;---------------------------;
;    Dragon Claw by Reu     ;
; http://www.reubenkee.com/ ;
;---------------------------;

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

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

[Velocity]
walk.fwd = 2.4
walk.back = -2.2
run.fwd = 10, 0
run.back = -5.5, -3.6
jump.neu = 0, -9.5
jump.back = -3.4
jump.fwd = 3.4
runjump.back = -2.55, -8.1
runjump.fwd = 6, -8.1
airjump.neu = 0, -8.1
airjump.back = -3.4
airjump.fwd = 3.4

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = 0.44
stand.friction = 0.85
crouch.friction = 0.82
stand.friction.threshold = 1.0
crouch.friction.threshold = 1.0
air.gethit.groundlevel = 25
air.gethit.groundrecover.ground.threshold = -20
air.gethit.groundrecover.groundlevel = 10
air.gethit.airrecover.threshold = -1
air.gethit.airrecover.yaccel = 0.35
air.gethit.trip.groundlevel = 15
down.bounce.offset = 0, 20
down.bounce.yaccel = 0.4
down.bounce.groundlevel = 12
down.friction.threshold = 0.5

[Quotes]
victory1 = "........."

;==============================================================================================
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0, 0

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


;==============================================================================================
[Statedef 180]
type = S

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

[State 180]
type = changestate
trigger1 = command="hold_x" || command="hold_y" || command="hold_z"
value = 181

[State 180]
type = changestate
trigger1 = command="hold_a" || command="hold_b" || command="hold_c"
value = 182

[State 3]
type = ChangeState
trigger1 = 1
value = ifelse(random<500, 181, 182)


;==============================================================================================
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0, 0

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

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

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 9
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8181
ownpal = 1


;==============================================================================================
[Statedef 8181]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8181
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -25, -80
random = 120, 50
sprpriority = -1
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -25, -80
random = 120, 50
sprpriority = -1
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -25, -80
random = 120, 50
sprpriority = -1
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -25, -80
random = 120, 50
sprpriority = -1
ownpal = 1
accel = 0.02, -0.05


;==============================================================================================
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0, 0

[State 1]
type = PlaySnd
trigger1 = time = 0
value = 800, 20

[State 1]
type = PlaySnd
trigger1 = animelem = 12
value = 0, 9

[State 1]
type = PlaySnd
trigger1 = animelem = 12
value = 800, 31

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

[State FireB]
type = Explod
trigger1 = animelem = 6
ignorehitpause = 1
anim = 8182
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1


;==============================================================================================
[Statedef 190]
type = S
ctrl = 0

[State 3]
type = ChangeState
trigger1 = 1
value = ifelse(random<500, 192, 193)


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

[State specialintrounavailable]
type=varset
trigger1 = !time
var(0)=0

[State 1]
type = PlaySnd
trigger1 = time = 0
trigger2 = time < 100
trigger2 = timemod = 39, 38
value = 800, 20

[State FireB]
type = Explod
trigger1 = time = 0
trigger2 = time < 100
trigger2 = timemod = 19, 18
ignorehitpause = 1
anim = 192
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = animelem = 15
ignorehitpause = 1
anim = 191
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 1]
type = PlaySnd
trigger1 = animelem = 15
value = 800, 31
freqmul = 1.1

[State 1]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 31

[State 1]
type = PlaySnd
trigger1 = animelem = 16
value = 0, 6
freqmul = 0.8

[State 1]
type = PlaySnd
trigger1 = animtime = 0
value = 0, 7
freqmul = 0.8

[State 1]
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

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

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0


;==============================================================================================
[Statedef 193]
type = S
ctrl = 0
anim = 193
velset = 0, 0

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

[State 3]
type = Changeanim
trigger1 = roundstate = 0
value = 193

[State specialintrounavailable]
type=varset
trigger1 = !time
var(0)=0

[State 1]
type = PlaySnd
trigger1 = time = 3
value = 800, 19

[State 1]
type = PlaySnd
trigger1 = time = 0
trigger2 = time < 100
trigger2 = timemod = 39, 38
value = 6, 7

[State FireB]
type = Explod
trigger1 = time = 0
trigger2 = time < 100
trigger2 = timemod = 29, 28
ignorehitpause = 1
anim = 194
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = animelem = 2
ignorehitpause = 1
anim = 8194
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0


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

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 196]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8000
sprpriority = 3

[State bind]
type = varset
trigger1 = time= 0
v = 1
value = 4

[State bind2]
type = varset
trigger1 = time= 0
v = 2
value = 0

[State bind]
type = varadd
trigger1 = 1
v = 1
value = 1

[State bind1]
type = varset
trigger1 = var(1) >= 10
v = 2
value = Ifelse(var(2) , 0, 1)

[State bind3]
type = varset
trigger1 = var(1) >= 10
v = 1
value = 0

[State bind]
type = Veladd
trigger1 = var(2) = 1
x = 2

[State bind]
type = Veladd
trigger1 = var(2) = 0
x = -2

[State bind]
type = Veladd
trigger1 = var(2) = 1
y = 1

[State bind]
type = Veladd
trigger1 = var(2) = 0
y = -1

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 600


;==============================================================================================
[Statedef 1400]
type = S
movetype= I
physics = S
ctrl = 0
anim = 1400
sprpriority = 2

[State particles]
type = Helper
triggerall = numhelper(777) < 1
trigger1 = time = 30
ignorehitpause = 1
persistent = 0
helpertype = normal
name = "dot"
id = 777
pos = 0, -65
postype = p1
stateno =40001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State varset] 
type = varset
trigger1 = time = 0
v = 24
value = 0

[State varset] 
type = varadd
trigger1 = power >= 3000
v = 24
value = 1

[State varset] 
type = varadd
trigger1 = var(24) = 100
v = 23
value = 1200

[State 5]
type = PalFX
trigger1 = var(24) = 100
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State 5]
type = PalFX
trigger1 = power = 3000
persistent = 0
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State FireB]
type = Explod
triggerall = anim != 1401
trigger1 = time > 25
trigger1 = timemod = 8, 7
ignorehitpause = 1
id = 2121
anim = 2123
postype = p1
pos = 50, -70
random = 30, 5
sprpriority = 4
ownpal = 1
accel = 0, -0.02
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
triggerall = anim != 1401
trigger1 = time > 25
trigger1 = timemod = 8, 7
ignorehitpause = 1
id = 2121
anim = 2123
postype = p1
pos = -42, -70
random = 30, 5
sprpriority = 4
ownpal = 1
accel = 0, -0.02
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time = 18
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.3
postype = p1
pos = 0, 1
sprpriority = -2
ownpal = 1
accel = 0, 0
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time = 18
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 1, 0.3
postype = p1
pos = 0, 1
sprpriority = 2
ownpal = 1
accel = 0, 0
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time = 3
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 5, -50
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 5]
type = EnvShake
trigger1 = time = 20
persistent = 0
time = 20
ampl = -2
freq = 100
phase = 15

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*time), 1.2 - (.08*time)

[State 1]
type = PlaySnd
trigger1 = time = 5
value = 800, 19

[State 1]
type = PlaySnd
trigger1 = time > 80
trigger1 = (GameTime%85) = 0 
value = 800, 20

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [0, 10]
value = 3

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [10, 20]
value = 10

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [20, 30]
value = 20

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [30, 40]
value = 30

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [40, 50]
value = 40

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time = [50, 60]
value = 50

[State 1]
type = poweradd
trigger1 = (GameTime%5) = 0 
trigger1 = time > 60
value = 60

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = 0, 100

[State FireB]
type = Explod
trigger1 = time > 20
trigger1 = (GameTime%18) = 0 
ignorehitpause = 1
id = 6030
anim = 6030
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
accel = 0, -0.005
removeongethit = 1
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time > 6
trigger1 = (GameTime%17) = 0 
trigger1 = var(12) > 50
ignorehitpause = 1
id = 6041
anim = 6041
postype = p1
pos = 2, 2
sprpriority = 3
ownpal = 1
accel = 0, -0.005
removeongethit = 1
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time > 6
trigger1 = (GameTime%17) = 0 
trigger1 = var(12) <= 50
ignorehitpause = 1
id = 6042
anim = 6042
postype = p1
pos = 2, 2
sprpriority = 3
ownpal = 1
accel = 0, -0.005
removeongethit = 1
pausemovetime = 999999
supermovetime = 999999

[State FireB]
type = Explod
trigger1 = time = 20
trigger2 = time > 20
trigger2 = (GameTime%30) = 0 
ignorehitpause = 1
id = 6040
anim = 6040
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
removeongethit = 1
pausemovetime = 999999
supermovetime = 999999

[State 7]
type = Removeexplod
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
id = 6030

[State 7]
type = Removeexplod
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
id = 6020

[State 7]
type = Removeexplod
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
id = 6040

[State 7]
type = Removeexplod
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
id = 6041

[State 7]
type = Removeexplod
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel 
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
id = 6042

[State 7]
type = ChangeAnim
trigger1 = command != "hold_y" && !AILevel
trigger2 = command != "hold_b" && !AILevel
trigger3 = AILevel && p2movetype != I
trigger4 = AILevel && p2bodydist x < 100
trigger5 = var(24) = 100
trigger6 = power >= 3000 && AILevel
value = 1401
persistent = 0

[State 7]
type = ChangeState
trigger1 = anim = 1401 && animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 200]
type = S
movetype = A
physics = S
juggle = 1
ctrl = 0
poweradd = (Var(23)=0) * 20
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8200
ownpal = 1

[State 1]
type = veladd
trigger1 = time = 0
x = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 3
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 200

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -76)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15000
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 1]
type = HitDef
trigger1 = animelem = 4 && time >= 2
attr = S, NA
damage = 20, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0, 12
sparkno = -1
sparkxy = -10, -76
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -4
airguard.velocity = -1.9, -0.8
air.type = High
air.velocity = -1.4, 1
air.hittime = 12
getpower = (Var(23)=0) * 20 

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

[State Idle]
type = statetypeset
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 7]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8200]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8200
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 60, -70
random = 40, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 200
value = 9999

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205


;==============================================================================================
[Statedef 205]
type = S
movetype = A
physics = S
juggle = 1
ctrl = 0
poweradd = (Var(23)=0) * 20
sprpriority = 2

[State 1]
type = veladd
trigger1 = time = 0
x = 2

[State hadouken hit helper]
type = Helper
trigger1 = time = 3
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8205
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 7
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 205

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -76)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 1]
type = HitDef
trigger1 = animelem = 8 && time >= 2
attr = S, NA
damage = 20, 0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 0, 12
sparkno = -1
sparkxy = -10, -60
hitsound = S5, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -4
airguard.velocity = -1.9, -0.8
air.type = High
air.velocity = -1.4, 1
air.hittime = 12
getpower = (Var(23)=0) * 20 

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

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0 && (movecontact != [1, 12])
movetype = I

[State 7]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8205]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8205
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [7, 12]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 60, -65
random = 60, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 2]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -40
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [2, 7]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -40
random = 30, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 205
value = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205 && parent, stateno != 206


;==============================================================================================
[Statedef 206]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = -1

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8206
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(7) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 206

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
trigger1 = prevstateno = 0
value = 206
elem = 4

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 1]
type = Veladd
trigger1 = time = 0
x = 2

[State 1]
type = posadd
trigger1 = time = 0 && prevstateno = 205
x = 14

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

[State 1]
type = PlaySnd
trigger1 = animelem = 12
value = 0, 7

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -70)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelemtime(7) = 1 && time >= 2
attr = S, NA
animtype = Medium
damage = 20
guardflag = MA
pausetime = 0, 4
sparkno = -1
sparkxy = -10, -70
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -2.5
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 20 

[State 2]
type = HitDef
trigger1 = animelem = 13
attr = S, NA
animtype = Medium
damage = 20
guardflag = MA
pausetime = 0, 9
sparkno = -1
sparkxy = -10, -60
hitsound = S5, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 20 

[State 4]
type = sprpriority
trigger1 = animelem = 5
value = 2

[State Idle]
type = statetypeset
trigger1 = animelemtime(14) >= 0 && (movecontact != [1, 12])
movetype = I

[State 5]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8206]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8206
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 8]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -55
random = 70, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [8, 13]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -10, -95
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [13, 16]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -85
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [16, 19]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 90, -70
random = 30, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 206
value = 9999

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205 && parent, stateno != 206 && parent, stateno != 207


;==============================================================================================
[Statedef 207]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = -1

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8207
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 7
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 207

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 1]
type = posadd
trigger1 = time = 0 && prevstateno = 206
x = 32

[State 1]
type = posadd
trigger1 = animelem = 2
x = 6

[State 1]
type = posadd
trigger1 = animelem = 3
x = 8

[State 1]
type = posadd
trigger1 = animelem = 4
x = 10

[State 1]
type = posadd
trigger1 = animelem = 5
x = 9

[State 1]
type = posadd
trigger1 = animelem = 6
x = 9

[State 1]
type = posadd
trigger1 = animelem = 7
x = 9

[State 1]
type = posadd
trigger1 = animelem = 8
x = 4

[State 1]
type = posadd
trigger1 = animelem = 13
x = -4

[State 1]
type = posadd
trigger1 = animelem = 14
x = -8

[State 1]
type = posadd
trigger1 = animelem = 15
x = -12

[State 1]
type = posadd
trigger1 = animelem = 16
x = -12

[State 1]
type = posadd
trigger1 = animelem = 17
x = -12

[State 1]
type = posadd
trigger1 = animtime = 0
x = -25

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -70)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 8 && time >= 2
attr = S, NA
animtype = Medium
damage = 40
guardflag = MA
pausetime = 0, 9
sparkno = -1
sparkxy = -10, -80
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -6
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 40 

[State 4]
type = sprpriority
trigger1 = animelem = 5
value = 2

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0 && (movecontact != [1, 12])
movetype = I

[State 5]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8207]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8207
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -20, -95
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [5, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -85
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [10, 15]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -45
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 207
value = 9999

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205 && parent, stateno != 206 && parent, stateno != 207 && parent, stateno != 210


;==============================================================================================
[Statedef 210]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = -1

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8210
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 10
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 210

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 1]
type = Veladd
trigger1 = time = 0
x = 5

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

[State 1]
type = PlaySnd
trigger1 = animelem = 15
value = 0, 8

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -70)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 11 && time >= 2
attr = S, NA
animtype = Medium
damage = 20
guardflag = MA
pausetime = 0, 6
sparkno = -1
sparkxy = 10, -50
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 20 

[State 2]
type = HitDef
trigger1 = animelem = 17
attr = S, NA
animtype = Hard
damage = 40
guardflag = MA
pausetime = 0, 12
sparkno = -1
sparkxy = -10, -70
hitsound = S5, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -10
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 20 

[State 3]
type = ChangeAnim
trigger1 = animelemTime(5) > 0 && animelemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

[State 4]
type = sprpriority
trigger1 = animelem = 5
value = 2

[State Idle]
type = statetypeset
trigger1 = animelemtime(18) >= 0 && (movecontact != [1, 12])
movetype = I

[State 5]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8210]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8210
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -65
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [5, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 70, -65
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [8, 13]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -20, -50
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [13, 18]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 70, -65
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 210
value = 9999

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205 && parent, stateno != 206 && parent, stateno != 207 && parent, stateno != 210 && parent, stateno != 211


;==============================================================================================
[Statedef 211]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = -1

[State counter hit counter]
type = Veladd
trigger1 = time = 0
x = 8

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8211
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 6
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 211

[State Width]
type = Width
trigger1 = 1
value = 15, 0

[State 1]
type = posadd
trigger1 = time = 0 && prevstateno = 210
x = 20

[State 1]
type = posadd
trigger1 = animelem = 2
x = 6

[State 1]
type = posadd
trigger1 = animelem = 3
x = 8

[State 1]
type = posadd
trigger1 = animelem = 4
x = 10

[State 1]
type = posadd
trigger1 = animelem = 5
x = 9

[State 1]
type = posadd
trigger1 = animelem = 6
x = 9

[State 1]
type = posadd
trigger1 = animelem = 7
x = 9

[State 1]
type = posadd
trigger1 = animelem = 12
x = -5

[State 1]
type = posadd
trigger1 = animelem = 13
x = -13

[State 1]
type = posadd
trigger1 = animelem = 14
x = -13

[State 1]
type = posadd
trigger1 = animelem = 15
x = -12

[State 1]
type = posadd
trigger1 = animelem = 16
x = -12

[State 1]
type = posadd
trigger1 = animelem = 17
x = -12

[State 1]
type = posadd
trigger1 = animtime = 0
x = -8

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -70)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 7 && time >= 4
attr = S, NA
animtype = Hard
damage = 60
guardflag = MA
pausetime = 0, 16
sparkno = -1
sparkxy = -10, -50
hitsound = S5, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -10
air.velocity = -2.5, 1
getpower = (Var(23)=0) * 40 
forcestand = 1

[State 4]
type = sprpriority
trigger1 = animelem = 5
value = 2

[State Idle]
type = statetypeset
trigger1 = animelemtime(8) >= 0 && (movecontact != [1, 12])
movetype = I

[State 5]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 8211]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8211
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [15, 20]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -10, -95
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [13, 15]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 60, -85
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 13]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -45
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 211
value = 9999

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H
trigger3 = parent, stateno != 200 && parent, stateno != 205 && parent, stateno != 206 && parent, stateno != 207 && parent, stateno != 210 && parent, stateno != 211


;==============================================================================================
[Statedef 230]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = -1

[State counter hit counter]
type = Varset
trigger1 = time = 0
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(5) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 220

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -37)

[State 2]
type = HitDef
trigger1 = animelemtime(5) = 1 && time >= 4
attr = S, NA
animtype = Medium
priority = 4, Hit
damage = 20
guardflag = MA
pausetime = 12, 12
sparkno = 0
sparkxy = -10, -37
hitsound = S6, 2
guardsound = S0, 100
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5
air.velocity = -2.5, -1
p1sprpriority = -1
getpower = (Var(23)=0) * 20 

[State 1]
type = veladd
trigger1 = time = 0
x = 1

[State 1]
type = posadd
trigger1 = animelem = 1
x = 1

[State 1]
type = posadd
trigger1 = animelem = 2
x = 1

[State 1]
type = posadd
trigger1 = animelem = 3
x = 1

[State 1]
type = posadd
trigger1 = animelem = 4
x = 1

[State 1]
type = posadd
trigger1 = animelem = 5
x = 1

[State 1]
type = posadd
trigger1 = animelem = 7
x = 2

[State 1]
type = posadd
trigger1 = animelem = 8
x = 2

[State 1]
type = posadd
trigger1 = animelem = 9
x = 2

[State 1]
type = posadd
trigger1 = animelem = 10
x = 2

[State 1]
type = posadd
trigger1 = animtime = 0
x = 12

[State Idle]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 235]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = -1

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 1
v = 13
value = 1

[State Shadows]
type = Afterimage
trigger1 = time = 0 && var(13) = 2
length = 21
PalBright = 1, 1, 1
PalContrast = 108, 108, 108
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 2
Trans = Add
time = 9999

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(5) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno = 230
trigger1 = (time = 0) && (prevstateno != 4999)
value = 221

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno != 230
trigger1 = (time = 0) && (prevstateno != 4999)
value = 222

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -77)

[State 1]
type = veladd
trigger1 = time = 0
x = 4

[State 2]
type = HitDef
trigger1 = animelemtime(5) = 1 && time >= 4
attr = S, NA
animtype = Medium
damage = 20
guardflag = MA
pausetime = 12, 12
sparkno = 0
sparkxy = -10, -85
hitsound = S6, 2	
guardsound = S0, 100
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -3
air.velocity = -2.5, -1
p1sprpriority = -1
getpower = (Var(23)=0) * 20 

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -77)

[State 1]
type = posadd
trigger1 = animelem = 1
x = 2

[State 1]
type = posadd
trigger1 = animelem = 2
x = 2

[State 1]
type = posadd
trigger1 = animelem = 3
x = 2

[State 1]
type = posadd
trigger1 = animelem = 4
x = 2

[State 1]
type = posadd
trigger1 = animelem = 5
x = 2

[State 1]
type = posadd
trigger1 = animelem = 6
x = 2

[State 1]
type = posadd
trigger1 = animelem = 8
x = 2

[State 1]
type = posadd
trigger1 = animelem = 9
x = 2

[State 1]
type = posadd
trigger1 = animelem = 10
x = 2

[State 1]
type = posadd
trigger1 = animelem = 11
x = 2

[State 1]
type = posadd
trigger1 = animtime = 0
x = 12

[State Idle]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 236]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 2
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(7) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno = 235
trigger1 = (time = 0) && (prevstateno != 4999)
value = 232

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno != 235
trigger1 = (time = 0) && (prevstateno != 4999)
value = 231

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -77)

[State 1]
type = posadd
trigger1 = animelem = 3
x = 10

[State 1]
type = posadd
trigger1 = animelem = 4
x = 10

[State 1]
type = posadd
trigger1 = animelem = 5
x = 6

[State 1]
type = posadd
trigger1 = animelem = 6
x = 8

[State 1]
type = posadd
trigger1 = animelem = 7
x = 8

[State 1]
type = posadd
trigger1 = animelem = 8
x = 3

[State 1]
type = velset
trigger1 = time = 12
x = 1.5

[State 1]
type = posadd
trigger1 = animelem = 13
x = 7

[State 1]
type = posadd
trigger1 = animelem = 14
x = 7

[State 1]
type = posadd
trigger1 = animelem = 15
x = 7

[State 1]
type = posadd
trigger1 = animelem = 16
x = 7

[State 1]
type = posadd
trigger1 = animelem = 17
x = 7

[State 1]
type = posadd
trigger1 = animtime = 0
x = 22

[State 2]
type = HitDef
trigger1 = animelemtime(7) = 1 && time >= 4
attr = S, NA
animtype = Medium
priority = 4, Hit
damage = 40
guardflag = MA
pausetime = 12, 12
sparkno = 0
sparkxy = -10, -77
hitsound = S6, 3
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -8
air.velocity = -2.5, -1
getpower = (Var(23)=0) * 40 

[State Idle]
type = statetypeset
trigger1 = animelemtime(8) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 237]
type = S
movetype = A
physics = N
juggle = 4
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 3
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(13) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno = 236
trigger1 = (time = 0) && (prevstateno != 4999)
value = 234

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno != 236
trigger1 = (time = 0) && (prevstateno != 4999)
value = 233

[State 1]
type = PlaySnd
trigger1 = time = 0 && prevstateno = 236
value = 0, 3

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

[State 1]
type = PlaySnd
trigger1 = time = 12
value = 0, 2

[State 1]
type = PlaySnd
trigger1 = time = 20 && prevstateno != 236
value = 0, 3

[State 1]
type = posadd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
trigger11 = animelem = 16
trigger12 = animelem = 17
trigger13 = animelem = 18
x = 7

[State 1]
type = velset
trigger1 = time = 18
x = 2

[State 1]
type = velmul
trigger1 = time > 25
x = 0.68

[State 1]
type = velmul
trigger1 = time = [0, 10]
x = 0.68

[State 1]
type = posadd
trigger1 = animelem = 11
trigger2 = animelem = 12
trigger3 = animelem = 13
trigger4 = animelem = 14
x = 4

[State 1]
type = posadd
trigger1 = animelem = 19
trigger2 = animelem = 20
trigger3 = animelem = 21
trigger4 = animelem = 22
trigger5 = animelem = 23
trigger6 = animelem = 34
x = 7

[State 1]
type = posadd
trigger1 = animtime = 0
x = 8

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -77)

[State 2]
type = HitDef
trigger1 = animelemtime(13) = 1 && time >= 4
attr = S, NA
animtype = Medium
priority = 4, Hit
damage = 40
guardflag = MA
pausetime = 14, 14
sparkno = 0
sparkxy = -10, -77
hitsound = S6, 4
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -9
air.velocity = -9, -1
getpower = (Var(23)=0) * 40 

[State Idle]
type = statetypeset
trigger1 = animelemtime(14) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 240]
type = S
movetype = A
physics = S
juggle = 5
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 4
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(10) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno = 237
trigger1 = (time = 0) && (prevstateno != 4999)
value = 239

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno != 237
trigger1 = (time = 0) && (prevstateno != 4999)
value = 238

[State 1]
type = posadd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 6
trigger6 = animelem = 7
trigger7 = animelem = 8
trigger8 = animelem = 9
trigger9 = animelem = 10
trigger10 = animelem = 18
trigger11 = animelem = 19
trigger12 = animelem = 20
x = 5

[State 1]
type = posadd
triggerall = anim = 238
trigger1 = animelem = 4
x = 19

[State 1]
type = posadd
trigger1 = animtime = 0
x = 17

[State 1]
type = PlaySnd
trigger1 = time = 5
value = 0, 3

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -78)

[State 2]
type = HitDef
trigger1 = animelemtime(10) = 1 && time >= 4
attr = S, NA
animtype = Hard
damage = 60
guardflag = MA
pausetime = 15, 15
sparkno = 2
sparkxy = -10, -78
hitsound = S6, 4
guardsound = S0, 100
ground.type = High
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -14
air.velocity = -14.2, -1
getpower = (Var(23)=0) * 40 

[State Idle]
type = statetypeset
trigger1 = animelemtime(11) >= 0
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 241]
type = S
movetype = A
physics = N
juggle = 4
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 5
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State Width]
type = Width
trigger1 = (animelemTime (2) >= 0) && (animelemTime (7) < 0)
value = 15, 0

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(11) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno = 240
trigger1 = (time = 0) && (prevstateno != 4999)
value = 242

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = prevstateno != 240
trigger1 = (time = 0) && (prevstateno != 4999)
value = 241

[State 1]
type = PlaySnd
trigger1 = time = 0 && prevstateno = 236
value = 0, 3

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

[State 1]
type = PlaySnd
trigger1 = time = 10
value = 0, 3

[State 1]
type = PlaySnd
trigger1 = time = 20
value = 0, 2

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

[State 1]
type = posadd
trigger1 = animelem = 1
trigger2 = animelem = 2
trigger3 = animelem = 3
trigger4 = animelem = 4
trigger5 = animelem = 5
trigger6 = animelem = 6
trigger7 = animelem = 7
trigger8 = animelem = 8
trigger9 = animelem = 9
trigger10 = animelem = 10
x = 7

[State 1]
type = velset
trigger1 = time = 18
x = 2

[State 1]
type = velmul
trigger1 = time > 25
x = 0.68

[State 1]
type = velmul
trigger1 = time = [0, 10]
x = 0.68

[State 1]
type = posadd
trigger1 = animelem = 11
trigger2 = animelem = 12
trigger3 = animelem = 13
trigger4 = animelem = 14
x = 4

[State 1]
type = posadd
trigger1 = animelem = 19
trigger2 = animelem = 20
trigger3 = animelem = 21
trigger4 = animelem = 22
trigger5 = animelem = 23
trigger6 = animelem = 34
x = 7

[State 1]
type = posadd
trigger1 = animtime = 0
x = 8

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -72)

[State 2]
type = HitDef
trigger1 = animelemtime(11) = 1 && time >= 4
attr = S, NA
animtype = Hard
priority = 4, Hit
damage = 25
guardflag = MA
pausetime = 7, 7
sparkno = 0
sparkxy = -10, -72
hitsound = S6, 3
guardsound = S0, 100
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -6
air.velocity = -2.5, -1
getpower = (Var(23)=0) * 20 

[State 2]
type = HitDef
trigger1 = animelem = 15
attr = S, NA
animtype = Hard
priority = 4, Hit
damage = 35
guardflag = MA
pausetime = 15, 15
sparkno = 0
sparkxy = -10, -80
hitsound = S6, 4
guardsound = S0, 100
ground.type = High
ground.slidetime = 22
ground.hittime = 22
ground.velocity = -16
air.velocity = -16, -1
getpower = (Var(23)=0) * 20 

[State Idle]
type = statetypeset
trigger1 = animelemtime(16) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 250]
type = S
movetype = A
physics = N
juggle = 4
poweradd = (Var(23)=0) * 22
anim = 250
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 1
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 1]
type = PlaySnd
trigger1 = time = 5
value = 0, 3

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -37)

[State 2]
type = HitDef
trigger1 = animelem = 8
attr = C, NA
animtype = Medium
priority = 4, Hit
damage = 30
guardflag = L
pausetime = 12, 12
sparkno = 0
sparkxy = -10, -67
hitsound = S6, 3
guardsound = S0, 100
ground.type = Low
ground.slidetime = 14
ground.hittime = 14
ground.velocity = -5
air.velocity = -5, -1
getpower = (Var(23)=0) * 20 

[State 1]
type = velset
trigger1 = animelem = 5
x = 3

[State 1]
type = velset
trigger1 = time = 19
x = 0

[State 1]
type = posadd
trigger1 = animelem = 1
x = 10

[State 1]
type = posadd
trigger1 = animelem = 2
x = 10

[State 1]
type = posadd
trigger1 = animelem = 3
x = 10

[State 1]
type = posadd
trigger1 = animelem = 4
x = 15

[State 1]
type = posadd
trigger1 = animelem = 5
x = 20

[State 1]
type = posadd
trigger1 = animelem = 12
trigger2 = animelem = 13
trigger3 = animelem = 14
trigger4 = animelem = 15
x = 7

[State 1]
type = posadd
trigger1 = animtime = 0
x = 12

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 251]
type = S
movetype = A
physics = S
juggle = 4
poweradd = (Var(23)=0) * 22
anim = 251
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 7
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 1]
type = PlaySnd
trigger1 = time = 5
value = 0, 3

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -37)

[State 2]
type = HitDef
trigger1 = animelem = 8
attr = S, NA
animtype = Medium
priority = 4, Hit
damage = 30
guardflag = L
pausetime = 12, 12
sparkno = 0
sparkxy = -10, -27
hitsound = S6, 4
guardsound = S0, 100
ground.type = Trip
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -0.5, -7
air.velocity = -0.5, -7
fall = 1
air.fall = 1
fall.recover = 0
getpower = (Var(23)=0) * 20 

[State 1]
type = velmul
trigger1 = time > 21
x = 0.68

[State 1]
type = posadd
trigger1 = animelem = 1
x = 3

[State 1]
type = posadd
trigger1 = animelem = 2
x = 3

[State 1]
type = posadd
trigger1 = animelem = 3
x = 3

[State 1]
type = posadd
trigger1 = animelem = 4
x = 3

[State 1]
type = posadd
trigger1 = animelem = 5
x = 3

[State 1]
type = posadd
trigger1 = animtime = 0
x = 12

[State 3]
type = ChangeState
trigger1 = Animtime = 0
trigger1 = AILevel && var(32) = 1
trigger1 = random < (1000 * (AIlevel ** 2 / 64.0))
value = 1120
ctrl = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 252]
type = A
movetype = A
physics = N
juggle = 4
poweradd = (Var(23)=0) * 22
anim = 252
ctrl = 0
sprpriority = 2

[State counter hit counter]
type = Varadd
trigger1 = time = 0 && var(13) = 8
v = 13
value = 1

[State 1]
type = AfterImageTime
trigger1 = animtime = 0 
trigger2 = movecontact = 1
time = 0

[State counter hit counter]
type = Varset
trigger1 = animtime = 0
v = 13
value = 0

[State 1]
type = PlaySnd
trigger1 = time = 5
value = 0, 3

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -37)

[State Slow Motion]
type = Pause 
triggerall = roundstate = 2 && p2life > 0
trigger1 = time = [20, 44]
time = 2
movetime = 1
ignorehitpause = 1

[State Throw Sound]
type = PlaySnd
trigger1 = time = 20
value = 800, 0

[State red fadeout]
type = BGPalFx
trigger1 = time = 20
add = 100, 100, 100
mul = 300, 300, 300
sinadd = -100, -100, -100, 340
time = 48
ignorehitpause = 1

[State 2]
type = HitDef
trigger1 = animelem = 23
attr = S, NA
animtype = Medium
priority = 4, Hit
damage = 100
guardflag = HA
pausetime = 35, 35
sparkno = 0
sparkxy = -10, -52
hitsound = S6, 4
guardsound = S0, 100
ground.type = Trip
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -15, 50
air.velocity = -15, 50
fall.envshake.time = 15
fall.envshake.freq = 150
fall.envshake.ampl = -20
fall.envshake.phase = 15
getpower = (Var(23)=0) * 20 
fall.recover = 0
fall.recovertime = 120

[State 5]
type = EnvShake
trigger1 = movehit = 1
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State 1]
type = velset
trigger1 = animelem = 10
x = 0.5
y = -3

[State 1]
type = veladd
trigger1 = time = [15, 50]
y = 0.175

[State 1]
type = velset
trigger1 = time = 51
y = 0

[State 1]
type = posset
trigger1 = time >= 51
y = 0

[State 1]
type = velmul
trigger1 = time > 52
x = 0.58

[State 1]
type = posadd
trigger1 = animelem = 1
x = 3

[State 1]
type = posadd
trigger1 = animelem = 2
x = 3

[State 1]
type = posadd
trigger1 = animelem = 3
x = 3

[State 1]
type = posadd
trigger1 = animelem = 4
x = 3

[State 1]
type = posadd
trigger1 = animelem = 5
x = 3

[State 1]
type = posadd
trigger1 = animtime = 0
x = 12

[State Idle]
type = statetypeset
trigger1 = animelemtime(24) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 400]
type = C
movetype = A
physics = C
juggle = 5
poweradd = (Var(23)=0) * 15
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8400
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 400

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -42)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15000
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelemtime(4) = 1 && time >= 4
attr = C, NA
damage = 20
priority = 4, Hit
animtype = Light
hitflag = MAF
guardflag = MA
pausetime = 0, 5
sparkno = -1
sparkxy = -10, -42
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 8
ground.hittime = 8
ground.velocity = -4
air.velocity = -1.5, -1
getpower = (Var(23)=0) * 20 

[State Idle]
type = statetypeset
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 8400]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8400
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 4]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 17, -75
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [4, 8]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 65, -50
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 400
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 400
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 410]
type = C
movetype = A
physics = C
juggle = 6
poweradd = (Var(23)=0) * 50
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8410
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(10) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 410

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelemtime(10) = 1 && time >= 4
attr = C, NA
damage = 40
animtype = Medium
hitflag = MAF
guardflag = MA
pausetime = 0, 12
sparkno = -1
sparkxy = -10, -55
hitsound = S5, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5, 0
air.velocity = -5, -1
getpower = (Var(23)=0) * 40 
forcestand = 1

[State particles]
type = Helper
trigger1 = movehit = 1 && animelem = 4
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0
sparkno = -1

[State Idle]
type = statetypeset
trigger1 = animelemtime(11) >= 0 && (movecontact != [1, 12])
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 8410]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8410
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [5, 11]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 45, -75
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [3, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -32
random = 60, 15
sprpriority = 1
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 3]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -30, -65
random = 20, 40
sprpriority = 1
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 410
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 410
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 415]
type = C
movetype = A
physics = C
juggle = 6
poweradd = (Var(23)=0) * 50
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8415
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(11) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 415

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelemtime(11) = 1 && time >= 4
attr = C, NA
damage = 60
animtype = up
hitflag = MAF
guardflag = MA
pausetime = 12, 12
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1, -12
air.hittime = 15
air.velocity = -1, -5
fall = 1
fallanimtype = up
fall.recovertime = 65
getpower = (Var(23)=0) * 60 

[State Idle]
type = statetypeset
trigger1 = animelemtime(12) >= 0 && (movecontact != [1, 12])
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 8415]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8415
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [12, 18]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 65, -85
random = 60, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [7, 12]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 45, -45
random = 30, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [5, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 10, -15
random = 60, 25
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -40, -25
random = 20, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 415
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 415
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 430]
type = C
movetype = A
physics = C
juggle = 5
poweradd = (Var(23)=0) * 22
ctrl = 0
sprpriority = 2

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(5) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 430

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -8)

[State 2]
type = HitDef
trigger1 = animelemtime(5) = 1 && time >= 4
attr = C, NA
damage = 20
animtype = Light
hitflag = MAFD
guardflag = L
pausetime = 6, 6
sparkno = 0
sparkxy = -10, -8
hitsound = S6, 2
guardsound = S0, 100
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5
air.velocity = -2, -3
down.velocity = -1, -3
down.hittime = 20
getpower = (Var(23)=0) * 20 

[State Idle]
type = statetypeset
trigger1 = animelemtime(6) >= 0
movetype = I

[State 3]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 440]
type = C
movetype = A
physics = C
juggle = 7
poweradd = (Var(23)=0) * 70
ctrl = 0
sprpriority = 2

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(8) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 440

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -5) && (Var(3) := -10)

[State 3]
type = HitDef
trigger1 = animelemtime(8) = 1 && time >= 4
attr = C, NA
damage = 40
hitflag = MAFD
guardflag = L
pausetime = 8, 8
sparkno = 1
sparkxy = -10, -10
hitsound = S6, 3
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -1.5, 0
air.velocity = -1.2, -3
guard.velocity = -5
fall = 0
getpower = (Var(23)=0) * 40 

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 450]
type = C
movetype = A
physics = C
poweradd = (Var(23)=0) * 70
ctrl = 0
sprpriority = 2

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(6) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 450

[State 1]
type = Posadd
trigger1 = animelem = 3
x = 10

[State 1]
type = Posadd
trigger1 = animelem = 4
x = 10

[State 1]
type = Posadd
trigger1 = animelem = 5
x = 10

[State 1]
type = Posadd
trigger1 = animelem = 6
x = 6

[State 1]
type = Posadd
trigger1 = animelem = 12
x = -3

[State 1]
type = Posadd
trigger1 = animelem = 13
x = -4

[State 1]
type = Posadd
trigger1 = animelem = 14
x = -5

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -5) && (Var(3) := -10)

[State 3]
type = HitDef
trigger1 = animelemtime(6) = 1 && time >= 4
attr = C, NA
damage = 80
hitflag = MAFD
guardflag = L
pausetime = 12, 12
sparkno = 1
sparkxy = -10, -25
hitsound = S6, 4
guardsound = S0, 100
ground.type = Trip
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -0.5, -2
air.velocity = -0.2, 1
guard.velocity = -5
fall = 1
getpower = (Var(23)=0) * 60 

[State Idle]
type = statetypeset
trigger1 = animelemtime(7) >= 0
movetype = I

[State 4]
type = ChangeState
trigger1 = Animtime = 0
value = 11
ctrl = 1


;==============================================================================================
[Statedef 600]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 11
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8600
ownpal = 1

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 600

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -58)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15000
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelemtime(4) = 1 && time >= 4
persistent = 0
attr = A, NA
damage = 20
guardflag = HA
priority = 4, Hit
pausetime = 8, 8
sparkno = -1
sparkxy = -10, -58
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 5
ground.hittime = 5
ground.velocity = -4
air.velocity = -1.3, (vel Y)
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)

[State Idle]
type = statetypeset
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 3]
type = CtrlSet
trigger1 = time = 17
value = 1


;==============================================================================================
[Statedef 8600]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8600
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 4]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -7, -95
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [4, 8]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 35, -70
random = 60, 20
sprpriority = 4
ownpal = 1
accel = -0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 600
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 600
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 605]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 11
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8605
ownpal = 1

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 7
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 605

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -58)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

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

[State 2]
type = HitDef
trigger1 = animelem = 8 && time >= 4
persistent = 0
attr = A, NA
damage = 40
guardflag = HA
priority = 4, Hit
pausetime = 8, 8
sparkno = -1
sparkxy = -10, -58
hitsound = S5, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 5
ground.hittime = 5
ground.velocity = -4
air.velocity = -1.3, (vel Y)
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)

[State Idle]
type = statetypeset
trigger1 = animelemtime(9) >= 0 && (movecontact != [1, 12])
movetype = I

[State 3]
type = CtrlSet
trigger1 = time = 19
value = 1


;==============================================================================================
[Statedef 8605]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8605
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [5, 11]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 45, -95
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 45, -45
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 605
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 605
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 610]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = 2

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "bladespark"
persistent = 0
pos = 0, 0
postype = p1
stateno = 8610
ownpal = 1

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(9) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 610

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 3]
type = HitDef
trigger1 = animelemtime(9) = 1 && time >= 4
persistent = 0
attr = A, NA
damage = 60
guardflag = HA
priority = 4, Hit
pausetime = 12, 12
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime = 17
ground.velocity = -6
air.velocity = -7, 9
air.fall = 1
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)
fall.recover = 1
fall.recovertime = 120

[State Idle]
type = statetypeset
trigger1 = animelemtime(10) >= 0 && (movecontact != [1, 12])
movetype = I


;==============================================================================================
[Statedef 8610]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8610
sprpriority = 3

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, 0
facing = 1

[State FireB]
type = Explod
trigger1 = time = [0, 5]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -10, -105
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [5, 10]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -75
random = 60, 30
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time = [8, 14]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 30, -45
random = 60, 20
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = Changeanim
trigger1 = parent, stateno != 610
value = 9999

[State 1]
type = AfterImageTime
trigger1 = parent, stateno != 610
time = 0

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 630]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 20
ctrl = 0
sprpriority = 2

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 630

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -5) && (Var(3) := -35)

[State 2]
type = HitDef
persistent = 0
trigger1 = animelemtime(4) = 1 && time >= 2
attr = A, NA
damage = 20
guardflag = HA
priority = 4, Hit
pausetime = 8, 8
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 2
guardsound = S0, 100
ground.type = High
ground.slidetime = 6
ground.hittime = 6
ground.velocity = -4
air.velocity = -2, (vel Y)
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)

[State Idle]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I

[State 3]
type = CtrlSet
trigger1 = time = 20
value = 1


;==============================================================================================
[Statedef 635]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 20
ctrl = 0
sprpriority = 2

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(7) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 635

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -5) && (Var(3) := -35)

[State 2]
type = HitDef
trigger1 = animelemtime(7) = 1 && time >= 2
persistent = 0
attr = A, NA
damage = 40
guardflag = HA
priority = 4, Hit
pausetime = 8, 8
sparkno = 1
sparkxy = -10, -70
hitsound = S6, 3
guardsound = S0, 100
ground.type = High
ground.slidetime = 6
ground.hittime = 6
ground.velocity = -4
air.velocity = -2, (vel Y)
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)

[State Idle]
type = statetypeset
trigger1 = animelemtime(8) >= 0
movetype = I

[State 3]
type = CtrlSet
trigger1 = time = 22
value = 1


;==============================================================================================
[Statedef 640]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = 2

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 9
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 641

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -40)

[State 3]
type = HitDef
trigger1 = animelem = 10
attr = A, NA
hitflag = MAFD
damage = 70
guardflag = HA
priority = 4, Hit
pausetime = 17, 17
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 4
guardsound = S0, 100
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -9
air.velocity = -10, 10
air.fall = 1
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)
fall.recover = 1
fall.recovertime = 120

[State Idle]
type = statetypeset
trigger1 = animelemtime(11) >= 0
movetype = I


;==============================================================================================
[Statedef 641]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = 2

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State 1]
type = veladd
trigger1 = movecontact = 1
y = -0.5
persistent = 0
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(9) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 640

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -40)

[State 3]
type = HitDef
trigger1 = animelemtime(9) = 1
attr = A, NA
hitflag = MAFD
damage = 70
guardflag = HA
priority = 4, Hit
pausetime = 17, 17
sparkno = 1
sparkxy = -10, -80
hitsound = S6, 4
guardsound = S0, 100
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -9
air.velocity = -9, ifelse(var(17) >= 12, 6, ifelse(var(17) <= 0, -6, var(17) - 6))
air.fall = 1
getpower = (Var(23)=0) * 20 
fall = (var(17) >= 10 && p2statetype != A)
fall.recover = 1
fall.recovertime = 120

[State Idle]
type = statetypeset
trigger1 = animelemtime(12) >= 0
movetype = I


;==============================================================================================
[Statedef 645]
type = A
movetype = A
physics = A
poweradd = (Var(23)=0) * 65
ctrl = 0
sprpriority = 2

[State 1]
type = velmul
trigger1 = movecontact = 1
trigger1 = prevstateno = 1003 || prevstateno = 1013 || prevstateno = 1023
x = 0.5
persistent = 0
ignorehitpause = 1

[State counter hit counter]
type = Varadd
trigger1 = time = 0
v = 10
value = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelemtime(4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 645

[State 1]
type = Changestate
trigger1 = movecontact = 1
trigger2 = time = 0
trigger2 = prevstateno = 4999
value = 646

[State 1]
type = veladd
trigger1 = time = 0
y = 1

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

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := 0)

[State 3]
type = HitDef
trigger1 = animelemtime(4) = 1 && time >= 2
attr = A, NA
damage = 30
hitflag = MAFD
guardflag = HA
priority = 4, Hit
pausetime = 12, 12
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 3
guardsound = S0, 100
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime = 15
air.hittime = 20
ground.velocity = -5
air.velocity = -4, -4
air.fall = 1
fall.recover = 0
down.velocity = 0, 0
getpower = (Var(23)=0) * 20 

[State Idle]
type = statetypeset
trigger1 = animelemtime(5) >= 0
movetype = I


;==============================================================================================
[Statedef 646]
type = A
movetype = I
physics = A
velset = 1.3 * vel x, -6

[State 1]
type = Changeanim
trigger1 = time = 0
persistent = 0
value = 645
elem = 5

[State 1]
type = CtrlSet
trigger1 = time = 8
value = 1


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

[State Do Not Guard]
type = attackdist
trigger1 = 1
value = 0

[State Tech]
type = varset
trigger1 = 1
var(27) = 0

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

[State 1]
type = HitDef
trigger1 = !var(39)
trigger1 = animelem = 2
trigger1 = p2dist x >= 0 && P2Bodydist x <= 20
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 810
p2stateno = 820
guard.dist = 0
fall = 1
numhits = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(3) >= 0
movetype = I

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 810]
type = S
movetype = A
physics = N
anim = 810
poweradd = (Var(23)=0) * 60

[State Tech]
type = changestate
trigger1 = numtarget && var(27) > 0
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "b" || target, command = "c" || target, command = "y" || target, command = "z")
value = 990

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State HitCountAdd]
type = posadd
trigger1 = time < 49
x = p2bodydist x

[State Throw Sound]
type = PlaySnd
trigger1 = animelem = 8
value = 800, 0

[State red fadeout]
type = BGPalFx
trigger1 = animelem = 8
add = 100, 100, 100
mul = 300, 300, 300
sinadd = -100, -100, -100, 340
time = 47
ignorehitpause = 1

[State Slow Motion]
type = Pause 
triggerall = (GameTime%3) = 0 && roundstate = 2 && p2life > 0
trigger1 = time = [16, 44]
time = 1
movetime = 0
ignorehitpause = 1

[State 2]
type = HitDef
trigger1 = animelem = 25
attr = S, NA
animtype = Up
damage = 83
guardflag = MA
pausetime = 0, 0
sparkno = 2
sparkxy = -10, -78
hitsound = S6, 4
guardsound = S0, 100
ground.type = High
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -0.5, -13
air.velocity = -0.5, -12

[State Bind 11]
type = TargetDrop
trigger1 = animelem = 26

[State Grab Sound]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State HitCountAdd]
type = velset
trigger1 = animelem = 25
x = -3

[State HitCountAdd]
type = statetypeset
trigger1 = animelem = 33
physics = S

[State 7]
type = GameMakeAnim
trigger1 = animelem = 33
value = 45
pos = 5, -8
	

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 33
value = 40, 0

[State State End]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 820]
type = A
movetype= H
physics = N
velset = 0, 0

[State 1]
type = velset
trigger1 = time = 5
x = -1

[State Dust]
type = MakeDust
trigger1 = 1
pos = -15, 0
spacing = 5

[State 1]
type = ChangeAnim2
trigger1 = time = 0
value = 820

[State 6]
type = SelfState
trigger1 = time = 50
value = 5050


;==============================================================================================
[Statedef 821]
type = A
movetype= H
physics = N
poweradd = (Var(23)=0) * 40

[State 1]
type = ChangeAnim2
trigger1 = time = 0
value = 821

[State 1]
type = PosAdd
trigger1 = time = 7
y = -60
x = -20

[State 2]
type = VelSet
trigger1 = time = 6
x = -1
y = -7

[State 5]
type = PosAdd
trigger1 = time = 12
y = 30

[State 6]
type = SelfState
trigger1 = time = 12
value = 5050


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

[State Do Not Guard]
type = attackdist
trigger1 = 1
value = 0

[State Tech]
type = varset
trigger1 = 1
var(27) = 0

[State Tech]
type = varset
trigger1 = numenemy
trigger1 = enemynear, statetype = S
trigger1 = (enemynear, stateno = [0, 899]) && (enemynear, stateno != [100, 119]) && (enemynear, stateno != [600, 799])
var(27) = 7

[State 1]
type = HitDef
trigger1 = !var(39)
trigger1 = animelem = 2
trigger1 = p2dist x >= 0 && P2Bodydist x <= 20
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 910
p2stateno = 920
guard.dist = 0
fall = 1
numhits = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(3) >= 0
movetype = I

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 910]
type = A
movetype = A
physics = N
anim = 910
poweradd = (Var(23)=0) * 60
sprpriority = -1

[State Tech]
type = changestate
trigger1 = numtarget && var(27) > 0
trigger1 = (target, command = "holdfwd" || target, command = "holdback") && target, command != "holdup" && target, command != "holddown"
trigger1 = (target, command = "b" || target, command = "c" || target, command = "y" || target, command = "z")
value = 990

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State HitCountAdd]
type = velset
trigger1 = time = 12
y = -3

[State HitCountAdd]
type = veladd
trigger1 = time = [12, 71]
y = 0.11

[State HitCountAdd]
type = velset
trigger1 = time = 72
y = 0

[State HitCountAdd]
type = posadd
trigger1 = time < 84
x = 1

[State HitCountAdd]
type = posset
trigger1 = time = 72
y = 0

[State HitCountAdd]
type = posadd
trigger1 = animelem = 6
x= 5

[State HitCountAdd]
type = posadd
trigger1 = animelem = 7
x= 10

[State red fadeout]
type = BGPalFx
trigger1 = animelem = 8
add = 100, 100, 100
mul = 300, 300, 300
sinadd = -100, -100, -100, 340
time = 47
ignorehitpause = 1

[State Throw Sound]
type = PlaySnd
trigger1 = animelem = 8
value = 800, 0

[State Slow Motion]
type = Pause 
triggerall = (GameTime%3) = 0 && roundstate = 2 && p2life > 0
trigger1 = time = [16, 44]
time = 1
movetime = 0
ignorehitpause = 1

[State Grab Sound]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 1

[State 2]
type = HitDef
trigger1 = animelem = 33
attr = S, NA
animtype = DiagUp
damage = 100
guardflag = MA
pausetime = 0, 0
sparkno = 2
sparkxy = -10, -78
hitsound = S6, 4
guardsound = S0, 100
ground.type = High
ground.slidetime = 25
ground.hittime = 25
ground.velocity = 6, -6
air.velocity = 6, -6
p2facing = -1

[State Bind 11]
type = TargetDrop
trigger1 = animelem = 34

[State HitCountAdd]
type = statetypeset
trigger1 = animelem = 37
physics = S

[State 7]
type = GameMakeAnim
trigger1 = animelem = 37
value = 45
pos = 5, -28
	

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 37
value = 40, 0

[State 1]
type = turn
trigger1 = Animtime = 0

[State State End]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 920]
type = A
movetype= H
physics = N
velset = 0, 0

[State 1]
type = velset
trigger1 = time = 10
x = 0.5

[State Dust]
type = MakeDust
trigger1 = 1
pos = -15, 0
spacing = 5

[State 1]
type = ChangeAnim2
trigger1 = time = 0
value = 920


;==============================================================================================
[Statedef 921]
type = A
movetype= H
physics = N
poweradd = (Var(23)=0) * 40

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

[State 1]
type = ChangeAnim2
trigger1 = time = 0
value = 921

[State 1]
type = PosAdd
trigger1 = time = 7
y = -60
x = -20

[State 2]
type = VelSet
trigger1 = time = 6
x = -6
y = -4

[State 5]
type = PosAdd
trigger1 = time = 12
y = 30

[State 1]
type = PosAdd
trigger1 = time = 12
y = 60
x = 20

[State 6]
type = SelfState
trigger1 = time = 12
value = 5050


;==============================================================================================
[Statedef 3000]
type = S
physics = S
movetype = I
anim = 1000
ctrl = 0
velset = 0, 0
poweradd = (Var(23)=0) * -1000

[State Slow Motion]
type = Pause 
trigger1 = var(7) > 0
time = 2
movetime = 2
ignorehitpause = 1

[State 40, 6]
type = turn
trigger1 = time = 0
trigger1 = prevstateno = 2300 || prevstateno = 2310 || prevstateno = 2315 || prevstateno = 2325
ignorehitpause = 1
persistent = 0

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 13
freqmul = 1

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = animtime = -1
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 3001
ctrl = 1


;==============================================================================================
[Statedef 3001]
type = A
physics = N
anim = 1001
ctrl = 0
sprpriority = 1

[State Slow Motion]
type = Pause 
trigger1 = var(7) > 0
time = 2
movetime = 2
ignorehitpause = 1

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = (ifelse(facing = 1, -126, 126) - pos x) / 16.0 * facing
y = -12

[State 40, 4]
type = Veladd
trigger1 = time > 0
y = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State 40, 6]
type = ChangeState
trigger1 = time >= 12
trigger1 = ((pos x * facing) + vel x) <= -126
trigger2 = time >= 20
value = 3002


;==============================================================================================
[Statedef 3002]
type = A
physics = N
anim = 1005
ctrl = 0
velset = 0, 0
sprpriority = 1

[State Turn]
type = turn
trigger1 = time = 0
trigger1 = frontedgedist < backedgedist

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = time = 0
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State 1]
type = poweradd
trigger1 = time = 0
trigger1 = prevstateno != [3000, 3001]
value = -1000

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

[State Randomizer]
type = varrandom
trigger1 = time = 0
v = 8
range = 0, 100

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
volume = 255
channel = 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State red fadeout]
type = BGPalFx
triggerall = var(7) = 0
trigger1 = animelem = 2
add = 0, 0, 0
sinadd = -200, -200, -200, 340
time = 53
ignorehitpause = 1

[State red fadein]
type = BGPalFx
triggerall = var(7) = 1
trigger1 = animelem = 2
add = 50, 50, 50
sinadd = -200, -200, -200, 340
time = 33
ignorehitpause = 1

[State white fadein]
type = BGPalFx
triggerall = var(7) > 1
trigger1 = animelem = 2
add = 100, 0, 0
sinadd = -200, -200, -200, 340
time = 33
ignorehitpause = 1

[State Freeze]
type = superpause
triggerall = var(7) = 0
trigger1 = animelem = 2
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 53

[State Freeze]
type = superpause
triggerall = var(7) > 0
trigger1 = animelem = 2
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 33

[State SuperLight] 
type = Explod
triggerall = var(7) = 0
trigger1 = animelem = 2
anim = 8000
pos = 4, -90
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State SuperLight] 
type = Explod
triggerall = var(7) > 0
trigger1 = animelem = 2
anim = 8001
pos = 4, -90
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State X-Ism]
type = PlaySnd
triggerall = var(7) = 0
trigger1 = animelem = 2
value = 11, 2
volume = 200

[State The kamek sample]
type = PlaySnd
triggerall = var(7) > 0
trigger1 = animelem = 1
value = 11, 1
volume = 200

[State 0]
type = Varadd
trigger1 = animelem = 2
v = 7
value = 1

[State Shadows]
type = Afterimage
trigger1 = animelem = 2
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Shadows]
type = Afterimage
triggerall = animelem = 2
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 4
freqmul = 1.3

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 3
freqmul = 1.3

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State Pos]
type = posset
trigger1 = 1
x = ifelse(facing = 1, -126, 126)

[State 40, 6]
type = ChangeState
trigger1 = !animtime
value = 3003


;==============================================================================================
[Statedef 3003]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3003
sprpriority = 1

[State 1]
type = screenbound
trigger1 = facing = 1 && pos x < 0
trigger2 = facing = -1 && pos x > 0
value = 1
movecamera = 0, 1

[State 40, 4]
type = VelSet
trigger1 = time= 0 
x = 2
y = ifelse(p2dist y >= 72, 12, ifelse(p2dist y <= -72, -12, p2dist y / 6.0))

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4
freqmul = 1.2

[State 40, 4]
type = Velmul
trigger1 = p2dist y > -12
trigger1 = p2dist y < 12
x = 0.55
y = 0.55

[State 40, 4]
type = Veladd
trigger1 = time > 22
y = 0.44

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 10) && (Var(3) := -50)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 40, 6]
type = posset
trigger1 = pos y > 0
y = 0

[State 40, 6]
type = ChangeState
triggerall = var(8) < 90
triggerall = var(7) < 3
trigger1 = movecontact = 1
trigger2 = p2dist y > -50
trigger2 = p2dist y < 12
trigger3 = time > 5
trigger4 = pos y >= 0
value = 3005

[State 40, 6]
type = ChangeState
triggerall = var(8) >= 90
trigger1 = movecontact = 1
trigger2 = p2dist y > -50
trigger2 = p2dist y < 12
trigger3 = time > 5
trigger4 = pos y >= 0
value = 3008

[State 40, 6]
type = ChangeState
trigger2 = var(7) >= 3
trigger1 = movecontact = 1
trigger2 = p2dist y > -50
trigger2 = p2dist y < 12
trigger3 = time > 5
trigger4 = pos y >= 0
value = 3008


;==============================================================================================
[Statedef 3005]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3007
sprpriority = 1

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = -1, 1
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = time > 3
trigger1 = time < 20
ignorehitpause = 1
id = 2121
anim = 2122
vel = -vel x, -vel Y
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time > 3
trigger1 = time < 20
ignorehitpause = 1
id = 2121
anim = 2122
vel = -vel x, -vel Y
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 1
value = 800, 12
channel = 1

[State FireB]
type = Explod
trigger1 = animelem = 3
anim = 6010
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = animelem = 3
anim = 6011
id = 6011
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = -10, 0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = -1
removeongethit = 1

[State 40, 4]
type = Veladd
trigger1 = vel x > 0
x = -0.25

[State 40, 4]
type = Veladd
trigger1 = 1
y = -0.5

[State 40, 4]
type = Velset
trigger1 = time = 0
x = 20
y = 0

[State angle]
type = angledraw
trigger1 = time > 0
value = ifelse(time >= 45, 90, time * 2)

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 2]
type = HitDef
trigger1 = movecontact = 0 && movereversed = 0
attr = A, HA
animtype = Medium
damage = 25
getpower = 0, 0
guardflag = MA
pausetime = 0, 13
sparkno = 0
sparkxy = -10, -50
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -3, (-23 -(pos y - 280)/45)
air.velocity = -3, (-23 -(pos y - 280)/45)
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
guard.kill = 1
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Land SOund]
type = PlaySnd
trigger1 = time = 72
value = 800, 32
abspan = 0
freqmul = 1

[State 40, 6]
type = ChangeState
trigger1 = time = 80
value = 3006


;==============================================================================================
[Statedef 3006]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3006
facep2 = 1
sprpriority = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 1
value = 800, 7
freqmul = 1.3

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = -1, 1
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
vel = var(12), -20
postype = p1
pos = 0, -20
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
vel = var(12) , -5
postype = p1
pos = 0, -20
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State FireB]
type = RemoveExplod
trigger1 = time = 0
id = 6011

[State FireB]
type = Explod
trigger1 = time = 0
anim = 6012
id = 6012
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = -1
removeongethit = 1

[State 40, 4]
type = posset
trigger1 = time = 0
x = 0
y = ceil(pos y - screenpos y) - 120

[State 40, 4]
type = posset
trigger1 = time = 0 && numtarget > 0
trigger1 = (target, gethitvar(guarded)) = 0
x = (target, pos x + ifelse(facing = 1, 30, -30))
y = (target, pos y - 250)

[State 40, 4]
type = velset
trigger1 = time = 0
x = 0
y = 25

[State 40, 4]
type = Veladd
trigger1 = 1
y = 0.44

[State 2]
type = HitDef
trigger1 = hitcount < 8
attr = A, HA
animtype = Medium
damage = 25, 5
getpower = 0, 0
guardflag = MA
pausetime = 7, 7
sparkno = 0
sparkxy = -10, -50
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -2.5
air.velocity = -2.5, (Vel Y) -1.9
air.fall = 1
kill = 0
guard.kill = 1
p2stateno = 3010
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Bind 11]
type = TargetBind
trigger1 = movehit > 0
pos = -15, -5

[State 40, 4]
type = Velset
trigger1 = pos y > 5
y = 0

[State FireB]
type = RemoveExplod
trigger1 = pos y > 5
id = 6012

[State 40, 6]
type = ChangeState
trigger1 = pos y > 5
value = 3007


;==============================================================================================
[Statedef 3007]
type = A
physics = N
movetype = i
ctrl = 0
anim = 3008

[State FireB]
type = Explod
trigger1 = time = [1, 50]
ignorehitpause = 1
anim = 2123
postype = p1
pos = 0, -65
random = 50, 50
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Slow Motion]
type = Pause 
triggerall = (GameTime%3) = 0 && roundstate = 2 && p2life > 0
trigger1 = time < 20
time = 2
movetime = 1
ignorehitpause = 1
persistent = 1

[State HitCountAdd]
type = HitAdd
trigger1 = time = 0
value = 1

[State HitCountAdd]
type = targetlifeadd
trigger1 = time = 0 && numtarget
trigger1 = (target, gethitvar(guarded)) = 0
value = -70 / (var(22))

[State Bind 11]
type = TargetDrop
trigger1 = time = 0

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

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 11

[State 5]
type = EnvShake
trigger1 = time = 0
persistent = 0
time = 20
ampl = -10
freq = 150
phase = 15

[State FireB]
type = Explod
trigger1 = time = 0
anim = 6013
id = 6013
ignorehitpause = 1
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
removeongethit = 0
scale = 1, 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

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

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = -12
x = -5

[State 52, 1]
type = Veladd
trigger1 = anim = 3008
y = 0.44

[State 40, 6]
type = Changeanim
trigger1 = pos y > 5 && time > 15
value = 3009
persistent = 0

[State Land SOund]
type = PlaySnd
trigger1 = pos y > 5 && time > 15
value = 40, 0

[State FireB]
type = Explod
trigger1 = pos y > 5 && time > 15
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 0.7, 0.3
postype = p1
pos = 0, 5
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = pos y > 5 && time > 15
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 0.7, 0.3
postype = p1
pos = 0, -3
sprpriority = 2
ownpal = 1
accel = 0, 0

[State 40, 6]
type = VelSet
trigger1 = pos y > 5 && time > 15
x = 0
y = 0

[State 40, 6]
type = posset
trigger1 = pos y > 5 && time > 15
y = 0

[State 1]
type = varset
trigger1 = Animtime = 0 && anim = 3009
v = 7
value = 0

[State -2, shadowrem]
type = afterimagetime
trigger1 = Animtime = 0 && anim = 3009
time = 0

[State 52, 4]
type = ChangeState
trigger1 = Animtime = 0 && anim = 3009
value = 0
ctrl = 12


;==============================================================================================
[Statedef 3008]
type = A
physics = N
movetype = A
anim = 3007
ctrl = 0
sprpriority = 1

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = -1, 1
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = time > 3
trigger1 = time < 20
ignorehitpause = 1
id = 2121
anim = 2122
vel = -vel x, -vel Y
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = time > 3
trigger1 = time < 20
ignorehitpause = 1
id = 2121
anim = 2122
vel = -vel x, -vel Y
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 1
value = 800, 12
channel = 1

[State FireB]
type = Explod
trigger1 = animelem = 3
anim = 6010
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = animelem = 3
anim = 6011
id = 6011
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = -10, 0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = -1
removeongethit = 1

[State 40, 4]
type = Veladd
trigger1 = vel x > 0
x = -0.25

[State 40, 4]
type = Veladd
trigger1 = 1
y = -0.5

[State 40, 4]
type = Velset
trigger1 = time = 0
x = 25
y = 0

[State angle]
type = angledraw
trigger1 = time > 0
value = ifelse(time >= 45, 90, time * 2)

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 2]
type = HitDef
trigger1 = movecontact = 0 && movereversed = 0
attr = A, SA
animtype = Medium
damage = 25, 5
getpower = 0, 0
guardflag = MA
pausetime = 0, 13
sparkno = 0
sparkxy = -10, -50
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -3, (-23 -(pos y - 280)/45)
air.velocity = -3, (-23 -(pos y - 280)/45)
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
guard.kill = 1
forcestand = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State Land SOund]
type = PlaySnd
trigger1 = time = 82
value = 800, 32

[State 40, 6]
type = ChangeState
trigger1 = time = 90 && movehit = 0
value = 3006

[State 40, 6]
type = ChangeState
trigger1 = time = 90 && movehit > 0
value = 3016


;==============================================================================================
[Statedef 3016]
type = A
physics = N
movetype = A
anim = 9997
ctrl = 0
sprpriority = 1
velset = 0, 0

[State FireB]
type = RemoveExplod
trigger1 = time = 0
id = 6011

[State 40, 6]
type = Posset
trigger1 = 1
x = 0
y = -240

[State FireB]
type = Explod
trigger1 = time = 0 && facing = 1
ignorehitpause = 1
id = 1212
anim = 6130
postype = p1
pos = 0, 0
bindtime = 30
sprpriority = 4
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
removetime = -2

[State FireB]
type = Explod
trigger1 = time = 0 && facing = -1
ignorehitpause = 1
id = 1212
anim = 6130
postype = p1
pos = 0, 0
bindtime = 30
sprpriority = 4
ownpal = 1
pausemovetime = 9999
supermovetime = 9999
removetime = -2

[State Freeze]
type = Pause
trigger1 = time= 0
time = 70
movetime = 70
ignorehitpause = 1
persistent = 0

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

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
triggerall = facing = 1
trigger1 = time = 24
trigger2 = time = 40
value = 800, 32
pan = 520
freqmul = 0.9

[State Land SOund]
type = PlaySnd
triggerall = facing = 1
trigger1 = time = 10
trigger2 = time = 32
value = 800, 32
pan = -520
freqmul = 1.1

[State Land SOund]
type = PlaySnd
triggerall = facing = -1
trigger1 = time = 24
trigger2 = time = 40
value = 800, 32
pan = 520
freqmul = 0.9

[State Land SOund]
type = PlaySnd
triggerall = facing = -1
trigger1 = time = 10
trigger2 = time = 32
value = 800, 32
pan = -520
freqmul = 1.1

[State 2]
type = HitDef
trigger1 = time = 4
trigger2 = time = 18
trigger3 = time = 32
trigger4 = time = 40
trigger5 = time = 48
persistent = 1
numhits = 2
attr = A, SA
animtype = Medium
damage = 25
getpower = 0, 0
guardflag = MA
pausetime = 0, 13
sparkno = 0
sparkxy = -10, 0
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = 0, 0
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
snap = 0, 50
p2stateno = 3010
forcestand = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 62
value = 800, 32
pan = 0

[State 40, 6]
type = ChangeState
trigger1 = time = 70
value = 3009


;==============================================================================================
[Statedef 3009]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3006
sprpriority = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State red fadeout]
type = BGPalFx
trigger1 = time = 0
add = 200, 200, 200
sinadd = -200, -200, -200, 340
time = 75
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 1
value = 800, 7
freqmul = 1.3

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = -1, 1
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
vel = var(12), -20
postype = p1
pos = 0, -20
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
vel = var(12) , -5
postype = p1
pos = 0, -20
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = time = 0
anim = 6012
id = 6012
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = -1
removeongethit = 1

[State 40, 4]
type = velset
trigger1 = time = 0
x = 0
y = 25

[State 40, 4]
type = Veladd
trigger1 = 1
y = 0.44

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1, 1

[State 2]
type = HitDef
trigger1 = time = 0
persistent = 1
attr = A, SA
animtype = Medium
damage = 100
getpower = 0, 0
guardflag = MA
pausetime = 40, 40
sparkno = 0
sparkxy = -10, -50
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -2.5
air.velocity = -2.5, (Vel Y) -1.9
air.fall = 1
kill = 0
guard.kill = 1
p2stateno = 3010
forcestand = 1

[State FireB]
type = Explod
trigger1 = movecontact = 1
ignorehitpause = 1
persistent = 0
anim = 2160
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
scale = 1, 1

[State Throw Sound]
type = PlaySnd
trigger1 = movecontact = 1
ignorehitpause = 1
persistent = 0
value = 800, 27

[State Throw Sound]
type = PlaySnd
trigger1 = movecontact = 1
ignorehitpause = 1
persistent = 0
value = 800, 28

[State Throw Sound]
type = PlaySnd
trigger1 = movecontact = 1
ignorehitpause = 1
persistent = 0
value = 800, 29

[State 5]
type = EnvShake
trigger1 = movecontact = 1
ignorehitpause = 1
persistent = 0
time = 10
ampl = -10
freq = 150
phase = 15

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Bind 11]
type = TargetBind
trigger1 = movehit > 0
pos = -15, -5

[State 40, 4]
type = Velset
trigger1 = pos y > 5
y = 0

[State FireB]
type = RemoveExplod
trigger1 = pos y > 5
id = 6012

[State 40, 6]
type = ChangeState
trigger1 = pos y > 5
value = 3017


;==============================================================================================
[Statedef 3017]
type = A
physics = N
movetype = i
ctrl = 0
anim = 6132

[State HitCountAdd]
type = HitAdd
trigger1 = time = 0
value = 1

[State Ikuze]
type = PlaySnd
trigger1 = time = 110
value = 800, 18
volume = 255

[State HitCountAdd]
type = targetlifeadd
trigger1 = time = 0
value = -120 / var(22)

[State Bind 11]
type = TargetDrop
trigger1 = time = 0

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

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 11
abspan = -300

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 11
abspan = 300

[State 5]
type = EnvShake
trigger1 = time = 0
persistent = 0
time = 30
ampl = -20
freq = 150
phase = 15

[State FireB]
type = Explod
trigger1 = time = 0
anim = 6013
id = 6013
ignorehitpause = 1
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
removeongethit = 0
scale = 1.5, 1.5

[State FireB]
type = Explod
trigger1 = time = 30
anim = 6133
id = 6133
ignorehitpause = 1
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
removeongethit = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

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

[State FireB]
type = Explod
trigger1 = pos y > 5 && time > 15
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 0.7, 0.3
postype = p1
pos = 0, 5
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = pos y > 5 && time > 15
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 0.7, 0.3
postype = p1
pos = 0, -3
sprpriority = 2
ownpal = 1
accel = 0, 0

[State 1]
type = varset
trigger1 = Animtime = 0
v = 7
value = 0

[State -2, shadowrem]
type = afterimagetime
trigger1 = Animtime = 0
time = 0

[State 52, 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3010]
type = A
movetype= H
physics = N
velset = 0, 0

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 1]
type = ChangeAnim 
trigger1 = 1
value = 5070

[State 2]
type = ChangeState
trigger1 = HitShakeOver
value = 3011

[State 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140


;==============================================================================================
[Statedef 3011]
type = A
movetype= H
physics = N

[State 1]
type = HitVelSet
trigger1 = time = 0
x = 0
y = 0

[State 2]
type = VelAdd
trigger1 = 1
y = 0.44

[State 3]
trigger1 = Vel Y > 0
trigger1 = pos y >= 15
type = ChangeState
value = 3012


;==============================================================================================
[Statedef 3012]
type = L
movetype= H
physics = N
velset = 0, 0

[State 1]
type = Posset
trigger1 = 1
y = 0
ignorehitpause = 1

[State 3]
type = ChangeAnim
trigger1 = time = 0
value = 5080

[State 4]
type = ChangeState
trigger1 = time = 20
value = 3013


;==============================================================================================
[Statedef 3013]
type = L
movetype= H
physics = C

[State 3]
type = ChangeAnim
trigger1 = time = 0
value = 5110

[State 1]
type = HitVelSet
trigger1 = time = 0
x = 1

[State 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 3]
type = VarSet
trigger1 = time = 0
sysvar(0) = 1

[State 4]
type = SelfState
trigger1 = time = 90
value = 5120
trigger1 = alive = 1
ctrl = 0

[State 9]
type = SelfState
trigger1 = time = 90
trigger1 = alive= 0
value = 5150
ctrl = 1


;==============================================================================================
[Statedef 3100]
type = S
physics = S
movetype = A
anim = 3100
ctrl = 0
velset = 0, 0
poweradd = (Var(23)=0) * -1000

[State 40, 6]
type = turn
trigger1 = time = 0
trigger1 = prevstateno = 2300 || prevstateno = 2310 || prevstateno = 2315 || prevstateno = 2315
ignorehitpause = 1
persistent = 0

[State Randomizer]
type = varrandom
trigger1 = animelem = 1
v = 8
range = 0, 100

[State 9]
type = Changestate
triggerall = time = 0
trigger1 = var(8) >= 90
trigger2 = var(7) > 1
value = 3150
ctrl = 1

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

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 3
volume = 255
channel = 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State red fadeout]
type = BGPalFx
triggerall = var(7) = 0
trigger1 = animelem = 4
add = 0, 0, 0
sinadd = -200, -200, -200, 340
time = 75
ignorehitpause = 1

[State red fadein]
type = BGPalFx
triggerall = var(7) = 1
trigger1 = animelem = 4
add = 50, 50, 50
sinadd = -200, -200, -200, 340
time = 75
ignorehitpause = 1

[State white fadein]
type = BGPalFx
triggerall = var(7) > 1
trigger1 = animelem = 4
add = 100, 0, 0
sinadd = -200, -200, -200, 340
time = 75
ignorehitpause = 1

[State Freeze]
type = superpause
triggerall = var(7) = 0
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 53
movetime = 7

[State Freeze]
type = superpause
triggerall = var(7) > 0
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 33
movetime = 7

[State SuperLight] 
type = Explod
triggerall = var(7) = 0
trigger1 = animelem = 4
anim = 8000
pos = -72, -84
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State SuperLight] 
type = Explod
triggerall = var(7) > 0
trigger1 = animelem = 4
anim = 8001
pos = -72, -84
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State X-Ism]
type = PlaySnd
triggerall = var(7) = 0
trigger1 = animelem = 4
value = 11, 2
volume = 200

[State The kamek sample]
type = PlaySnd
triggerall = var(7) > 0
trigger1 = animelem = 4
value = 11, 1
volume = 200

[State 0]
type = Varadd
trigger1 = animelem = 4
v = 7
value = 1

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Shadows]
type = Afterimage
triggerall = animelem = 1
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Slow Motion]
type = Pause 
triggerall = roundstate = 2 && p2life > 0
trigger1 = time = [9, 25]
time = 2
movetime = 1
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 6
value = 800, 3

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 6
value = 800, 5

[State FireB]
type = Explod
trigger1 = animelem = 8
ignorehitpause = 1
anim = 3103
vel = 0
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
removetime = 40
pausemovetime = 9999

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -65)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 3121


;==============================================================================================
[Statedef 3121]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3101
sprpriority = 1

[State push]
type = Playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1]
type = posadd
trigger1 = time = 0
x = 8
y = 15

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =3200
ownpal = 1

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -75)

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 3
y = -3

[State 1]
type = PlaySnd
trigger1 = animelem = 4 && anim = 3101
trigger2 = animelem = 9 && anim = 3101
value = 0, 6
volume = -70

[State Randomizer]
type = varrandom
trigger1 = 1
v = 2
range = -20, 20

[State Randomizer]
type = varrandom
trigger1 = 1
v = 3
range = -80, -20

[State 4]
type = HitDef
trigger1 = animelem = 5 && anim = 3101
trigger2 = animelem = 10 && anim = 3101
attr = A, HA
damage = 25, 5
animtype = Diagup
getpower = 0, 0
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 2
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1.3, -8
air.velocity = -1.3, (Vel Y - 1)
fall = 1
fall.recover = 0
forcestand = 1

[State 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 3102
value = 0, 8

[State 4]
type = HitDef
trigger1 = animelem = 4 && anim = 3102
attr = A, HA
damage = 40, 10
animtype = Diagup
getpower = 0, 0
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 12
sparkxy = -10, -80
sparkno = -1
hitsound = S6, 1
guardsound = S0, 100
guard.velocity = 0
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -10, -4
air.velocity = -10, -4
fall = 1
fall.recover = 0
forcestand = 1

[State 3]
type = VelAdd
trigger1 = 1
y = 0.10

[State 5]
type = ChangeAnim
trigger1 = vel y > 2 && animelem = 11
value = 3102
persistent = 0

[State 9]
trigger1 = vel y > 0
trigger1 = pos y >= 28
type = ChangeState
value = 3004


;==============================================================================================
[Statedef 3004]
type = S
physics = N
ctrl = 0
anim = 3004

[State NHB]
type = Playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 7]
type = GameMakeAnim
trigger1 = time = 0
value = 45
pos = 5, -8

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

[State 52, 1]
type = Velmul
trigger1 = 1
x = 0.58

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = 0

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

[State 1]
type = varset
trigger1 = Animtime = 0
v = 7
value = 0

[State -2, shadowrem]
type = afterimagetime
trigger1 = Animtime = 0
time = 0

[State 52, 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3200]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9101
sprpriority = 3

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

[State bind]
type = Bindtoroot
trigger1 = 1
facing = 1
pos = 0, 0

[State FireB]
type = Explod
trigger1 = anim = 9101 && time > 10
trigger1 = animelem = 4 || animelem = 5 || animelem = 6 || animelem = 7
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 70, -75
random = 40, 90
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 9101 && time > 10
trigger1 = animelem = 8 || animelem = 9 || animelem = 10 || animelem = 11
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -140
random = 90, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 9101 && time > 10
trigger1 = animelem = 10 || animelem = 11 || animelem = 1 || animelem = 2
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -80, -75
random = 40, 90
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 9101 && time > 10
trigger1 = animelem = 3 || animelem = 4 || animelem = 5 || animelem = 6
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -20
random = 90, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State cancelanim]
type = Changeanim
trigger1 = parent, anim = 3102
value = 9102
ignorehitpause = 1
persistent= 0

[State cancelanim]
type = destroyself
trigger1 = parent, stateno != 3100 && parent, stateno != 3121

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 90
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 3150]
type = S
physics = S
movetype = A
anim = 1110
ctrl = 0
velset = 0, 0

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State 1]
type = NotHitBy
trigger1 = animelemtime(18) < 0
value = , NP, SP, HP
time = 1

[State 1]
type = NotHitBy
trigger1 = backedgedist < 0
value = SCA
time = 1

[State Push]
type = playerpush
trigger1 = animelemtime(18) < 0
value = 0
ignorehitpause = 1

[State red fadeout]
type = BGPalFx
triggerall = var(7) = 0
trigger1 = animelem = 1
add = 0, 0, 0
sinadd = -200, -200, -200, 340
time = 80
ignorehitpause = 1

[State red fadein]
type = BGPalFx
triggerall = var(7) = 1
trigger1 = animelem = 1
add = 50, 50, 50
sinadd = -200, -200, -200, 340
time = 80
ignorehitpause = 1

[State white fadein]
type = BGPalFx
triggerall = var(7) > 1
trigger1 = animelem = 1
add = 100, 0, 0
sinadd = -200, -200, -200, 340
time = 80
ignorehitpause = 1

[State Freeze]
type = superpause
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 80
movetime = 80

[State SuperLight] 
type = Explod
triggerall = var(7) = 0
trigger1 = animelem = 5
anim = 8000
pos = -43, -81
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State SuperLight] 
type = Explod
triggerall = var(7) > 0
trigger1 = animelem = 5
anim = 8001
pos = -43, -81
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State X-Ism]
type = PlaySnd
trigger1 = var(7) = 0
trigger1 = animelem = 5
value = 11, 2
volume = 200

[State The kamek sample]
type = PlaySnd
triggerall = var(7) > 0
trigger1 = animelem = 5
value = 11, 1
volume = 200

[State 0]
type = Varadd
trigger1 = animelem = 5
v = 7
value = 1

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Shadows]
type = Afterimage
triggerall = animelem = 1
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 8
value = 800, 21
freqmul = 1

[State Land SOund]
type = PlaySnd
trigger1 = animelemtime(9) = 0 || animelemtime(9) = 2
value = 800, 22
freqmul = 1
abspan = 255

[State 5]
type = EnvShake
trigger1 = animelem = 9
persistent = 0
time = 5
ampl = -20
freq = 150
phase = 15

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1

[State red fadeout]
type = BGPalFx
trigger1 = movecontact = 1
add = 200, 200, 200
mul = 300, 300, 300
sinadd = -200, -200, -200, 20
time = 5
ignorehitpause = 1
persistent = 1

[State 1]
type = screenbound
trigger1 = animelemtime(12) >= 0
trigger1 = movehit || (movecontact && numenemy >= 2)
value = 0
movecamera = 0, 1

[State Slow Motion]
type = Pause 
triggerall = roundstate = 2 && p2life > 0
trigger1 = movecontact > 0
trigger1 = time < 110
time = 3
movetime = 0
ignorehitpause = 1

[State 4]
type = HitDef
trigger1 = animelemtime(12) >= 0 && animelemtime(18) < 0
attr = S, HA
damage = 30, 4
animtype = Diagup
getpower = 0, 0
givepower = 15
priority = 5, Hit
hitflag = MAFP
guardflag = MA
pausetime = 0, 0
sparkxy = -10, -80
sparkno = -1
hitsound = S6, 1
guardsound = S0, 100
guard.velocity = -3
ground.type = High
air.type = high
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -10, -3
air.velocity = -10, -3
fall = 1
fall.recover = 0
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Explod
trigger1 = time = 7
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.5
postype = p1
pos = -20, 1
sprpriority = -2
ownpal = 1
accel = 0, 0
facing = -1
supermovetime = 9999
pausemovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 7
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 1, 0.5
postype = p1
pos = -20, 1
sprpriority = 2
ownpal = 1
accel = 0, 0
supermovetime = 9999
pausemovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 60
ignorehitpause = 1
anim = 6045
vel = 0, 0
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1
accel = 0, 0
facing = 1
supermovetime = 9999
pausemovetime = 9999

[State Randomizer]
type = varrandom
trigger1 = 1
v = 2
range = -40, 0

[State Randomizer]
type = varrandom
trigger1 = 1
v = 3
range = -100, -50

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State FireB]
type = Explod
trigger1 = animelem = 9
ignorehitpause = 1
persistent = 1
id = 6043
anim = 6044
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 4
ownpal = 1
pausemovetime = -1
supermovetime = -1
removeongethit = 1

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 26
value = 800, 18
volume = 255

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 26
value = 0, 7
volume = 255

[State 1]
type = posadd
trigger1 = animtime = 0
x = -8

[State 1]
type = varset
trigger1 = Animtime = 0
v = 7
value = 0

[State -2, shadowrem]
type = afterimagetime
trigger1 = Animtime = 0
time = 0

[State 9]
type = ChangeState
trigger1 = animtime = 0
trigger1 = backedgedist < 10
value = 3151
ctrl = 0

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


;==============================================================================================
[Statedef 3151]
type = S
physics = N
anim = 100
sprpriority = 1

[State 4]
type = Posset
trigger1 = 1
y = 0

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 4]
type = Changeanim
trigger1 = anim = 100 && animtime = 0
value = 101

[State 1]
type = VelSet
trigger1 = time = 0
x = 20

[State 1]
type = VelSet
trigger1 = frontedgedist < 360
x = 10

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 4 || animelem = 11
value = 40, 4

[State 7]
type = GameMakeAnim
trigger1 = animelem = 4 || animelem = 11
value = 46
pos = 5, 0

[State 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 3]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 4]
type = ChangeState
trigger1 = backedgedist > 10
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3152]
type = S
physics = N
movetype = A
anim = 1112
ctrl = 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1]
type = velset
trigger1 = time = 0
y = 0

[State 1]
type = velmul
trigger1 = time > 3
x = 0.8

[State 1]
type = NotHitBy
trigger1 = time < 8
value = SCA, NP, SP, HP
time = 1

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -65)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

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


;==============================================================================================
[Statedef 3300]
type = A
physics = N
anim = 3300
ctrl = 0
sprpriority = 1
poweradd = (Var(23)=0) * -1000

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

[State FireB]
type = RemoveExplod
trigger1 = time = 0
id = 6012

[State Randomizer]
type = varrandom
trigger1 = animelem = 1
v = 8
range = 0, 100

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 1
value = 1, 3
volume = 255
channel = 0

[State red fadeout]
type = BGPalFx
triggerall = var(7) = 0
trigger1 = animelem = 1
add = 0, 0, 0
sinadd = -200, -200, -200, 340
time = 53
ignorehitpause = 1

[State red fadein]
type = BGPalFx
triggerall = var(7) = 1
trigger1 = animelem = 1
add = 50, 50, 50
sinadd = -200, -200, -200, 340
time = 53
ignorehitpause = 1

[State white fadein]
type = BGPalFx
triggerall = var(7) > 1
trigger1 = animelem = 1
add = 100, 0, 0
sinadd = -200, -200, -200, 340
time = 53
ignorehitpause = 1

[State Freeze]
type = superpause
triggerall = var(7) = 0
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 53
movetime = 11

[State Freeze]
type = superpause
triggerall = var(7) > 0
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 53
movetime = 11

[State SuperLight] 
type = Explod
triggerall = var(7) = 0
trigger1 = animelem =1
anim = 8000
pos = 0, -70
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State SuperLight] 
type = Explod
triggerall = var(7) > 0
trigger1 = animelem = 1
anim = 8001
pos = 0, -70
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State X-Ism]
type = PlaySnd
triggerall = var(7) = 0
trigger1 = animelem = 1
value = 11, 2
volume = 200

[State The kamek sample]
type = PlaySnd
triggerall = var(7) > 0
trigger1 = animelem = 1
value = 11, 1
volume = 200

[State 0]
type = Varadd
trigger1 = time = 0
v = 7
value = 1

[State Shadows]
type = Afterimage
trigger1 = animelem = 1 && var(7) = 1
time = 9999
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1

[State Shadows]
type = Afterimage
triggerall = animelem = 1
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
time = 9999
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1

[State counter hit counter]
type = Varadd
trigger1 = time = 0
v = 11
value = 1

[State hadouken hit helper]
type = Helper
trigger1 = time = 10
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =3305
ownpal = 1
pausemovetime = 9999
supermovetime = 9999

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = Velset
trigger1 = time = 0
x = 0
y = 0

[State Direction]
type=varset
trigger1= !time
var(35)= 0

[State Direction]
type=varset
triggerall= !time
trigger1= !AIlevel
trigger1 = command = "QCB_QCB_x" || command = "QCB_QCB_y" || command = "QCB_QCB_z"
trigger2 = AILevel && p2bodydist x < 0
var(35)= 1

[State Direction]
type = turn
trigger1 = animtime = 0 && var(35)

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 40, 6]
type = ChangeState
triggerall = animtime = 0
trigger1 = var(8) < 90
trigger1 = var(7) < 3
value = 3301

[State 40, 6]
type = Posset
trigger1 = pos y > 20 && time = 0
y = 21

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 3004

[State 40, 6]
type = ChangeState
triggerall = animtime = 0
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
value = 3303


;==============================================================================================
[Statedef 3301]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 1

[State 40, 6]
type = ChangeState
trigger1 = movecontact = 1
trigger2 = prevstateno = 4999
value = 3302

[State NHB]
type = NotHitBy
trigger1 = anim = 3306
value = , NP, SP
time = 1

[State 40, 6]
type = Varset
trigger1 = time = 0
v = 9
value = 0

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 6, 6
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =1206
ownpal = 1
size.xscale = 0.85
size.yscale = 0.85

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno = 3307
ownpal = 1
size.xscale = 1
size.yscale = 1

[State Push]
type = playerpush
trigger1 = time < 25
value = 0
ignorehitpause = 1

[State 40, 4]
type = VelAdd
trigger1 = time > 25
y = 0.44

[State recover]
type = ChangeAnim
trigger1 = time = 25
value = 5040

[State 40, 4]
type = turn
trigger1 = time = 25 && movecontact = 1
trigger1 = p2bodydist x < 0
persistent= 1
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = (time % 2) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 3306

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 13

[State particles]
type = Helper
trigger1 = hitcount = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = (time % 2) = 1
attr = A, HA
animtype = Medium
damage = 15, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 5
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -2, -2
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Idle]
type = statetypeset
trigger1 = anim = 5040
movetype = I

[State 40, 6]
type = afterimagetime
trigger1 = pos y > 20
time = 0

[State 40, 6]
type = varset
trigger1 = pos y > 20
v = 7
value = 0

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 3004


;==============================================================================================
[Statedef 3302]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 1

[State NHB]
type = NotHitBy
trigger1 = anim = 3306
value = , NP, SP
time = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = (time % 2) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 3306

[State 5]
type = velset
trigger1 = time > 4
x = 16
ignorehitpause = 1

[State 5]
type = velset
trigger1 = time = 0
x = 1
ignorehitpause = 1

[State 40, 6]
type = Varadd
trigger1 = time = 0
v = 9
value = 1

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 40, 4]
type = VelAdd
trigger1 = movecontact = 0
trigger1 = time > 25
y = 0.44

[State recover]
type = ChangeAnim
trigger1 = movecontact = 0
trigger1 = time = 25
value = 5040

[State Randomizer]
type = varrandom
trigger1 = 1
v = 2
range = -25, 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 3
range = -65, -35

[State particles]
type = Helper
trigger1 = hitcount = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15004
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15004
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = (time % 2) = 1
trigger1 = var(9) = 1 || var(9) = 3 || var(9) = 5 || var(9) = 7 || var(9) = 9
attr = A, HA
animtype = Hard
damage = 35, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 5
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -2.5, -8
forcestand = 1

[State 2]
type = HitDef
trigger1 = (time % 2) = 1
trigger1 = var(9) = 2 || var(9) = 4 || var(9) = 6 || var(9) = 8 
attr = A, HA
animtype = Hard
damage = 45, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 5
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -2.5, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State 2]
type = HitDef
trigger1 = (time % 2) = 1
trigger1 = var(9) = 10
attr = A, HA
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 5
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -4.5, -8
air.velocity = -4.5, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State Idle]
type = statetypeset
trigger1 = anim = 5040
movetype = I

[State 40, 6]
type = afterimagetime
trigger1 = pos y > 20
time = 0

[State 40, 6]
type = varset
trigger1 = pos y > 20
v = 7
value = 0

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004

[State 40, 6]
type = ChangeState
trigger1 = movecontact = 1 && var(9) < 11
value = 3302


;==============================================================================================
[Statedef 3303]
type = A
physics = N
movetype = A
ctrl = 0
anim = 3306
sprpriority = 1

[State FireB]
type = Explod
trigger1 = time = 1
ignorehitpause = 1
persistent = 1
id = 6021
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 4
ignorehitpause = 1
persistent = 1
id = 6022
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 7
ignorehitpause = 1
persistent = 1
id = 6023
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 10
ignorehitpause = 1
persistent = 1
id = 6024
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 13
ignorehitpause = 1
persistent = 1
id = 6025
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6021
scale = -0.5 - (.01*(time-1)), -0.5 - (.01*(time-1))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6022
scale = -0.5 - (.01*(time-4)), -0.5 - (.01*(time-4))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6023
scale = -0.5 - (.01*(time-7)), -0.5 - (.01*(time-7))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6024
scale = -0.5 - (.01*(time-10)), -0.5 - (.01*(time-10))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6025
scale = -0.5 - (.01*(time-13)), -0.5 - (.01*(time-13))

[State NHB]
type = NotHitBy
trigger1 = 1
value = , NP, SP
time = 1

[State red fadeout]
type = BGPalFx
trigger1 = 1
add = -50, -50, -50
mul = 300, 300, 300
time = 2
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 800, 36

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =1206
ownpal = 1
size.xscale = 0.85
size.yscale = 0.85

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno = 3308
ownpal = 1
size.xscale = 1
size.yscale = 1

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno = 3309
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 5]
type = velset
trigger1 = time = 0
x = 30
ignorehitpause = 1

[State 40, 6]
type = Varadd
trigger1 = time = 0
v = 9
value = 1

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 2
range = -25, 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 3
range = -65, -35

[State particles]
type = Helper
trigger1 = hitcount = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15004
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15004
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = movecontact = 0
attr = A, HA
animtype = Hard
damage = 85, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 5
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -1.5, -7.5
air.velocity = -2.5, -5.5
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
guard.kill = 1
forcestand = 1

[State Throw Sound]
type = PlaySnd
trigger1 = time = 100 && facing = 1
value = 800, 24
abspan = 100

[State Throw Sound]
type = PlaySnd
trigger1 = time = 100 && facing = -1
value = 800, 24
abspan = -100

[State Throw Sound]
type = PlaySnd
trigger1 = time = 100
value = 800, 7
abspan = 0

[State 40, 6]
type = ChangeState
trigger1 = time = 120
value = 3304


;==============================================================================================
[Statedef 3304]
type = A
physics = N
movetype = A
ctrl = 0
anim = 2152
sprpriority = 1

[State FireB]
type = Explod
trigger1 = time = 6
ignorehitpause = 1
persistent = 1
id = 6021
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 26
ignorehitpause = 1
persistent = 1
id = 6022
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 46
ignorehitpause = 1
persistent = 1
id = 6023
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 66
ignorehitpause = 1
persistent = 1
id = 6024
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 86
ignorehitpause = 1
persistent = 1
id = 6025
anim = 60211
vel = 0, 0
postype = p1
pos = 20, -75
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6021
scale = -0.5 - (.01*(time-6)), -0.5 - (.01*(time-6))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6022
scale = -0.5 - (.01*(time-26)), -0.5 - (.01*(time-26))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6023
scale = -0.5 - (.01*(time-46)), -0.5 - (.01*(time-46))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6024
scale = -0.5 - (.01*(time-66)), -0.5 - (.01*(time-66))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6025
scale = -0.5 - (.01*(time-86)), -0.5 - (.01*(time-86))

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Explod
trigger1 = timemod = 6, 5
trigger2 = time > 69
ignorehitpause = 1
persistent = 1
id = 2010
anim = 2010
postype = p1
pos = 50, -70
random = 0, 0
bindtime = 10
sprpriority = 4
ownpal = 1
accel = -0.01, 0
scale = 0.7, 0.7

[State 1]
type = PlaySnd
trigger1 = time = 70
value = 8, 7
channel = 0

[State 1]
type = PlaySnd
trigger1 = time = 70
value = 8, 7
channel = 1
freqmul = 1.1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 40, 6]
type = afterimagetime
trigger1 = time = 0
time = 0
ignorehitpause = 1
persistent = 0

[State Shadows]
type = Afterimage
trigger1 = time = 5
time = 9999
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
ignorehitpause = 1
persistent = 0

[State Shadows]
type = Afterimage
triggerall = time = 5
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
time = 9999
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
ignorehitpause = 1
persistent = 0

[State Randomizer]
type = turn
trigger1 = 1
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = velset
trigger1 = time = 0
x = 20

[State 40, 4]
type = velset
trigger1 = time = 5
x = 2

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = 1 && numtarget > 0
x = (target, pos x - 80)

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = -1 && numtarget > 0
x = (target, pos x + 80)

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = 1 && numtarget = 0
x = -160

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = -1 && numtarget = 0
x = 160

[State Throw Sound]
type = PlaySnd
trigger1 = time = 18
value = 800, 23
abspan = 200

[State Throw Sound]
type = PlaySnd
trigger1 = time = 19
value = 800, 23
abspan = -200

[State hadouken hit helper]
type = Helper
trigger1 = time = 20
helpertype = normal
name = "final boom"
persistent = 0
pos = 0, 0
postype = p1
stateno = 3310
ownpal = 1

[State 5]
type = EnvShake
trigger1 = time = 33
ignorehitpause = 1
persistent = 0
time = 20
ampl = -30
freq = 150
phase = 15

[State Randomizer]
type = varrandom
trigger1 = 1
v = 12
range = -9, 9
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = timemod = 2, 1
trigger1 = var(9) = 0
ignorehitpause = 1
id = 2121
anim = 2121
vel =(( (-vel x)/1) + (var(12))), (((-vel Y)/1) + (var(12)))
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = timemod = 2, 1
trigger1 = var(9) = 0
ignorehitpause = 1
id = 2121
anim = 2121
vel =(( (-vel x)/1) + (var(12))), (((-vel Y)/1) + (var(12)))
postype = p1
pos = 0, -70
random = 60, 60
sprpriority = 4
ownpal = 1

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 2
range = -25, 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 3
range = -65, -35

[State red fadeout]
type = BGPalFx
trigger1 = time = 0
add = -70, -70, -70
mul = 300, 300, 300
sinadd = 70, 70, 70, 340
time = 47
ignorehitpause = 1

[State Slow Motion]
type = Pause 
triggerall = roundstate = 2 && p2life > 0
trigger1 = time = [0, 70]
time = 1
movetime = 0
ignorehitpause = 1

[State 2]
type = HitDef
trigger1 = time = 0
attr = A, HA
animtype = Hard
fall.animtype = Hard
damage = 15, 5
getpower = 0, 0
hitflag = MAFD
guardflag = MA
pausetime = 0, 50
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = 0, -2
fall = 1
air.fall = 1
fall.recover = 0
p2stateno = 3010
p1sprpriority = 1
kill = 0
guard.kill = 1
forcestand = 1

[State 40, 6]
type = velset
trigger1 = time = 70
x = 25

[State 40, 6]
type = ChangeState
trigger1 = time = 150
value = 3306


;==============================================================================================
[Statedef 3306]
type = A
physics = N
movetype = I
ctrl = 0
anim = 1003
sprpriority = 1

[State 40, 6]
type = turn
trigger1 = time = 0

[State FireB]
type = RemoveExplod
trigger1 = time = 0
id = 2010

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = 1
x = -280
y = -50

[State 40, 4]
type = posset
trigger1 = time = 0 && facing = -1
x = 280
y = -50

[State 1]
type = PlaySnd
trigger1 = time = 0
value = 6, 8
channel = 1
freqmul = 0.8

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 13
y = 3

[State particles]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =10001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = posadd
trigger1 = time = 0
x = 10

[State 40, 4]
type = Velmul
trigger1 = time > 20
x = 0.98

[State 40, 4]
type = Veladd
trigger1 = time > 12
y = 0.44

[State 40, 6]
type = velmul
trigger1 = time = 0
x = 0.5
y = 0.5

[State 40, 6]
type = velmul
trigger1 = time = [1, 10]
x = 1.05
y = 1.00

[State 40, 6]
type = velmul
trigger1 = time = [10, 20]
x = 0.95
y = 0.95

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -50)

[State NHB]
type = Playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 40, 6]
type = varset
trigger1 = pos y > 0
v = 7
value = 0

[State 40, 6]
type = afterimagetime
trigger1 = pos y > 0
time = 0

[State 40, 6]
type = ChangeState
trigger1 = pos y > 0
value = 1004


;==============================================================================================
[Statedef 3400]
type = S
physics = S
movetype = A
anim = 3315
ctrl = 0
velset = 0, 0
poweradd = (Var(23)=0) * -1000

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State 40, 6]
type = turn
trigger1 = time = 0
trigger1 = prevstateno = 2300 || prevstateno = 2310 || prevstateno = 2315 || prevstateno = 2325
ignorehitpause = 1
persistent = 0

[State Randomizer]
type = varrandom
trigger1 = animelem = 1
v = 8
range = 0, 100

[State Ikuze]
type = PlaySnd
trigger1 = animelem = 9
value = 1, 3
volume = 255
channel = 0

[State red fadeout]
type = BGPalFx
triggerall = var(7) = 0
trigger1 = animelem = 9
add = 0, 0, 0
sinadd = -200, -200, -200, 340
time = 53
ignorehitpause = 1

[State red fadein]
type = BGPalFx
triggerall = var(7) = 1
trigger1 = animelem = 1
add = 50, 50, 50
sinadd = -200, -200, -200, 340
time = 39
ignorehitpause = 1

[State white fadein]
type = BGPalFx
triggerall = var(7) > 1
trigger1 = animelem = 1
add = 100, 0, 0
sinadd = -200, -200, -200, 340
time = 39
ignorehitpause = 1

[State Freeze]
type = superpause
triggerall = var(7) = 0
trigger1 = animelem = 9
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 53
movetime = 29

[State Freeze]
type = superpause
triggerall = var(7) > 0
trigger1 = animelem = 1
anim = -1
sound = -1
darken = 0
p2defmul = 1
time = 39
movetime = 39

[State SuperLight] 
type = Explod
triggerall = var(7) = 0
trigger1 = animelem = 9
anim = 8000
pos = -22, -42
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State SuperLight] 
type = Explod
triggerall = var(7) > 0
trigger1 = animelem = 9
anim = 8001
pos = -22, -42
sprpriority = 4
postype = p1
supermovetime = -1
bindtime = 53
ownpal = 1
pausemovetime = 9999

[State X-Ism]
type = PlaySnd
triggerall = var(7) = 0
trigger1 = animelem = 9
value = 11, 2
volume = 200

[State The kamek sample]
type = PlaySnd
triggerall = var(7) > 0
trigger1 = animelem = 9
value = 11, 1
volume = 200

[State 0]
type = Varadd
trigger1 = animelem = 9
v = 7
value = 1

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 21
PalBright = 0, 0, 0
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State Shadows]
type = Afterimage
triggerall = animelem = 1
trigger1 = var(8) >= 90
trigger2 = var(7) >= 2
length = 21
PalBright = 0, 0, 0
PalContrast = 242, 0, 0
PalAdd = 0, 0, 0
PalMul = 0.9, 0.9, 0.9
FrameGap = 10
Trans = Add1
time = 9999

[State FireB]
type = Explod
trigger1 = time = [44, 49]
ignorehitpause = 1
id = 2123
anim = 2123
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
vel = -4, 0
accel = 0.1, -0.05

[State FireB]
type = Explod
trigger1 = time = [44, 49]
ignorehitpause = 1
id = 2123
anim = 2123
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
vel = -4, 0
accel = 0.2, -0.05

[State FireB]
type = Explod
trigger1 = time = [44, 49]
ignorehitpause = 1
id = 2123
anim = 2123
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
vel = -4, 0
accel = 0.3, -0.05

[State NHB]
type = NotHitBy
trigger1 = animelemtime(22) < 0
value = SCA
time = 1

[State NHB]
type = NotHitBy
trigger1 = animelemtime(22) >= 0 && animelemtime(32) < 0
value = , NP, SP, HP
time = 1

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 24
trigger1 = var(7) < 3
trigger1 = var(8) < 90
value = 800, 8
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State FireB]
type = Explod
trigger1 = time = 42
ignorehitpause = 1
anim = 2304
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 42
ignorehitpause = 1
anim = 2305
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, -10
sprpriority = 2
ownpal = 1
accel = 0, 0

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 5
trigger1 = var(7) < 3
trigger1 = var(8) < 90
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =2301
ownpal = 1

[State 2]
type = velset
trigger1 = animelem = 24
x = 65

[State 1]
type = screenbound
trigger1 = animelem = 24, >= 0
value = 0
movecamera = 0, 1

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 23
attr = S, HA
damage = 90, 10
getpower = 0, 0
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 0, 16
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 100
ground.hittime = 100
ground.velocity = 13, 0
air.hittime = 50
air.velocity = 5, (-9.3-(((p2dist y))*0.02))
p2stateno = 3450
kill = 0
guard.kill = 1
p2facing = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State 2]
type = PosAdd
trigger1 = (animelem = 27, > 0) && movecontact = 0
x = 70
persistent= 0
ignorehitpause = 1

[State 9]
type = ChangeAnim
trigger1 = (animelem = 27, > 0) && movecontact = 0
value = 3315
elem = 28
ctrl = 0
persistent = 0
ignorehitpause = 1

[State 2]
type = velset
trigger1 = animelem = 27
x = 0

[State 0]
type = Varset
trigger1 = animelem = 36
v = 7
value = 0

[State 1]
type = AfterImageTime
trigger1 = animelem = 36
time = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(28) >= 0
movetype = I

[State 9]
type = ChangeState
trigger1 = movehit && animelem = 28
value = 3409
ctrl = 0

[State 9]
type = ChangeState
trigger1 = moveguarded && animelem = 28
value = 3430
ctrl = 0

[State 9]
type = ChangeState
triggerall = animelem = 20
trigger1 = var(8) >= 90
trigger2 = var(7) >= 3
value = 3440
ctrl = 0

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


;==============================================================================================
[Statedef 3409]
type = A
physics = N
movetype = A
anim = 9999
ctrl = 0
sprpriority = -1

[State 9]
type = ChangeState
trigger1 = time = 30
value = 3410
ctrl = 0


;==============================================================================================
[Statedef 3410]
type = A
physics = N
movetype = A
anim = 3310
ctrl = 0
sprpriority = -1
velset = 0, -1

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

[State FireB]
type = Explod
trigger1 = time = [0, 10]
ignorehitpause = 1
persistent = 1
anim = 6015
vel = 0, 0
postype = p1
pos = 50, (-50+time*3)
random = 0, 0
sprpriority = 4
ownpal = 1
accel = -0.03, 0
facing = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 18
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 20, -85
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*time), 1.2 - (.08*time)

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 2123
vel = 0, -5

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 0

[State Throw Sound]
type = PlaySnd
trigger1 = time = 15
value = 800, 10

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 6

[State red fadeout]
type = BGPalFx
trigger1 = time = 4
add = 30, 30, 30
mul = 300, 300, 300
sinadd = -150, -150, -150, 680
time = 90
ignorehitpause = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 0

[State 40, 4]
type = veladd
trigger1 = 1
y = 0.03

[State 40, 4]
type = posadd
trigger1 = time = 0 
y = -10

[State 40, 4]
type = posadd
trigger1 = time = 0
x = (p2dist x -200)

[State 1]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 2

[State Slow Motion]
type = Pause 
triggerall = roundstate = 2 && p2life > 0
trigger1 = time = [4, 27]
trigger2 = time = [32, 44]
time = 2
movetime = 0
ignorehitpause = 1

[State 40, 4]
type = posadd
trigger1 = time = [27, 32]
x = 33
y = 2

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 2]
type = veladd
trigger1 = time < 27
x = -0.2

[State 2]
type = veladd
trigger1 = time > 32
x = 0.2

[State 2]
type = velset
trigger1 = animelem = 1
x = 8

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 8
attr = A, HA
damage = 70, 10
getpower = 0, 0
animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0, 6
sparkno = -1
sparkxy = -10, -55
hitsound = -1
guardsound = S0, 100
ground.type = High
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 0, 0
air.hittime = 50
air.velocity = 0, (-5.6-(((p2dist y))*0.02))
p1sprpriority = -1
p2stateno = 3450
kill = 0
guard.kill = 1
p2facing = 1
air.fall = 1
fall.recover = 0
numhits = 0
forcestand = 1

[State 1]
type = envcolor
trigger1 = movecontact = 1
value = 0, 0, 0
under = 0
ignorehitpause = 1
persistent = 0
time = 10

[State 40, 6]
type = changestate
trigger1 = animtime = 0
trigger2 = movecontact = 1
value = 3430
ctrl = 0


;==============================================================================================
[Statedef 3430]
type = S
physics = S
movetype = A
anim = 3330
ctrl = 0
sprpriority = 1
velset = 0, 0

[State FireB]
type = RemoveExplod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 1111

[State 1]
type = envcolor
trigger1 = time = 10
value = 255, 255, 255
under = 0
ignorehitpause = 1
persistent = 0
time = 1

[State red fadeout]
type = BGPalFx
trigger1 = time = 10
add = 100, 100, 100
mul = 300, 300, 300
sinadd = -100, -100, -100, 80
time = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = PosAdd
trigger1 = movecontact = 1
x = 50
persistent= 0
ignorehitpause = 1

[State 2]
type = velset
trigger1 = movecontact = 1
x = 0
persistent= 0
ignorehitpause = 1

[State 1]
type = screenbound
trigger1 = time < 10
value = 0
movecamera = 0, 0

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

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

[State 40, 4]
type = posadd
trigger1 = time = 0
x = (p2dist x -170)

[State 1]
type = NotHitBy
trigger1 = time < 10
value = SCA, NP, SP, HP
time = 2

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 800, 9

[State 2]
type = velset
trigger1 = time = 0
x = 40

[State 2]
type = velset
trigger1 = animelem = 6
x = 0

[State FireB]
type = Explod
trigger1 = animelem = 6
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.6
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = time = 0
trigger1 = target, stateno = 3450
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-10)), (-55)
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = time = 2
trigger1 = target, stateno = 3450
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-17)), (-65)
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = time = 4
trigger1 = target, stateno = 3450
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-23)), (-80)
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = time = 6
trigger1 = target, stateno = 3450
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (10)), (-42)
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = time = 8
trigger1 = target, stateno = 3450
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-20)), (-54)
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State Throw Sound]
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = time = 0
trigger1 = target, stateno = 3450
value = 6, 0
pan = 50

[State Throw Sound]
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = time = 2
trigger1 = target, stateno = 3450
value = 5, 0
pan = 50

[State Throw Sound]
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = time = 4
trigger1 = target, stateno = 3450
value = 6, 1
pan = 50

[State Throw Sound]
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = time = 6
trigger1 = target, stateno = 3450
value = 5, 0
pan = 50

[State Throw Sound]
type = PlaySnd
trigger1 = time = 8
trigger1 = numtarget > 0
trigger1 = target, stateno = 3450
value = 6, 1
pan = 50

[State 2]
type = HitDef
trigger1 = animelem = 1
attr = S, HA
damage = 160, 20
getpower = 0, 0
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 0, 46
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = low
air.type = low
fall.animtype = Hard
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -10, -4
air.hittime = 20
air.velocity = -10, -4
p1sprpriority = 1
p2stateno = 3450
fall = 1
air.fall = 1
fall.recover = 0
numhits = 5
kill = 0
guard.kill = 1
forcestand = 1

[State 2]
type = targetlifeadd
trigger1 = time = 10
value = -1
absolute = 1

[State 0]
type = Varset
trigger1 = animtime = 0
v = 7
value = 0

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State Idle]
type = statetypeset
trigger1 = animelemtime(3) >= 0 && (movecontact != [1, 12])
movetype = I

[State 40, 6]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3440]
type = A
physics = N
movetype = A
anim = 3440
ctrl = 0
sprpriority = -2
velset = 0, 0

[State Slow Motion]
type = Pause
trigger1 = (GameTime%3) = 0 && roundstate = 2 && p2life > 0
time = 2
movetime = 2
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = time = 6
anim = 6025
id = 6011
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = -10, 0
bindtime = -1
sprpriority = 3
ownpal = 1
removetime = 300
removeongethit = 1
pausemovetime = 9999
supermovetime = 9999

[State silence]
type = assertspecial
trigger1 = 1
flag = nofg
flag2 = nobardisplay
flag3 = nomusic
ignorehitpause = 1

[State 1]
type = AfterImageTime
trigger1 = time = 0
time = 0

[State Land SOund]
type = PlaySnd
trigger1 = time = 2
value = 800, 15
freqmul = 1
volume = 255
abspan = -255

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 800, 15
freqmul = 1
volume = 255
abspan = 255

[State 1]
type = envcolor
trigger1 = time = 0
value = 0, 0, 0
under = 0
time = 40
ignorehitpause = 1
persistent = 0

[State FireB]
type = Explod
trigger1 = time = 10 && facing = 1
ignorehitpause = 1
persistent = 1
id = 2222
anim = 6024
vel = 0, 0
postype = left
facing = -1
pos = 130, 110
random = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 2, 1
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 70 && facing = 1
ignorehitpause = 1
persistent = 1
id = 2222
anim = 6024
vel = 0, 0
postype = left
facing = -1
pos = 130, 110
random = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 2, 1
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 10 && facing = -1
ignorehitpause = 1
persistent = 1
id = 2222
anim = 6024
vel = 0, 0
postype = left
facing = 1
pos = 130, 110
random = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 2, 1
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 70 && facing = -1
ignorehitpause = 1
persistent = 1
id = 2222
anim = 6024
vel = 0, 0
postype = left
facing = 1
pos = 130, 110
random = 0, 0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 2, 1
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 6
ignorehitpause = 1
persistent = 1
id = 1111
anim = 6022
vel = 0, 0
postype = left
pos = -160, 0
bindtime = -1
ontop = 1
ownpal = 1
ontop = 1
scale = 4, (1.3333333 * gameheight / gamewidth)

[State FireB]
type = Explod
trigger1 = time = 10
ignorehitpause = 1
persistent = 1
id = 6021
anim = 6021
vel = 0, 0
postype = p1
pos = 20, -65
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 30
ignorehitpause = 1
persistent = 1
id = 6022
anim = 6021
vel = 0, 0
postype = p1
pos = 20, -65
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 50
ignorehitpause = 1
persistent = 1
id = 6023
anim = 6021
vel = 0, 0
postype = p1
pos = 20, -65
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 70
ignorehitpause = 1
persistent = 1
id = 6024
anim = 6021
vel = 0, 0
postype = p1
pos = 20, -65
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 90
ignorehitpause = 1
persistent = 1
id = 6025
anim = 6021
vel = 0, 0
postype = p1
pos = 20, -65
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6021
scale = -1.2 - (.01*(time-90)), -1.2 - (.01*(time-90))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6022
scale = -1.2 - (.01*(time-110)), -1.2 - (.01*(time-110))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6023
scale = -1.2 - (.01*(time-130)), -1.2 - (.01*(time-130))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6024
scale = -1.2 - (.01*(time-150)), -1.2 - (.01*(time-150))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6025
scale = -1.2 - (.01*(time-170)), -1.2 - (.01*(time-170))

[State Land SOund]
type = PlaySnd
trigger1 = time = 9
value = 800, 14
freqmul = 1
volume = -255
abspan = -255

[State Land SOund]
type = PlaySnd
trigger1 = time = 10
value = 800, 14
freqmul = 1
volume = -255
abspan = 255

[State red fadeout]
type = BGPalFx
trigger1 = animelem = 4
add = 80, 80, 80
mul = 300, 300, 300
sinadd = 100, 100, 100, 500
time = 300
ignorehitpause = 1
persistent = 0

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1, 1

[State 40, 4]
type = posadd
trigger1 = animelem = 4
x = (p2dist x -70)

[State 1]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 2

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 2]
type = velset
trigger1 = time = 0
x = 0

[State 2]
type = velset
trigger1 = animelem = 2
x = 0.8

[State FireB]
type = Explod
trigger1 = animelem = 6
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.6
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State 2]
type = HitDef
trigger1 = animelem = 2
attr = S, HA
damage = 0
getpower = 0, 0
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 20, 282
sparkno = -1
sparkxy = -10, -55
guardsound = S0, 100
ground.type = low
air.type = low
fall.animtype = Hard
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 10, -4
air.hittime = 50
air.velocity = 10, -4
p1sprpriority = -2
p2stateno = 3460
fall = 0
air.fall = 0
fall.recover = 0
kill = 0
forcestand = 1
ID = 3440

[State FireB]
type = RemoveExplod
trigger1 = animtime = 0
id = 6011

[State 40, 6]
type = changestate
trigger1 = animtime = 0 && movehit = 0
value = 3430
ctrl = 0

[State 40, 6]
type = changestate
trigger1 = animtime = 0 && movehit > 0
value = 3441
ctrl = 0


;==============================================================================================
[Statedef 3441]
type = S
movetype = A
physics = N
velset = 0, 0
anim = 3441

[State silence]
type = assertspecial
trigger1 = time < 211
flag = nofg
flag2 = nobardisplay
flag3 = nomusic

[State red fadeout]
type = BGPalFx
trigger1 = time = 1
add = -150, -150, -150
mul = 300, 300, 300
sinadd = 150, 150, 150, 600
time = 150
ignorehitpause = 1
persistent = 0

[State FireB]
type = Explod
trigger1 = time = 120
anim = 6026
ignorehitpause = 1
scale = 1, 1
postype = p1
pos = 0, 0
bindtime = -1
sprpriority = 3
ownpal = 1
facing = -1
removeongethit = 1

[State FireB]
type = RemoveExplod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 1111

[State Land SOund]
type = PlaySnd
trigger1 = time = 40
value = 800, 17
freqmul = 1
abspan = -255

[State Land SOund]
type = PlaySnd
trigger1 = time = 42
value = 800, 17
freqmul = 1
abspan = 255

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 800, 15
freqmul = 1
volume = 255
abspan = -255

[State Land SOund]
type = PlaySnd
trigger1 = time = 1
value = 800, 15
freqmul = 1
volume = 255
abspan = 255

[State FireB]
type = Explod
trigger1 = time = 120
ignorehitpause = 1
anim = 2304
vel = 0, 0
scale = 0.7, 1.2
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 120
ignorehitpause =1
anim = 2305
vel = 0, 0
scale = 0.7, 1.2
postype = p1
pos = 0, -10
sprpriority = 2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 40
ignorehitpause = 1
persistent = 1
anim = 6023
vel = 0, 0
postype = left
pos = 0, floor((gameheight / gamewidth) * 80) - 60
random = 0, 0
bindtime = -1
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 40
ignorehitpause = 1
persistent = 1
id = 6029
anim = 6020
vel = 0, 0
postype = left
pos = 160, 120
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999
ontop = 1

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6029
scale = 1.2 - (.1*(time-25)), 1.2 - (.1*(time-25))

[State 1]
type = envcolor
trigger1 = time < 121
value = 0, 0, 0
under = 0
ignorehitpause = 1
persistent = 1
time = 1

[State red fadeout]
type = BGPalFx
trigger1 = time = 0
add = 100, 100, 100
mul = 300, 300, 300
sinadd = 100, 100, 100, 500
time = 1
ignorehitpause = 1
persistent = 0

[State FireB]
type = Explod
trigger1 = time = 211
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p2
pos = 20, -85
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.1*(time-195)), 1.2 - (.1*(time-195))

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = animelem = 13
trigger1 = target, stateno = 3460
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-10)), (-55)
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = animelem = 13
trigger1 = target, stateno = 3460
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-17)), (-65)
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = animelem = 13
trigger1 = target, stateno = 3460
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-23)), (-80)
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = animelem = 13
trigger1 = target, stateno = 3460
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (10)), (-42)
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = numtarget > 0
trigger1 = animelem = 13
trigger1 = target, stateno = 3460
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (-20)), (-54)
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 2]
type = HitDef
trigger1 = animelem = 13
attr = S, HA
damage = 350, 0
getpower = 0, 0
animtype = Hard
hitflag = MAF
guardflag = M
pausetime = 0, 0
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = low
air.type = low
fall.animtype = Hard
ground.slidetime = 50
ground.hittime = 50
ground.velocity = 10, -4
air.hittime = 50
air.velocity = 10, -4
fall = 1
air.fall = 1
fall.recover = 0
kill = 1
numhits = 10
chainID = 3440

[State 5]
type = EnvShake
trigger1 = movecontact = 1
persistent = 0
time = 10
ampl = -10
freq = 150
phase = 15

[State 1]
type = envcolor
trigger1 = numtarget > 0
trigger1 = target, stateno = 3460
trigger1 = animelem = 13
value = 255, 255, 255
under = 1
ignorehitpause = 1
persistent = 0
time = 3

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 12
value = 800, 18
freqmul = 1

[State Land SOund]
type = PlaySnd
trigger1 = numtarget > 0
trigger1 = target, stateno = 3460
trigger1 = animelem = 13
value = 800, 16
freqmul = 1
volume = 255

[State 40, 4]
type = posadd
trigger1 = time < 5
x = 90

[State 0]
type = Varset
trigger1 = animtime = 0
v = 7
value = 0

[State 40, 6]
type = turn
trigger1 = animtime = 0

[State 1]
type = AfterImageTime
trigger1 = animtime = 0
time = 0

[State 40, 6]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3450]
type = S
movetype= H
physics = N
velset = 0, 0

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 0

[State 1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = GetHitVar(animtype) != [3, 5]
value = ifelse((GetHitVar(groundtype) = 1), 5000, 5010) + GetHitVar(animtype)

[State 2]
type = ChangeAnim
trigger1 = time = 0
trigger1 = GetHitVar(animtype) = [3, 5]
value = 5030

[State 3]
type = ChangeAnim
trigger1 = time = 0
trigger1 = (GetHitVar(animtype) = [4, 5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

[State 4]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5]
type = StateTypeSet
trigger1 = time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = pos y != 0
statetype = a

[State 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 3451

[State 7]
type = SelfState
trigger1 = HitShakeOver
value = 5030

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

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

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


;==============================================================================================
[Statedef 3451]
type = S
movetype= H
physics = N

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 0

[State 40, 6]
type = velmul
trigger1 = 1
x = 0.95

[State 1]
type = HitVelSet
trigger1 = time = 0
x = 1

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

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

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

[State 6]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1


;==============================================================================================
[Statedef 3460]
type = S
movetype= H
physics = N
velset = 0, 0
sprpriority = 2

[State 1]
type = NotHitBy
trigger1 = time < 148
value = SCA, NP, SP, HP
time = 1

[State 6]
type = hitfallset
trigger1 = time = 0
value = 1

[State 6]
type = posset
trigger1 = time = 0
ignorehitpause = 1
persistent = 0
y = 0

[State 6]
type = posadd
trigger1 = backedgedist >= 100
trigger1 = p2dist x < 150
trigger1 = time = 0
ignorehitpause = 1
persistent = 0
x = -150

[State 6]
type = posadd
trigger1 = backedgedist < 100
trigger1 = time = 0
ignorehitpause = 1
persistent = 0
x = 100

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 1, 1

[State 1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = GetHitVar(animtype) != [3, 5]
value = ifelse((GetHitVar(groundtype) = 1), 5000, 5010) + GetHitVar(animtype)

[State 2]
type = ChangeAnim
trigger1 = time = 0
trigger1 = GetHitVar(animtype) = [3, 5]
value = 5030

[State 3]
type = ChangeAnim
trigger1 = time = 0
trigger1 = (GetHitVar(animtype) = [4, 5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype)

[State 4]
type = ChangeAnim
trigger1 = Time > 0
value = anim

[State 5]
type = StateTypeSet
trigger1 = time = 0
trigger1 = GetHitVar(yvel) != 0 || GetHitVar(fall)
trigger2 = pos y != 0
statetype = a

[State 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0 && !GetHitVar(fall)
value = 3461

[State 7]
type = SelfState
trigger1 = HitShakeOver
value = 5030

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

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

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


;==============================================================================================
[Statedef 3461]
type = S
movetype= H
physics = N

[State 1]
type = screenbound
trigger1 = 1
value = 1
movecamera = 0, 0

[State 40, 6]
type = velmul
trigger1 = 1
x = 0.95

[State 1]
type = HitVelSet
trigger1 = time = 0
x = 1

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

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

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

[State 6]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1


;==============================================================================================
[Statedef 990]
type = S
physics = N
movetype = I
anim = 5945
ctrl = 0
velset = 0,0
sprpriority = 1

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

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

[State 990, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 990, push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

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

[State 990, FX]
type = playsnd
trigger1 = !time
value = 0, 100

[State 990, FX]
type = explod
trigger1 = !time
anim = F40
sprpriority = 5
postype = p1
pos = 0, -55
ownpal = 1
pausemovetime = -1
supermovetime = -1

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


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

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

[State 995, NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1

[State 995, push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

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

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


;==============================================================================================
[Statedef 1000]
type = S
physics = S
movetype = I
anim = 1000
ctrl = 0
velset = 0, 0

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 13
freqmul = 1

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = animtime = -1
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1001


;==============================================================================================
[Statedef 1001]
type = A
physics = N
anim = 1001
ctrl = 0
sprpriority = 1

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = (ifelse(facing = 1, -126, 126) - pos x) / 16.0 * facing
y = -12

[State 40, 4]
type = Veladd
trigger1 = time > 0
y = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State 40, 6]
type = ChangeState
trigger1 = time >= 12
trigger1 = ((pos x * facing) + vel x) <= -126
trigger2 = time >= 20
value = 1002


;==============================================================================================
[Statedef 1002]
type = A
physics = N
anim = 1002
ctrl = 0
velset = 0, 0
sprpriority = 1

[State Turn]
type = turn
trigger1 = time = 0
trigger1 = frontedgedist < backedgedist

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = time = 0
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 4
freqmul = 1.3

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 3
freqmul = 1.3

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State Pos]
type = posset
trigger1 = 1
x = ifelse(facing = 1, -126, 126)

[State 40, 6]
type = ChangeState
trigger1 = !animtime
value = 1003


;==============================================================================================
[Statedef 10001]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 3

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 0, 0

[State FireB]
type = Explod
trigger1 = parent, movecontact = 0
trigger1 = random <= 600
ignorehitpause = 1
id = 2121
anim = 2121
scale = 0.5, 0.5
postype = p1
pos = -10, -100
random = 20, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05
vel = ((-parent, vel x)/2), ((-parent, vel y)/2)

[State FireB]
type = Explod
trigger1 = parent, movecontact = 0
trigger1 = random <= 600
ignorehitpause = 1
id = 2121
anim = 2121
scale = 0.5, 0.5
postype = p1
pos = -10, -100
random = 20, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05
vel = ((-parent, vel x)/3), ((-parent, vel y)/3)

[State FireB]
type = Explod
trigger1 = parent, movecontact = 0
trigger1 = random <= 600
ignorehitpause = 1
id = 2121
anim = 2121
scale = 0.5, 0.5
postype = p1
pos = -10, -100
random = 20, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05
vel = ((-parent, vel x)/4), ((-parent, vel y)/4)

[State FireB]
type = Explod
trigger1 = parent, movecontact = 0
trigger1 = random <= 600
ignorehitpause = 1
id = 2121
anim = 2121
scale = 0.5, 0.5
postype = p1
pos = -10, -100
random = 20, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05
vel = ((-parent, vel x)/5), ((-parent, vel y)/5)

[State FireB]
type = changeanim
trigger1 = time = 0 && parent, vel y > 3
ignorehitpause = 1
persisent = 0
value = 6001

[State FireB]
type = changeanim
trigger1 = time = 0 && parent, vel y <=3 && parent, vel y >= -3
ignorehitpause = 1
persisent = 0
value = 6002

[State FireB]
type = changeanim
trigger1 = time = 0 && parent, vel y < -3
ignorehitpause = 1
persisent = 0
value = 6003

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = animtime = 0
trigger2 = parent, anim != 1003


;==============================================================================================
[Statedef 1003]
type = A
physics = N
movetype = A
ctrl = 1
anim = 1003
sprpriority = 1

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 1]
type = screenbound
trigger1 = facing = 1 && pos x < 0
trigger2 = facing = -1 && pos x > 0
value = 1
movecamera = 0, 1

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

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 40, 4]
type = VelSet
triggerall = p2dist y > -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
x = (p2dist x)/18
y = (p2dist y)/18

[State 40, 4]
type = VelSet
triggerall = p2dist y <= -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
x = (p2dist x)/18
y = -13

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command = "holdfwd"
x = 10
y = 0

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command = "holdup"
x = 8
y = -8

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command = "holddown"
x = 8
y = 8

[State particles]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =10001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4
freqmul = 1.2

[State 40, 4]
type = Velmul
trigger1 = time > 20
x = 0.98

[State 40, 4]
type = Veladd
trigger1 = time > 12
y = 0.44

[State 40, 6]
type = velmul
trigger1 = time = 0
x = 0.5
y = 0.5

[State 40, 6]
type = velmul
trigger1 = time = [1, 10]
x = 1.05
y = 1.00

[State 40, 6]
type = velmul
trigger1 = time = [10, 20]
x = 0.95
y = 0.95

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -50)

[State 40, 6]
type = ChangeState
trigger1 = pos y > 0
value = 1004


;==============================================================================================
[Statedef 1004]
type = S
physics = N
ctrl = 0
anim = 1004

[State 7]
type = GameMakeAnim
trigger1 = time = 0
value = 45
pos = 5, -8

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

[State 52, 1]
type = Velmul
trigger1 = 1
x = 0.88

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = 0

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

[State 52, 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 1010]
type = S
physics = S
movetype = I
anim = 1000
ctrl = 0
velset = 0, 0

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 13
freqmul = 1

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = animtime = -1
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1011


;==============================================================================================
[Statedef 1011]
type = A
physics = N
anim = 1001
ctrl = 0
sprpriority = 1

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = (ifelse(facing = 1, -126, 126) - pos x) / 16.0 * facing
y = -12

[State 40, 4]
type = Veladd
trigger1 = time > 0
y = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State 40, 6]
type = ChangeState
trigger1 = time >= 12
trigger1 = ((pos x * facing) + vel x) <= -126
trigger2 = time >= 20
value = 1012


;==============================================================================================
[Statedef 1012]
type = A
physics = N
anim = 1002
ctrl = 0
velset = 0, 0
sprpriority = 1

[State Turn]
type = turn
trigger1 = time = 0
trigger1 = frontedgedist < backedgedist

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = time = 0
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 4
freqmul = 1.3

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 3
freqmul = 1.3

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State Pos]
type = posset
trigger1 = 1
x = ifelse(facing = 1, -126, 126)

[State 40, 6]
type = ChangeState
trigger1 = !animtime
value = 1013


;==============================================================================================
[Statedef 1013]
type = A
physics = N
movetype = A
ctrl = 1
anim = 1003
sprpriority = 1

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 1]
type = screenbound
trigger1 = facing = 1 && pos x < 0
trigger2 = facing = -1 && pos x > 0
value = 1
movecamera = 0, 1

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

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State particles]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =10001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = VelSet
triggerall = p2dist y > -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
x = (p2dist x)/16
y = (p2dist y)/16

[State 40, 4]
type = VelSet
triggerall = p2dist y <= -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
x = (p2dist x)/16
y = -13

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command = "holdfwd"
x = 12
y = 0

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command = "holdup"
x = 9
y = -9

[State 40, 4]
type = VelSet
trigger1 = time= 0
trigger1 = command = "holddown"
x = 9
y = 9

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4
freqmul = 1.2

[State 40, 4]
type = Velmul
trigger1 = time > 20
x = 0.98

[State 40, 4]
type = Veladd
trigger1 = time > 12
y = 0.44

[State 40, 6]
type = velmul
trigger1 = time = 0
x = 0.6
y = 0.6

[State 40, 6]
type = velmul
trigger1 = time = [1, 10]
x = 1.05
y = 1.00

[State 40, 6]
type = velmul
trigger1 = time = [10, 20]
x = 0.95
y = 0.95

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -50)

[State 40, 6]
type = ChangeState
trigger1 = pos y > 0
value = 1004


;==============================================================================================
[Statedef 1020]
type = S
physics = S
movetype = I
anim = 1000
ctrl = 0
velset = 0, 0

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 13
freqmul = 1

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = animtime = -1
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1021


;==============================================================================================
[Statedef 1021]
type = A
physics = N
anim = 1001
ctrl = 0
sprpriority = 1

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = (ifelse(facing = 1, -126, 126) - pos x) / 16.0 * facing
y = -12

[State 40, 4]
type = Veladd
trigger1 = time > 0
y = 1

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State 40, 6]
type = ChangeState
trigger1 = time >= 12
trigger1 = ((pos x * facing) + vel x) <= -126
trigger2 = time >= 20
value = 1022


;==============================================================================================
[Statedef 1022]
type = A
physics = N
anim = 1002
ctrl = 0
velset = 0, 0
sprpriority = 1

[State Turn]
type = turn
trigger1 = time = 0
trigger1 = frontedgedist < backedgedist

[State Camera]
type = helper
trigger1 = !numhelper(9998)
trigger1 = time = 0
helpertype = normal
stateno = 9998
ID = 9998
name = "Camera"
postype = p1

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 4
freqmul = 1.3

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 3
freqmul = 1.3

[State 1]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0, 1

[State Pos]
type = posset
trigger1 = 1
x = ifelse(facing = 1, -126, 126)

[State 40, 6]
type = ChangeState
trigger1 = !animtime
value = 1023


;==============================================================================================
[Statedef 1023]
type = A
physics = N
movetype = A
ctrl = 1
anim = 1003
sprpriority = 1

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 1]
type = screenbound
trigger1 = facing = 1 && pos x < 0
trigger2 = facing = -1 && pos x > 0
value = 1
movecamera = 0, 1

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

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State particles]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =10001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = VelSet
triggerall = p2dist y > -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
trigger2 = time = 0 && AILevel
x = (p2dist x) / 14.0
y = (p2dist y) / 14.0

[State 40, 4]
type = VelSet
triggerall = p2dist y <= -420
trigger1 = time= 0
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command != "holdfwd"
trigger2 = time = 0 && AILevel
x = (p2dist x) / 14.0
y = -13

[State 40, 4]
type = VelSet
trigger1 = time= 0 && !AILevel
trigger1 = command != "holdup"
trigger1 = command != "holddown"
trigger1 = command = "holdfwd"
x = 14
y = 0

[State 40, 4]
type = VelSet
trigger1 = time= 0 && !AILevel
trigger1 = command = "holdup"
x = 10
y = -10

[State 40, 4]
type = VelSet
trigger1 = time= 0 && !AILevel
trigger1 = command = "holddown"
x = 10
y = 10

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4
freqmul = 1.2

[State 40, 4]
type = Velmul
trigger1 = time > 20
x = 0.98

[State 40, 4]
type = Veladd
trigger1 = time > 12
y = 0.44

[State 40, 6]
type = velmul
trigger1 = time = 0
x = 0.7
y = 0.7

[State 40, 6]
type = velmul
trigger1 = time = [1, 10]
x = 1.05
y = 1.00

[State 40, 6]
type = velmul
trigger1 = time = [10, 20]
x = 0.95
y = 0.95

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -50)

[State 40, 6]
type = ChangeState
trigger1 = pos y > 0
value = 1004


;==============================================================================================
[Statedef 1100]
type = S
physics = S
movetype = A
ctrl = 0
velset = 0, 0
juggle = 10
poweradd = (Var(23)=0) * 70

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =8101
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 10
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1100

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -65)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 1]
type = PlaySnd
trigger1 = animelem = 8
value = 0, 7

[State 3]
type = HitDef
trigger1 = animelem = 8
attr = S, SA
damage = 25, 10
animtype = Medium
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 6
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0, -9
air.velocity = 0, -9
fall.animtype = Hard
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = NotHitBy
trigger1 = animelemtime(9) < 0
value = SCA, NP, SP, HP
time = 1

[State 1]
type = posadd
trigger1 = time > 6
x = 2

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1101
ctrl = 1


;==============================================================================================
[Statedef 1101]
type = A
physics = N
movetype = A
ctrl = 0
anim = 1101
sprpriority = 1

[State 1]
type = posadd
trigger1 = time = 0
y = 15

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -75)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 3
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 4
y = -7.5

[State 1]
type = PlaySnd
trigger1 = animelem = 4 && anim = 1101
trigger2 = animelem = 9 && anim = 1101
value = 0, 6
volume = -50

[State 4]
type = HitDef
trigger1 = animelem = 5 && anim = 1101
trigger2 = animelem = 10 && anim = 1101
attr = A, SA
damage = 20, 5
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 2
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1.3, -8
air.velocity = -1.3, (Vel Y - 3)
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 1102
value = 0, 8

[State 4]
type = HitDef
trigger1 = animelem = 4 && anim = 1102
attr = A, SA
damage = 30, 10
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 12
sparkxy = -10, -80
sparkno = -1
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity =-2, -4
air.velocity = -2, -4
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 2]
type = VelMul
trigger1 = 1
x = 0.88

[State 3]
type = VelAdd
trigger1 = 1
y = 0.44

[State 5]
type = ChangeAnim
trigger1 = vel y < 2 && animtime = 0
value = 1102
persistent = 0

[State Idle]
type = statetypeset
trigger1 = anim = 1102
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 9]
trigger1 = vel y > 0
trigger1 = pos y >= 28
type = ChangeState
value = 1004


;==============================================================================================
[Statedef 8101]
type = S
movetype = A
physics = N
ctrl = 0
anim = 8100
sprpriority = 3

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

[State FireB]
type = Explod
trigger1 = anim = 8101 && time > 10
trigger1 = animelem = 4 || animelem = 5 || animelem = 6 || animelem = 7
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 70, -75
random = 40, 90
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 8101 && time > 10
trigger1 = animelem = 8 || animelem = 9 || animelem = 10 || animelem = 11
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -140
random = 90, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 8101 && time > 10
trigger1 = animelem = 10 || animelem = 11 || animelem = 1 || animelem = 2
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = -80, -75
random = 40, 90
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = anim = 8101 && time > 10
trigger1 = animelem = 3 || animelem = 4 || animelem = 5 || animelem = 6
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, -20
random = 90, 40
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 0, 0

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State cancelanim]
type = Changeanim
trigger1 = parent, anim = 1101
value = 8101
ignorehitpause = 1
persistent= 0

[State cancelanim]
type = Changeanim
trigger1 = parent, anim = 1102
value = 8102
ignorehitpause = 1
persistent= 0

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State cancelanim]
type = destroyself
trigger1 = parent, stateno != 1100 && parent, stateno != 1101 && parent, stateno != 1110 && parent, stateno != 1111 && parent, stateno != 1120 && parent, stateno != 1121 && parent, stateno != 4999

[State Dissipate]
type = destroyself
trigger1 = time >= 90
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 1110]
type = S
physics = S
movetype = A
ctrl = 0
velset = 0, 0
juggle = 10
poweradd = (Var(23)=0) * 70

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =8101
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 10
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1100

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -65)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 3
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15001
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 1]
type = PlaySnd
trigger1 = animelem = 8
value = 0, 7

[State 3]
type = HitDef
trigger1 = animelem = 8
attr = S, SA
damage = 25, 10
animtype = Medium
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 6
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0, -9
air.velocity = 0, -9
fall.animtype = Hard
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = NotHitBy
trigger1 = animelemtime(10) < 0
value = SCA, NP, SP, HP
time = 1

[State 1]
type = posadd
trigger1 = time > 6
x = 9

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1111
ctrl = 1


;==============================================================================================
[Statedef 1111]
type = A
physics = N
movetype = A
ctrl = 0
anim = 1101
sprpriority = 1

[State 1]
type = posadd
trigger1 = time = 0
y = 15

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -75)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 3
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 6
y = -8.5

[State 1]
type = PlaySnd
trigger1 = animelem = 4 && anim = 1101
trigger2 = animelem = 9 && anim = 1101
value = 0, 6
volume = -50

[State 4]
type = HitDef
trigger1 = animelem = 5 && anim = 1101
trigger2 = animelem = 10 && anim = 1101
attr = A, SA
damage = 20, 5
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 2
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1.3, -8
air.velocity = -1.3, (Vel Y - 3)
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 1102
value = 0, 8

[State 4]
type = HitDef
trigger1 = animelem = 4 && anim = 1102
attr = A, SA
damage = 30, 10
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 12
sparkxy = -10, -80
sparkno = -1
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2, -4
air.velocity = -2, -4
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 2]
type = VelMul
trigger1 = 1
x = 0.88

[State 3]
type = VelAdd
trigger1 = 1
y = 0.44

[State 5]
type = ChangeAnim
trigger1 = vel y < 3 && animtime = 0
value = 1102
persistent = 0

[State Idle]
type = statetypeset
trigger1 = anim = 1102
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 9]
trigger1 = vel y > 0
trigger1 = pos y >= 28
type = ChangeState
value = 1004


;==============================================================================================
[Statedef 1120]
type = S
physics = S
movetype = A
ctrl = 0
velset = 0, 0
juggle = 10
poweradd = (Var(23)=0) * 70

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =8101
ownpal = 1

[State 2]
type = ReversalDef
trigger1 = prevstateno != 4999
trigger1 = animelem = 10
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1100

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -65)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 3
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 1]
type = PlaySnd
trigger1 = animelem = 8
value = 0, 7

[State 3]
type = HitDef
trigger1 = animelem = 8
attr = S, SA
damage = 25, 10
animtype = Medium
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 6
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = Low
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 0, -9
air.velocity = 0, -9
fall.animtype = Hard
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 1]
type = posadd
trigger1 = time > 6
x = 2

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 1121
ctrl = 1


;==============================================================================================
[Statedef 1121]
type = A
physics = N
movetype = A
ctrl = 0
anim = 1101
sprpriority = 1

[State 1]
type = posadd
trigger1 = time = 0
y = 15

[State 1]
type = NotHitBy
trigger1 = time <= 5
value = , NP, SP, HP
time = 1

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := 0) && (Var(3) := -75)

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 2
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 3
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 4
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 5
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = hitcount = 6
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 8
y = -11.5

[State 1]
type = PlaySnd
trigger1 = animelem = 4 && anim = 1101
trigger2 = animelem = 9 && anim = 1101
value = 0, 6
volume = -50

[State 4]
type = HitDef
trigger1 = animelem = 5 && anim = 1101
trigger2 = animelem = 10 && anim = 1101
attr = A, SA
damage = 20, 5
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 2
sparkxy = var(2), var(3)
sparkno = -1
hitsound = S6, 0
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -1.3, -8
air.velocity = -1.3, (Vel Y - 3)
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 1]
type = PlaySnd
trigger1 = animelem = 3 && anim = 1102
value = 0, 8

[State 4]
type = HitDef
trigger1 = animelem = 4 && anim = 1102
attr = A, SA
damage = 30, 10
animtype = Diagup
getpower = (Var(23)=0) * 30 
givepower = 15
priority = 5, Hit
hitflag = MAF
guardflag = MA
pausetime = 0, 12
sparkxy = -10, -80
sparkno = -1
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
air.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -2, -4
air.velocity = -2, -4
fall = 1
fall.recover = 1
fall.recovertime = 120
forcestand = 1

[State 2]
type = VelMul
trigger1 = 1
x = 0.88

[State 3]
type = VelAdd
trigger1 = 1
y = 0.44

[State 5]
type = ChangeAnim
trigger1 = vel y > 2 && animtime = 0
value = 1102
persistent = 0

[State Idle]
type = statetypeset
trigger1 = anim = 1102
trigger1 = animelemtime(5) >= 0 && (movecontact != [1, 12])
movetype = I

[State 9]
trigger1 = vel y > 0
trigger1 = pos y >= 28
type = ChangeState
value = 1004


;==============================================================================================
[Statedef 1200]
type = A
physics = N
anim = 1200
ctrl = 0
sprpriority = 1
poweradd = (Var(23)=0) * 70

[State counter hit counter]
type = Varadd
trigger1 = time = 0
v = 11
value = 1

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =1205
ownpal = 1
size.xscale = 0.8
size.yscale = 0.8

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = Velmul
trigger1 = time > 0
x = 0.9
y = 0.9

[State Direction]
type=varset
trigger1= !time
var(35)= 0

[State Direction]
type=varset
triggerall= !time
trigger1= !AIlevel && command = "QCB_x"
trigger2 = AILevel && p2bodydist x < 0 && var(11) = 2
var(35)= 1

[State Direction]
type = turn
trigger1 = animtime = 0 && var(35)

[State 40, 6]
type = ChangeState
trigger1 = animtime = 0
value = 1201

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1201]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 6, 8
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 10, -70
postype = p1
stateno =1206
ownpal = 1
size.xscale = 0.65
size.yscale = 0.65

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 70, -70
postype = p1
stateno =1207
ownpal = 1
size.xscale = 0.7
size.yscale = 0.7

[State 40, 4]
type = VelAdd
trigger1 = time > 25
y = 0.44

[State recover]
type = ChangeAnim
trigger1 = time = 25
value = 5040

[State 40, 4]
type = Ctrlset
trigger1 = time = 25
value= 1

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 40, 4]
type = turn
trigger1 = time = 25 && movecontact = 1
trigger1 = p2bodydist x < 0
persistent= 1
ignorehitpause = 1

[State 2]
type = ReversalDef
trigger1 = (time % 4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1202

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 7

[State 2]
type = HitDef
trigger1 = (time % 4) = 2
attr = A, SA
animtype = Medium
damage = 15, 10
guardflag = MA
pausetime = 3, 5
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -0.5*(vel x), 2*(Vel Y)
air.fall = 1
getpower = (Var(23)=0) * 30 
fall.recover = 1
fall.recovertime = 16
forcestand = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1205]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1210
sprpriority = 3

[State Randomize]
type = angleset
trigger1 = !time
value = 90 * (random % 4)

[State Randomize]
type = angledraw
trigger1 = 1

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, -70
facing = 1

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 10
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.55, .55, .55
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 25


;==============================================================================================
[Statedef 1300]
type = S
ctrl = 0
anim = 1450
velset = 0, 0
movetype = I
physics = S
sprpriority = 2

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 10
freqmul = 2

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 6027
anim = 6027
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State skin fadeout]
type = PalFx
trigger1 = time = 0
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State Reversal]
type = reversaldef
trigger1 = animelem = 3
reversal.attr = SCA, AA
p1stateno = 1301
pausetime = 4, 12
hitsound = s6, 5
numhits = 0

[State HitOverride]
type = HitOverride
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
slot = 1
time = 1
stateno = 1301
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 1301]
type = S
ctrl = 0
anim = 1451
velset = 0, 0
movetype = A
physics = S
sprpriority = 2

[State 5]
type = EnvShake
trigger1 = time = 5
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 30

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 31
channel = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 0, -50
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 2]
type = HitDef
trigger1 = time = 5
attr = S, SA
hitflag = MAFP
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 10
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*(time+13)), 1.2 - (.08*(time+13))

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1455
anim = 1455
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 2]
type = ChangeState
trigger1 = time = 20
value = 1302
ctrl = 0


;==============================================================================================
[Statedef 1302]
type = A
ctrl = 0
anim = 1452
velset = 0, 0
movetype = I
physics = N
sprpriority = 2

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State mobility restore]
type = posset
trigger1 = time = 0
x = -100
y = -50

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 1]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < -5

[State mobility restore]
type = velset
trigger1 = numenemy
trigger1 = time = 10
y = -2 + enemynear, vel y

[State mobility restore]
type = veladd
trigger1 = time > 10
y = 0.44

[State mobility restore]
type = ctrlset
trigger1 = time > 10
value = 1

[State FireB]
type = Explod
trigger1 = time <2
ignorehitpause = 1
id = 1456
anim = 1456
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = time =5
ignorehitpause = 1
id = 1457
anim = 1457
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1310]
type = S
ctrl = 0
anim = 1450
velset = 0, 0
movetype = I
physics = S
sprpriority = 2

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 10
freqmul = 2

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 6027
anim = 6027
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State skin fadeout]
type = PalFx
trigger1 = time = 0
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State Reversal]
type = reversaldef
trigger1 = animelem = 3
reversal.attr = SCA, AA
p1stateno = 1311
pausetime = 4, 12
hitsound = s6, 5
numhits = 0

[State HitOverride]
type = HitOverride
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
slot = 1
time = 1
stateno = 1311
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 1311]
type = S
ctrl = 0
anim = 1451
velset = 0, 0
movetype = A
physics = S
sprpriority = 2

[State 5]
type = EnvShake
trigger1 = time = 5
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 30

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 31
channel = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 0, -50
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 2]
type = HitDef
trigger1 = time = 5
attr = S, SA
hitflag = MAFP
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 10
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*(time+13)), 1.2 - (.08*(time+13))

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1455
anim = 1455
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 2]
type = ChangeState
trigger1 = time = 20
value = 1312
ctrl = 0


;==============================================================================================
[Statedef 1312]
type = A
ctrl = 0
anim = 1452
velset = 0, 0
movetype = I
physics = N
sprpriority = 2

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State mobility restore]
type = posset
trigger1 = time = 0
x = 100
y = -50

[State 1]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < -5

[State mobility restore]
type = velset
trigger1 = numenemy
trigger1 = time = 10
y = -2 + enemynear, vel y

[State mobility restore]
type = veladd
trigger1 = time > 10
y = 0.44

[State mobility restore]
type = ctrlset
trigger1 = time > 10
value = 1

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1456
anim = 1456
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
id = 1457
anim = 1457
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 3305]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3305
sprpriority = 3

[State Randomize]
type = angleset
trigger1 = !time
value = 90 * (random % 4)

[State Randomize]
type = angledraw
trigger1 = 1

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

[State bind]
type = bindtoroot
trigger1 = 1
pos = 0, -70
facing = 1

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 10
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.55, .55, .55
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 60


;==============================================================================================
[Statedef 1320]
type = S
ctrl = 0
anim = 1450
velset = 0, 0
movetype = I
physics = S
sprpriority = 2

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 10
freqmul = 2

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 6027
anim = 6027
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State skin fadeout]
type = PalFx
trigger1 = time = 0
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State Reversal]
type = reversaldef
trigger1 = animelem = 3
reversal.attr = SCA, AA
p1stateno = 1321
pausetime = 4, 12
hitsound = s6, 5
numhits = 0

[State HitOverride]
type = HitOverride
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
slot = 1
time = 1
stateno = 1321
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 1321]
type = S
ctrl = 0
anim = 1451
velset = 0, 0
movetype = A
physics = S
sprpriority = 2

[State 5]
type = EnvShake
trigger1 = time = 5
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 30

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 31
channel = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 0, -50
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 2]
type = HitDef
trigger1 = time = 5
attr = S, SA
hitflag = MAFP
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 10
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*(time+13)), 1.2 - (.08*(time+13))

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1455
anim = 1455
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 2]
type = ChangeState
trigger1 = time = 20
value = 1322
ctrl = 0


;==============================================================================================
[Statedef 1322]
type = A
ctrl = 0
anim = 1452
velset = 0, 0
movetype = I
physics = N
sprpriority = 2

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 40, 4]
type = posset
trigger1 = numenemy
trigger1 = time = 0 && facing = 1
x = (enemynear, pos x + 30)
y = (enemynear, pos y - 10)

[State 40, 4]
type = posset
trigger1 = numenemy
trigger1 = time = 0 && facing = -1
x = (enemynear, pos x - 30)
y = (enemynear, pos y - 10)

[State 1]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < -5

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State mobility restore]
type = velset
trigger1 = numenemy
trigger1 = time = 10
y = -3 + enemynear, vel y

[State mobility restore]
type = veladd
trigger1 = time > 10
y = 0.44

[State mobility restore]
type = ctrlset
trigger1 = time > 10
value = 1

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1456
anim = 1456
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
id = 1457
anim = 1457
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1330]
type = S
ctrl = 0
anim = 1450
velset = 0, 0
movetype = I
physics = S
sprpriority = 2

[State Throw Sound]
type = PlaySnd
trigger1 = time = 0
value = 800, 10
freqmul = 2

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
persistent = 1
id = 6027
anim = 6027
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State skin fadeout]
type = PalFx
trigger1 = time = 0
time = 8
add = 115, 80, 80
sinadd = -115, -80, -80, 32

[State Reversal]
type = reversaldef
trigger1 = animelem = 3
reversal.attr = SCA, AA
p1stateno = 1331
pausetime = 4, 12
hitsound = s6, 5
numhits = 0

[State HitOverride]
type = HitOverride
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
slot = 1
time = 1
stateno = 1331
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


;==============================================================================================
[Statedef 1331]
type = S
ctrl = 0
anim = 1451
velset = 0, 0
movetype = A
physics = S
sprpriority = 2

[State 5]
type = EnvShake
trigger1 = time = 5
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 30

[State Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800, 31
channel = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 0, -50
random = 0, 0
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 2]
type = HitDef
trigger1 = time = 5
attr = S, SA
hitflag = MAFP
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 10
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (.08*(time+13)), 1.2 - (.08*(time+13))

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1455
anim = 1455
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 2]
type = ChangeState
trigger1 = time = 20
value = 1332
ctrl = 0


;==============================================================================================
[Statedef 1332]
type = A
ctrl = 0
anim = 1452
velset = 0, 0
movetype = I
physics = N
sprpriority = 2

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State mobility restore]
type = posset
trigger1 = time = 0
x = 0
y = -50

[State 1]
type = Turn
trigger1 = time = 0
trigger1 = p2dist x < -5

[State mobility restore]
type = velset
trigger1 = numenemy
trigger1 = time = 10
y = -2 + enemynear, vel y

[State mobility restore]
type = veladd
trigger1 = time > 10
y = 0.44

[State mobility restore]
type = ctrlset
trigger1 = time > 10
value = 1

[State FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1456
anim = 1456
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
id = 1457
anim = 1457
postype = p1
pos = 0, 0
sprpriority = 4
ownpal = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1341]
type = S
ctrl = 0
anim = 1451
velset = 0, 0
movetype = A
physics = S
sprpriority = 2
poweradd = -1000

[State 3875,  Shun Goku Shoryuken Charge up Slow Motion ]
type = Pause 
trigger1 = time = 0
time = 40
movetime = 40
ignorehitpause = 1 

[State 195,  5]
type = EnvShake
trigger1 = time = 5
ignorehitpause = 1
persistent = 0
time = 5
ampl = -10
freq = 150
phase = 15

[State 810,  Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800,  30

[State 810,  Throw Sound]
type = PlaySnd
trigger1 = time = 5
value = 800,  31
channel = 1

[State 3470,  FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
persistent = 1
id = 6020
anim = 6020
vel = 0, 0
postype = p1
pos = 0,  -50
random = 0, 0
bindtime = 1
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 2]
type = HitDef
trigger1 = time = 5
attr = S, SA
hitflag = MAFP
animtype = Hard
damage = 50, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 10
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1
air.fall = 1
fall.recover = 0
forcestand = 1

[State 200,  particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist X) - (var(2))),  (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40,  6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State 3470,  FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6020
scale = 1.2 - (0.08 * (time + 13)),  1.2 - (0.08 * (time + 13))

[State 3470,  FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1455
anim = 1455
postype = p1
pos = 0, 0
bindtime = 1
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

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

[State 195,  2]
type = ChangeState
trigger1 = time >= 20
value = 1342
ctrl = 0


;==============================================================================================
[Statedef 1342]
type = A
ctrl = 0
anim = 1452
velset = 0, 0
movetype = I
physics = N
sprpriority = 2

[State 40,  4]
type = posset
trigger1 = time = 0 && facing = 1
x = (enemynear,  pos X + 30)
y = (enemynear,  pos Y - 10)

[State 40,  4]
type = posset
trigger1 = time = 0 && facing = -1
x = (enemynear,  pos X - 30)
y = (enemynear,  pos Y - 10)

[State 5201,  1]
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 107,  Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 810,  mobility restore]
type = velset
trigger1 = time = 10
y = -3 + enemynear,  vel Y

[State 810,  mobility restore]
type = veladd
trigger1 = time > 10
y = 0.44

[State 810,  mobility restore]
type = ctrlset
trigger1 = time > 10
value = 1

[State 3470,  FireB]
type = Explod
trigger1 = time < 2
ignorehitpause = 1
id = 1456
anim = 1456
postype = p1
pos = 0, 0
bindtime = 1
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 3470,  FireB]
type = Explod
trigger1 = time = 5
ignorehitpause = 1
id = 1457
anim = 1457
postype = p1
pos = 0, 0
bindtime = 1
sprpriority = 4
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State 40,  6]
type = ChangeState
trigger1 = pos Y > 20
value = 1004


;==============================================================================================
[Statedef 1206]
type = S
movetype = A
physics = N
ctrl = 0
anim = 1211
sprpriority = 3

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 10
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.55, .55, .55
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 50


;==============================================================================================
[Statedef 1207]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2001
sprpriority = 3

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 1
range = -3, 3
persistent = 1
ignorehitpause = 1

[State NHB]
type = turn
trigger1 = facing != parent, facing

[State FireB]
type = Explod
trigger1 = parent, anim = 1202
ignorehitpause = 1
id = 2121
anim = 2121
vel = -5, var(1)
postype = p1
pos = -20, 0
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = parent, anim = 1202
trigger1 = timemod = 6, 5
ignorehitpause = 1
id = 2010
anim = 2010
postype = p1
pos = 0, 0
random = 0, 0
bindtime = 10
sprpriority = 4
ownpal = 1
accel = -0.01, 0
scale = 0.7, 0.7

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 40, -70

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State changeanim]
type = changeanim
trigger1 = parent, anim != 1202
value = 2002
persistent = 0
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time >= 50
trigger1 = parent, anim != 1202 && parent, anim != 5040 && parent, anim != 3306
trigger2 = time >= 100
trigger3 = anim = 2002 && animtime = 0


;==============================================================================================
[Statedef 3307]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2001
sprpriority = 3

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 1
range = -9, 9
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = parent, anim = 3306
ignorehitpause = 1
id = 2121
anim = 2121
vel = -5, var(1)
postype = p1
pos = -20, 0
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = parent, anim = 3306
trigger1 = timemod = 6, 5
ignorehitpause = 1
id = 2010
anim = 2010
postype = p1
pos = 0, 0
random = 0, 0
bindtime = 10
sprpriority = 4
ownpal = 1
accel = -0.01, 0

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 40, -70

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State changeanim]
type = changeanim
trigger1 = parent, anim != 3306
value = 2002
persistent = 0
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = anim = 2002 && animtime = 0


;==============================================================================================
[Statedef 3308]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2001
sprpriority = 3

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 1
range = -9, 9
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = parent, anim = 3306
ignorehitpause = 1
id = 2121
anim = 2121
vel = -5, var(1)
postype = p1
pos = -20, 0
random = 60, 60
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State FireB]
type = Explod
trigger1 = parent, anim = 3306
trigger1 = timemod = 2, 1
ignorehitpause = 1
id = 2010
anim = 2010
postype = p1
pos = 0, 0
random = 0, 0
bindtime = 10
sprpriority = 4
ownpal = 1
accel = -0.01, 0

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 40, -70

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State changeanim]
type = changeanim
trigger1 = parent, anim != 3306
value = 2002
persistent = 0
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time >= 100
trigger2 = anim = 2002 && animtime = 0


;==============================================================================================
[Statedef 3309]
type = S
movetype = A
physics = N
ctrl = 0
anim = 3309
sprpriority = 3

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State 1]
type = screenbound
trigger1 = time < 80
value = 1
movecamera = 0, 0

[State vel]
type = velset
trigger1 = time = 20
x = 5

[State vel]
type = veladd
trigger1 = time > 20
x = 0.44

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State Randomizer]
type = varrandom
trigger1 = 1
v = 1
range = -9, 9
persistent = 1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = time = [20, 85]
trigger1 = timemod = 3, 2
ignorehitpause = 1
anim = 2160
postype = p1
pos = 20, 0
random = 0, 150
sprpriority = 4
ownpal = 1
scale = 0.5, 0.5

[State FireB]
type = Explod
trigger1 = time = 20
ignorehitpause = 1
persistent = 1
id = 6021
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 30
ignorehitpause = 1
persistent = 1
id = 6022
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 40
ignorehitpause = 1
persistent = 1
id = 6023
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 50
ignorehitpause = 1
persistent = 1
id = 6024
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 60
ignorehitpause = 1
persistent = 1
id = 6025
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 70
ignorehitpause = 1
persistent = 1
id = 6026
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 80
ignorehitpause = 1
persistent = 1
id = 6027
anim = 6020
vel = 0, 0
postype = p1
pos = 0, 0
random = 0, 0
sprpriority = -1
ownpal = 1
pausemovetime =9999
supermovetime = 9999

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6021
scale = -0.5 - (.02*(time-20)), -0.5 - (.02*(time-20))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6022
scale = -0.5 - (.02*(time-30)), -0.5 - (.02*(time-30))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6023
scale = -0.5 - (.02*(time-40)), -0.5 - (.02*(time-40))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6024
scale = -0.5 - (.02*(time-50)), -0.5 - (.02*(time-50))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6025
scale = -0.5 - (.02*(time-60)), -0.5 - (.02*(time-60))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6026
scale = -0.5 - (.02*(time-70)), -0.5 - (.02*(time-70))

[State FireB]
type = Modifyexplod
trigger1 = 1
ignorehitpause = 1
persistent = 1
id = 6027
scale = -0.5 - (.02*(time-80)), -0.5 - (.02*(time-80))

[State 5]
type = EnvShake
trigger1 = time = 20
trigger2 = time = 30
trigger3 = time = 40
trigger4 = time = 50
trigger5 = time = 59
trigger6 = time = 67
trigger7 = time = 74
trigger8 = time = 80
trigger9 = time = 85
ignorehitpause = 1
time = 5
ampl = 9
freq = 180

[State Throw Sound]
type = PlaySnd
trigger1 = time = 30
trigger2 = time = 74
trigger3 = time = 85
value = 800, 27

[State Throw Sound]
type = PlaySnd
trigger1 = time = 40
trigger2 = time = 50
trigger3 = time = 67
value = 800, 29

[State Throw Sound]
type = PlaySnd
trigger1 = time = 20
trigger2 = time = 59
trigger3 = time = 80
value = 800, 28

[State 2]
type = HitDef
trigger1 = time > 20
trigger1 = time < 70
trigger1 = timemod = 7, 6
attr = A, HP
animtype = Hard
fall.animtype = Hard
damage = 20/(root, var(22)), 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 0
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -8, -4
air.velocity = -8, -1
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
guard.kill = 1
forcestand = 1

[State 2]
type = HitDef
trigger1 = time > 70
trigger1 = timemod = 7, 6
attr = A, HP
animtype = Hard
fall.animtype = Hard
damage = 20/(root, var(22)), 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 0
sparkno = 1
sparkxy = var(2), var(3)
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = 2.0, -8
air.velocity = 2.0, -8
fall = 1
air.fall = 1
fall.recover = 0
kill = 0
guard.kill = 1
forcestand = 1

[State bind]
type = Bindtoparent
trigger1 = time = 0
value = 1
pos = 40, -70

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = anim = 2002 && animtime = 0
trigger2 = time >= 100
trigger3 = root, movetype = H


;==============================================================================================
[Statedef 3310]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2151
sprpriority = 5

[State noshadow]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2]
type = HitDef
trigger1 = time = 0
numhits = 5
attr = A, HP
animtype = Up
fall.animtype = Up
damage = 105, 10
getpower = 0, 0
guardflag = MA
pausetime = 0, 43
sparkno = 1
sparkxy = var(2), var(3)
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
air.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = 2, -12
air.velocity = 2, -12
fall = 1
air.fall = 1
fall.recover = 0
p1sprpriority = 4
forcestand = 1

[State bind]
type = Bindtoparent
trigger1 = time = 0
value = 1
pos = -40, -70

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = animtime = 0


;==============================================================================================
[Statedef 1210]
type = A
physics = N
anim = 1200
ctrl = 0
sprpriority = 1
poweradd = (Var(23)=0) * 70

[State counter hit counter]
type = Varadd
trigger1 = time = 0
v = 11
value = 1

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =1205
ownpal = 1
size.xscale = 0.8
size.yscale = 0.8

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = Velmul
trigger1 = time > 0
x = 0.9
y = 0.9

[State Direction]
type=varset
trigger1= !time
var(35)= 0

[State Direction]
type=varset
triggerall= !time
trigger1= !AIlevel && command = "QCB_y"
trigger2 = AILevel && p2bodydist x < 0 && var(11) = 2
var(35)= 1

[State Direction]
type = turn
trigger1 = animtime = 0 && var(35)

[State 40, 6]
type = ChangeState
trigger1 = animtime = 0
value = 1211

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1211]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 6, 8
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 10, -70
postype = p1
stateno =1206
ownpal = 1
size.xscale = 0.65
size.yscale = 0.65

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 30, -70
postype = p1
stateno =1207
ownpal = 1
size.xscale = 1
size.yscale = 0.7

[State Push]
type = playerpush
trigger1 = time < 25
value = 0
ignorehitpause = 1

[State 40, 4]
type = VelAdd
trigger1 = time > 25
y = 0.44

[State recover]
type = ChangeAnim
trigger1 = time = 25
value = 5040

[State 40, 4]
type = Ctrlset
trigger1 = time = 25
value= 1

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 2]
type = ReversalDef
trigger1 = (time % 4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1202

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 8

[State 2]
type = HitDef
trigger1 = (time % 4) = 2
attr = A, SA
animtype = Medium
damage = 20, 10
guardflag = MA
pausetime = 3, 5
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -1.2*(vel x), 1.8*(Vel Y)
air.fall = 1
getpower = (Var(23)=0) * 20 
fall.recover = 1
fall.recovertime = 16
forcestand = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1220]
type = A
physics = N
anim = 1200
ctrl = 0
sprpriority = 1
poweradd = (Var(23)=0) * 70

[State counter hit counter]
type = Varadd
trigger1 = time = 0
v = 11
value = 1

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 0, -70
postype = p1
stateno =1205
ownpal = 1
size.xscale = 0.8
size.yscale = 0.8

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 0, 4

[State 40, 4]
type = Velmul
trigger1 = time > 0
x = 0.9
y = 0.9

[State Direction]
type=varset
trigger1= !time
var(35)= 0

[State Direction]
type=varset
triggerall= !time
trigger1= !AIlevel && command = "QCB_z"
trigger2 = AILevel && p2bodydist x < 0 && var(11) = 2
var(35)= 1

[State Direction]
type = turn
trigger1 = animtime = 0 && var(35)

[State 40, 6]
type = ChangeState
trigger1 = animtime = 0
value = 1221

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 1221]
type = A
physics = N
movetype = A
ctrl = 0
sprpriority = 1

[State particles]
type = Helper
trigger1 = hitcount = 1 && var(18) = 0
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = varset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 6, 8
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 10, -70
postype = p1
stateno =1206
ownpal = 1
size.xscale = 0.65
size.yscale = 0.65

[State hadouken hit helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "fire vacuum"
pos = 30, -70
postype = p1
stateno =1207
ownpal = 1
size.xscale = 1
size.yscale = 0.7

[State Push]
type = playerpush
trigger1 = time < 25
value = 0
ignorehitpause = 1

[State 40, 4]
type = VelAdd
trigger1 = time > 25
y = 0.44

[State recover]
type = ChangeAnim
trigger1 = time = 25
value = 5040

[State no blocking]
type = Assertspecial
trigger1 = 1
flag = noairguard

[State 40, 4]
type = Ctrlset
trigger1 = time = 25
value= 1

[State 2]
type = ReversalDef
trigger1 = (time % 4) = 0
reversal.attr = SCA, NA, SA
p1stateno = 4999
pausetime = 0, 0; 17, 15
sparkno = -1
hitsound = S800, 2

[State changeanim for counter cancel]
type = ChangeAnim
trigger1 = (time = 0) && (prevstateno != 4999)
value = 1202

[State 40, 4]
type = VelSet
trigger1 = time = 0
x = 10

[State 2]
type = HitDef
trigger1 = (time % 4) = 2
attr = A, SA
animtype = Medium
damage = 25, 10
guardflag = MA
pausetime = 3, 5
sparkno = 1
sparkxy = -10, -50
hitsound = S6, 1
guardsound = S0, 100
ground.type = High
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -5.5
air.velocity = -2.5, -8
air.fall = 1
getpower = (Var(23)=0) * 20 
fall.recover = 1
fall.recovertime = 16
forcestand = 1

[State 40, 6]
type = ChangeState
trigger1 = pos y > 20
value = 1004


;==============================================================================================
[Statedef 2300]
type = S
physics = N
movetype = A
anim = 2315
ctrl = 0
sprpriority = 1
velset = 0, 0
poweradd = (Var(23)=0) * 70

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 30

[State NHB]
type = NotHitBy
trigger1 = animelemtime(14) >= 0 && animelemtime(22) < 0
value = , AP
time = 1

[State FireB]
type = Explod
trigger1 = time = [11, 29]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Land SOund]
type = PlaySnd
trigger1 = time = 11
value = 800, 4
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.5
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 1, 0.5
postype = p1
pos = 0, -8
sprpriority = 2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 21
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.5
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0
trans = addalpha
alpha = 156, 256

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =2301
ownpal = 1

[State 2]
type = velset
trigger1 = animelem = 18
x = 25

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State 2]
type = HitDef
trigger1 = animelem = 20
attr = S, SA
damage = 80, 10
animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0, 12
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = 12, 0
air.hittime = 50
air.velocity = 6, -2
getpower = (Var(23)=0) * 100 
forcestand = 1

[State Push]
type = playerpush
trigger1 = animelemtime(26) < 0 || (movecontact = [1, 16])
value = 0
ignorehitpause = 1

[State 40, 6]
type = turn
trigger1 = animtime = 0
ignorehitpause = 1
persistent = 0

[State 2]
type = PosAdd
trigger1 = animelem = 22
x = 60

[State 2]
type = velset
trigger1 = animelem = 22
x = 2

[State 2]
type = velmul
trigger1 = time > 21
x = 0.88

[State Idle]
type = statetypeset
trigger1 = animelemtime(22) >= 0
movetype = I

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


;==============================================================================================
[Statedef 2310]
type = S
physics = N
movetype = A
anim = 2315
ctrl = 0
sprpriority = 1
velset = 0, 0
poweradd = (Var(23)=0) * 70

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 30

[State NHB]
type = NotHitBy
trigger1 = animelemtime(14) >= 0 && animelemtime(22) < 0
value = , AP
time = 1

[State FireB]
type = Explod
trigger1 = time = [11, 29]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Land SOund]
type = PlaySnd
trigger1 = time = 11
value = 800, 4
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.6
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2303
vel = 0, 0
scale = 1, 0.6
postype = p1
pos = 0, -8
sprpriority = 2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 21
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.5
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0
trans = addalpha
alpha = 156, 256

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =2301
ownpal = 1

[State 2]
type = velset
trigger1 = animelem = 18
x = 35

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State 2]
type = HitDef
trigger1 = animelem = 20
attr = S, SA
damage = 80, 10
animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0, 14
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = 12, 0
air.hittime = 50
air.velocity = 6, -2
getpower = (Var(23)=0) * 100 
forcestand = 1

[State Push]
type = playerpush
trigger1 = animelemtime(26) < 0 || (movecontact = [1, 16])
value = 0
ignorehitpause = 1

[State 40, 6]
type = turn
trigger1 = animtime = 0
ignorehitpause = 1
persistent = 0

[State 2]
type = PosAdd
trigger1 = animelem = 22
x = 90

[State 2]
type = velset
trigger1 = animelem = 22
x = 3

[State 2]
type = velmul
trigger1 = time > 21
x = 0.88

[State Idle]
type = statetypeset
trigger1 = animelemtime(22) >= 0
movetype = I

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


;==============================================================================================
[Statedef 2315]
type = S
physics = N
movetype = A
anim = 2315
ctrl = 0
sprpriority = 1
velset = 0, 0
poweradd = (Var(23)=0) * 70

[State Guard]
type = attackdist
trigger1 = 1
value = 320

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 30

[State NHB]
type = NotHitBy
trigger1 = animelemtime(14) >= 0 && animelemtime(22) < 0
value = , AP
time = 1

[State FireB]
type = Explod
trigger1 = time = [11, 29]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05

[State Land SOund]
type = PlaySnd
trigger1 = time = 11
value = 800, 4
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.7
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0

[State FireB]
type = Explod
trigger1 = time = 21
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.7
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0
trans = addalpha
alpha = 156, 256

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2303
vel = 0, 0
postype = p1
pos = 0, -8
sprpriority = 2
ownpal = 1
accel = 0, 0

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =2301
ownpal = 1

[State 2]
type = velset
trigger1 = animelem = 18
x = 45

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State 2]
type = HitDef
trigger1 = animelem = 20
attr = S, SA
damage = 80, 10
animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0, 16
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = 12, 0
air.hittime = 50
air.velocity = 6, -2
getpower = (Var(23)=0) * 100 
forcestand = 1

[State Push]
type = playerpush
trigger1 = animelemtime(26) < 0 || (movecontact = [1, 16])
value = 0
ignorehitpause = 1

[State 40, 6]
type = turn
trigger1 = animtime = 0
ignorehitpause = 1
persistent = 0

[State 2]
type = PosAdd
trigger1 = animelem = 22
x = 120

[State 2]
type = velset
trigger1 = animelem = 22
x = 4

[State 2]
type = velmul
trigger1 = time > 21
x = 0.88

[State Idle]
type = statetypeset
trigger1 = animelemtime(22) >= 0
movetype = I

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


;==============================================================================================
[Statedef 2325]
type = S
physics = N
movetype = A
anim = 2315
ctrl = 0
sprpriority = 1
velset = 0, 0
poweradd = -1000

[State Slow Motion]
type = Pause 
trigger1 = time = 0
time = 20
movetime = 20
ignorehitpause = 1
persistent = 0

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 148, 148, 148
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 30

[State NHB]
type = NotHitBy
trigger1 = animelemtime(22) < 0
value = SCA
time = 1

[State FireB]
type = Explod
trigger1 = time = [11, 29]
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 40, -30
random = 40, 70
sprpriority = 4
ownpal = 1
accel = 0.02, -0.05
pausemovetime = 9999
supermovetime = 9999

[State Land SOund]
type = PlaySnd
trigger1 = time = 11
value = 800, 4

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2302
vel = 0, 0
scale = 1, 0.7
postype = p1
pos = 0, 0
sprpriority = -2
ownpal = 1
accel = 0, 0
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 21
ignorehitpause = 1
anim = 2306
vel = 6, 0
scale = 1, 0.7
postype = p1
pos = -30, 9
sprpriority = 2
ownpal = 1
accel = 0, 0
trans = addalpha
alpha = 156, 256
pausemovetime = 9999
supermovetime = 9999

[State FireB]
type = Explod
trigger1 = time = 11
ignorehitpause = 1
anim = 2303
vel = 0, 0
postype = p1
pos = 0, -8
sprpriority = 2
ownpal = 1
accel = 0, 0
pausemovetime = 9999
supermovetime = 9999

[State hadouken hit helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
name = "fire vacuum"
pos = 0, 0
postype = p1
stateno =2301
ownpal = 1
pausemovetime = 20
supermovetime = 20

[State 2]
type = velset
trigger1 = animelem = 18
x = 45

[State particles]
type = Helper
trigger1 = moveguarded = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15010
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = movehit = 1
helpertype = normal
name = "dot"
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15003
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State sparkxy set]
type = Null
trigger1 = time = 0
trigger1 = (Var(2) := -10) && (Var(3) := -55)

[State 2]
type = HitDef
trigger1 = animelem = 20
attr = S, SA
damage = 120
getpower = 0, 0
animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0, 16
sparkno = -1
sparkxy = -10, -55
hitsound = S6, 1
guardsound = S0, 100
ground.type = Low
ground.slidetime = 15
ground.hittime = 15
ground.velocity = 16, 0
air.hittime = 50
air.velocity = 6, -2

[State Push]
type = playerpush
trigger1 = time < 23
value = 0
ignorehitpause = 1

[State 40, 6]
type = turn
trigger1 = animtime = 0
ignorehitpause = 1
persistent = 0

[State 2]
type = PosAdd
trigger1 = animelem = 22 && movecontact = 0
x = 70
persistent= 0

[State 2]
type = PosAdd
trigger1 = movecontact = 1
x = ((p2bodydist x) + 120)
persistent= 0

[State 2]
type = velset
trigger1 = animelem = 22
x = 4

[State 2]
type = velmul
trigger1 = time > 21
x = 0.88

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


;==============================================================================================
[Statedef 2301]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2301
sprpriority = 3

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

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 10
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 40
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 2302]
type = S
movetype = A
physics = N
ctrl = 0
anim = 2302
sprpriority = 3

[State FireB]
type = Explod
trigger1 = time < 7
ignorehitpause = 1
anim = 2111
vel = (IfElse(random < 500, -(random/450), -(random/250))), -random/950
scale = 0.35, 0.35
postype = p1
pos = 0, 0
random = 60, 10
sprpriority = 2
ownpal = 1
accel = 0, -0.1

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 10
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1

[State Dissipate]
type = destroyself
trigger1 = time >= 40
trigger2 = parent, movetype = H


;==============================================================================================
[Statedef 40001]
type = S
movetype= I
physics = N
ctrl = 0
anim = 2111

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State varset]
type = varset
trigger1 = rootdist x < 40
trigger2 = rootdist x > -40
v = 10
value = 0

[State varset]
type = varadd
trigger1 = rootdist x < -40
v = 10
value = 1

[State varset]
type = varadd
trigger1 = rootdist x > 40
v = 10
value = -1

[State varset]
type = varset
trigger1 = var(10) = 1
v = 11
value = 1

[State varset]
type = varset
trigger1 = var(10) = -1
v = 11
value = -1

[State 40, 6]
type = sprpriority
trigger1 = root, var(24) != 100
trigger1 = 1
ignorehitpause = 1
persistent = 1
value = 3*(var(11))

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "var 10 : %d | var 11: %d | rootdist x: %d | rootdist y: %d"
params = var(10) , var(11), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State FireB]
type = Explod
trigger1 = timemod = 4, 3
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 4*(var(11))
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 20
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 0

[State velset]
type = turn
trigger1 = (root, facing) != facing

[State velset]
type = velset
trigger1 = time = 0
trigger1 = prevstateno != 4010 && prevstateno != 4011
x = 10
y = 0

[State velset]
type = veladd
trigger1 = time < 10
trigger1 = prevstateno = 4010 || prevstateno = 4011
y = -1

[State velset]
type = veladd
trigger1 = rootdist y > 50
y = 1

[State velset]
type = veladd
trigger1 = rootdist y < 50
y = -1

[State velset]
type = veladd
trigger1 = rootdist x > 0
x = 1

[State velset]
type = veladd
trigger1 = rootdist x < 0
x = -1

[State velset]
type = velmul
trigger1 = vel x < -8 || vel x > 8
x = 0.9

[State velset]
type = velmul
trigger1 = vel y < -8 || vel y > 8
y = 0.9

[State velset]
type = velmul
trigger1 = rootdist x < 10
trigger1 = rootdist x > -10
trigger1 = vel x > -8 || vel x < 8
x = 1.1

[State velset]
type = velmul
trigger1 = rootdist y < 40
trigger1 = rootdist y > -60
trigger1 = vel y > -8 || vel y < 8
y = 1.1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1
persistent = 1

[State Dissipate]
type = changestate	
triggerall = rootdist x > -50
triggerall = rootdist y < 100
triggerall = rootdist y > -100
trigger1 = (root, stateno = 200) || (root, stateno = 205) || (root, stateno = 206) || (root, stateno = 207) || (root, stateno = 210)
trigger2 = (root, stateno = 211) || (root, stateno = 230) || (root, stateno = 235) || (root, stateno = 236) || (root, stateno = 237)
trigger3 = (root, stateno = 240) || (root, stateno = 241) || (root, stateno = 400) || (root, stateno = 410)
trigger4 = (root, stateno = 430) || (root, stateno = 440) || (root, stateno = 450) || (root, stateno = 600) || (root, stateno = 605)
trigger5 = (root, stateno = 610) || (root, stateno = 630) || (root, stateno = 635) || (root, stateno = 640)
value = 4010
ignorehitpause = 1
presistent = 1

[State Dissipate]
type = destroyself
triggerall = root, stateno != 1400
trigger1 = root, var(23) <= 0

[State Dissipate]
type = changestate
trigger1 = root, var(24) = 100
value= 40002


;==============================================================================================
[Statedef 40002]
type = S
movetype= I
physics = N
ctrl = 0
sprpriority = 5

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
id = 3010
anim = 3010
postype = p1
pos = 0, 0
sprpriority = 5
ownpal = 1
pausemovetime = 9999
supermovetime = 9999

[State white fadeout]
type = BGPalFx
trigger1 = time = 0
add = -50, -50, -50
sinadd = 50, 5, 50, 200
time = 48
ignorehitpause = 1
persistent = 0

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 7
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.70, .70, .70
FrameGap = 1
Trans = Add
time = 9999

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1
persistent = 1

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

[State 1]
type = PlaySnd
trigger1 = time = 0
ignorehitpause = 1
persistent = 0
value = 800, 35

[State Slow Motion]
type = Pause 
trigger1 = time = 0
time = 50
movetime = 0
ignorehitpause = 1
persistent = 0

[State Dissipate]
type = changestate
trigger1 = time = 0
value= 4000


;==============================================================================================
[Statedef 4000]
type = S
movetype= I
physics = N
ctrl = 0
anim = 3000

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 10
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = vel x/5, -0.5

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 3001
anim = 3001
postype = p1
pos = 0, 10
sprpriority = 3
ownpal = 1

[State varset]
type = varset
trigger1 = rootdist x < 40
trigger2 = rootdist x > -40
v = 10
value = 0

[State varset]
type = varadd
trigger1 = rootdist x < -40
v = 10
value = 1

[State varset]
type = varadd
trigger1 = rootdist x > 40
v = 10
value = -1

[State varset]
type = varset
trigger1 = var(10) = 1
v = 11
value = 1

[State varset]
type = varset
trigger1 = var(10) = -1
v = 11
value = -1

[State 40, 6]
type = sprpriority
trigger1 = 1
ignorehitpause = 1
persistent = 1
value = 3*(var(11))

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "var 10 : %d | var 11: %d | rootdist x: %d | rootdist y: %d"
params = var(10) , var(11), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 4*(var(11))
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 20
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 0

[State velset]
type = turn
trigger1 = (root, facing) != facing

[State velset]
type = velset
trigger1 = time = 0
trigger1 = prevstateno != 4010 && prevstateno != 4011 && prevstateno != 40002 && prevstateno != 4021
x = 10
y = 0

[State velset]
type = veladd
trigger1 = time < 10
trigger1 = prevstateno = 4010 || prevstateno = 4011 || prevstateno = 40002
y = -1

[State velset]
type = veladd
trigger1 = time = 0
trigger1 = prevstateno = 4021
y = -10

[State velset]
type = veladd
trigger1 = rootdist y > 50
y = 1

[State velset]
type = veladd
trigger1 = rootdist y < 50
y = -1

[State velset]
type = veladd
trigger1 = rootdist x > 0
x = 1

[State velset]
type = veladd
trigger1 = rootdist x < 0
x = -1

[State velset]
type = velmul
trigger1 = vel x < -8 || vel x > 8
x = 0.9

[State velset]
type = velmul
trigger1 = vel y < -8 || vel y > 8
y = 0.9

[State velset]
type = velmul
trigger1 = rootdist x < 10
trigger1 = rootdist x > -10
trigger1 = vel x > -8 || vel x < 8
x = 1.1

[State velset]
type = velmul
trigger1 = rootdist y < 40
trigger1 = rootdist y > -60
trigger1 = vel y > -8 || vel y < 8
y = 1.1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1
persistent = 1

[State Dissipate]
type = changestate	
triggerall = root, var(23) > 0
triggerall = rootdist x > -50
triggerall = rootdist y < 100
triggerall = rootdist y > -100
trigger1 = (root, stateno = 200) || (root, stateno = 205) || (root, stateno = 206) || (root, stateno = 207) || (root, stateno = 210)
trigger2 = (root, stateno = 211) || (root, stateno = 230) || (root, stateno = 235) || (root, stateno = 236) || (root, stateno = 237)
trigger3 = (root, stateno = 240) || (root, stateno = 241) || (root, stateno = 400) || (root, stateno = 410)
trigger4 = (root, stateno = 430) || (root, stateno = 440) || (root, stateno = 450) || (root, stateno = 600) || (root, stateno = 605)
trigger5 = (root, stateno = 610) || (root, stateno = 630) || (root, stateno = 635) || (root, stateno = 640)
value = 4010
ignorehitpause = 1
presistent = 1

[State Dissipate]
type = changestate	
triggerall = root, var(23) > 0
trigger1 = (root, stateno = 2300) || (root, stateno = 2310) || (root, stateno = 2315) 
trigger1 = root, time < 30
value = 4020
ignorehitpause = 1
presistent = 1

[State Dissipate]
type = Changeanim
triggerall = root, stateno != 1400
trigger1 = root, var(23) <= 0
trigger2 = root, power <= 0
value = 3011
persistent = 0
ignorehitpause = 1

[State Dissipate]
type = destroyself
triggerall = root, stateno != 1400
trigger1 = anim = 3011 && animtime = 0


;==============================================================================================
[Statedef 4010]
type = A
movetype = A
physics = N
ctrl = 0
anim = 3000
sprpriority = 3

[State 1]
type = varset
trigger1 = time = 0
v = 20
value = 0

[State 1]
type = varadd
trigger1 = 1
v = 20
value = 1

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State HitOverride]
type = HitOverride
trigger1 = 1
time = -1
stateno = 4011
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = pos y > -5
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 10
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = -2, -vel y/5

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 3001
anim = 3001
postype = p1
pos = 0, 10
sprpriority = 3
ownpal = 1

[State 1]
type = PlaySnd
trigger1 = time = 1
value = 800, 33
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 2]
type = HitDef
trigger1 = root, stateno != 415
trigger1 = movecontact = 0
attr = S, NA
animtype = Medium
damage = 20/(root, var(22)), 10
guardflag = MA
pausetime = 0, 0
sparkno = -1
sparkxy = -10, 0
hitsound = S800, 34
guardsound = S0, 100
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -2, 0
air.velocity = -2, (root, vel Y)
getpower = (root, Var(23)=0) * 20 

[State FireB]
type = Explod
trigger1 = movecontact > 0
ignorehitpause = 1
persistent = 0
id = 3002
anim = 3002
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
scale = 2.5, 2.5

[State particles]
type = Helper
triggerall = root, numhelper(778) = 0
trigger1 = hitcount = 1 && root, var(18) = 0
helpertype = normal
name = "dot"
id = 778
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = parentvarset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "p2dist x : %d | p2dist y: %d | rootdist x: %d | rootdist y: %d"
params = ceil(p2dist x) , ceil(p2dist y), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State FireB]
type = Explod
trigger1 = time < 15
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State FireB]
type = Explod
trigger1 = time >= 15
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = -3
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State 40, 6]
type = sprpriority
trigger1 = time = 15
ignorehitpause = 1
persistent = 0
value = -3

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 5
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.70, .70, .70
FrameGap = 1
Trans = Add
time = 9999

[State velset]
type = turn
trigger1 = (root, facing) != facing

[State velset]
type = velset
trigger1 = time = 0
x = 60

[State velset]
type = velmul
trigger1 = time = 0
y = 2

[State velset]
type = velmul
trigger1 = time < 10
x = 0.9

[State velset]
type = veladd
trigger1 = rootdist y > 50
y = 1

[State velset]
type = veladd
trigger1 = rootdist y < 50
y = -1

[State velset]
type = veladd
trigger1 = rootdist x > 50
x = 2

[State velset]
type = veladd
trigger1 = rootdist x < 50
x = -2

[State velset]
type = velmul
trigger1 = vel x < -10 || vel x > 10
x = 0.9

[State velset]
type = velmul
trigger1 = vel y < -10 || vel y > 10
y = 0.9

[State Dissipate]
type = changestate
trigger1 = var(20) > 10
trigger1 = rootdist x > 10
trigger1 = rootdist y < 50
value = 4000


;==============================================================================================
[Statedef 4011]
type = A
movetype = A
physics = N
ctrl = 0
anim = 3000
sprpriority = 3

[State 1]
type = varadd
trigger1 = 1
v = 20
value = 1

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State HitOverride]
type = HitOverride
trigger1 = 1
time = -1
stateno = 4011
attr = SCA, AA, AP, AT
ignorehitpause = 1

[State HitBy]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = -1
ignorehitpause = 1

[State FireB]
type = Explod
trigger1 = pos y > -5
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 10
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = -2, -vel y/5

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 3001
anim = 3001
postype = p1
pos = 0, 10
sprpriority = 3
ownpal = 1

[State 1]
type = PlaySnd
trigger1 = time = 1
value = 800, 33
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 2]
type = HitDef
trigger1 = root, stateno != 415
trigger1 = movecontact = 0
attr = S, NA
animtype = Medium
damage = 20
guardflag = MA
pausetime = 0, 0
sparkno = -1
sparkxy = -10, 0
hitsound = S800, 34
guardsound = S0, 100
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -2, 0
air.velocity = -2, (root, vel Y)

[State FireB]
type = Explod
trigger1 = movecontact > 0
ignorehitpause = 1
persistent = 0
id = 3002
anim = 3002
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
scale = 2.5, 2.5

[State particles]
type = Helper
triggerall = root, numhelper(778) = 0
trigger1 = hitcount = 1 && root, var(18) = 0
helpertype = normal
name = "dot"
id = 778
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = parentvarset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "p2dist x : %d | p2dist y: %d | rootdist x: %d | rootdist y: %d"
params = ceil(p2dist x) , ceil(p2dist y), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State FireB]
type = Explod
trigger1 = time < 15
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State FireB]
type = Explod
trigger1 = time >= 15
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = -3
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State 40, 6]
type = sprpriority
trigger1 = time = 15
ignorehitpause = 1
persistent = 0
value = -3

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 7
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.70, .70, .70
FrameGap = 1
Trans = Add
time = 9999

[State velset]
type = turn
trigger1 = (root, facing) != facing

[State velset]
type = velmul
trigger1 = var(20) < 10
x = 0.9

[State velset]
type = veladd
trigger1 = rootdist y > 50
y = 1

[State velset]
type = veladd
trigger1 = rootdist y < 50
y = -1

[State velset]
type = veladd
trigger1 = rootdist x > 50
x = 2

[State velset]
type = veladd
trigger1 = rootdist x < 50
x = -2

[State velset]
type = velmul
trigger1 = vel x < -10 || vel x > 10
x = 0.9

[State velset]
type = velmul
trigger1 = vel y < -10 || vel y > 10
y = 0.9

[State Dissipate]
type = changestate
trigger1 = var(20) > 10
trigger1 = rootdist x > 10
trigger1 = rootdist y < 50
value = 4000


;==============================================================================================
[Statedef 4020]
type = S
movetype= I
physics = N
ctrl = 0
anim = 3000

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 10
random = 20, 20
sprpriority = 3
ownpal = 1
accel = 0.02, -0.05
vel = vel x/5, -0.5

[State FireB]
type = Explod
trigger1 = pos y > -10
ignorehitpause = 1
id = 3001
anim = 3001
postype = p1
pos = 0, 10
sprpriority = 3
ownpal = 1

[State varset]
type = varset
trigger1 = rootdist x < 40
trigger2 = rootdist x > -40
v = 10
value = 0

[State varset]
type = varadd
trigger1 = rootdist x < -40
v = 10
value = 1

[State varset]
type = varadd
trigger1 = rootdist x > 40
v = 10
value = -1

[State varset]
type = varset
trigger1 = var(10) = 1
v = 11
value = 1

[State varset]
type = varset
trigger1 = var(10) = -1
v = 11
value = -1

[State 40, 6]
type = sprpriority
trigger1 = 1
ignorehitpause = 1
persistent = 1
value = 3*(var(11))

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "var 10 : %d | var 11: %d | rootdist x: %d | rootdist y: %d"
params = var(10) , var(11), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 4*(var(11))
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 20
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.60, .60, .60
TimeGap = 1
FrameGap = 1
Trans = Add
time = 0

[State velset]
type = velset
trigger1 = time = 0
x = -2
y = 0

[State velset]
type = veladd
trigger1 = rootdist y > 50
y = 1

[State velset]
type = veladd
trigger1 = rootdist y < 50
y = -1

[State NHB]
type = NotHitBy
trigger1 = 1
value = SCA
time = -1
ignorehitpause = 1
persistent = 1

[State Dissipate]
type = changestate	
trigger1 = time = 30
trigger2 = root, time = 30
value = 4021
ignorehitpause = 1
presistent = 1


;==============================================================================================
[Statedef 4021]
type = A
movetype = A
physics = N
ctrl = 0
anim = 3012
sprpriority = 3

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
id = 2121
anim = 2121
postype = p1
pos = 0, 0
random = 20, 20
sprpriority = 4*(var(11))
ownpal = 1
accel = 0.02, -0.05
vel = -vel x/5, -vel y/5

[State Afterimage]
type = AfterImage
trigger1 = time = 0
length = 7
PalBright = 1, 1, 1
PalContrast = 255, 255, 255
PalAdd = 0, 0, 0
PalMul = 0.70, .70, .70
FrameGap = 1
Trans = Add
time = 9999

[State 1]
type = varadd
trigger1 = 1
v = 20
value = 1

[State 1]
type = Posset
trigger1 = pos y > 0
y = 0

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA
ignorehitpause = 1

[State 1]
type = PlaySnd
trigger1 = time = 1
value = 800, 33
channel = 1

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 1
pan = 0

[State 2]
type = HitDef
trigger1 = root, stateno != 415
trigger1 = movecontact = 0
attr = S, NA
animtype = Hard
damage = 20
guardflag = MA
pausetime = 10, 10
sparkno = -1
sparkxy = -10, 0
hitsound = S800, 34
guardsound = S0, 100
ground.type = Low
ground.slidetime = 35
ground.hittime = 35
ground.velocity = -13, 0
air.velocity = -13, (root, vel Y)

[State FireB]
type = Explod
trigger1 = movecontact > 0
ignorehitpause = 1
persistent = 0
id = 3002
anim = 3002
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
scale = 2.5, 2.5

[State particles]
type = Helper
triggerall = root, numhelper(778) = 0
trigger1 = hitcount = 1 && root, var(18) = 0
helpertype = normal
name = "dot"
id = 778
pos = Floor((p2dist x) - (var(2))), (var(3))
postype = p1
stateno =15020
ownpal = 1
size.xscale = 1
size.yscale = 1
ignorehitpause = 1
persistent = 0

[State 40, 6]
type = parentvarset
trigger1 = hitcount = 1
ignorehitpause = 1
persistent = 0
v = 18
value= 150

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "p2dist x : %d | p2dist y: %d | rootdist x: %d | rootdist y: %d"
params = ceil(p2dist x) , ceil(p2dist y), ceil(rootdist x), ceil(rootdist y)
ignorehitpause = 1

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

[State velset]
type = velset
trigger1 = time = 0
x = 35
y = 0

[State Dissipate]
type = changestate
trigger1 = time = 7
value = 4000


;==============================================================================================
[Statedef 9998]
type = S
velset = 0, 0
anim = 9999

[State Bound]
type = screenbound
trigger1 = 1
value = 0
movecamera = 1, 1

[State End]
type = destroyself
trigger1 = roundstate = 2
trigger1 = root, stateno != [1000, 1002]
trigger1 = root, stateno != [1010, 1012]
trigger1 = root, stateno != [1020, 1022]
trigger1 = root, stateno != [3000, 3002]


;==============================================================================================
[Statedef 9999]
type = A
ctrl = 0
anim = 9999
sprpriority = -5
movetype = I
physics = N

[State 1]
type = Pause
trigger1 = time = 0
time = 5
movetime = 5

[State 5]
type = EnvShake
trigger1 = time = 0
ignorehitpause = 1
persistent = 0
time = 5
ampl = 2
freq = 180

[State varset]
type = varset
trigger1 = root, stateno = [0, 1000]
trigger1 = time = 0
v = 42
value = 0

[State varset]
type = varset
trigger1 = root, stateno = [1000, 3000]
trigger1 = time = 0
v = 42
value = 1

[State varset]
type = varset
trigger1 = root, stateno >= 3000
trigger1 = time = 0
v = 42
value = 2

[State varset]
type = varset
trigger1 = root, var(8) >= 90 || root, var(7) >= 3
trigger1 = root, stateno >= 3000
trigger1 = time = 0
v = 42
value = 3

[State white fadeout]
type = BGPalFx
trigger1 = time = 0
trigger1 = var(42) = 1
add = 255, 255, 255
sinadd = -255, -255, -255, 48
time = 12
ignorehitpause = 1
persistent = 0

[State white fadeout]
type = BGPalFx
trigger1 = time = 0
trigger1 = var(42) = 2
add = 255, 255, 255
time = 10
ignorehitpause = 1
persistent = 0
pausemovetime = 9999

[State white fadeout]
type = BGPalFx
trigger1 = time = 10
trigger1 = var(42) = 2
add = 255, 255, 255
sinadd = -255, -255, -255, 48
time = 12
ignorehitpause = 1
persistent = 0
pausemovetime = 9999

[State red fadeout]
type = BGPalFx
trigger1 = time = 0
trigger1 = var(42) = 3
add = 312, -512, -512
time = 10
ignorehitpause = 1

[State red fadeout]
type = BGPalFx
trigger1 = time = 10
trigger1 = var(42) = 3
add = 312, -512, -512
sinadd = -312, 512, 512, 48
time = 12
ignorehitpause = 1

[State silence]
type = assertspecial
trigger1 = time <= 42
trigger1 = var(42) = 3
flag = nofg

[State effect]
type = Playsnd
trigger1 = time = 0
trigger1 = var(42) = 3
value = 0, 13
channel = 0
persistent = 0
volume = 255
ignorehitpause = 1
abspan = 0

[State 6008]
type = destroyself
trigger1 = roundstate < 3


;==============================================================================================
[Statedef 9997]
type = S
physics = S
sprpriority = 0
ctrl = 0

[State 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 0

[State 2]
type = VelSet
trigger1 = time = 0
y = 0

[State 3]
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = time = 4
x = 0

[State 4]
type = ChangeState
trigger1 = !alive
value = 5050

[State 4]
type = ChangeState
trigger1 = var(32) = 1
trigger1 = time = 9
value = 41

[State 4] 
type = ChangeState
trigger1 = time = 50
trigger2 = p2dist x < 0
value = 0
ctrl = 0


;==============================================================================================
[Statedef 9996]
type = C
physics = C
anim = 11
sprpriority = 0
ctrl = 0

[State 11, 1]
type = ChangeAnim
trigger1 = Anim = 6 && Animtime = 0
value = 11

[State 4] 
type = ChangeState
trigger1 = life < 600
value = 12
ctrl = 1


;==============================================================================================
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, Gone]
type= removeexplod
trigger1= ishelper
[State 0, Gone]
type= destroyself
trigger1= ishelper

[State Skip Beginning]
type = ChangeAnim
trigger1 = time = 0
trigger1 = anim = 195 || anim = 1450
value = ifelse(power < 3000, 0, 2)
elem = 8

[State 1]
type = ChangeAnim
triggerall = power < 3000
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 0

[State 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 2 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 2

[State 2]
type = VelSet
trigger1 = time = 0
y = 0

[State 3]
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
trigger2 = time = 4
x = 0

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

[State 0, Are you floating?]
type= changeState
triggerall= pos y < 0
trigger1= !numenemy
trigger2= numenemy = 1
trigger2= (enemy, name = "M-NES Game 1" + enemy, name = "M-NES Game 2" + enemy, name = "M-GB Game 1" + enemy, authorname = "Bane84") < 2
trigger3= numenemy >= 2
trigger3= (enemy(0), name = "M-NES Game 1" + enemy(0), name = "M-NES Game 2" + enemy(0), name = "M-GB Game 1" + enemy(0), authorname = "Bane84") < 2
trigger3= (enemy(1), name = "M-NES Game 1" + enemy(1), name = "M-NES Game 2" + enemy(1), name = "M-GB Game 1" + enemy(1), authorname = "Bane84") < 2
value = 50


;==============================================================================================
[Statedef 20]
type = S
physics = S
sprpriority = 0

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 11 || animelem = 25
value = 40, 3

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

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

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 21


;==============================================================================================
[Statedef 21]
type = S
physics = S
sprpriority = -1

[State Land SOund]
type = PlaySnd
trigger1 = animelem = 11 || animelem = 25
value = 40, 3

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
trigger2 = AILevel
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 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && Animtime = 0
value = 21


;==============================================================================================
[Statedef 40]
type = S
physics = S
anim = 40
ctrl = 0
facep2=1
sprpriority = 1

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 26
channel = 0

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

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

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

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

[State 40, 4]
type = VelSet
trigger1 = Animtime = 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, 5]
type = VelSet
trigger1 = Animtime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = Animtime = 0
value = 50
ctrl = 1


;==============================================================================================
[Statedef 41]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1
facep2=1

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 26
channel = 0

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

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

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

[State 40, 4]
type = VelSet
trigger1 = Animtime = 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, 5]
type = VelSet
trigger1 = Animtime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = Animtime = 0
value = 50
ctrl = 1


;==============================================================================================
[Statedef 42]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1
facep2=1

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 26
channel = 0

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

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

[State 40, 2]
type = VarSet
trigger1 = 1
sysvar(1) = -1

[State 40, 4]
type = VelSet
trigger1 = Animtime = 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, 5]
type = VelSet
trigger1 = Animtime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 6]
type = ChangeState
trigger1 = Animtime = 0
value = 50
ctrl = 1


;==============================================================================================
[Statedef 45]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 26
channel = 0
freqmul = 0.9

[State Land SOund]
type = PlaySnd
trigger1 = animtime = 0
value = 800, 26
channel = 1
freqmul = 1.1

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 8
PalBright = 1, 1, 1
PalContrast = 108, 108, 108
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 2
Trans = Add
time = 22

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

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

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

[State 40, 4]
type = VelSet
trigger1 = Animtime = 0
x = ifelse(sysvar(1)=0, 0, ifelse(sysvar(1)=1, 5.5, -5.0))
y = -10.0

[State 40, 6]
type = ChangeState
trigger1 = Animtime = 0
value = 46
ctrl = 1


;==============================================================================================
[Statedef 46]
type = A
physics = A

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

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

[State 50, 2]
type = ChangeAnim
trigger1 = time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 52, 53))

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


;==============================================================================================
[Statedef 60]
type = S
physics = S
movetype = A
anim = 60
ctrl = 0
velset = 0, 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1]
type = HitBy
trigger1 = time = 0
value=SCA, AT
time = 25

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 88, 88, 88
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 25

[State 2]
type = Posadd
trigger1 = time = [12, 24]
x = -6

[State Land SOund]
type = PlaySnd
trigger1 = time = 3
trigger2 = time = 12
value = 0, 3

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


;==============================================================================================
[Statedef 61]
type = S
physics = S
movetype = A
anim = 61
ctrl = 0
velset = 0, 0

[State Push]
type = playerpush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1]
type = HitBy
trigger1 = time = 0
value=SCA, AT
time = 25

[State Shadows]
type = Afterimage
trigger1 = time = 0
length = 11
PalBright = 1, 1, 1
PalContrast = 88, 88, 88
PalAdd = 0, 0, 0
PalMul = 0.5, 0.5, 0.5
FrameGap = 3
Trans = Add
time = 25

[State 2]
type = Posadd
trigger1 = time = [10, 24]
x = 7

[State Land SOund]
type = PlaySnd
trigger1 = time = 3
trigger2 = time = 12
value = 0, 3

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


;==============================================================================================
[Statedef 100]
type = S
physics = S
anim = 100
sprpriority = 1

[State 4]
type = Changeanim
trigger1 = anim = 100 && animtime = 0
value = 101

[State 1]
type = VelSet
trigger1 = anim = 100
x = 5

[State 1]
type = Veladd
triggerall = anim = 100
trigger1 = animelem = 3
trigger2 = animelem = 4
x = 2

[State 1]
type = VelSet
trigger1 = anim = 101
x = 10

[State 1]
type = posadd
triggerall = anim = 101
trigger1 = animelem = 1
trigger2 = animelem = 8
x = 10

[State Land SOund]
type = PlaySnd
trigger1 = anim = 101
trigger1 = animelem = 4 || animelem = 11
value = 40, 4

[State 7]
type = explod
trigger1 = animelem = 4 || animelem = 11
anim = 103
pos = 5, 0
random = 3, 3
sprpriority = 4

[State 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 3]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 4]
type = ChangeState
trigger1 = command != "holdfwd" && !AILevel
value = 0


;==============================================================================================
[Statedef 105]
type = S
physics = S
movetype = A
anim = 105
ctrl = 0
velset = 0, 0

[State 2]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 1]
type = NotHitBy
trigger1 = 1
value = SCA, NP, SP, HP
time = 1

[State 9]
type = ChangeState
trigger1 = animtime = 0
value = 106
ctrl = 0


;==============================================================================================
[Statedef 106]
type = A
physics = N
movetype = A
anim = 106
velset = const(velocity.run.back.x), const(velocity.run.back.y)

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 800, 25
channel = 0

[State Land SOund]
type = SndPan
trigger1 = 1
channel = 0
pan = 0

[State 1]
type = NotHitBy
trigger1 = time <= 3
value = SCA, NP, SP, HP
time = 1

[State 2]
type = PosAdd
trigger1 = time = 0
x = -40

[State 1]
type = Gravity
trigger1 = 1

[State 9]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = pos y >= 10
value = 107


;==============================================================================================
[Statedef 107]
type = S
physics = S
movetype = I
anim = 107
ctrl = 1

[State 7]
type = GameMakeAnim
trigger1 = time = 0
value = 45
pos = 5, -8
	

[State Land SOund]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

[State 1]
type = velset
trigger1 = time = 0
y = 0

[State 2]
type = PosSet
trigger1 = time = 0
y = 0

[State SlideSound]
type = PlaySnd
trigger1 = time = 0
value = 0, 11
volume = -50

[State Dust]
type = MakeDust
trigger1 = 1
pos = -15, 0
spacing = 5

[State 4]
type = CtrlSet
trigger1 = animtime = -2
value = 1

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


;==============================================================================================
[Statedef 15000]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 13000
vel = 0, 0
scale = 0.6, 0.6
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 13001
vel = 0, 0
scale = 0.6, 0.6
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 13002
vel = 0, 0
scale = 0.6, 0.6
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 13003
vel = 0, 0
scale = 0.6, 0.6
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/200, -(random/200))), (IfElse(random <= 500, random/200, -(random/200)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 2


;==============================================================================================
[Statedef 15001]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 13004
vel = 0, 0
scale = 0.7, 0.7
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 13005
vel = 0, 0
scale = 0.7, 0.7
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 13006
vel = 0, 0
scale = 0.7, 0.7
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 13007
vel = 0, 0
scale = 0.7, 0.7
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/150, -(random/150))), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 2


;==============================================================================================
[Statedef 15002]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 13008
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 13009
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 13010
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 13011
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, -(random/100))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
pausemovetime = -1
supermovetime = -1
ownpal = 1
ontop = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 2


;==============================================================================================
[Statedef 15003]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 13000
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 13001
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 13002
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 13003
vel = 0, 0
scale = 1.2, 1.2
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/80, -(random/80))), (IfElse(random <= 80, random/150, -(random/80)))
scale = 1, 1
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1
ontop = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 2


;==============================================================================================
[Statedef 15004]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State 1]
type = Turn
trigger1 = time = 0

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 13008
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 13009
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 13010
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 13011
vel = 0, 0
scale = 0.8, 0.8
postype = p1
pos = 0, 0
sprpriority = 3
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = (IfElse(random <= 500, random/100, (random/150))), (IfElse(random <= 500, random/150, -(random/100)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 2


;==============================================================================================
[Statedef 15005]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State skin fadeout]
type = PalFx
trigger1 = time = 0
time = 24
add = 0, 0, 0
sinadd = 155, 15, 15, 100

[State bind]
type = Bindtoparent
trigger1 = 1
value = 1
pos = 0, -50

[State FireB]
type = Explod
trigger1 = 1
ignorehitpause = 1
anim = 2111
vel = (IfElse(parent, vel x < 0, random/150, -(random/150))), (IfElse(parent, vel Y < 0, random/150, -(random/150)))
scale = 0.35, 0.35
postype = p1
pos = 0, 0
random = 50, 70
sprpriority = 2
ownpal = 1
accel = 0.1, -0.1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 5


;==============================================================================================
[Statedef 15006]
type = S
movetype = A
physics = N
ctrl = 0
sprpriority = 5

[State 4]
type = ChangeAnim2
trigger1 = 1
value = parent, anim
elem = parent, animelemNo(0)

[State 1]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State Afterimage]
type = AfterImage
trigger1 = 1
length = 2
PalBright = 1, 1, 1
PalContrast = 255, 155, 25
PalAdd = 0, 0, 0
PalMul = 0.55, .55, .55
TimeGap = 1
FrameGap = 1
Trans = Add
time = 9999

[State bind]
type = Bindtoparent
trigger1 = -1
value = 1
pos = 1, 5

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time >= 30
trigger2 = facing != parent, facing


;==============================================================================================
[Statedef 15010]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State FireB]
type = Explod
trigger1 = time = 0
ignorehitpause = 1
anim = 2122
vel = -(random/150), (IfElse(random <= 500, random/150, -(random/150)))
postype = p1
pos = 0, 0
sprpriority = 2
ownpal = 1

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = time > 30


;==============================================================================================
[Statedef 15020]
type = S
movetype = A
physics = N
ctrl = 0
anim = 9999
sprpriority = 5

[State Randomizer]
type = varrandom
trigger1 = 1
v = 10
range = 0, 100

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5000 || enemynear, stateno = 5020 || enemynear, stateno = 5030 || enemynear, stateno = 5001
trigger1 = timemod = 3, 2
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = 40, (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5000 || enemynear, stateno = 5020 || enemynear, stateno = 5030 || enemynear, stateno = 5001
trigger1 = timemod = 3, 2
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 6017
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = 40, (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.65, 0.65
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5000 || enemynear, stateno = 5020 || enemynear, stateno = 5030 || enemynear, stateno = 5001
trigger1 = timemod = 3, 2
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 6018
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = 40, (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.5, 0.5
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5000 || enemynear, stateno = 5020 || enemynear, stateno = 5030 || enemynear, stateno = 5001
trigger1 = timemod = 3, 2
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 6019
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = 40, (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5050 || enemynear, stateno = 5035
trigger1 = var(10) >= 0 && var(10) < 25
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = 20, (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , (-(enemynear, vel y)/5)

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5050 || enemynear, stateno = 5035
trigger1 = var(10) >= 25 && var(10) < 50
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = (enemynear, const(size.height)), (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.65, 0.65
vel = (-(enemynear, vel x)/5) , (-(enemynear, vel y)/5)

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5050 || enemynear, stateno = 5035
trigger1 = var(10) >= 50 && var(10) < 75
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = (enemynear, const(size.height)), (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.5, 0.5
vel = (-(enemynear, vel x)/5) , (-(enemynear, vel y)/5)

[State FireB]
type = Explod
trigger1 = numenemy
trigger1 = enemynear, stateno = 5050 || enemynear, stateno = 5035
trigger1 = var(10) >= 75 && var(10) <= 100
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), (enemynear, const(size.mid.pos.y))+30
random = (enemynear, const(size.height)), (enemynear, const(size.height))
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , (-(enemynear, vel y)/5)

[State FireB]
type = Explod
triggerall = timemod = 3, 2
triggerall = var(10) >= 0 && var(10) < 25
triggerall = numenemy
trigger1 = enemynear, stateno = 5100 || enemynear, stateno = 5101 || enemynear, stateno = 5110 || enemynear, stateno = 3012
trigger2 = enemynear, stateno = 3013 || enemynear, stateno = 5150
ignorehitpause = 1
anim = 6016
postype = p2
pos=(enemynear, const(size.mid.pos.x)), 5
random = (enemynear, const(size.height)+60), 20
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
triggerall = timemod = 3, 2
triggerall = var(10) >= 25 && var(10) < 50
triggerall = numenemy
trigger1 = enemynear, stateno = 5100 || enemynear, stateno = 5101 || enemynear, stateno = 5110 || enemynear, stateno = 3012
trigger2 = enemynear, stateno = 3013 || enemynear, stateno = 5150
ignorehitpause = 1
anim = 6017
postype = p2
pos=(enemynear, const(size.mid.pos.x)), 5
random = (enemynear, const(size.height)+60), 20
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.65, 0.65
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
triggerall = timemod = 3, 2
triggerall = var(10) >= 50 && var(10) < 75
triggerall = numenemy
trigger1 = enemynear, stateno = 5100 || enemynear, stateno = 5101 || enemynear, stateno = 5110 || enemynear, stateno = 3012
trigger2 = enemynear, stateno = 3013 || enemynear, stateno = 5150
ignorehitpause = 1
anim = 6018
postype = p2
pos=(enemynear, const(size.mid.pos.x)), 5
random = (enemynear, const(size.height)+60), 20
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
scale = 0.5, 0.5
vel = (-(enemynear, vel x)/5) , -0.3

[State FireB]
type = Explod
triggerall = timemod = 3, 2
triggerall = var(10) >= 75 && var(10) <= 100
triggerall = numenemy
trigger1 = enemynear, stateno = 5100 || enemynear, stateno = 5101 || enemynear, stateno = 5110 || enemynear, stateno = 3012
trigger2 = enemynear, stateno = 3013 || enemynear, stateno = 5150
ignorehitpause = 1
anim = 6019
postype = p2
pos=(enemynear, const(size.mid.pos.x)), 5
random = (enemynear, const(size.height)+60), 20
sprpriority = 3
ownpal = 1
ontop = 1
trans.type = addalpha
trans.alpha = 10, 10
vel = (-(enemynear, vel x)/5) , -0.3

[State posfollow]
type= posadd
trigger1 = 1
x = ceil(p2dist x)
y = ceil(p2dist y)

[State NHB]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State Dissipate]
type = destroyself
trigger1 = root, var(18) <= 0
trigger2 = numenemy
trigger2 = enemynear, ctrl || enemynear, movetype!=H


;==============================================================================================
[Statedef 120]
type = U
physics = U
anim = 120 + (statetype = C) + (statetype = A) * 2

[State 120, Type]
type = statetypeset
trigger1 = !time && statetype = S
physics = S

[State 120, Type]
type = statetypeset
trigger1 = !time && statetype = C
physics = C

[State 120, Type]
type = statetypeset
trigger1 = !time && statetype = A
physics = A

[State 120, Vel]
type = velset
trigger1 = !time && statetype != A
x = 0
y = 0

[State 120, High to Low]
type = statetypeset
trigger1 = !AIlevel && statetype = S && command = "holddown"
trigger2 = AIlevel && statetype = S && (enemynear, movetype = A) && (enemynear, statetype = C)
statetype = C
physics = C

[State 120, Low to High]
type = statetypeset
trigger1 = !AIlevel && statetype = C && command != "holddown"
trigger2 = AIlevel && statetype = C && (enemynear, movetype = A) && (enemynear, statetype != C)
statetype = S
physics = S

[State 120, AI fix]
type = ctrlset
trigger1 = AIlevel && numenemy
value = (enemynear, time >= 60 || time >= 20)

[State 120, End]
type = changestate
trigger1 = !animtime || AIlevel
value = 130 + (statetype = C) + (statetype = A) * 2

[State 120, Stop]
type = changestate
trigger1 = (!AIlevel && command != "holdback")
trigger2 = !inguarddist
trigger3 = AIlevel && numenemy
trigger3 = enemynear, hitdefattr = SCA, AT
value = 140


;==============================================================================================
[Statedef 130]
type=S
physics=S

[State anim]
type=changeanim
trigger1 = anim!=130
value=130

[State Hi to Lo]
type=changestate
trigger1 = !AILevel && command="holddown"
trigger2 = AILevel && (enemynear, movetype=A) && (enemynear, statetype=C)
value=131

[State Stop Guarding]
type=changeState
trigger1 = !AILevel && command!="holdback"
trigger2 = AILevel
trigger2 = enemynear, movetype!=A && p2bodydist x>=80 && (p2dist y!=[-75, 75]) && !(enemy, numproj)
trigger3 = !inguarddist
value=140

[State AI fix]
type = ctrlset
trigger1 = AIlevel && numenemy
value = (enemynear, time >= 60 || time >= 20)


;==============================================================================================
[Statedef 131]
type=C
physics=C

[State anim]
type=changeanim
trigger1 = anim!=131
value=131

[State Lo to Hi]
type=changestate
trigger1 = !AILevel && statetype=C && command!="holddown"
trigger2 = AILevel && statetype=C && (enemynear, movetype=A) && (enemynear, statetype!=C)
value=130

[State Stop Guarding]
type=changestate
trigger1 = !AILevel && command!="holdback"
trigger2 = AILevel
trigger2 = enemynear, movetype!=A && p2bodydist x>=80 && (p2dist y!=[-75, 75]) && !(enemy, numproj)
trigger3 = !inguarddist
value=140

[State AI fix]
type = ctrlset
trigger1 = AIlevel && numenemy
value = (enemynear, time >= 60 || time >= 20)


;==============================================================================================
[Statedef 132]
type=A
physics=N

[State anim]
type=changeanim
trigger1 = anim!=132
value=132

[State grav]
type=veladd
trigger1 = 1
y=const(movement.yaccel)

[State var]
type=varset
trigger1 = 1
sysvar(0)=(pos y>=0) && (vel y>0)

[State vel]
type=velset
trigger1 = sysvar(0)
y=0

[State pos]
type=posset
trigger1 = sysvar(0)
y=0

[State end]
type=changestate
triggerall = sysvar(0)
triggerall = inguarddist
trigger1 = !AILevel && command!="holdback"
trigger2 = AILevel
trigger2 = enemynear, movetype!=A && p2bodydist x>=80 && (p2dist y!=[-75, 75]) && !(enemy, numproj)
value=130

[State end]
type=changeState
trigger1 = sysvar(0)
value=52

[State stop guarding]
type=changestate
trigger1 = !AILevel && command!="holdback"
trigger2 = AILevel
trigger2 = enemynear, movetype!=A && p2bodydist x>=80 && (p2dist y!=[-75, 75]) && !(enemy, numproj)
trigger3 = !inguarddist
value=140

[State AI fix]
type = ctrlset
trigger1 = AIlevel && numenemy
value = (enemynear, time >= 60 || time >= 20)


;==============================================================================================
[Statedef 140000]
type = U
physics = U
ctrl = 1

[State 1]
type = ChangeAnim
trigger1 = time = 0
value = 140 + (statetype = C) + (statetype = A) * 2

[State 2]
type = StateTypeSet
trigger1 = time = 0 && statetype = S
physics = S

[State 3]
type = StateTypeSet
trigger1 = time = 0 && statetype = C
physics = C

[State 4]
type = StateTypeSet
trigger1 = time = 0 && statetype = A
physics = A

[State Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
trigger2 = AILevel && statetype = S && p2statetype = C
statetype = C
physics = C

[State Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
trigger2 = AILevel && statetype = C && p2statetype != C
statetype = S
physics = S

[State 5]
type=changestate
trigger1 = !animtime
value = (statetype = C) * 11 + (statetype = A) * 51


;==============================================================================================
[Statedef 150]
type = S
movetype= H
physics = N
velset = 0, 0

[State 1]
type = varset
trigger1 = anim = 130 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 1

[State 1]
type = varset
trigger1 = anim = 1300 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 0 && time < 22
value = 130
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 1 && time < 22
value = 1300
elem = time
ignorehitpause = 1
persistent = 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 0 && time = 0
value = 7, 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 1 && time = 0
value = 7, 1

[State 1]
type = ChangeAnim
triggerall = power >= 1000
triggerall = var(1) = 0 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
value = 1300
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
triggerall = power >= 1000
triggerall = var(1) = 1 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
value = 130
elem = time
ignorehitpause = 1
persistent = 0

[State Slow Motion]
type = Pause 
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
time = 10
movetime = 0

[State particles]
type = Helper
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
helpertype = normal
name = "dot"
id = 12
pos = 0, -65
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 1]
type = varset
trigger1 = command = "a" || command = "b" || command = "c"
trigger2 = AILevel && var(42) > 50 && p2dist x < 250 && random < 300
trigger3 = AILevel && var(42) > 12 && random < 200 && p2dist x < 250 && random < 300
trigger4 = AILevel && var(20) > 0 && p2dist x < 250 && random < 300
ignorehitpause = 1
persistent = 0
v = 21
value = 1

[State 1]
type = varset
trigger1 = command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
v = 21
value = 2

[State 1]
type = varadd
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
v = 20
value = 1

[State 1]
type = PlaySnd
triggerall = var(20) <= 2
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
value = 800, 2

[State 10]
type = PlaySnd
trigger1 = power >= 1000
trigger1 = var(20) > 2
value = 6, 5
ignorehitpause = 1
persistent = 0

[State 5]
type = PalFX
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
trigger2 = AILevel && var(42) > 50
trigger3 = AILevel && var(42) > 12 && random < 200
trigger4 = AILevel && var(20) > 0
ignorehitpause = 1
persistent = 0
time = 3
add = 128, 128, 128

[State 2]
type = ChangeState
trigger1 = power >= 1000
trigger1 = var(20) > 2
trigger1 = var(21) = 1
value = 1341
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = power >= 1000
trigger1 = var(20) > 2
trigger1 = var(21) = 2
value = 2325
ignorehitpause = 1

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

[State 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3


;==============================================================================================
[Statedef 151]
type = S
physics = S
movetype = H
anim = 130

[State 151, Vel]
type = hitvelset
trigger1 = !time
x = 1

[State 151, Vel]
type = velset
trigger1 = time = gethitvar(slidetime)
trigger2 = hitover
x = 0

[State 151, Ctrl]
type = ctrlset
trigger1 = time = gethitvar(ctrltime)
value = 1

[State 151, High to Low]
type = statetypeset
trigger1 = !AIlevel && statetype = S && command = "holddown"
trigger2 = AIlevel && random < (1000 * (AIlevel ** 2 / 64.0))
trigger2 = statetype = S && (enemynear, movetype = A) && (enemynear, statetype = C)
statetype = C
physics = C

[State 151, Low to High]
type = statetypeset
trigger1 = !AIlevel && statetype = C && command != "holddown"
trigger2 = AIlevel && random < (1000 * (AIlevel ** 2 / 64.0))
trigger2 = statetype = C && (enemynear, movetype = A) && (enemynear, statetype != C)
statetype = S
physics = S

[State 151, End]
type = changestate
trigger1 = hitover
value = 130
ctrl = 1


;==============================================================================================
[Statedef 152]
type = C
movetype= H
physics = N
velset = 0, 0

[State 1]
type = varset
trigger1 = anim = 131 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 1

[State 1]
type = varset
trigger1 = anim = 1310 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 0 && time = 0
value = 7, 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 1 && time = 0
value = 7, 1

[State 1]
type = ChangeAnim
trigger1 = var(1) = 0 && time < 22
value = 131
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 1 && time < 22
value = 1310
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
triggerall = power >= 1000
trigger1 = var(1) = 0 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
value = 1310
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
triggerall = power >= 1000
trigger1 = var(1) = 1 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
value = 131
elem = time
ignorehitpause = 1
persistent = 0

[State Slow Motion]
type = Pause 
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
time = 10
movetime = 0

[State particles]
type = Helper
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
helpertype = normal
name = "dot"
id = 12
pos = 0, -40
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 1]
type = varset
trigger1 = command = "a" || command = "b" || command = "c"
ignorehitpause = 1
persistent = 0
v = 21
value = 1

[State 1]
type = varset
trigger1 = command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
v = 21
value = 2

[State 1]
type = varadd
triggerall = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
v = 20
value = 1

[State 1]
type = PlaySnd
trigger1 = var(20) <= 2
trigger1 = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
value = 800, 2

[State 10]
type = PlaySnd
trigger1 = power >= 1000
trigger1 = var(20) > 2
value = 6, 5
ignorehitpause = 1
persistent = 0

[State 5]
type = PalFX
trigger1 = power >= 1000
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
time = 3
add = 128, 128, 128

[State 2]
type = ChangeState
trigger1 = power >= 1000
trigger1 = var(20) > 2
trigger1 = var(21) = 1
value = 1341
ignorehitpause = 1

[State 2]
type = ChangeState
trigger1 = power >= 1000
trigger1 = var(20) > 2
trigger1 = var(21) = 2
value = 2325
ignorehitpause = 1

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

[State 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4


;==============================================================================================
[Statedef 153]
type = C
physics = C
movetype = H
anim = 131

[State 153, Vel]
type = hitvelset
trigger1 = !time
x = 1

[State 153, Vel]
type = velset
trigger1 = time = gethitvar(slidetime)
trigger2 = hitover
x = 0

[State 153, Ctrl]
type = ctrlset
trigger1 = time = gethitvar(ctrltime)
value = 1

[State 153, High to Low]
type = statetypeset
trigger1 = !AIlevel && statetype = S && command = "holddown"
trigger2 = AIlevel && random < (1000 * (AIlevel ** 2 / 64.0))
trigger2 = statetype = S && (enemynear, movetype = A) && (enemynear, statetype = C)
statetype = C
physics = C

[State 153, Low to High]
type = statetypeset
trigger1 = !AIlevel && statetype = C && command != "holddown"
trigger2 = AIlevel && random < (1000 * (AIlevel ** 2 / 64.0))
trigger2 = statetype = C && (enemynear, movetype = A) && (enemynear, statetype != C)
statetype = S
physics = S

[State 153, End]
type = changestate
trigger1 = hitover
value = 131
ctrl = 1


;==============================================================================================
[Statedef 154]
type = A
movetype= H
physics = N
velset = 0, 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 0 && time = 0
value = 7, 0

[State 10]
type = PlaySnd
trigger1 = var(1) = 1 && time = 0
value = 7, 1

[State 1]
type = varset
trigger1 = anim = 132 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 1

[State 1]
type = varset
trigger1 = anim = 1320 && time = 4
ignorehitpause = 1
persistent = 0
v = 1
value = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 0 && time < 22
value = 132
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 1 && time < 22
value = 1320
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 0 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
value = 1320
elem = time
ignorehitpause = 1
persistent = 0

[State 1]
type = ChangeAnim
trigger1 = var(1) = 1 && time < 22
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
value = 132
elem = time
ignorehitpause = 1
persistent = 0

[State Slow Motion]
type = Pause 
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
time = 10
movetime = 0

[State particles]
type = Helper
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
helpertype = normal
name = "dot"
id = 12
pos = 0, -40
postype = p1
stateno =15002
ownpal = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State 1]
type = varset
trigger1 = command = "a" || command = "b" || command = "c"
ignorehitpause = 1
persistent = 0
v = 21
value = 1

[State 1]
type = varset
trigger1 = command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
v = 21
value = 2

[State 1]
type = varadd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
v = 20
value = 1

[State 1]
type = PlaySnd
trigger1 = var(20) <= 2
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
value = 800, 2

[State 10]
type = PlaySnd
trigger1 = var(20) > 2
value = 6, 5
ignorehitpause = 1
persistent = 0

[State 5]
type = PalFX
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z"
ignorehitpause = 1
persistent = 0
time = 3
add = 128, 128, 128

[State 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155

[State 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4


;==============================================================================================
[Statedef 155]
type = A
movetype= H
physics = N

[State 1]
type = HitVelSet
trigger1 = time = 0
x = 1
y = 1

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

[State 3]
type = CtrlSet
trigger1 = time = GetHitVar(ctrltime)
value = 1

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

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

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

[State 7]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command != "holdback"
value = 52

[State 8]
type = ChangeState
trigger1 = sysvar(0)
value = 130


;==============================================================================================
[Statedef 4999]
type = U
movetype= U
physics = U
ctrl = 0

[State Wood 1]
type = Explod
trigger1 = time <= 0 && numexplod(1712) = 0
anim = F40
postype = p1
pos = ceil(p2dist x/2), -ceil(70 -(p2dist y/2))
scale = 1, 1
id = 1712
sprpriority = 5
pausemovetime = -1
supermovetime = -1
ignorehitpause = 1
persistent = 0

[State particles]
type = Helper
trigger1 = time <= 0 && numhelper(12) = 0
helpertype = normal
name = "dot"
id = 12
pos = ceil(p2dist x/2), -ceil(70 -(p2dist y/2))
postype = p1
stateno =15002
ownpal = 1
size.xscale = 1
size.yscale = 1
pausemovetime = 999
supermovetime = 999
ignorehitpause = 1
persistent = 0

[State particles]
type = bgpalfx
trigger1 = 1
time = 20
add = 128, 128, 128
sinadd = -128, -128, -128, 80
persistent = 0
ignorehitpause = 1

[State 4999, 1]
type = changeanim
trigger1 = 1
value = Anim
elem = Var(5)

[State 2]
type = PosFreeze
trigger1 = 1

[State 2]
type = pause
trigger1 = 1
time = 20
endcmdbuftime = 20
persistent = 0
ignorehitpause = 1

[State if dead]
type = SelfState
trigger1 = !alive
value = ifelse(StateType = A, 5020, 5000)

[State still kicking]
type = SelfState
trigger1 = alive
value = Var(4)
ctrl = 1


;============================================================================================== 
[Statedef 5100]
type    = L
movetype= H
physics = N

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

[State 5100, Var]
type = VarSet
trigger1 = time = 0
sysvar(1) = floor(vel y)

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

[State 5100, 3]
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]
type = VelMul
trigger1 = time = 0
x = 0.75

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

[State 5100, 8]
type = Explod
trigger1 = time = 1
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprpriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

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

[State 5100, 10]
type = PlaySnd
trigger1 = time = 1
value = 40, 5

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

[State 5100, 12]
type = ChangeState
trigger1 = Animtime = 0
value = 5101

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


;============================================================================================== 
[Statedef 5101]
type    = L
movetype= H
physics = N

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

[State 5101, 2]
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 = Const(movement.down.bounce.offset.y)

[State 5101, 5]
type = PosAdd
trigger1 = time = 0
x = Const(movement.down.bounce.offset.x)

[State 5101, 6]
type = VelAdd
trigger1 = 1
y = Const(movement.down.bounce.yaccel)

[State 5101, 7]
trigger1 = Vel Y > 0
trigger1 = pos y >= Const(movement.down.bounce.groundlevel)
type = ChangeState
value = 5110


;============================================================================================== 
[Statedef 5110]
type    = L
movetype= H
physics = N

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

[State 5110, 1]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3]
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119]
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

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

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

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

[State 5110, 6]
type = PlaySnd
trigger1 = time = 0
trigger1 = !SysVar(0)
value = 40, 5

[State 5110, 7]
type = Explod
trigger1 = time = 0
trigger1 = !SysVar(0)
anim = F(60 + (sysvar(1) > Const720p(20)) + (sysvar(1) > Const720p(56)))
pos = 0, 0
sprpriority = ifelse (sysvar(1) <= Const720p(56), -10, 10)

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

[State 5110, 9]
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = Animtime = 0
trigger2 = SysVar(0)
value = 5110 + (anim % 10)

[State 5110, 10]
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = Animtime = 0
trigger2 = SysVar(0)
value = 5110

[State 5110, 11]
type = ChangeState
triggerall = !alive
trigger1 = Animtime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = time = 0
sysvar(0) = 0

[State 5110, 13]
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = VelSet
trigger1 = abs(vel x) < Const(movement.down.friction.threshold)
persistent = 0
x = 0

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

[State 5110, 16]
type = ForceFeedback
trigger1 = !alive
trigger1 = time = 0
ampl = 200, 7, -0.467
time = 30
waveform = sine


;============================================================================================== 
[Statedef 5200]
type = A
movetype = H
physics = N

[State Anim]
type = changeanim
trigger1 = anim = 5035 && !animtime
value = 5050

[State Vel]
type = veladd
trigger1 = 1
y = gethitvar(yaccel)

[State End]
type = SelfState
trigger1 = vel y > 0 && pos y >= -10
value = 5201


[Statedef 5201]
type = S
movetype = I
physics = N
anim = 5200
ctrl = 0
facep2 = 1

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

[State Vel]
type = velset
trigger1 = !time
x = -8
y = 0

[State Vel]
type = velmul
trigger1 = 1
x = 0.9

[State Sound]
type = PlaySnd
trigger1 = time = 0 || time = 8
value = 0, 3

[State flash]
type = palfx
trigger1 = !time
add = 255, 255, 255
sinadd = -255, -255, -255, 40
time = 10

[State Dust]
type = MakeDust
trigger1 = abs(vel x) >= 1
pos = 0, 0
spacing = 4

[State NHB]
type = nothitby
trigger1 = 1
value = SCA
time = 1

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


;============================================================================================== 
[Statedef 5210]
type = A
movetype = I
physics = N
anim = 5210
ctrl = 0

[State flash]
type = palfx
trigger1 = !time
add = 255, 255, 255
sinadd = -255, -255, -255, 40
time = 10

[State Accel]
type = veladd
trigger1 = 1
y = 0.6

[State Vel]
type = velset
trigger1 = !time
x = ifelse((command = "holdfwd" && command != "holdback"), 4, ifelse((command != "holdfwd" && command = "holdback"), -4, 0))
y = -7.55

[State 5210, Turn]
type = turn
trigger1 = !time
trigger1 = p2dist x < 0

[State NHB]
type = nothitby
trigger1 = time<14
value = SCA
time = 1

[State ctrl]
type = ctrlset
trigger1 = time >= 14
value = 1

[State Land]
type = changestate
trigger1 = vel y > 0
trigger1 = pos y > -vel y
value = 52


;==============================================================================================
[Statedef 5205]
type = A
physics = N
movetype = H

[State 5205, Anim]
type = changeanim
trigger1 = !animtime
trigger1 = anim=5035
value = 5050

[State 5205, Accel]
type = veladd
trigger1 = 1
y = gethitvar(yaccel)

[State 5205, Ground]
type= selfstate
trigger1= vel y > 0
trigger1= pos y >= const(movement.air.gethit.groundrecover.groundlevel)
value= 5200

[State Air]
type = SelfState
trigger1 = time >= 60
value = 5210


;==============================================================================================
[Statedef 52]
type = S
physics = S
ctrl = 0
anim = 47

[State 7]
type = GameMakeAnim
trigger1 = time = 0
value = 45
pos = 5, -8

[State 7, Landing Sound]
type = PlaySnd
trigger1 = time = 0
value = 40, 0

[State 52, 1]
type = VelSet
trigger1 = time = 0
y = 0

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

[State Guard]
type = changestate
trigger1 = inguarddist
trigger1 = command="holdback"
trigger1 = prevstateno = 46 || prevstateno = 50
value = 120

[State 52, 3]
type = CtrlSet
trigger1 = time = 1
value = 1

[State 52, 4]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1


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

[State 1]
type = VarRangeSet
trigger1 = roundsexisted = 0
value = 0

[State 2]
type = VarRangeSet
trigger1 = roundsexisted = 0
fvalue = 0

[State 3]
type = RemapPal
trigger1 = 1
source = 1, 1
dest = 1, palno

[State 4]
type = ChangeState
trigger1 = roundno = 1
value = 190

[State 4]
type = changestate
trigger1 = !time && teammode = turns
trigger1 = roundsexisted = 0 && roundno >= 2
value = 190

[State 5]
type = ChangeState
trigger1 = 1
value = 0


;==============================================================================================
[Statedef -2]

[State -2, P2 Safe Fall]
type = targetstate
trigger1 = numtarget=1
trigger1 = target, command = "recovery"
trigger1 = target, gethitvar(fall.recover)
trigger1 = target, alive && target, hitfall
trigger1 = target, pos y >= -48 && target, vel y > 0
trigger1 = target, stateno = 5030 || target, stateno = 5035 || target, stateno = 5050 || target, stateno = 5071
value = 5205
ignorehitpause = 1

[State -2, Throws Disallowed]
type= varset
triggerall= numenemy
trigger1= enemynear, movetype != H
trigger1= enemynear, stateno != 140
trigger1= (enemynear, ctrl && enemynear, time >= 1) || (enemynear, time >= 8)
trigger2= enemynear, movetype = A
trigger3= (enemynear, stateno != [0, 52]) && (enemynear, stateno != [120, 155]) && (enemynear, stateno != [5000, 5120])
var(39)= 0

[State -2, Throws Disallowed]
type= varset
triggerall= numenemy
trigger1= enemynear, stateno = [150, 155]
trigger2= (enemynear, stateno = 51 || enemynear, stateno = 140) && (enemynear, prevstateno = [150, 155])
trigger3= enemynear, movetype = H && enemynear, statetype != A
trigger4= (enemynear, stateno = [5020, 5040]) && enemynear, hitfall = 0
trigger5= enemynear, stateno = 40 && enemynear, prevstateno != 52 && (enemynear, anim != [0, 29])
var(39)= 1
ignorehitpause= 1

[State Tech]
type = varadd
trigger1 = var(27)>0
var(27) = -1

[State varset]
type = varset
trigger1 = power <= 0
v = 23
value = 0

[State varset] 
type = varadd
trigger1 = var(23) > 0
v = 23
value = -1

[State power deplete]
type = poweradd
trigger1 = var(23) > 0
trigger1 = numhelper(777) >= 1
ignorehitpause = 1
persistent = 1
value = -5

[State -2, ai memory]
type = Varadd
trigger1 = numenemy
trigger1 = enemynear, movetype = I
v = 40
value = 1

[State -2, ai memory]
type = Varset
trigger1 = numenemy
trigger1 = enemynear, movetype != I
v = 40
value = 0

[State -2, how did he hit me from so far]
type = Varadd
trigger1 = var(42) = 1
trigger1 = p2dist x > 250
v = 41
value = 1

[State -2, wtf ow]
type = Varadd
trigger1 = movetype = H
v = 42
value = 1

[State -2, whew]
type = Varset
trigger1 = movetype != h
v = 42
value = 0

[State -2, ai memory]
type = Varadd
trigger1 = numenemy
trigger1 = facing = enemy, facing
v = 43
value = 1

[State -2, ai memory]
type = Varset
trigger1 = numenemy
trigger1 = facing != enemy, facing
v = 43
value = 0

[State -2, wtf ow]
type = Varset
trigger1 = stateno = 450
v = 44
value = 100

[State -2, whew]
type = Varadd
trigger1 = stateno != 450 && var(44) > 0
v = 44
value = -1

[State -2, ai mode]
type = varrandom
trigger1 = var(31) = 0 && numtarget = 0
v = 33
range = 0, 100

[State -2, ai mode]
type = Varset
trigger1 = var(31) = 0 && numtarget = 0
trigger1 = var(33) >= 0
trigger1 = var(33) < 25
v = 32
value = 1

[State -2, ai mode]
type = Varset
trigger1 = var(31) = 0 && numtarget = 0
trigger1 = var(33) >= 25
trigger1 = var(33) < 50
v = 32
value = 2

[State -2, ai mode]
type = Varset
trigger1 = var(31) = 0 && numtarget = 0
trigger1 = var(33) >=50
trigger1 = var(33) < 75
v = 32
value = 3

[State -2, ai mode]
type = Varset
trigger1 = var(31) = 0 && numtarget = 0
trigger1 = var(33) >= 75
trigger1 = var(33) <= 100
v = 32
value = 4

[State -2, ai mode override for facing]
type = Varset
trigger1 = var(43) > 15 && numtarget = 0
v = 32
value = 1

[State -2, wuss mode]
type = Varset
trigger1 = power >= 2000 && life >= 600 && p2life <= 200
v = 32
value = 0

[State -2, ai mode counter]
type = Varset
trigger1 = var(31) = 0 && numtarget = 0
v = 31
value = 200

[State -2, ai mode]
type = Varadd
trigger1 = var(31) > 0
v = 31
value = -1

[State -2, Varset1]
type = Varset
trigger1 = movetype != H && stateno != 4999
v = 4
value = stateno
ignorehitpause = 1

[State -2, Varset1]
type = varset
trigger1 = movetype != H && stateno != 4999
v = 5
value = AnimElemNo(0)
ignorehitpause = 1

[State -2, Varset1]
type = Varset
trigger1 = stateno = 0
trigger2 = ctrl
v = 20
value = 0

[State -2, Varset1]
type = Varset
trigger1 = pos y > 0
trigger2 = statetype = S || statetype = C
v = 10
value = 0

[State -2, Varset1]
type = Varset
trigger1 = pos y > 0
trigger2 = movetype = H
trigger3 = statetype = S || statetype = C
v = 11
value = 0

[State -2, Varset1]
type = Varadd
trigger1 = var(18) > 0
v = 18
value = -1

[State -2, Varset1]
type = Varset
trigger1 = numenemy
trigger1 = enemynear, ctrl || enemynear, movetype!=H
v = 18
value = 0

[State -2, shadowrem]
type = afterimagetime
trigger1 = movetype = H
time = 0

[State -2, shadowrem]
type = Varset
trigger1 = movetype = H
v = 7
value = 0

[State -2, CountDown]
type = VarAdd 
trigger1 = Var(6) > 0
var(6) = -1 
ignorehitpause = 1

[State -2, throw hit release]
type = TargetDrop
trigger1 = movetype = H && prevstateno = 810
trigger2 = movetype = H && prevstateno = 910

[State -2, Set Up For Count]
type = VarSet
trigger1 = p2movetype = H
trigger1 = !Var(15)
v = 15
value = 1

[State -2, Keep Track Of Hit Count]
type = VarSet
trigger1 = UniqHitCount > 0
trigger1 = Var(15)
v = 16
value = UniqHitCount

[State -2, Add To Total Hit Count]
type = VarSet
triggerall = Var(15)
trigger1 = UniqHitCount < Var(16)
trigger2 = p2movetype != H
v = 17
value = Var(17) + Var(16)

[State -2, Add Helper Hits To Total Hit Count]
type = VarSet
triggerall = Var(15)
trigger1 = var(19) != 0
trigger2 = p2movetype != H
v = 17
value = Var(17) + var(19)

[State -2, Keep Track of Helper Hit Count]
type = VarSet
trigger1 = var(19) != 0
trigger1 = Var(15)
v = 19
value = 0

[State -2, Projectile Hits]
type = VarSet
triggerall = Var(15)
trigger1 = ProjHit = 1
v = 17
value = Var(17) + 1

[State -2, Reset Current Hit Count]
type = VarSet
trigger1 = UniqHitCount < Var(16)
trigger1 = Var(15)
v = 16
value = UniqHitCount

[State -2, Combo Is Finished]
type = VarSet
trigger1 = p2movetype != H
trigger1 = Var(15)
v = 16
value = 0

[State -2, Reset]
type = VarSet
triggerall = Var(15)
trigger1 = p2movetype != H
v = 15
value = 0

[State -2, Reset]
type = VarSet
trigger1 = p2movetype != H
v = 14
value = 0

[State -2, Reset]
type = VarSet
trigger1 = !numhelper(9990)
trigger1 = !Var(15)
trigger1 = Var(17) > 0
v = 17
value = 0

[State -2, Beam Attackmulset]
type = VarSet
trigger1 = var(17) < 6
v = 22
value = 1

[State -2, Beam Attackmulset]
type = VarSet
trigger1 = var(17) = [6, 10]
v = 22
value = 2

[State -2, Beam Attackmulset]
type = VarSet
trigger1 = var(17) = [11, 15]
v = 22
value = 3

[State -2, Beam Attackmulset]
type = VarSet
trigger1 = var(17) > 15
v = 22
value = 4

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) < 4
value = 1

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [4, 6]
value = 0.6

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [7, 9]
value = 0.55

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [10, 12]
value = 0.5

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [13, 15]
value = 0.44

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [16, 19]
value = 0.4

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [20, 23]
value = 0.35

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [25, 28]
value = 0.3

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) = [29, 32]
value = 0.25

[State -2, AttackMulSet]
type = AttackMulSet
trigger1 = Var(15)
trigger1 = Var(17) >= 33
value = 0.2

[State -2]
type = Playerpush
trigger1 = winko
value = 0
ignorehitpause = 1

[State -2, KO Screen 1]
type = helper
trigger1 = winko
trigger1 = numhelper(9999) = 0
helpertype = normal
name = "lookatdaflashyfxduhh..."
id = 9999
pos = 0, 0
bindtime = -1
postype = left
stateno = 9999
keyctrl = 0
ignorehitpause = 1
ownpal = 1
pausemovetime = 9999
supermovetime = 9999

[State -2, Display]
type = DisplaytoClipboard
trigger1 = 1
text = "AI mode = %d  AI Throttle = %f"
params = var(32), (AIlevel ** 2 / 64.0)
ignorehitpause = 1

[State -2, Debug]
type = appendtoclipboard
trigger1 = 1
text= "\nhttp://www.reubenkee.com/"
ignorehitpause = 1


;==============================================================================================
[Statedef -3]

[State -3, P2 Facing]
type= targetfacing
trigger1= movecontact = 1 && numtarget = 1
trigger1= !(target, Hitshakeover) && !(target, Hitfall) && (target, time <= 1)
value= ifelse(p2dist x >= 0, -1, 1)
ignorehitpause = 1

[State -3, Underground Juggle Prevention]
type = targetbind
trigger1 = movecontact = 1
trigger1 = numtarget && numenemy
trigger1 = (target, time = 0) && (target, ID = enemynear, ID)
trigger1 = !(target, hitshakeover) && (target, pos y > 0)
pos = ceil(p2dist x), ceil(-pos y)
ignorehitpause = 1
