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

[Size]
xscale=1
yscale=1
ground.back = 20
ground.front = 25
air.back = 9
air.front = 15
height = 55
attack.dist = 160
proj.attack.dist = 90
proj.doscale = 0
head.pos = 0, -82
mid.pos = -8, -53
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  =2.6     ;Walk forward
walk.back = -2.0     ;Walk backward
run.fwd  = 4.8, 0    ;Run forward (x, y)
run.back = -6,-5;Hop backward (x, y)
jump.neu = 0,-8.7  ;Neutral jumping velocity (x, y)
jump.back = -2.4  ;Jump back Speed (x, y)
jump.fwd = 2.4     ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 2.5         ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .5         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching
;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 11, 1

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 180]
type = S

;[State 180, 1]
;type = ChangeState
;trigger1 = random >= 499
;value = 182

[State 180, 1]
type = ChangeState
trigger1 = var(23)=0;random < 499
value = 181

[State 180, 1]
type = ChangeState
trigger1 = var(23)=1;random < 499
value = 184

;---------------------------------------------------------------------------
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 200, 8
channel = 6

[State 0, StopSnd]
type = StopSnd
trigger1 = animelem =3
channel = 6

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 200, 12
freqmul =.975


[State 0, Explod]
type = Explod
trigger1 =  time =65
anim = 6003
ID = 6003
pos = 0,-94
postype = p1
facing = 1
vfacing = 1
bindtime = -1
scale = .15,.15
sprpriority = 6
ontop = 1
shadow = 0,0,0
ownpal = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time =[68,70]
ID = 6003
shadow = 0,0,0
ownpal = 0
scale = .23,.23

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time =[70,73]
ID = 6003
shadow = 0,0,0
ownpal = 0
scale = .5,.5
[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time =[74,77]
ID = 6003
shadow = 0,0,0
ownpal = 0
scale = .75,.75

[State 900, Effect]
type = Helper
trigger1 = animelem = 3
name = "charge"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6008
id = 6008

[State 900, Effect]
type = Helper
trigger1 =animelem = 3
name = "charge2"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6009
id = 6009

[State 900, Effect]
type = Helper
trigger1 = animelem = 3
name = "charge3"
postype = P1
pos = -13,0
ownpal = 1
stateno = 6010
id = 6001

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 184]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 800, 3
freqmul =.975

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 182]
type = S
physics=S
ctrl = 0
anim = 171

[State 0, VelSet]
type = Velset
trigger1 =time =0
x = -3

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

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

[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 57    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 =1
y = 0
;ignorehitpause =
;persistent =


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

[State 0, ChangeState]
type = ChangeState
trigger1 =time = 54
value =5110
;---------------------------------------------------------------------------
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 183]
type = C
physics=S
ctrl = 0
anim = 172

[State 0, VelSet]
type = Velset
trigger1 =time =0
x = -3

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

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

[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 57    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 0, PosSet]
type = PosSet
trigger1 =1
y = 0
;ignorehitpause =
;persistent =


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

[State 0, ChangeState]
type = ChangeState
trigger1 =time = 54
value =5110


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

[State 190, ChangeState]
type = ChangeState
triggerall = p2name != "Boss Sagat by Kamekaze"
triggerall = p2name != "Nega Joe"
trigger1 = 1
value = ifelse(random<499,196,191)

[State 191, ChangeState]
type = ChangeState
trigger1 = p2name = "Boss Sagat by Kamekaze" && enemy,Authorname = "Kamekaze"
value = ifelse(teammode =simul,191,194)

[State 191, ChangeState]
type = ChangeState
trigger1 = p2name = "Nega Joe" && enemy,Authorname = "Kamekaze" && enemy,stateno!=4000
value = ifelse(teammode =simul,191,197)

[State 191, ChangeState]
type = ChangeState
triggerall = stateno!=4000
trigger1 = p2name = "Nega Joe" && enemy,Authorname = "Kamekaze" && enemy,stateno=4000
value = 4000
ignorehitpause=1

;[State 191, ChangeState]
;type = ChangeState
;trigger1 =random > 500
;value = 192

;[State 191, ChangeState]
;type = ChangeState
;trigger1 =1;random = [668,999]
;value = 0

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

[State 702, PlaySnd]
type = PlaySnd
trigger1 =animelem = 5
value = S200,11

[State 702, PlaySnd]
type = PlaySnd
trigger1 =animelem = 5
value = S300,0
[State 702, PlaySnd]
type = PlaySnd
trigger1 =animelem = 1
value = S1,0
channel = 5

[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6008
id = 6008

[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge2"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6009
id = 6009

[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge3"
postype = P1
pos = -13,0
ownpal = 1
stateno = 6010
id = 6001

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

[State 0, StopSnd]
type = StopSnd
trigger1 = animtime =0
channel = 1


[State 191, 3] ;Change to stand state when done
type = Changestate
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
; Introduction
[Statedef 192]
type = S
ctrl = 0
anim = 5150
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 30
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1



[State 0, VarSet]
type = VarSet
trigger1 = time=30
v = 58    ;fv = 10
value = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time= 70
value = 5120

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = time = 85
value = 0
;---------------------------------------------------------------------------
; Introduction 2
[Statedef 193]
type = S
physics = N
ctrl = 0
anim = 190
velset = 0,0

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 0, LifeSet]
type = LifeSet
trigger1 = time = 0
value = var(57)



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animelem = 4 && anim = 190
value = 900
elem = 3

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time =[0,50]
flag = nobardisplay

[State 0, LifeAdd]
type = LifeAdd
trigger1 =time >50 && life !=lifemax && anim = 900
value = 10


[State 900, Effect]
type = playsnd
trigger1=time=96
value = S200,8

[State 0, StopSnd]
type = StopSnd
trigger1 = life = lifemax
channel = -1
;ignorehitpause =
;persistent =

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = life = lifemax
value = 0
;---------------------------------------------------------------------------
; Introduction
[Statedef 194]
type = S
anim = 900
velset = 0,0
sprpriority = 2

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

[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 19   ;fv = 10
value = 0
;ignorehitpause =
;persistent =
[State 191, ChangeState]
type = ChangeState
triggerall = stateno!=4000
trigger1 = p2name = "Nega Joe" && enemy,Authorname = "Kamekaze" && enemy,stateno=4000
value = 4000
ignorehitpause=1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,8
channel = 6

[State 0, StopSnd]
type = StopSnd
trigger1 = time=ifelse(prevstateno=197,60,40)
channel = 6

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim!=3000 && time=ifelse(prevstateno=197,60,40)
value = 3000

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 60
value = S200,5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = ifelse(prevstateno=197,(time=[75,115]),(time = [55,95]))
value = 3000
elem =  6

[State 3000, Helper]
type = Helper
trigger1 =animelem = 4 && anim=3000
helpertype = normal
name = "haohsik"
ID = 3001
stateno = 3001
pos = 79,-79
postype = p1
facing = 1
keyctrl = 0
ownpal = 0



[State 0, AllPalFX]
type = AllPalFX
triggerall = prevstateno!=197
trigger1 = time = 58
time = 5
add = 256,256,256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256


[State 0, ChangeState]
type = ChangeState
trigger1 =animtime = 0 && anim = 3000
value = 195
;---------------------------------------------------------------------------
; Introduction
[Statedef 196]
type = S
velset = 4,-6
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 3003
elem = 3

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

[State 191, ChangeState]
type = ChangeState
triggerall = stateno!=4000
trigger1 = p2name = "Nega Joe" && enemy,Authorname = "Kamekaze" && enemy,stateno=4000
value = 4000
ignorehitpause=1
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = intro

[State 0, VelAdd]
type = VelAdd
trigger1 =anim = 3003
y = .5

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
y = 20

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
x = -92

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 195 && animelem = 2
value = S200,22
freqmul=.98

[State 0, PosSet]
type = PosSet
trigger1 =pos y>=0 && time >= 1
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = pos y>=0&&time >= 1 && anim != 3003
x = 0
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && anim !=1056 && time>1&& anim !=195
value = 1056

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim !=195 &&animtime= 0 &&anim=1056
value = 195

[State 100, dust]
type = Explod
trigger1 = AnimElem = 1 && anim=1056
anim = 11005
ID = 11005
postype = p1
pos = 0,0
bindtime = 2
sprpriority = 0
scale = .7,.7
ownpal = 1

[State -3, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 1 && anim=1056
value = 40, 0

[State 0, ChangeState]
type = ChangeState
trigger1 =animtime = 0 && anim = 195
value = 0
;---------------------------------------------------------------------------
; Introduction
[Statedef 197]
type = S
velset = 4,-6
sprpriority = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 3003
elem = 3

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
[State 191, ChangeState]
type = ChangeState
triggerall = stateno!=4000
trigger1 = p2name = "Nega Joe" && enemy,Authorname = "Kamekaze" && enemy,stateno=4000
value = 4000
ignorehitpause=1

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

[State 0, VelAdd]
type = VelAdd
trigger1 =anim = 3003
y = .5

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
y = 20

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
x = -92

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 195 && animelem = 2
value = S200,21
freqmul=.98

[State 0, PosSet]
type = PosSet
trigger1 =pos y>=0 && time >= 1
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = pos y>=0&&time >= 1 && anim != 3003
x = 0
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos y >=0 && anim !=1056 && time>1&& anim !=195
value = 1056

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim !=195 &&animtime= 0 &&anim=1056
value = 195

[State 100, dust]
type = Explod
trigger1 = AnimElem = 1 && anim=1056
anim = 11005
ID = 11005
postype = p1
pos = 0,0
bindtime = 2
sprpriority = 0
scale = .7,.7
ownpal = 1

[State -3, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 1 && anim=1056
value = 40, 0

[State 0, ChangeState]
type = ChangeState
trigger1 =animtime = 0 && anim = 195
value = 194

;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = prevstateno=194
flag = intro


[State 200, 1]
type = PlaySnd
trigger1 = time = 0
value = 90, 7
freqmul=ifelse(var(58)=1,.97,.98)


[State 195, 2]
type = ChangeState
trigger1 =animtime = 0
value = 0
ctrl = ifelse((prevstateno=[194,197]),0,1)


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 200
poweradd = ifelse(var(3)=1,0,20)
sprpriority = 2



[State 200, 1]
type = HitDef
trigger1 = !movecontact
attr = S, NA
damage = 21,2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 0
getpower = ifelse(var(3),0,10)
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
envshake.time = 8
envshake.ampl = 1





[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 201]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
ctrl = 0
anim = 201
poweradd = ifelse(var(3)=1,0,20)
sprpriority = 2



[State 200, 1]
type = HitDef
trigger1 = !movecontact
attr = S, NA
damage = 21,2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -80
hitsound = S2, 0
getpower = ifelse(var(3),0,10)
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -3
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
envshake.time = 8
envshake.ampl = 1
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

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


;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 205]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 205
sprpriority = 2

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


[State 210, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage =45,5
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-65
getpower = ifelse(var(58)=0,0,20)
hitsound   = S2,2
guardsound =  S5, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3.5
air.velocity = -2.5,-4
envshake.time = 10
envshake.ampl = 2


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 206
sprpriority = 2

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 210, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage =45,5
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound   = S2,2
guardsound =  S5, 0
getpower = ifelse(var(3),0,20)
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3.5
air.velocity = -2.5,-4
envshake.time = 10
envshake.ampl = 2


[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98

[State 210, 2]
type = HitDef
trigger1 =!movecontact
attr = S, NA
animtype  = Medium
damage =60,10
guardflag = MA
pausetime = 12, 12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-76
hitsound   = S2,1
guardsound =  S5, 0
ground.type = High
ground.slidetime = 16
getpower = ifelse(var(3),0,35)
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4
envshake.time = 12
envshake.ampl = 3
envshake.freq=60


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

;-------------------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,22)
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 230, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage = 23,3
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-86
hitsound   = S2,3
guardsound =  S5, 0
ground.type = Low
getpower = ifelse(var(3),0,10)
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4
air.velocity = -2.5,-3.5
envshake.time = 8
envshake.ampl = 1

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 231]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,22)
ctrl = 0
velset = 0,0
anim = 231
sprpriority = 2

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 230, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage = 21,3
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-78
hitsound   = S2,3
guardsound =  S5, 0
ground.type = Low
getpower = ifelse(var(3),0,10)
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4
air.velocity = -2.5,-3.5
envshake.time = 8
envshake.ampl = 1

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

;---------------------------------------------------------------------------
; Standing medium kick
; CNS difficulty: easy
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

[State 240, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage = 48,6
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-25
getpower = ifelse(var(3),0,20)
hitsound   = S2,4
guardsound =  S5, 0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -4.5
air.velocity = -2.2,-3.2
envshake.time = 10
envshake.ampl = 2



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


;---------------------------------------------------------------------------
; Standing medium kick
; CNS difficulty: easy
[Statedef 236]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 236
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

[State 240, 2]
type = HitDef
trigger1 =!movecontact
attr = S, NA
animtype  = Medium
damage = 48,6
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,4
guardsound =  S5, 0
getpower = ifelse(var(3),0,20)
ground.type = Low
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -4.5
air.velocity = -2.2,-3.2
envshake.time = 10
envshake.ampl = 2


[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2


[State 245, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98

[State 245, 2]
type = HitDef
trigger1 = !movecontact
attr = S, NA
animtype  = Medium
damage = 79,13
guardflag = MA
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-82
hitsound   = S2,5
guardsound = S5, 0
getpower = ifelse(var(3),0,35)
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2
envshake.time = 12
envshake.ampl = 3
envshake.freq=60


[State 245, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light punch
; CNS difficulty: easy
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,10)
ctrl = 0
anim = 400
sprpriority = 2

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

[State 400, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage = 14
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
getpower = ifelse(var(3),0,8)
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-47
hitsound   = S2,0
guardsound =  S5, 0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4.8
air.velocity = -1.5,-3
envshake.time =8
envshake.ampl = 1

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
;---------------------------------------------------------------------------
;Crouching medium punch
; CNS difficulty: easy
[Statedef 405]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,35)
ctrl = 0
anim = 405
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98



[State 410, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage = 47
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-50
hitsound   = S2,2
guardsound = S5, 0
ground.type = Low
getpower = ifelse(var(3),0,15)
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -5
air.velocity = -3,-4
envshake.time = 10
envshake.ampl = 2

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching medium punch
; CNS difficulty: easy
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,40)
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98



[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3 && !movecontact
attr = C, NA
damage = 76
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12, 12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -15,-94
getpower = ifelse(var(3),0,35)
hitsound   = S2,1
guardsound = S5, 0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -8
air.velocity = -3,-4
envshake.time = 10
envshake.ampl = 2

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,7)
ctrl = 0
anim = 430
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 3

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98



[State 430, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage = 21
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 8, 8
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-2
hitsound   = S2,3
guardsound =  S5, 0
ground.type = Low
getpower = ifelse(var(3),0,10)
ground.slidetime =10
ground.hittime  = 10
ground.velocity = -4.2
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
envshake.time = 8
envshake.ampl = 1

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

;---------------------------------------------------------------------------
[Statedef 435]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,14)
ctrl = 0
anim = 435
sprpriority = 2

[State 430, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 4


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 430, 2]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage =42
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 10, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-43
hitsound   = S2,4
guardsound =  S5, 0
getpower = ifelse(var(3),0,14)
ground.type = Low
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -6
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20
envshake.time = 10
envshake.ampl = 2

[State 430, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;----------------------------------------------------------------------------
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 8
poweradd= ifelse(var(3)=1,0,30)
ctrl = 0
anim = 440
sprpriority = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 3
freqmul =.98


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

[State 440, 3]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage = 73
hitflag = MAFD
guardflag = L
pausetime = 12, 12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -12,-17
hitsound   = S2,5
getpower = ifelse(var(3),0,40)
guardsound =  S5, 0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1.3,-4
air.velocity = -1.3,-4
guard.velocity = -5
fall = 1
envshake.time = 12
envshake.ampl = 3
envshake.freq=60

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

;---------------------------------------------------------------------------
;Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  =8
poweradd= ifelse(var(3)=1,0,11)
ctrl = 0
anim = 600
sprpriority = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, 2]
type = HitDef
trigger1 = !movecontact
attr = A, NA
damage = 24
guardflag = HA
priority = 3
pausetime = 8, 9
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-57
hitsound   = S2,0
guardsound =  S5, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 8
envshake.ampl = 1



[State 0, ChangeState]
type = ChangeState
trigger1 =  animtime = 0
value = 57
ctrl = 1
;---------------------------------------------------------------------------
;Jump medium Punch
; CNS difficulty: easy
[Statedef 605]
type    = A
movetype= A
physics = A
juggle  = 7
poweradd= ifelse(var(3)=1,0,11)
ctrl = 0
anim = 605
sprpriority = 2

[State 605, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 3
freqmul =.98


[State 605, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
damage = 47
guardflag = HA
priority = 3
pausetime = 8, 10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-52
hitsound   = S2,2
guardsound =  S5, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 10
envshake.ampl = 2


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

;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98

[State 605, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
damage =72
guardflag = HA
priority = 3
pausetime = 8, 12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -20,-70
hitsound   = S2,1
guardsound =  S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 12
envshake.ampl = 3

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

;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 6
poweradd= ifelse(var(3)=1,0,20)
ctrl = 0
anim = 630
sprpriority = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98

[State 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
damage = 26
guardflag = HA
priority = 3
pausetime = 8, 9
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-72
hitsound   = S2,3
guardsound =  S5, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 8
envshake.ampl = 1



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


;-----------------------------------------------------------
;Jump Strong Kick
[Statedef 635]
type    = A
movetype= A
physics = A
juggle  = 7
poweradd= ifelse(var(3)=1,0,65)
ctrl = 0
anim = 640
sprpriority = 2

[State 605, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 0
freqmul =.98

[State 605, 2]
type = HitDef
trigger1 =!movecontact
attr = A, NA
damage =45
guardflag = HA
priority = 3
pausetime = 8,10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-40
hitsound   = S2,4
guardsound =  S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 10
envshake.ampl = 2

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 57
ctrl = 1
;---------------------------------------------------------------------------
;Jump medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 8
poweradd= ifelse(var(3)=1,0,20)
ctrl = 0
anim = 640
sprpriority = 2

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 2


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 1
freqmul =.98

[State 605, 2]
type = HitDef
trigger1 =animelem = 3
attr = A, NA
damage =76
guardflag = HA
priority = 3
pausetime = 8,12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-40
hitsound   = S2,5
guardsound =  S5, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4
air.velocity = -1.3,-3
envshake.time = 12
envshake.ampl = 3


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 57
ctrl = 1
;------------------------------------------------------------------------
[Statedef 800]
type = S
movetype= A
physics = S
juggle = 8
velset = 0,0
ctrl = 0
anim = 800

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 810
p2stateno = 820
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------
[Statedef 810]
type = S
movetype= A
physics = N
anim = 810
poweradd = ifelse(var(3)=1,0,80)
;juggle = 8

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =2
value = 0

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 2
freqmul =.98

[State 810,width]
type=width
trigger1=animelemtime(10)<0
edge=50,50
[State 810, 1]
type = targetbind
trigger1 = animelemtime(1)>=0 && animelemtime(2)<0
pos = 34,-0

[State 810, 2]
type = targetbind
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
pos = 34, -67

[State 810, 2]
type = targetbind
trigger1 = animelemtime(3)>=0 && animelemtime(4)<0
pos = -4, -64

[State 810, 2]
type = targetbind
trigger1 = animelemtime(4)>=0 && animelemtime(5)<0
pos = -50, -68

[State 810, 2]
type = targetbind
trigger1 = animelem=5
pos = -125, -60

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -80

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 5
value = 821
[State 0, Turn]
type = Turn
trigger1 =animelem=7
[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------
[Statedef 811]
type = S
movetype= A
physics = N
anim = 850
poweradd = ifelse(var(3)=1,0,80)
hitcountpersist = 0
;juggle = 8

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =1
value = 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 2

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

[State 810,width]
type=width
trigger1=animelemtime(10)<0
edge=25,0
[State 810, 1]
type = targetbind
trigger1 = animelemtime(1)>=0 && animelemtime(2)<0
pos = 40,0

[State 810, 2]
type = targetbind
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
pos = 40, 0

[State 240, 2]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
animtype  = Medium
damage = 132
guardflag = MA
pausetime = 10,10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -20,-52
hitsound   = S2,1
guardsound =  S5, 0
ground.type = high
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6,-4
envshake.time = 10
envshake.ampl = 2




[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Thrown by Throw
[Statedef 820]
type    = S
movetype= H
physics = N
velset = 0,0

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


[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 811
;---------------------------------------------------------------------------
;Thrown by Throw - thrown into the air
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 5.5,-4.5
poweradd = 40

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
;Throw - Attempt
[Statedef 850]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = ifelse(command = "holdfwd",1,-1)
p2facing = -1
p1stateno = 840
p2stateno = 845
guard.dist = 0
fall = 1



[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Throw - Throwing the opponent
[Statedef 840]
type    = S
movetype= A
physics = N
anim = 840
poweradd = ifelse(var(3)=1,0,60)

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 2

[State 0, TargetFacing]
type = TargetFacing
triggerall = time < 5
trigger1 =  facing = -1
value = 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 200, 1


[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 5

[State 840, bind ]
type = Targetbind
trigger1=animelem = 1
pos=-52,-74
[State 840, bind ]
type = Targetbind
trigger1=animelem = 2
pos=-33,-110
[State 840, bind ]
type = Targetbind
trigger1 = animelem = 3
pos = 58,-78
[State 840, bind ]
type = Targetbind
trigger1 = animelem = 4
pos = 101,-33

[State 840, bind]
type = Targetbind
trigger1 = animelem = 5
pos=93,0


[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(19) < 0
edge = 0,25
player = 0,25
value = 0,25


[State 100, dust]
type = Explod
trigger1 = animelem = 5
anim = 11005
ID = 11005
postype = p2
pos = 0,0
bindtime = 2
removetime = 14
sprpriority = 0
scale = .7,.7
ownpal = 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = animelem = 5
value = 0, 6
[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 5
value = -153

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 5
value = 822

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

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

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


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

;---------------------------------------------------------------------------
;Thrown by Throw - thrown into the air
[Statedef 822]
type    = S
movetype= H
physics = N
velset = 0,0
poweradd = 40

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0

[State 821, 4] ;Hit ground
type = SelfState
trigger1 =time = 20
value = ifelse(Alive,5120,5150)

;------------------------------------------------------------------------
[Statedef 830]
type = A
movetype= A
physics = A
juggle = 4
ctrl = 0
anim = 801

[State 800, 1]
type = HitDef
Trigger1 = Time > 0
attr = A, NT
hitflag = A
priority = 1,hit
sparkno = -1
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 831
p2stateno = 832
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 57
ctrl = 1
;----------------------------------------------------------------------
[Statedef 831]
type = A
movetype= A
physics = N
anim = 802
poweradd = ifelse(var(3)=1,0,80)
hitcountpersist = 0
;juggle = 8

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = .5
y = -.5

[State 810, SprPriority]
type = SprPriority
trigger1 = AnimElem =1
value = 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1, 2

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

[State 810,width]
type=width
trigger1=animelemtime(10)<0
edge=25,0
[State 810, 1]
type = targetbind
trigger1 = animelemtime(1)>=0 && animelemtime(2)<0
pos = 34,-26

[State 810, 2]
type = targetbind
trigger1 = animelemtime(2)>=0 && animelemtime(3)<0
pos = 34, -24

[State 240, 2]
type = HitDef
trigger1 = animelem = 3
attr = A, NA
animtype  = Medium
damage = 110
guardflag = MA
pausetime = 10,10
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -20,-82
hitsound   = S2,1
guardsound =  S5, 0
ground.type = high
ground.slidetime = 12
ground.hittime  = 15
air.velocity = -6,6
envshake.time = 10
envshake.ampl = 2

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 57
ctrl = 1
;---------------------------------------------------------------------------
;Thrown by Throw
[Statedef 832]
type    = A
movetype= H
physics = N
velset = 0,0

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


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

;----------------------------------------------------------------------------
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= ifelse(var(58)=1,0,110)
anim = 1000
ctrl = 0
velset=0,0
sprpriority = 0

[State 0, VarSet]
type = VarSet
triggerall = var(59) = 0
triggerall = var(58) = 0
trigger1 = time=0
v = 2  ;fv = 10
value = ifelse(command = "hkx",1,ifelse(command = "hky",2,3))


[State 100, dust]
type = Explod
trigger1 =animelem = 2&& anim = 1000
anim = 1006
ID = 11008
postype = p1
pos = 0,0
bindtime = -1
sprpriority = 9
ontop=1
scale = 1,1
ownpal = 1

[State 0, VarSet]
type = VarSet
trigger1 =command = "hkex" && time = 0 || var(58) =1
v = 2    ;fv = 10
value = 4

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0 && var(2)=4
value = 1005

[State 182, 2]
type = NotHitBy
trigger1 = Time = 1 && var(2)=4
value = SCA
time = 8

[State 0, VarSet]
type = Varadd
trigger1 =animelem = 3 && var(2) = 4
fv = 1 ;fv = 10
value = 39
ignorehitpause = 1
persistent =0


[State 0, PalFXWiz]
type = PalFX
trigger1 = var(2)=4 && animelemtime(5)<0 && animelemtime(3) >0
time = 1
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(2)=4 && animelem=5
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 1050, 1]
type = PlaySnd
trigger1 = time = 1 && var(2) !=4
value = 200, 4
freqmul =.98

[State 1050, 1]
type = PlaySnd
trigger1 = time = 1 && var(2) =4
value = 200, 11
freqmul =.98

[State 1050, 1]
type = PlaySnd
trigger1 = animelem =4 && var(2) =4
value = 0,2


[State 0, Helper]
type = Helper
trigger1 = animelem  = 3  && var(2) !=4
helpertype = normal ;player
name ="Haoh-ken"
ID = 1001
stateno = 1001
pos = 83,-66
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 1050, 4]
type = HitDef
trigger1 = !movecontact
attr = A, SP
guardflag = MA
hitflag = MAF
animtype  = diagup
damage    =75,4
priority  = 9
guardflag = MA
pausetime = 15,15
sparkxy = -10,-66
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = 0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -6,-6
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -6,-6
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
fall = 1
fall.recover=0


;[State 0, Helper]
;type = Helper
;trigger1 = animelem  = 3
;helpertype = normal ;player
;name ="Haoh-ken"
;ID = 1001
;stateno = 1006
;pos = 83,-66
;postype = p1    ;p2,front,back,left,right
;facing = 1
;keyctrl = 0
;ownpal = 1

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

;---------------------------------------------------------------------------
[Statedef 1005]
type    = A
movetype= A
physics = N
juggle  = 8
poweradd= ifelse(var(2)=4,0,110)
anim = 1003
ctrl = 0
sprpriority = 0

[State 0, VarSet]
type = VarSet
triggerall = var(59) = 0
trigger1 =time = 0
v = 2  ;fv = 10
value = ifelse(command = "hkx",1,ifelse(command = "hky",2,3))

[State 0, VarSet]
type = VarSet
trigger1 = var(2)=4
v = 2    ;fv = 10
value = 3
;ignorehitpause =
;persistent =


[State 1050, 1]
type = PlaySnd
trigger1 = time = 0
value = 200, 4
freqmul =.98

[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 5   ;fv = 10
value = ifelse(vel x <0,1,ifelse(vel x >0,2,3))


[State 0, VelSet]
type = VelSet
trigger1 = time=1
x = 0
y = 0

[State 0, Helper]
type = Helper
trigger1 = animelem  = 3
helpertype = normal ;player
name ="Haoh-ken"
ID = 1003
stateno = 1003
pos = 40,-56
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 5
x = ifelse(var(5)=2,const(velocity.jump.fwd.x),ifelse(var(5) =1,const(velocity.jump.back.x),0))

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(5) >= 0
y = .5

[State 1010, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 57
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 1050]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= ifelse(var(58)=1,0,110)
ctrl = 0
velset=0,0
sprpriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,5
freqmul =.975
[State 0, VarSet]
type = Varadd
trigger1 =animelem = 3 && var(9) = 4
fv = 1 ;fv = 10
value = 40
ignorehitpause =1
persistent =  0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=1
value = ifelse(var(9)=1,1050,1051)
elem = 1
ignorehitpause =1
persistent =  1


[State 0, Width]
type = Width
trigger1 =1
player = 20,30
;value = 0,0
;ignorehitpause =
;persistent =


[State 0, VarSet]
type = Varset
triggerall = var(59) = 0
triggerall = var(58) = 0
trigger1 =time = 0
v = 9   ;fv = 10
value = ifelse(command = "Kx",1,ifelse(command = "Ky",2,ifelse(command = "Kz",3,4)))
ignorehitpause =1

[State 0, VarSet]
type = VarSet
trigger1 = command = "Kex" && time=0 || var(58) =1
v = 9    ;fv = 10
value = 4
[State 0, NotHitBy]
type = NotHitBy
trigger1 = time =0
value = SCA,AA,AP
;value2 = S,NA
time = 2
;ignorehitpause =

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time =1
value = SCA,AA,AP
;value2 = S,NA
time = ifelse(var(9)=4,15,4)
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 =  animelem=5
x = ifelse(var(9)=4,2.5,2)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(4)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N        ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(4) >=1 && animelemtime(5) <0
y = ifelse(var(9)=1,-8,ifelse(var(9)=2,-9.25,-10.4))
[State 0, VelSet]
type = Veladd
trigger1 =animelemtime(4) >=0
y = .45


[State 0, VelSet]
type = Velmul
trigger1 = animelemtime(4) >=0
x = .95

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

[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 4 && var(9) = 4
value = 300,0

[State 100, dust]
type = Explod
trigger1 = animelem = 4
anim = 11008
ID = 11008
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 0
scale = 1,1
ownpal = 1
[State 1050, 4]
type = HitDef
triggerall = var(9) !=4
trigger1 = animelem = 3
attr = A, SA
hitflag = MFP
animtype  = Medium
damage    =ifelse(var(9)=1,35,ifelse(var(9)=2,42,56)),10
priority  = 9
guardflag = MA
pausetime = 13,13
sparkxy = -15,-75
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = ifelse(var(9)=4,4,-.5)
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(9)=1,8,ifelse(var(9)=2,10,12))
envshake.ampl = ifelse(var(9)=1,1,2)
envshake.freq=60
palfx.time = ifelse(var(9)=4,20,0)
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256

[State 1050, 4]
type = HitDef
trigger1 = animelemtime(4) = 1  && var(9) !=4
trigger2 = animelem = 5  && var(9) =4
attr = A, SA
;hitflag =  MAFP
animtype  = up
damage    = ifelse(var(9)=1,35,ifelse(var(9)=2,39,ifelse(var(9)=3,40,105))),10
priority  = 9
guardflag = MA
pausetime = ifelse(var(9)=4,4,13),ifelse(var(9)=4,4,13)
sparkxy = -15,-92
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(3) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -1.5,ifelse(var(9)=1,-9,ifelse(var(9)=2,-10,-11))
guard.velocity = -3
airguard.velocity = -1.5,-2
air.velocity = -1.5,ifelse(var(9)=4,-8,-7)
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(9)=1,8,ifelse(var(9)=2,10,ifelse(var(9)=3,10,4)))
envshake.ampl = ifelse(var(9)=1,1,2)
envshake.freq=60
fall=1
fall.recover=0
palfx.time = ifelse(var(9)=4,20,0)
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256


[State 0, Helper]
type = Helper
trigger1 = var(9) = 4 && numhelper(11015) <1 && animelem =3
helpertype = normal ;player
name = "flames"
ID = 11015
stateno = 11015
pos =  32,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 0
[State 0, PalFXWiz]
type = PalFX
trigger1 = var(9)=4 && animelemtime(6)<0 && animelemtime(3) >0
time = 1
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(9)=4 && animelem=6
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1
[State 1000, 7]
type = ChangeState
trigger1 =time >12 && pos y >=0
value = 52
ctrl  = 1
;---------------------------------------------------------------------------
[Statedef 1100]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= ifelse(var(3)=1,0,110)
velset = 0,0
anim = ifelse(var(11)=1,1053,1052)
ctrl = 0
sprpriority = 2

[State 0, VarSet]
type = Varset
triggerall = var(59) = 0
trigger1 =time = 0
v = 11  ;fv = 10
value = ifelse(command = "hska",1,ifelse(command = "hskb",2,3))
ignorehitpause =1

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

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 9
freqmul=.97

[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 8
value = 200, 7
freqmul=.97

[State 100, dust]
type = Explod
trigger1 = time = 2
anim = 11008
ID = 11008
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 0
scale = 1,1
ownpal = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = (time = 0 && command = "hskex" && var(59) = 0)|| var(58) =1
value = 1260



[State 0, VelSet]
type = VelSet
trigger1 =animelemtime(2) >=1 && animelemtime(3) <0
x = ifelse(var(11)=1,2.5,ifelse(var(11)=2,3.5,5.25))

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(2)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N        ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = animelemtime(3) >=1 && animelemtime(4) <0
y = ifelse(var(11)=1,-6.25,ifelse(var(11)=2,-6.25,-7))

[State 0, VelSet]
type = Veladd
trigger1 =animelemtime(3) >=0
y = .5

[State 1050, 4]
type = HitDef
trigger1 = animelem = 2
attr = A, SA
hitflag = MFP
animtype  = Medium
damage    =ifelse(var(9)=1,35,ifelse(var(9)=2,42,51)),10
priority  = 9
guardflag = MA
pausetime = 8,8
sparkxy = -10,-62
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,5
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -.5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(9)=1,8,ifelse(var(9)=2,10,12))
envshake.ampl = ifelse(var(9)=1,1,2)
envshake.freq=60

[State 1050, 4]
type = HitDef
trigger1 = animelem = 4
attr = A, SA
hitflag =  MAFP
animtype  = Medium
damage    = ifelse(var(11)=1,35,ifelse(var(11)=2,39,40)),10
priority  = 9
guardflag = MA
pausetime = 10,10
sparkxy = -15,-75
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,5
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = ifelse(var(11)=1,-3.5,ifelse(var(11)=2,-2,-3)),ifelse(var(11)=1,-5,ifelse(var(11)=2,-3,-4))
guard.velocity = -3
airguard.velocity = -1.5,-2
air.velocity = ifelse(var(11)=1,-3.5,ifelse(var(11)=2,-2,-3)),ifelse(var(11)=1,-5,ifelse(var(11)=2,-3,-4))
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(11)=1,8,ifelse(var(11)=2,10,12))
envshake.ampl = ifelse(var(11)=1,1,2)
envshake.freq=60
fall=1
fall.recover=0

[State 1050, 4]
type = HitDef
trigger1 = animelem = 9
attr = A, SA
hitflag =  MAFP
animtype  = Medium
damage    = ifelse(var(11)=1,35,ifelse(var(11)=2,39,40)),10
priority  = 9
guardflag = MA
pausetime = 12,12
sparkxy = -15,-65
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,5
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = ifelse(var(11)=1,-5,ifelse(var(11)=2,-6,-7)),ifelse(var(11)=1,-4,ifelse(var(11)=2,-3,3))
guard.velocity = -3
airguard.velocity = -1.5,-2
air.velocity = ifelse(var(11)=1,-5,ifelse(var(11)=2,-6,-7)),ifelse(var(11)=1,-4,ifelse(var(11)=2,-3,3))
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(11)=1,8,ifelse(var(11)=2,10,12))
envshake.ampl = ifelse(var(11)=1,1,2)
envshake.freq=60
fall=1
fall.recover=0

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim !=1056
trigger1 = animelemtime(6) >0 && pos y >=0
value = 1056
elem = 1

[State 0, PosSet]
type = PosSet
trigger1 = anim = 1056
y = 0

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 1056
x = 0
y = 0


[State 100, dust]
type = Explod
trigger1 = AnimElem = 1 && anim=1056
anim = 11005
ID = 11005
postype = p1
pos = 0,0
bindtime = 2
sprpriority = 0
scale = .7,.7
ownpal = 1

[State -3, Landing Sound]
type = PlaySnd
trigger1 = AnimElem = 1 && anim=1056
value = 40, 0

[State 1000, 7]
type = ChangeState
trigger1 =animtime=0 && anim = 1056
value = 0
ctrl  = 1

;---------------------------------------------------------------------------
[Statedef 1150]
type    = S
movetype= A
physics = S
juggle  = ifelse(var(25)=1,10,6)
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 0, VarSet]
type = VarSet
triggerall = var(59) = 0
trigger1 = time = 0
v = 6    ;fv = 10
value = ifelse(command = "Zx",0,ifelse(command = "Zy",1,2))
ignorehitpause=1
[State 0, VarSet]
type = VarSet
trigger1 = movehit
v = 25    ;fv = 10
value = 1
;ignorehitpause =
;persistent =

[State 1050, 1]
type = PlaySnd
triggerall = animelemtime(3) >= 0
trigger1=time%6=0
value = 0, 2

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 6

[State 1050, 4]
type = HitDef
triggerall = animelemtime(3) >=0
trigger1 = time%4=0
attr = A, SA
animtype  = Medium
damage    =0,5
priority  = 9
guardflag = MA
pausetime = 1,1
sparkxy = -10,-62
sparkno = -1
guard.sparkno= S11004
hitsound   = -1
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -0
guard.velocity = -3
airguard.velocity = -4,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
p1stateno = 1151
p2stateno=1152

[State 1100, end]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl=1

;---------------------------------------------------------------------------
[Statedef 1151]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 1101+var(6)

[State 810, 1]
type = targetbind
trigger1 = animelem=1
pos = 40,0
[State 0, VarSet]
type = VarSet
trigger1 = movehit
v = 25    ;fv = 10
value = 1
;ignorehitpause =
;persistent =
[State 810, 1]
type = targetbind
triggerall = anim = 1104
trigger1 = animelem=5
pos = 40,p2bodydist y

[State 1050, 4]
type = HitDef
triggerall = anim = [1101,1103]
trigger1 = animelem = 1||  animelem = 4|| animelem = 7|| animelem = 10|| animelem = 13|| animelem = 16 || animelem = 19|| animelem = 22 || animelem = 25|| animelem = 28
attr = A, SA
animtype  = Medium
damage    = ifelse(var(6)=0,8,ifelse(var(6)=1,10,12));,111,9
priority  = 5
guardflag = MA
pausetime = 2,2
sparkxy = -5,-57
sparkno = -1
guard.sparkno= S11004
hitsound   = S2,1
getpower = 0
guardsound = S5,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -3
air.velocity = 0,0
envshake.time = ifelse(var(6)=0,8,ifelse(var(6)=1,10,12))
envshake.ampl = ifelse(var(6)=0,1,2)
envshake.freq=60
getpower = ifelse(var(3) = 0,20,0)
p2stateno=1152
persistent = 1
kill=0


[State 1050, 4]
type = HitDef
triggerall = anim = 1104
trigger1 = animelem = 5
attr = A, SA
animtype  = UP
damage    = 16;,111,9
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -15,-102
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S200,10
guardsound = S5,0
getpower = ifelse(var(58) = 0,30,0)
ground.type = Low
ground.slidetime = 13
ground.hittime  = 22
air.hittime = 22
guard.velocity = -9
ground.velocity = -.7, -9
airguard.velocity = -6,-4
air.velocity = -.7, -9
envshake.time = ifelse(var(6)=1,8,ifelse(var(6)=2,10,12))
envshake.ampl = ifelse(var(6)=1,1,2)
envshake.freq=60
getpower = ifelse(var(3) = 0,20,0)
fall =1
fall.recover=0

[State 0, ChangeState]
type = Changeanim
triggerall = anim!=1104
trigger1 =animtime = 0
value = 1104

[State 100, dust]
type = Explod
triggerall = anim = [1101,1103]
trigger1 = animelem = 1
anim = 7005+(random%8)
ID = 7005
postype = p2
pos = -10,-81
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
triggerall = anim = [1101,1103]
trigger1 = animelem = 4 || animelem = 16
anim = 7005+(random%8)
ID = 7005
postype = p2
pos = -10,-91
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
triggerall = anim = [1101,1103]
trigger1 = animelem = 7 || animelem = 13 || animelem = 19 || animelem =25
anim = 7005+(random%8)
ID = 7005
postype = p2
pos = -10,-71
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
triggerall = anim = [1101,1103]
trigger1 = animelem = 10 || animelem = 22 || animelem = 28
anim = 7005+(random%8)
ID = 7005
postype = p2
pos = -10,-105
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 1100, end]
type = changestate
trigger1 = animtime = 0 && anim =1104
value = 0
ctrl=1
;---------------------------------------------------------------------------
;Thrown by Throw
[Statedef 1152]
type    = A
movetype= H
physics = N
velset = 0,0

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

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
y = -3

[State 0, animchange]
type = ChangeAnim
trigger1 = time = 0
value = 5001+(random%2)

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

[State  0, animchange]
type = ChangeAnim
trigger1 = time > 0
value = anim
;-----------------------------------------------
[statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= ifelse(var(3)=1,0,110)
velset = 0,0
anim = 1201
ctrl = 0
velset =0,0
sprpriority = 2

[State 0, VarSet]
type = Varset
triggerall = var(59) = 0
triggerall = var(58) = 0
trigger1 =time = 0
v = 8   ;fv = 10
value = ifelse(command = "rbkx",1,ifelse(command = "rbky",2,ifelse(command = "rbkex",4,3)))
ignorehitpause =1
[State 0, VarSet]
type = Varadd
trigger1 =animelem = 3 && var(8) = 4
fv = 1 ;fv = 10
value = 38
ignorehitpause =1
persistent =0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(8)=4
flag = unguardable


[State 0, VarSet]
type = Varset
triggerall = var(58) = 1
trigger1 =1
v = 8   ;fv = 10
value = 4

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

[State 1050, 1]
type = PlaySnd
triggerall = var(8)!=4
trigger1 = Time = 1
value = 200, 1

[State 1050, 1]
type = PlaySnd
trigger1=animelem =3
triggerall = anim = 205
value = 200,2
[State 1050, 1]
type = PlaySnd
trigger1=animelem =3
triggerall = anim = 1200
value = 200,5

[State 0, VelSet]
type = VelSet
triggerall = anim !=1200 && var(8) !=4
trigger1 = var(8)=3 && animelem = 3
x = 3.5

[State 0, VelSet]
type = VelSet
trigger1 = var(8)=4 && animelem = 4
x = 4


[State 0, VelSet]
type = VelSet
trigger1 = var(8)=4 && animelemtime(7) >= 0
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = anim !=1201 && var(8) !=4
x = 0

[State 0, TargetBind]
type = TargetBind
triggerall = movecontact
triggerall = !winko
triggerall = p2bodydist x >=0
triggerall = var(8) !=4
trigger1 = animelemtime(1) > 0 && animelemtime(4) < 0
pos = 40,0


[State 810, Width 2-11]
type = Width
triggerall = !winko
triggerall = movecontact
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(4) < 0
edge = 40,0
player = 0,0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause =1
;persistent =

[State 1050, 4]
type = HitDef
triggerall = anim = 1201
trigger1 = animelem = 3
attr = A, SA
hitflag = MFP
animtype  = Medium
damage    =ifelse(var(8)=1,25,ifelse(var(8)=2,32,41)),4
priority  = 9
guardflag = MA
pausetime = 8,8
sparkxy = -10,-62
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -.5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(9)=1,8,ifelse(var(9)=2,10,12))
envshake.ampl = ifelse(var(9)=1,1,2)
envshake.freq=60


[State 1050, 4]
type = HitDef
triggerall = anim = 205
trigger1 = animelem = 3
attr = A, SA
hitflag = MFP
animtype  = Medium
damage    =ifelse(var(8)=1,25,ifelse(var(8)=2,32,41)),4
priority  = 9
guardflag = MA
pausetime = ifelse(var(8) =4,3,8),ifelse(var(8) =4,3,8)
sparkxy = -10,-62
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -.5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(9)=1,8,ifelse(var(9)=2,10,12))
envshake.ampl = ifelse(var(9)=1,1,2)
envshake.freq=60


[State 0, VarSet]
type = VarSet
trigger1 = command = "rbkex" && time = 0
v = 8   ;fv = 10
value = 4

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 1 && var(8) = 4
x = 12

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movehit && var(8)=1&&  anim !=1200
trigger2= anim = 205 && animelemtime(5) >0 &&  anim !=1200
trigger3 =  anim !=1200 && (var(8) = 4 && time =1)
value = 1200
elem = ifelse(var(8) = 4,1,2)
ignorehitpause =0


[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim !=1200
triggerall = anim !=205
trigger1 = movehit && var(8)!=1
value = 205
ignorehitpause =0

[State 1050, 4]
type = HitDef
triggerall = anim = 1200
trigger1 = animelem = 3
attr = A, SA
hitflag = MFP
animtype  = Medium
damage    =ifelse(var(8)=1,25,ifelse(var(8)=2,32,ifelse(var(8)=3,41,50))),4
priority  = 9
guardflag = MA
pausetime = ifelse(var(8) =4,3,8),ifelse(var(8) =4,3,8)
sparkxy = -10,-62
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = Sifelse(var(8)=4,300,2),ifelse(var(8)=4,2,1)
guardsound = S5,0
ground.type = Low
getpower =0
ground.slidetime =13
ground.hittime  = 22
ground.velocity = -.5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(8)=1,8,ifelse(var(8)=2,10,12))
envshake.ampl = ifelse(var(8)=1,1,2)
envshake.freq=60
palfx.time = ifelse(var(8)=4,40,0)
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256


[State 1050, 4]
type = HitDef
triggerall = anim = 1200
trigger1 = animelem = 4
attr = A, SA
animtype  = up
damage    =ifelse(var(8)=1,41,ifelse(var(8)=2,50,ifelse(var(8)=3,58,55))),4
priority  = 5
guardflag = MA
pausetime = ifelse(var(8) =4,6,12),ifelse(var(8) =4,6,12)
sparkxy = -10,-82
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = Sifelse(var(8)=4,300,2),ifelse(var(8)=4,2,1)
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(8) = 0,30,0)
ground.velocity = -1,-10
guard.velocity = -2
airguard.velocity = -.5,-2
air.velocity = -.75,-7
ground.slidetime = 13
ground.hittime  = 22
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(8)=1,8,ifelse(var(8)=2,10,12))
envshake.ampl = ifelse(var(8)=1,1,2)
envshake.freq=60
fall=1
fall.recover=0
palfx.time = ifelse(var(8)=4,40,0)
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256


[State 0, PalFXWiz]
type = PalFX
triggerall= var(8) =4
trigger1 = animelemtime(3)>=0 && animelemtime(6)<0 && anim=1200
time = 10
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
triggerall= var(8) =4
trigger1 = animelem=6
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 0
persistent = 1


[State 0, Helper]
type = Helper
triggerall = var(8) = 4
trigger1 = numhelper(11017) <1 && animelem =3 && anim = 1200
helpertype = normal ;player
name = "flames"
ID = 11017
stateno = 11016
pos =  32,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 0, Pause]
type = Pause
triggerall = var(8) = 4
triggerall = anim = 1200
triggerall = !winko
trigger1 = time%3 && movecontact && !moveguarded && animelemtime(4) >0 && animelemtime(6)<0
time = 2

[State 1100, end]
type = changestate
trigger1 = (animtime = 0 && (!movecontact||moveguarded)) || (animtime = 0 && anim =1200)
value = 0
ctrl=1
;---------------------------------------------------------------------------
[Statedef 1250]
type    = S
movetype= A
physics = N
juggle  = 6
poweradd= ifelse(var(3)=1,0,110)
anim = 1250
ctrl = 0
velset=0,0
sprpriority = 0

[State 0, VarSet]
type = Varset
triggerall = var(59) = 0
trigger1 =time = 0
v = 20   ;fv = 10
value = ifelse(command = "mrsa",1,ifelse(command = "mrsb",2,3))
ignorehitpause =1

[State 0, VarSet]
type = VarSet
trigger1 = command = "mrsex" && time=0 || var(58) =1
v = 20    ;fv = 10
value = 4

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(20)=4 && animelemtime(2)>0 && anim=1250&& anim!=1251
time = 1
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = var(20)=4 && animelem=2 && anim=1251
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1
[State 0, VarSet]
type = Varadd
trigger1 =animelem = 2 && var(20) = 4
fv = 1 ;fv = 10
value = 42
ignorehitpause =1
persistent =  0

[State 0, NotHitBy]
type = HitBy
trigger1 = var(20) = 4 && anim!=1251
value = A,AA,AP
time = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S200,5
freqmul =.975

[State 0, VelSet]
type = VelSet
trigger1 =  animelem=2
x =ifelse(var(20)=1,3.25,ifelse(var(20)=2,4.5,ifelse(var(20)=3,5.5,6)))

[State 0, VelSet]
type = VelSet
trigger1 =  anim = 1251
x = 0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1250
trigger1 = animelemtime(2)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N        ;A,C,S,N

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1251
trigger1 = animelemtime(2)>=0
statetype = S      ;S,A,C,L
movetype = A       ;I,A,H
physics = S       ;A,C,S,N


[State 0, VelSet]
type = VelSet
triggerall = anim = 1250
trigger1 = animelemtime(2) >=1 && animelemtime(3) <0
y = ifelse(var(20)=1,-4,ifelse(var(20)=2,-4.75,ifelse(var(20)=3,-4.75,-5.25)))
[State 0, VelSet]
type = Veladd
triggerall = anim = 1250
trigger1 =animelemtime(4) >=0
y = .5

[State 1050, 1]
type = PlaySnd
triggerall = anim = 1250
trigger1 = time >= 24 && pos y >=15
value = 40, 0

[State 1050, 1]
type = PlaySnd
triggerall = anim = 1250
trigger1 = animelem =6
value = 0, 2
[State 100, dust]
type = Explod
triggerall = anim = 1250
trigger1 = animelem = 2
anim = 11008
ID = 11008
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 0
scale = 1,1
ownpal = 1

[State 1050, 4]
type = HitDef
trigger1 = animelem= 8
attr = A, SA
animtype  = up
damage    = ifelse(var(20)=1,65,ifelse(var(20)=2,78,ifelse(var(20)=3,89,100))),10
priority  = 9
guardflag = HA
pausetime = 13,13
sparkxy = -15,-72
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = High
getpower = ifelse(var(3) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -4,-3
guard.velocity = -3
airguard.velocity = -1.5,-2
air.velocity = -5,5
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = ifelse(var(20)=1,8,ifelse(var(20)=2,10,12))
envshake.ampl = ifelse(var(20)=1,1,2)
envshake.freq=60
fall=1
fall.recover=0


[State 1000, 7]
type = Changeanim
triggerall = anim !=1251
trigger1 =time >= 24 && pos y >=15
value = 1251
ctrl  = 1

[State 0, PosSet]
type = PosSet
triggerall = anim =1251
trigger1 =1
y = 0


[State 1000, 7]
type = Changestate
trigger1 =animtime = 0 && anim = 1251
value = 0
ctrl  = 1
;---------------------------------------------------------------------------
[Statedef 1260]
type    = S
movetype= A
physics = N
juggle  = 8
poweradd= 0
velset = 0,0
anim = 1054
ctrl = 0
sprpriority = 2

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelemtime(3)>0 && anim = 1054
trigger2 = anim = 1055 && animelemtime(7)<0
time = 1
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, Width]
type = Width
trigger1 =1
player = 28,15

[State 0, VarSet]
type = Varadd
trigger1 =animelem = 3 && anim = 1054
fv = 1 ;fv = 10
value = 43
persistent = 0
ignorehitpause=1

[State 0, PalFXWiz]
type = PalFX
trigger1 = animelem=7
time = 20
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,250,256,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1


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

[State 1050, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 9
freqmul=.97

[State 1050, 1]
type = PlaySnd
triggerall = anim = 1055
trigger1 = animelem = 2
value = 200, 7
freqmul=.97




[State 0, VelSet]
type = VelSet
triggerall = anim = 1054
trigger1 =animelemtime(3) >=1
x = 10

[State 0, Helper]
type = Helper
trigger1 = numhelper(11017) <1 && animelem =3 && anim = 1054
helpertype = normal ;player
name = "flames"
ID = 11017
stateno = 11017
pos =  32,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 0

[State 0, Helper]
type = Helper
trigger1 = numhelper(11017) <1 && animelem =4  && anim = 1055
helpertype = normal ;player
name = "flames"
ID = 11017
stateno = 11017
pos =  32,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 = anim = 1054 && animelem = 1
trigger2 = anim = 1055 && animelem = 4
v = 24    ;fv = 10
value = 1
[State 0, VarSet]
type = VarSet
trigger1 = anim = 1055  && animelem = 1
trigger2 = animtime = 0 && anim = 1055
v = 24    ;fv = 10
value = 0


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(2)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N        ;A,C,S,N

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1055 && animelemtime(7)<0
x = 4

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1055 && animelemtime(7)>=0
x = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 1055 && animelem = 1
x = 15

[State 1050, 4]
type = HitDef
triggerall =anim = 1054
trigger1 = !movecontact
attr = A, SA
animtype  = Medium
damage    =60
priority  = 9
guardflag = MA
pausetime = 15,15
sparkxy = -10,-62
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,5
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(58) = 0,30,0)
ground.slidetime =22
ground.hittime  = 22
ground.velocity = -.5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,4
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
palfx.time = 20
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim =1054 && !moveguarded
value = 1055
;ignorehitpause =
;persistent =



[State 1050, 4]
type = HitDef
triggerall = anim = 1055
trigger1 = animelem = 5
attr = A, SA
hitflag =  MAFP
animtype  = Medium
damage    = 60
priority  = 9
guardflag = MA
pausetime = 4,4
sparkxy = -15,-65
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S300,2;S2,5
guardsound = S5,0
ground.type = Low
getpower = ifelse(var(3) = 0,30,0)
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -4,-6
guard.velocity = -3
airguard.velocity = -1.5,-2
air.velocity = -4,-5
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time =12
envshake.ampl =2
envshake.freq=60
fall=1
fall.recover=0
palfx.time = 20
palfx.add = 0,-250,-256
palfx.mul = 256,256,256
palfx.sinadd = 0,0,0,1
palfx.invertall = 0
palfx.color = 256


[State 0, Pause]
type = Pause
triggerall = anim = 1055
triggerall = !winko
trigger1 = time%3 && movecontact && !moveguarded && animelemtime(4) >0
time = 2
;movetime = 2
;ignorehitpause =
;persistent =
;endcmdbuftime = (winmugen only)
;pausebg =  (winmugen only)



[State 1000, 7]
type = ChangeState
trigger1 =(animtime = 0 && anim = 1055) || (time = 40 && anim = 1054)
value = 52
ctrl  = 1

;---------------------------------------------------------------------------
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
anim = 900
ctrl = 0
sprpriority = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 8

[State 182, 2]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 56
value = 3000

[State 0, VarSet]
type = Varadd
triggerall = var(21)=3
trigger1 = time<=56
fv = 3    ;fv = 10
value = -.5


[State 0, VarRandom]
type = VarRandom
trigger1 = time = 0
v = 21
range = 1,3
;ignorehitpause =
;persistent =

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = ifelse(var(21)=2,-1500,ifelse(var(21)=3,-2000,-1000))
time = 55
movetime = 55
unhittable =1



[State 3000, Super B]
type = AfterImage
trigger1 = time = 1&& var(21) = 1
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 20,20,160




[State 3000, Super B]
type = AfterImage
trigger1 = time = 1  && var(21) = 2
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 160,20,20
palpostbright = 0,0,0



[State 3050, Super B]
type = AfterImage
trigger1 = time = 1 && var(21) = 3
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 120,20,160
palpostbright = 0,0,0

[State 3000, Helper]
type = Helper
trigger1 = time = 1 && var(21) = 3
helpertype = normal
name = "superbackground"
ID = 8055
stateno = 11011
pos = 0,0
postype = back
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90


;---------------------------------
[State 3000, Helper]
type = Helper
trigger1 =time = 1
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = 0,-61
postype = p1
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90


[State 3000, Helper]
type = Helper
trigger1 =animelem = 4 && anim=3000
helpertype = normal
name = "haohsik"
ID = 3001
stateno = 3001
pos = 79,-79
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2



[State 200, 1]
type = PlaySnd
trigger1 = Time = 56
value = 200, 14
freqmul=.98
[State 200, 1]
type = PlaySnd
trigger1 = Time = 56
value = 200, 14
freqmul=.98

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 13
freqmul=.98
[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 13
freqmul=.98


[State 3000, 7]
type = ChangeState
trigger1 = animtime = 0 && anim = 3000
value = 0
ctrl=1
;---------------------------------------------------------------------------
[Statedef 3010]
type    = S
movetype= A
physics = S
juggle  = 8
velset = 0,0
anim = 900
ctrl = 0
sprpriority = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 8

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 56
value = 3010

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 92
value = 3000

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = -1000
time = 55
movetime = 55
unhittable =1


[State 3000, 0]
type = VarSet
trigger1 = time = 1
var(3) = 0

;---------------------------------
[State 3000, Helper]
type = Helper
trigger1 =time = 1
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = 0,-61
postype = p1
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90


[State 3000, Helper]
type = Helper
trigger1 =animelem = 4 && anim=3010
helpertype = normal
name = "haohsik"
ID = 3001
stateno = 3003
pos = 79,-79
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 3000, Helper]
type = Helper
trigger1 =animelem = 4 && anim=3000
helpertype = normal
name = "haohsik"
ID = 3001
stateno = 3001
pos = 79,-79
postype = p1
facing = 1
keyctrl = 0
ownpal = 0

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2



[State 200, 1]
type = PlaySnd
trigger1 = Time = 56
value = 200, 14
freqmul=.98


[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 13
freqmul=.98


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


;---------------------------------------------------------------------------
[Statedef 3050]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
juggle=8
anim = 3003
sprpriority = 2



[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(3)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N
[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 8

[State 0, VarSet]
type = Varadd
triggerall = var(21)=3
trigger1 = time<=56
fv = 3    ;fv = 10
value = -.5
[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 15
freqmul=.98

[State 0, VarRandom]
type = VarRandom
trigger1 = time = 0
v = 21
range = 1,3
;ignorehitpause =
;persistent =

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = ifelse(var(21)=2,-1500,ifelse(var(21)=3,-2000,-1000))
time = 55
movetime = 55
unhittable =1



[State 3000, Super B]
type = AfterImage
trigger1 = time = 1&& var(21) = 1
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 20,20,160

[State 3000, 0]
type = VarSet
trigger1 = time = 1
var(3) = 0



[State 3000, Super B]
type = AfterImage
trigger1 = time = 1  && var(21) = 2
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 160,20,20
palpostbright = 0,0,0


[State 3050, Super B]
type = AfterImage
trigger1 = time = 1 && var(21) = 3
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 120,20,160
palpostbright = 0,0,0
[State 3000, Helper]
type = Helper
trigger1 = time = 1 && var(21) = 3
helpertype = normal
name = "superbackground"
ID = 8055
stateno = 11011
pos = 160,-120
postype = back
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

;---------------------------------
[State 3000, Helper]
type = Helper
trigger1 =time = 1
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = 0,-61
postype = p1
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

[State 0, VelSet]
type = VelSet
triggerall = anim=3003
trigger1 = animelem = 3
x = 7
y=-4

[State 0, VelAdd]
type = VelAdd
triggerall = anim=3003
trigger1 = animelemtime(3) >0
y = .45
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
triggerall = anim=3004
trigger1 = 1
y=0

[State 0, VelSet]
type = posSet
triggerall = anim=3004
trigger1 =1
y=0

[State 0, ChangeState]
type = Changeanim
trigger1 = pos y >= 0 && animelemtime(3) >0
value =3004


[State 1050, 4]
type = HitDef
triggerall =anim = 3003
trigger1 = !movecontact
attr = A, HA
animtype  = Medium
damage    =0,0
priority  = 7
guardflag = MA
pausetime = 2,2
guard.pausetime = 3, 8
sparkxy = -10,-62
sparkno = -1
guard.sparkno= S11004
hitsound   = -1
guardsound = S5,0
ground.type = Low
getpower =0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -0
guard.velocity = -3
airguard.velocity = -4,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.animtype = back
p1stateno = 3051
p2stateno = 3052
kill = 0
numhits = 0


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim = 3004
value = 52
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3051]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim =  ifelse(var(21)=1,3006,ifelse(var(21)=2,3007,3009))
sprpriority = 2


[State 0, EnvColor]
type = EnvColor
trigger1 =time = 0
value = 255,255,255
time = 2




[State 0, PosSet]
type = PosSet
trigger1 =time = 0
y = 0
[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(1) > 0 && animelemtime(58) <0
pos = 45,0

[State 0, Width]
type = Width
trigger1 =animelemtime(67)<0
edge = 35,35
player = 0,0


[State 200, 1]
type = PlaySnd
trigger1 = animelem =51&& anim = 3006
trigger2 = animelem =65&& anim = 3007
trigger3 = animelem =93&& anim = 3009
value = 200, 16
freqmul=.98

[State 200, 1]
type = PlaySnd
trigger1 = animelem =1&& anim = 3007
trigger2 = animelem =12&& anim = 3009
value = 200, 17
freqmul=.98

[State 200, 1] ;201
type = HitDef
trigger1 = animelem = 2
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
p2stateno =3052




[State 200, 1] ;201
type = HitDef
trigger1 = animelem=28 && (anim = 3006 ||anim = 3009)
trigger2 = animelem=6 && anim = 3007
trigger3 = animelem=51 && anim = 3009
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0



[State 200, 1] ;210
type = HitDef
trigger1 = animelem=7 && anim = 3009
trigger2 = animelem=44 && anim = 3009
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0

[State 210, 2];205
type = HitDef
trigger1 = animelem=7&& anim = 3006
trigger2 = animelem=33&& anim = 3007
trigger3 = animelem=14&& anim = 3009
trigger4 = animelem=64&& anim = 3009
attr = S, HA
animtype  = Medium
damage =21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-65
getpower = ifelse(var(3),0,20)
hitsound   = S2,1
guardsound =  S5, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 0
air.velocity = -2.5,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = unguardable

[State 210, 2] ;206
type = HitDef
trigger1 = animelem=14&& anim = 3006
trigger2 = animelem=26&& anim = 3007
trigger3 = animelem=49&& anim = 3007
trigger4= animelem=36&& anim = 3009
trigger5= animelem=57&& anim = 3009
attr = S, HA
animtype  = Medium
damage =18
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound   = S2,1
guardsound =  S5, 0
getpower =0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 01
air.velocity = -2.5,-4
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];230
type = HitDef
trigger1 = animelem=21&& anim = 3006
trigger2 = animelem=20&& anim = 3009
attr = S, HA
animtype  = Medium
damage = 23
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-86
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0


[State 210, 2] ;231
type = HitDef
trigger1 = animelem=33 && anim =3006
trigger2 = animelem=11 && anim =3007
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-78
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0
;p2stateno =3052

[State 210, 2];235
type = HitDef
trigger1 = animelem=42&& anim = 3006
trigger2 = animelem=77&& anim = 3009
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-25
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];3051
type = HitDef
trigger1 = animelem=86&& anim = 3009
attr = S, HA
animtype  = Medium
damage = 30
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -15,-46
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];236
type = HitDef
trigger1 = animelem=18 && anim = 3007
trigger2 = animelem=29 && anim = 3009
attr = S, HA
animtype  = Medium
damage = 23
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];240
type = HitDef
trigger1 = animelem=42 && anim = 3007
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-82
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];1201
type = HitDef
trigger1 = animelem=51 && anim = 3006
trigger2 = animelem=56 && anim = 3007
trigger3 = animelem=63 && anim = 3007
trigger4 = animelem=70 && anim = 3009
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = ifelse(anim = 3006,12,3),ifelse(anim = 3006,12,3)
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,1
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];1200
type = HitDef
trigger1 = animelem=58&& anim = 3006
attr = S, HA
animtype  = Medium
damage =38
guardflag = MA
pausetime = 13, 13
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-82
hitsound   = S2,1
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -1.5,-10
air.velocity = -1.5,-10
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall=1
fall.recover=0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 3007
trigger1 = animelemtime(69)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N        ;A,C,S,N


[State 0, Width]
type = Width
trigger1 = (animelemtime(69) >=1 && animelemtime(70) <0) && anim = 3007
trigger2=(animelemtime(95) >=1 && animelemtime(96) <0) && anim = 3009
edge = 32,25
player = 22,22
;value = 0,0
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = (animelemtime(69) >=1 && animelemtime(70) <0) && anim = 3007
trigger2=(animelemtime(95) >=1 && animelemtime(96) <0) && anim = 3009
y = -11
[State 0, VelSet]
type = Veladd
trigger1 =(animelemtime(69) >=0) && anim = 3007
trigger2=(animelemtime(96) >=0) && anim=3009
y = .5


[State 0, VelSet]
type = Velmul
trigger1 =(animelemtime(69) >=0) && anim = 3007
trigger2=(animelemtime(96) >=0) && anim=3009
x = .95


[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 68 && anim = 3007
value = 0, 2

[State 100, dust]
type = Explod
trigger1 = animelem = 69 && anim = 3007
trigger2 =  animelem=95 && anim = 3009
anim = 11008
ID = 11008
postype = p1
pos = 0,0
bindtime = 1
sprpriority = 0
scale = 1,1
ownpal = 1

[State 0, VelSet]
type = VelSet
trigger1 =  animelem=67 && anim = 3007
x = 4

[State 0, VelSet]
type = VelSet
trigger1 =  animelem=95 && anim = 3009
x = 2

[State 1050, 4] ;1051
type = HitDef
trigger1 = animelem = 68 && anim = 3007
trigger2 = animelem = 94 && anim = 3009
attr = A, HA
animtype  = Medium
damage    =25
priority  = 9
guardflag = MA
pausetime = 18,18
sparkxy = -15,-75
sparkno =S8000+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = 0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -2,-5
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
kill = 0
palfx.time=ifelse(anim =3009,20,0)
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,1


[State 1050, 4]
type = HitDef
trigger1 =animelem = 70 && anim = 3007
trigger2 = (time%4=0) && (animelemtime(95)>0 && animelemtime(97)<0) && var(21)=3
attr = A, HA
hitflag =  MAFP
animtype  = up
damage    = ifelse(var(21)=3,7,50)
priority  = 9
guardflag = MA
pausetime = ifelse(var(21)=3,3,22),ifelse(var(21)=3,3,22)
sparkxy = -15,-92
sparkno =S8000+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = 0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -3,-8
guard.velocity = -3
airguard.velocity = -2,-3
air.velocity = -5,-10
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl =2
envshake.freq=60
fall=1
fall.recover=0
kill = ifelse((var(21)=2 && animelem = 70),1,ifelse((var(21)=3 && hitcount = 15),1,0))
palfx.time=ifelse(anim =3009,40,0)
palfx.add = 0,-200,0
palfx.mul = 256,256,256
palfx.sinadd = 40,80,40,1

[State 0, Helper]
type = Helper
trigger1 = var(21) = 3 && numhelper(11015) <1 && animelem =95
helpertype = normal ;player
name = "flames"
ID = 11015
stateno = 11015
pos =  32,-86
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
ignorehitpause=1

[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim =3006
trigger2 =time>= 73 && pos y >=5  && anim !=3006
value = ifelse(anim !=3006,52,0)
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3052]
type    = S
movetype= H
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 0
ignorehitpause = 1
persistent = 1


[State 0, PosSet]
type = PosSet
trigger1 =1
y = 0
ignorehitpause = 1
persistent = 1



[State 1050, 5]
type = ChangeState
trigger1 =time = 5
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3053]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim =  3053
sprpriority = 2

[State 0, EnvColor]
type = EnvColor
trigger1 =time = 0
value = 255,255,255
time = 2
[State 0, VarSet]
type = VarSet
trigger1 =time = 0
v =23   ;fv = 10
value = 1

[State 100, dust]
type = Explod
trigger1 = enemy,animelem = 2  && p2stateno = 3056
anim = 3002
ID = 13000
postype = p2
pos = 0,0
bindtime = 2
sprpriority = 9
scale = .7,.7
ownpal = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =enemy,animelem = 2&& p2stateno = 3056
value = S300,1


[State 0, PosSet]
type = PosSet
trigger1 =time = 0
y = 0
[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(1) > 0 && animelemtime(58) <0
pos = 45,0

[State 0, Width]
type = Width
trigger1 =animelemtime(90)<0
edge = 45,45
player = 0,0

[State 0, Width]
type = Width
trigger1 =animelemtime(130)<0
edge = 90,45
player = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem =50
value = 200, 17
freqmul=.98

[State 200, 1]
type = PlaySnd
trigger1 = animelem =231
value = 200, 19
freqmul=.98

[State 200, 1]
type = PlaySnd
trigger1 = animelem =209
value = 200, 21
freqmul=.98

[State 200, 1] ;201
type = HitDef
trigger1 = animelem = 2
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
p2stateno =3052




[State 200, 1] ;201
type = HitDef
trigger1 = animelem=28
trigger2 = animelem=51
trigger3 = animelem=93
trigger4 = animelem=97
attr = S, HA
damage = 30
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0



[State 200, 1] ;210
type = HitDef
trigger1 = animelem=7
trigger2 = animelem=44
attr = S, HA
damage = 42
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0

[State 210, 2];205
type = HitDef
trigger1 = animelem=14
trigger2 = animelem=64
trigger3 = animelem=124
attr = S, HA
animtype  = Medium
damage =21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-65
getpower = ifelse(var(3),0,20)
hitsound   = S2,1
guardsound =  S5, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 0
air.velocity = -2.5,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = unguardable

[State 210, 2] ;206
type = HitDef
trigger1= animelem=36
trigger2= animelem=57
trigger3= animelem=117
trigger4= animelem=140
attr = S, HA
animtype  = Medium
damage =20
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound   = S2,1
guardsound =  S5, 0
getpower =0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 01
air.velocity = -2.5,-4
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];230
type = HitDef
trigger1 = animelem=20
attr = S, HA
animtype  = Medium
damage = 23
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-86
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2] ;231
type = HitDef
trigger1 = animelem=102
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-78
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0


[State 210, 2];235
type = HitDef
trigger1 = animelem=77
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-25
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0


[State 210, 2];240
type = HitDef
trigger1 = animelem=133
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-82
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2]
type = HitDef
trigger1 = animelem=86
attr = S, HA
animtype  = Medium
damage = 25
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -15,-46
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];236
type = HitDef
trigger1 = animelem=29
trigger2 = animelem=109
attr = S, HA
animtype  = Medium
damage = 28
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];1201
type = HitDef
trigger1 = animelem=70
trigger2 = animelem=147
trigger3 = animelem=154
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime =2,2
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,1
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 810, 1]
type = targetbind
triggerall = animelemtime(156) >0 && animelemtime(190)<0
trigger1 = animelem=161
pos = 40,p2bodydist y

[State 1050, 4]
type = HitDef
trigger1 = animelem = 157||  animelem = 160|| animelem = 163|| animelem = 166|| animelem = 169|| animelem = 172 || animelem = 175|| animelem = 178 || animelem = 181|| animelem = 184
attr = A, SA
animtype  = Medium
damage    = 20
priority  = 5
guardflag = MA
pausetime = 2,2
sparkxy = -5,-57
sparkno = -1
guard.sparkno= S11004
hitsound   = S2,1
getpower = 0
guardsound = S5,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -3
air.velocity = 0,0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
getpower = 0
p2stateno=1152
persistent = 1
kill=0

[State 100, dust]
type = Explod
trigger1 = animelem = 157
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-81
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 160 || animelem = 172
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-91
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 163 || animelem = 169 || animelem = 175 || animelem =181
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-71
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 166 || animelem = 178 || animelem = 184
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-105
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1


[State 1050, 4]
type = HitDef
trigger1 = animelem = 191
attr = A, SA
animtype  = UP
damage    = 16;,111,9
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -15,-102
sparkno = S8000+(random%8)
guard.sparkno= S11004
hitsound   = S200,10
guardsound = S5,0
getpower = 0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 22
air.hittime = 22
guard.velocity = -9
ground.velocity = -.7, -9
airguard.velocity = -6,-4
air.velocity = -.7, -9
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
getpower = 0
fall =1
kill =0
fall.recover=0
p2stateno =3055

[State 200, 1]
type = HitDef
trigger1 = animelem = 203
attr = S, HA
damage =500
animtype = diagup
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 35,35
sparkno =-1;S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S200, 10
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -9,-5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-4
air.hittime = 12
envshake.time = 18
envshake.ampl = 3
envshake.freq=60
fall=1
fall.recover=0
kill =0
p2stateno = 3056

[State 0, TargetBind]
type = TargetBind
trigger1 =animelem =203
pos = 120,-67
ignorehitpause =1
;persistent =

[State 100, dust]
type = Explod
trigger1 = animelem = 203
anim = 8052
ID = 8052
postype = p1
pos = 120,-67
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ontop=1
ignorehitpause=1

[State 0, BGPalFX]
type = BGPalFX
trigger1 = animelemtime(203)>=0 && animelemtime(204)<0
time = 20
add = 256,256,256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause =1
;persistent =

[State 0, PalFX]
type = PalFX
trigger1 = animelemtime(203)>=0 && animelemtime(204)<0
time = 1
add = -256,-256,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause =1
;persistent =




[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3054]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
juggle=0
anim = 3003
sprpriority = 2



[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(3)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
physics = N
[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 8

[State 0, VarSet]
type = Varadd
triggerall = var(21)=3
trigger1 = time<=56
fv = 3    ;fv = 10
value = -.5
[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 20
freqmul=.98


;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 0
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = -3000
time = 55
movetime = 55
unhittable =1



[State 3000, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "superbackground"
ID = 8055
stateno = 11012
pos = 160,-120
postype = back
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

;---------------------------------
[State 3000, Helper]
type = Helper
trigger1 =time = 0
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = 0,-61
postype = p1
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

[State 0, VelSet]
type = VelSet
triggerall = anim=3003
trigger1 = animelem = 3
x = 7
y=-4

[State 0, VelAdd]
type = VelAdd
triggerall = anim=3003
trigger1 = animelemtime(3) >0
y = .45
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
triggerall = anim=3004
trigger1 = 1
y=0

[State 0, VelSet]
type = posSet
triggerall = anim=3004
trigger1 =1
y=0

[State 0, ChangeState]
type = Changeanim
trigger1 = pos y >= 0 && animelemtime(3) >0
value =3004


[State 1050, 4]
type = HitDef
triggerall =anim = 3003
trigger1 = !movecontact
attr = A, HA
animtype  = Medium
damage    =0,0
priority  = 7
guardflag = MA
pausetime = 2,2
guard.pausetime = 3, 8
sparkxy = -10,-62
sparkno = -1
guard.sparkno= S11004
hitsound   = -1
guardsound = S5,0
ground.type = Low
getpower =0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -0
guard.velocity = -3
airguard.velocity = -4,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.animtype = back
p1stateno = 3053
p2stateno = 3052
kill = 0
numhits = 0


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim = 3004
value = 52
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3055]
type    = A
movetype= H
physics = N
juggle  = 0
velset = -.5,-15
ctrl = 0
sprpriority = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = 1
value = 3054
ignorehitpause = 1
persistent = 1

[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = .5



[State 1050, 5]
type =selfState
trigger1 =pos y >=0 && time >30
value = 5100
;---------------------------------------------------------------------------
[Statedef 3056]
type    = A
movetype= H
physics = N
juggle  = 0
ctrl = 0
velset=0,0
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 =time = 30
x = -1


[State 0, VelSet]
type = VelSet
trigger1 =animelem = 3
x = -5
y = -6

[State 0, PalFX]
type = PalFX
trigger1 = time = 0
time = 20
add = -256,-256,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause =1
;persistent =


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 3055
ignorehitpause = 1
persistent = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)>0
y =.5


[State 0, TargetLifeAdd]
type = LifeAdd
trigger1 = animelem = 2
value =-99999
kill = 1
[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
;---------------------------------------------------------------------------
[Statedef 3057]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
anim =3011
sprpriority = 2


[State 0, EnvColor]
type = EnvColor
trigger1 =time = 0
value = 255,255,255
time = 2




[State 0, PosSet]
type = PosSet
trigger1 =time = 0
y = 0
[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 0, TargetBind]
type = TargetBind
trigger1 = animelemtime(1) > 0 && animelemtime(58) <0
pos = 45,0

[State 0, Width]
type = Width
trigger1 =animelemtime(67)<0
edge = 35,35
player = 0,0

[State 200, 1]
type = PlaySnd
trigger1 = animelem =65
value = 200, 16
freqmul=.98


[State 200, 1]
type = PlaySnd
trigger1 = animelem =4 && anim=1005
value = 200, 11
freqmul =.98

[State 200, 1]
type = PlaySnd
trigger1 = animelem =1
value = 200, 17
freqmul=.98

[State 200, 1] ;201
type = HitDef
trigger1 = animelem = 2
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
p2stateno =3052




[State 200, 1] ;201
type = HitDef
trigger1 = animelem=6 && anim = 3007
attr = S, HA
damage = 22
animtype = medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
air.type = High
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0

[State 210, 2];205
type = HitDef
trigger1 = animelem=33
attr = S, HA
animtype  = Medium
damage =21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -25,-65
getpower = ifelse(var(3),0,20)
hitsound   = S2,1
guardsound =  S5, 0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 0
air.velocity = -2.5,-4
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
forcestand =1
kill = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =1
flag = unguardable

[State 210, 2] ;206
type = HitDef
trigger1 = animelem=26
trigger2 = animelem=49
attr = S, HA
animtype  = Medium
damage =25
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-67
hitsound   = S2,1
guardsound =  S5, 0
getpower =0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = 01
air.velocity = -2.5,-4
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0




[State 210, 2] ;231
type = HitDef
trigger1 = animelem=11
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-78
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0
p2stateno =3052

[State 210, 2];236
type = HitDef
trigger1 = animelem=18
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];240
type = HitDef
trigger1 = animelem=42
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 2, 3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-82
hitsound   = S2,5
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0

[State 210, 2];1201
type = HitDef
trigger1 = animelem=56
trigger2 = animelem=63
attr = S, HA
animtype  = Medium
damage = 21
guardflag = MA
pausetime = 3,3
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -10,-62
hitsound   = S2,1
guardsound =  S5, 0
ground.type = Low
getpower = 0
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = 0
air.velocity = -2.5,-3.5
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
kill = 0
[State 810, 1]
type = targetbind
triggerall = animelemtime(66) >0 && animelemtime(87)<0
trigger1 = animelem=66
pos = 40,p2bodydist y

[State 1050, 4]
type = HitDef
trigger1 = animelem = 66||  animelem = 69|| animelem = 72|| animelem = 75|| animelem = 78|| animelem = 81
attr = A, SA
animtype  = Medium
damage    = 20
priority  = 5
guardflag = MA
pausetime = 2,2
sparkxy = -5,-57
sparkno = -1
guard.sparkno= S11004
hitsound   = S2,1
getpower = 0
guardsound = S5,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,0
guard.velocity = -3
air.velocity = 0,0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
getpower = 0
p2stateno=1152
persistent = 1
kill=0

[State 100, dust]
type = Explod
trigger1 = animelem =    66
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-81
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 69 || animelem = 81
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-91
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 72|| animelem = 78
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-71
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 100, dust]
type = Explod
trigger1 = animelem = 75
anim = 8000+(random%8)
ID = 7005
postype = p2
pos = -10,-105
bindtime = 1
sprpriority = 9
scale = 1,1
ownpal = 1
ignorehitpause=1

[State 1050, 4]
type = HitDef
trigger1 = animelem = 88
attr = A, SA
animtype  = UP
damage    = 16;,111,9
priority  = 5
guardflag = MA
pausetime = 15,15
sparkxy = -15,-102
sparkno = S8000+(random%8)
guard.sparkno= S11004
hitsound   = S200,10
guardsound = S5,0
getpower = ifelse(var(58) = 0,30,0)
ground.type = Low
ground.slidetime = 13
ground.hittime  = 22
air.hittime = 22
guard.velocity = -9
ground.velocity = -.7, -9
airguard.velocity = -6,-4
air.velocity = -.7, -9
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
getpower = 0
fall =1
kill =0
fall.recover=0
p2stateno =3055

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim!=900
triggerall = anim!=1005
triggerall = anim=3011
trigger1 = animtime = 0
value = 900
elem = 1

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim=900
triggerall = anim!=1005
triggerall = anim!=3011
trigger1 =time=145
value = 1005
elem = 2

[State 1050, 4]
type = HitDef
trigger1 = animelem=4 && anim =1005
attr = S, HA
guardflag = MA
hitflag = MAF
animtype  = diagup
damage    =75,4
guardflag = MA
pausetime = 15,15
sparkxy = -10,-66
sparkno = S8000+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = low
getpower = 0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -6,-6
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -6,-6
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
fall = 1
fall.recover=0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nojugglecheck


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim=1005
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3058]
type    = S
movetype= A
physics = N
poweradd= 0
velset = 0,0
ctrl = 0
juggle=8
anim = 3003
sprpriority = 2



[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelemtime(3)>=0
statetype = A       ;S,A,C,L
movetype = A       ;I,A,H
[State 182, 2]
type = NotHitBy
trigger1 = Time = 56
value = SCA
time = 8

[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 15
freqmul=.98

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = -1000
time = 55
movetime = 55
unhittable =1



;---------------------------------
[State 3000, Helper]
type = Helper
trigger1 =time = 1
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = 0,-61
postype = p1
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

[State 0, VelSet]
type = VelSet
triggerall = anim=3003
trigger1 = animelem = 3
x = 7
y=-4

[State 0, VelAdd]
type = VelAdd
triggerall = anim=3003
trigger1 = animelemtime(3) >0
y = .45
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
triggerall = anim=3004
trigger1 = 1
y=0

[State 0, VelSet]
type = posSet
triggerall = anim=3004
trigger1 =1
y=0

[State 0, ChangeState]
type = Changeanim
trigger1 = pos y >= 0 && animelemtime(3) >0
value =3004


[State 1050, 4]
type = HitDef
triggerall =anim = 3003
trigger1 = !movecontact
attr = A, HA
animtype  = Medium
damage    =0,0
priority  = 7
guardflag = MA
pausetime = 2,2
guard.pausetime = 3, 8
sparkxy = -10,-62
sparkno = -1
guard.sparkno= S11004
hitsound   = -1
guardsound = S5,0
ground.type = Low
getpower =0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -0
guard.velocity = -3
airguard.velocity = -4,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall.animtype = back
p1stateno = 3057
p2stateno = 3052
kill = 0
numhits = 0


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim = 3004
value = 52
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3060]
type    = S
movetype= A
physics = S
juggle  = 6
velset = 0,0
ctrl = 0
anim = 3050
sprpriority = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time = 55
value = SCA
time = 12


[State 0, VarSet]
type = Varadd
triggerall = var(21)=2
trigger1 = time<=56
fv = 3    ;fv = 10
value = -.5


[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 20
value = 200, 18
freqmul=.98

[State 200, 1]
type = PlaySnd
trigger1 = Time = 62
value = 200, 19
freqmul=.98

[State 0, VarRandom]
type = VarRandom
trigger1 = time = 0
v = 21
range = 1,2
;ignorehitpause =
;persistent =

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = ifelse(var(21)=2,-3000,-2000)
time = 55
movetime = 55
unhittable =1

[State 3000, 0]
type = VarSet
trigger1 = time = 1
var(3) = 0


[State 3000, Super B]
type = AfterImage
trigger1 = time = 1  && var(21) = 1
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 160,20,20
palpostbright = 0,0,0



[State 3050, Super B]
type = AfterImage
trigger1 = time = 1 && var(21) = 2
time = 2
timegap = 1
framegap = 10
trans = add1
length = 30
paladd = 0,0,0
palmul = .9,.9,.9
palcontrast = 120,20,160
palpostbright = 0,0,0

[State 3000, Helper]
type = Helper
trigger1 =time = 0
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = -12,-61
postype = p1
facing = ifelse(facing = -1,1,1)
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

[State 200, 1]
type = HitDef
trigger1 = !movecontact&& var(21)= 1
attr = S, HA
damage = 350
animtype = diagup
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 35,35
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -9,-5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-4
air.hittime = 12
envshake.time = 18
envshake.ampl = 3
envshake.freq=60
fall=1
fall.recover=0

[State 200, 1]
type = HitDef
trigger1 = !movecontact&& var(21)= 2
attr = S, HA
damage =250
animtype = diagup
guardflag = MA
hitflag = MAF
priority =9, Hit
pausetime = 35,35
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -9,-5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-4
air.hittime = 12
envshake.time = 18
envshake.ampl = 3
envshake.freq=60


[State 0, TargetState]
type = TargetState
trigger1 = var(21) = 2 &&(movecontact && !moveguarded) && !winko && p2stateno!=[3061,3063]
value = 3061
ID = -1

[State 3000, Helper]
type = Helper
trigger1 = time = 1 && var(21) = 2
helpertype = normal
name = "superbackground"
ID = 8055
stateno = 11011
pos = 0,0
postype = left
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90
;--------------------------------------------------------------------------

[State 0, Width]
type = Width
trigger1 =animelem = 3
edge = 30,0
player = 30,0
[State 0, Width]
type = Width
trigger1 =animelem = 4
edge = 40,0
player = 40,0
[State 0, Width]
type = Width
trigger1 =animelemtime(7) >= 0
edge = 45,0
player = 45,0



[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 || (animelem = 13 && (!movecontact || moveguarded))
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3061]
type    = A
movetype= H
physics = N
sprpriority = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animexist(5052) && time = 0
value = 5052

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !animexist(5052) && time = 0
value = 5061

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = -8
y = -6

[State 0, VelAdd]
type = VelAdd
trigger1 = time >=0
y =.5
ignorehitpause=1
persistent = 1

[State 1050, 5]
type = ChangeState
trigger1 = pos y >=5
value = 3062
;---------------------------------------------------------------------------
[Statedef 3062]
type    = L
movetype= H
physics = S
sprpriority = 0
velset=0,0
anim = 5080

[State 0, PosSet]
type = PosSet
trigger1 =1
y = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
;value2 = S,NA
time = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animtime = 0 && anim = 5080
value = 5110


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time= 40
value = 5120


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0 && anim = 5120
value = 3063

;---------------------------------------------------------------------------
[Statedef 3063]
type    = S
movetype= H
physics = S
sprpriority = 0
anim = 5300




[State 1050, 5]
type = selfState
trigger1 =time = 120
value = 0
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 3065]
type    = S
movetype= I
physics = S
juggle  = 6
velset = 0,0
ctrl = 0
anim = 3051
sprpriority = 0

[State 182, 2]
type = NotHitBy
trigger1 = Time = 55
value = SCA
time = 12

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1
time = 2

[State 200, 1]
type = PlaySnd
trigger1 = Time = 20
value = 200, 18
freqmul=.98

;-------------------------------------------------
[State 3000, Super A]
type = SuperPause
trigger1 = time = 1
pos = 0, -87
anim = -1
sound = S999, 14
poweradd = -2000
time = 55
movetime = 55
unhittable =1

[State 3000, 0]
type = VarSet
trigger1 = time = 1
var(3) = 0

[State 3000, Helper]
type = Helper
trigger1 =time = 0
helpertype = normal
name = "superpause"
ID = 8050
stateno = 8050
pos = -12,-61
postype = p1
facing = ifelse(facing = -1,1,1)
keyctrl = 0
ownpal = 0
supermovetime = 90
pausemovetime  = 90

[State 0, ReversalDef]
type = ReversalDef
trigger1 = animelemtime(2)>0&&animelemtime(3)<0
reversal.attr = SCA,AA           ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
sparkno = S11004
hitsound = S5,0
p1stateno = 3066


[State 1050, 5]
type = ChangeState
trigger1 =animtime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 3066]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3052
ctrl = 0
sprpriority =9

[State 0, Pause]
type = Pause
trigger1 =time=0
time = 20



[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 200, 19
freqmul=.98

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =

[State 200, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
damage =400
animtype = diagup
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 35,35
sparkno =S8000+(random%8)
guard.sparkno= S11004
sparkxy = -12, -85
hitsound = S2, 1
getpower = 0
guardsound = S5, 0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -9,-5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -8,-4
air.hittime = 12
envshake.time = 18
envshake.ampl = 3
envshake.freq=60
fall=1
fall.recover=0
[State 100, dust]
type = Explod
trigger1 = movehit && numexplod(13000)<1
anim = 3002
ID = 13000
postype = p2
pos = 0,0
bindtime = 2
sprpriority = 9
scale = .7,.7
ownpal = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =movehit && numexplod(13000)<1
value = S300,1
[State 0, TargetState]
type = TargetState
trigger1 = (movecontact && !moveguarded) && !winko && p2stateno!=[3061,3063]
value = 3061
;--------------------------------------------------------------------------

[State 0, Width]
type = Width
trigger1 =animelem = 3
edge = 30,0
player = 30,0
[State 0, Width]
type = Width
trigger1 =animelem = 4
edge = 40,0
player = 40,0
[State 0, Width]
type = Width
trigger1 =animelemtime(7) >= 0
edge = 45,0
player = 45,0

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl =1
;---------------------------------------------------------------------------
[Statedef 3079]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 740
ctrl = 0
sprpriority = 1


[State 3050, Super A]
type = SuperPause
trigger1 = animelem = 2
pos = 0, 0
anim = S11006
sound = S90, 8
poweradd = -1000
time = 15

[State 0, Pause]
type = Pause
trigger1 = animelem = 2
time = 14
movetime = 9
ignorehitpause = 1
pausebg = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 10
value = 3083
ctrl = 0
;---------------------------------------------------------------------------
[Statedef 3081]
type    = C
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 741
ctrl = 0
sprpriority = 1

[State 3050, Super A]
type = SuperPause
trigger1 = animelem = 2
pos = 0, 0
anim = S11006
sound = S90, 8
poweradd = -1000
time = 15

[State 0, Pause]
type = Pause
trigger1 = animelem = 2
time = 19
movetime = 18
ignorehitpause = 1
pausebg = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 12
value = 3080
ctrl = 0
;---------------------------------------------------------------------------
[Statedef 3080]
type    = S
movetype= A
physics = S
juggle  = 8
poweradd= 0
velset = 0,0
anim = 440
ctrl = 0
sprpriority = 2
[State 710, hb]
type=nothitby
trigger1 = time = 0
value = SCA
time = 8
[State 200, 1]
type = PlaySnd
trigger1 = Time = 0
value = 200, 3
freqmul =.98


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

[State 440, 3]
type = HitDef
trigger1 = !movecontact
attr = C, NA
damage = 95
hitflag = MAFD
guardflag = L
pausetime = 12, 12
sparkno =S10000+(random%8)
guard.sparkno= S11004
sparkxy = -12,-17
hitsound   = S2,5
getpower = ifelse(var(3),0,40)
guardsound =  S5, 0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -1.3,-4
air.velocity = -1.3,-4
guard.velocity = -5
fall = 1
envshake.time = 12
envshake.ampl = 3
envshake.freq=60


[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;-------------------------------------------------------------------------------
[Statedef 3083]
type = S
movetype= A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 1005
elem = 3


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

[State 1050, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 200, 1
[State 710, hb]
type=nothitby
trigger1 = time = 0
value = SCA
time = 4

[State 1050, 4]
type = HitDef
trigger1 = !movecontact
attr = A, SP
hitflag = MFP
animtype  = diagup
damage    =110,4
priority  = 9
guardflag = MA
pausetime = 15,15
sparkxy = -10,-66
sparkno = S7005+(random%8)
guard.sparkno= S11004
hitsound   = S2,1
guardsound = S5,0
ground.type = Low
getpower = 0
ground.slidetime = 9
ground.hittime  = 22
ground.velocity = -6,-6
guard.velocity = -3
airguard.velocity = -.5,-2
air.velocity = -.5,-2
air.hittime = 22
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
envshake.time = 12
envshake.ampl = 2
envshake.freq=60
fall = 1
fall.recover=0
[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 900]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 900
ctrl = 0
sprpriority = 3

[State 900, Effect]
type = playsnd
trigger1 = time = 0
value = 95,0
volume = 255
channel = 1
loop= 1

[State 900, Effect]
type = playsnd
trigger1 = time = 8
value = 200,8
volume =255
channel = 2

[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6001
id = 6001

[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge2"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6002
id = 6002
[State 900, Effect]
type = Helper
trigger1 = Time = 0
name = "charge2"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6003
id = 6003

[State 900, PowerGain]
type = poweradd
trigger1 = 1
value = (time/8)

[State 0, LifeAdd]
type = LifeAdd
trigger1 = 1
value = -(time/80)
kill = 0


[State 900, End]
type = changestate
triggerall = var(59) = 1
trigger2 = power != 3000
trigger1 = (enemynear, statetype = A || (enemy,numproj >= 1)||(enemynear, ishelper))
trigger3 = life =1 && var(58)=1
value = 901
ctrl = 0

[State 900, End]
type = changestate
triggerall = var(59) = 0
trigger1 = command != "charge1" && command != "charge2" || command = "charge1" && command != "charge2" || command != "charge1" && command = "charge2"
trigger2 = power = 3000
trigger3 = life =1 && var(58)=1
value = 901
ctrl = 0

;-----------------------------------------------------------------------
;End Charge
[Statedef 901]
type    = S
movetype= I
physics = S
velset = 0,0
anim =901
ctrl = 0
sprpriority = 3

[State 900, NoVoice]
type = stopsnd
trigger1 = time = 0
channel = 2


[State 900, NoVoice]
type = stopsnd
trigger1 = time = 0
channel = 1

[State 901, End]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1
;----------------------------------------------------------------------
[Statedef 4000]
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 4000
ctrl = 0
sprpriority = 2

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



[State 1211, ]
type = bgPalFX
triggerall =prevstateno!=[190,197]
trigger1 = Time = 0
time = 80
add = 0,0,0
mul = 256,256,256
sinadd = -256,-256,-256,240


[State 1211, ]
type = bgPalFX
triggerall =prevstateno!=[190,197]
trigger1 = Time = 80
time = 160
add = -256,-256,-256
mul = 256,256,256
sinadd = 0,0,0,1

[State 1211, ]
type = bgPalFX
triggerall =prevstateno!=[190,197]
trigger1 = Time = 240
time = 60
add = -256,-256,-256
mul = 256,256,256
sinadd = 0,0,0,260

[State 0, VarSet]
type = VarSet
trigger1 =prevstateno=[190,197]
v = 22   ;fv = 10
value = 1


[State 0, Pause]
type = Pause
triggerall=prevstateno!=[190,197]
trigger1 = time =1
time = 300
movetime =300
pausebg = 1

[State 0, VarSet]
type = Varadd
trigger1 = 1
fv = 3    ;fv = 10
value = -2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1,0
volume = 255
loop = 1
channel=7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S11,1
volume = 255
channel = 2

[State 1211, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic
ignorehitpause=1

[State 831, Shake]
type  = envshake
trigger1 = time%4
freq  = 120
time  = 2
ampl  = 2

[State 0, VarSet]
type = VarSet
trigger1 =time = 300
v = 58;
value = 1
persistent = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =106
value = 900


[State 900, Effect]
type = Helper
trigger1 = Time = 106
name = "charge"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6008
id = 6008
supermovetime =999
pausemovetime = 999

[State 900, Effect]
type = Helper
trigger1 = Time = 106
name = "charge2"
postype = P1
pos = -8,0
ownpal = 1
stateno = 6009
id = 6009
supermovetime =999
pausemovetime = 999

[State 900, Effect]
type = Helper
trigger1 = Time = 106
name = "charge3"
postype = P1
pos = -13,0
ownpal = 1
stateno = 6010
id = 6001
supermovetime =999
pausemovetime = 999

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 86
value = S200,8
volume = 255

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 300
channel=7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5 && anim = 4000
value = S11,1

[State 0, VarAdd]
type = VarAdd
trigger1 = time%8=0
fv = 3    ;fv =
value = -1

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 66
time = 40
add = 0,0,0
mul = 256,256,256
sinadd = 0,-250,-256,160
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 106
time = 600
add = 0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1





[State 1071, 5]
type = changestate
trigger1 = time = 320
value = ifelse(prevstateno=190,195,0)
ctrl = ifelse(prevstateno=190,0,1)
;--------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[statedef -2]

[State -2, 1]
type = ChangeState
triggerall = RoundState = 0
triggerall = var(58) =1
triggerall =var(56) =1
triggerall = stateno !=193
trigger1 = RoundNo > 1
value = 193
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v = 25    ;fv = 10
value = 0
;ignorehitpause =
;persistent =
[State 0, VarSet]
type = VarSet
trigger1 =prevstateno = 4000
v = 58    ;fv = 10
value = 1

[State -2, 1]
type = ChangeState
triggerall = RoundState = 0
triggerall = var(56) =2
triggerall = var(58) =1 && p2name !="Nega Joe"
triggerall = stateno !=192
trigger1 = RoundNo > 1
value = 192

[State 0, LifeSet]
type = LifeSet
trigger1 =prevstateno = [192,193]
value = 1000

[State 0, VarSet]
type = VarSet
trigger1 = prevstateno = 192
v = 58   ;fv = 10
value = 0



[State -2, 1]
type = ChangeState
triggerall = prevstateno=[120,155]
triggerall = !alive
triggerall = stateno !=182
triggerall = pos y >=-12
trigger1 = 1
value = 182
[state FKO_snd]
type=PlaySND
trigger1=enemy,animelem = 2 && var(23)=1 && p2stateno = 3056
value=800,8
[State 0, VarSet]
type = VarSet
triggerall = lose
trigger1 =roundstate != 2
v = 56    ;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
triggerall = winko
trigger1 =roundstate != 2
v = 56  ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
triggerall = !lose
trigger1 =roundstate = 2
v = 57    ;fv = 10
value = life

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 =winko && var(23) =1
flag = nomusic



[State 900, Effect]
type = Helper
triggerall = stateno!=4000
triggerall= var(58)!=1
trigger1 = numhelper(4009) <1 && roundstate =2
name = "var"
postype = left
pos = 12,230
ownpal = 1
stateno = 4004
id = 4009
ignorehitpause=1
supermovetime = 999999999
pausemovetime  = 99999999

[State 0, ChangeState]
type = ChangeState
triggerall = stateno!=4000
triggerall = var(58)= 0
triggerall = roundstate = 2
trigger1 = Statetype !=A && var(22)=1 && stateno = [0,160]
value = 4000

[State 0, VarSet]
type = VarSet
triggerall = prevstateno!=190 && stateno!=190
trigger1 = fvar(3) >= 200
trigger2 = p2name ="Nega Joe" && enemy,authorname = "Kamekaze" && enemy,var(58)=1
v = 22   ;fv = 10
value = 1

[State 0, VarSet]
type = VarSet
trigger1 = fvar(3) >=200 || (prevstateno=190 && enemy,var(58)=1 &&p2name ="Nega Joe")
fv = 3 ;fv = 10
value = 200

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = var(3) = 1
flag = nostandguard
flag2 = nocrouchguard
flag3= noairguard

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = p2stateno = 3063
flag = nojugglecheck

[State 0, VarSet]
type = VarSet
trigger1 = stateno !=1260
v = 24    ;fv = 10
value = 0
;ignorehitpause =
;persistent =


[State 0, PalFXWiz]
type = PalFX
trigger1 =var(58)=1 || (stateno=3053 && animelemtime(138)<0 && animelemtime(139) >0)
time = 1
add =  0,-250,-256
mul = 256,256,256
sinadd = 0,0,0,80
invertall = 0
color = 256
ignorehitpause = 1
persistent = 1

;[State 1020, Blink Yellow]
;type = PalFX
;trigger1 = fvar(3) = 0
;triggerall = stateno !=[5000,5400]
;trigger2 = roundstate !=2
;time = 3
;add = 0,0,0
;sinadd = 0,0,0,0


[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3076
id = 1003
ignorehitpause = 1

[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3084
id = 1004
ignorehitpause = 1

[State 0, VarSet]
type = VarSet
trigger1 =  Numhelper(3001) < 1
v = 10    ;fv = 10
value = 0


[State 0, VarSet]
type = VarSet
trigger1 = enemynear,pos y < 0 || enemynear,statetype = A
v = 18   ;fv = 10
value = 1
ignorehitpause = 1
persistent =  1

[State 0, VarSet]
type = VarSet
trigger1 = enemynear,statetype = S || enemynear,statetype = C
v = 18   ;fv = 10
value = 0
ignorehitpause = 1
persistent =  1

[State 0, VarSet]
type = VarSet
trigger1 = enemynear,statetype = L
v = 18   ;fv = 10
value = 2
ignorehitpause = 1
persistent =  1



[State 0, VarSet]
type = VarSet
trigger1 = authorname= "Kamekaze" && p1name = "Nega Ryo By Kamekaze"
v = 50    ;fv = 10
value = 1

[State -2, Helper]
type = Helper
trigger1 = winko && (stateno = [3000,3060])
triggerall = NumHelper(11009) < 1
triggerall = stateno !=3053
helpertype = normal ;player
name = "winko"
ID = 11009
stateno = 11009
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1


[State -2, Helper]
type = Helper
triggerall = NumHelper(11010) < 1
trigger1 = winko && stateno = 3053
helpertype = normal ;player
name = "winko"
ID = 11010
stateno = 8900
pos = 0,0
postype = left   ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermove =999
pausemove = 999
ignorehitpause = 1



[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "var25 = %d, var1 = %d var8 = %d backdist = %d "
params =var(25),var(9),var(8),backedgedist
ignorehitpause =1
persistent = 1

[State 0, VarSet]
type = VarSet
triggerall = statetype = A
trigger1 = (p2bodydist x < 40) || (p2bodydist x >90)
v = 30   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
triggerall = statetype = A
trigger1 = p2bodydist x = [40,90]
v = 30   ;fv = 10
value = 1



;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State 1000, VarRandom]
type = VarRandom
triggerall = stateno!=[1000,1005]
triggerall = numhelper(1001) <1 && numhelper(1003) <1
trigger1 =var(59)=1 && var(58)=0
v = 2
range = 1,3
ignorehitpause =1

[State 1005, VarSet]
type = VarSet
triggerall = stateno!=[1000,1005]
triggerall = numhelper(1001) <1 && numhelper(1003) <1
triggerall = var(59)=1 && var(58)=0
triggerall = statetype!=A
triggerall = p2movetype!=H
trigger1 = p2bodydist x =[0,70]
v = 2    ;fv = 10
value = 4
ignorehitpause = 1
[State 1050, VarSet]
type = VarSet
triggerall =var(59)=1 && var(58)=0
triggerall = stateno!=1050
triggerall = (p2bodydist x=[0,45])
triggerall = p2movetype!=H
trigger1= roundno =1 && random<149
trigger2 = roundno >1 &&random<669
v = 9    ;fv = 10
value = 4
ignorehitpause = 1

[State 1050, VarSet]
type = VarSet
triggerall =var(59)=1 && var(58)=0
triggerall = stateno!=1250
triggerall = p2movetype!=H
trigger1= p2statetype != A && p2movetype =A
trigger2 = roundno >1 &&random<669
v = 20   ;fv = 10
value = 4
ignorehitpause = 1

[State 1200, VarRandom]
type = Varset
triggerall = stateno!=1200
triggerall =var(59)=1 && var(58)=0
triggerall = p2movetype!=H
trigger1= p2stateno=[120,160]
trigger2 = roundno >1 &&random<559
v = 8
value= 4
ignorehitpause =1


[State 0, VarRandom]
type = VarRandom
triggerall = stateno!=1050
trigger1 =var(59)=1 && var(58)=0
v = 9
range = 1,3
ignorehitpause =1


[State 0, VarRandom]
type = VarRandom
triggerall = stateno!=1100
trigger1 =var(59)=1 && var(58)=0
v = 11
range = 1,3
ignorehitpause =1


[State 0, VarRandom]
type = VarRandom
triggerall = stateno!=[1150,1153]
trigger1 =var(59)=1
v = 6
range = 0,2
ignorehitpause =1

[State 0, VarRandom]
type = VarRandom
triggerall = stateno!=1200
triggerall=p2stateno !=[120,160]
trigger1 =var(59)=1 && var(58)=0
v = 8
range = 1,3
ignorehitpause =1


[State 0, VarRandom]
type = VarRandom
triggerall = stateno!=1250
triggerall= p2statetype = A && p2movetype =A
trigger1 =var(59)=1 && var(58)=0
v = 20
range = 1,3
ignorehitpause =1

[State 0, VarSet]
type = Varset
triggerall = var(58) = 1
trigger1 =1
fv = 3   ;fv = 10
value = 0
[State 0, VarSet]
type = Varset
triggerall = var(58) = 1
trigger1 =1
fv = 1   ;fv = 10
value = 0

[State 0, DefenceMulSet]
type = DefenceMulSet
trigger1 = var(58) = 1
value = 1.5
ignorehitpause = 1
persistent = 1

[State 0, PowerAdd]
type = PowerAdd
triggerall = var(58) = 1
triggerall = Alive
triggerall = stateno != 4200
triggerall = stateno != [3057,3099]
triggerall = roundstate =2
trigger1 = gameTime%6 = 0
value = 10
ignorehitpause = 1
persistent = 1

[State 0, PowerAdd]
type = lifeAdd
triggerall = stateno != 3010
triggerall = stateno != 3065
triggerall = stateno != [3057,3099]
triggerall = var(58) = 1
triggerall = Alive
triggerall = roundstate =2
triggerall = p2name !="Nega Joe"
triggerall = movetype!=H
trigger1 = gameTime%8 = 0
value = -1
ignorehitpause = 1
persistent = 1

[State 0, AttackMulSet]
type = AttackMulSet
trigger1 = 1
time = 1
value = fvar(2)
[State 0, VarSet]
type = VarSet
triggerall = var(58) = 0
triggerall = enemy,movetype = H
trigger1 =stateno !=[3000,4007]
trigger1 =stateno !=[1150,1152]
fv =2 ;fv = 10
value = 1-((enemy,gethitvar(hitcount)) * .05)

[State 0, VarSet]
type = VarSet
trigger1 = var(58)=0&& enemy,movetype != H
fv = 2   ;fv = 10
value = 1
ignorehitpause =  1
persistent =  1

[State 0, VarSet]
type = VarSet
trigger1 = var(58)=1
fv = 2   ;fv = 10
value = 1.05
ignorehitpause =  1
persistent =  1


[State -3, VarRandom]
type = VarRandom
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5030
trigger5 = stateno = 5050
trigger6 = stateno = 5070
trigger7 = stateno = 5080
v = 0
range = 0,60

[State 0, VarSet]
type = Varset
trigger1 = numhelper(1001) <1
v = 17;fv = 10
value = 0


[State -3, 5]
type = VarSet
trigger1 = stateno != [3000,3015]
var(4) = 0

[State -3, 5]
type = VarSet
trigger1 = stateno !=[702,706]
var(13) = 0



[State -3, 8]
type = VarSet
trigger1 = roundstate = 3 || roundstate = 4
var(12) = 0




[State -3, Hit0]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [0,20]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 0


[State -3, Hit1]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [21,30]
trigger1 = Stateno = 5000
trigger2 = Stateno = 5010
value = 5000, 1


[State -3, StopSnd]
type = StopSnd
trigger1 = stateno !=[900,999]
channel = 2

[State -3, StopSnd]
type = StopSnd
trigger1 = stateno !=[900,999]
channel = 1

[State -3, StopSnd]
type = StopSnd
trigger1 = stateno !=191
channel = 5


[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [31,40]
trigger1 = stateno = 5020
trigger2 = stateno = 5030
trigger3 = stateno = 5050
value = 5000, 2


[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [41,50]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 3


[State -3, Hit2]
type = PlaySnd
triggerall = Alive
triggerall = Time = 0
triggerall = Var(0) = [51,60]
trigger1 = stateno = 5070
trigger2 = stateno = 5080
value = 5000, 4


;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
value = 40, 0


