;----------------------------------------------------------------------------
; Rolento's CNS ver1.0 by Tenshin - fairpear@hotmail.com
;	@ "http://kickme.to/openmugen"
;----------------------------------------------------------------------------
; var(1)	used for choosing win poses
; var(2)	used by Take No Prisoner super
;
; var(4)	used by Delta Mekong Attack
; 
; var(6)	used by knife helper block state random
; var(7)	used by knife helper block state
; var(8)	used for super jumps
;
;----------------------------------------------------------------------------

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 30
airjuggle = 15
sparkno = 1
guard.sparkno = 40
KO.echo = 0
volume = 255

[Size]
xscale = 1
yscale = 1
ground.back = 16
ground.front = 16
air.back = 13
air.front = 13
z.width = 3
height = 60
attack.width = 4,4
attack.dist = 16
proj.attack.dist = 90
proj.doscale = 0
head.pos = 5, -85
mid.pos = 0, -60
shadowoffset = 0

[Velocity]
walk.fwd  = 3
walk.back = -2.5
run.fwd  = 4.6, 0
run.back = -4.5,-3.8
jump.neu = 0,-8.1
jump.back = -3.5, -8.1
jump.fwd = 3.4
runjump.back = -2.55,-8.1
runjump.fwd = 3.4,-8.1
airjump.neu = 0,-8.1
airjump.back = -2.55,-8.1
airjump.fwd = 2.5,-8.1

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .43
stand.friction = .85
crouch.friction = .85

[Quotes]
victory1 = Encountering you has had no effect on my glorious destiny!
victory2 = Follow orders, and you may become more difficult to defeat!
victory3 = Hey! You!! Stand tall! Speak up!
victory4 = In my ideal nation, there would exist no one as weak as you!
victory5 = Judgment! Grade C! You are in need of supplementary training!!
victory6 = Judgment! You are not qualified to be a soldier!!
victory7 = Me... dictator? Me... insane? Negative! Absolutely negative!
victory8 = Your alternatives to defeat... Retreat, or total obedience.

;====================================================================================================

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

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

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

[State 180, VarRandom]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,120

[State 180, Jab]
type = VarSet
trigger1 = Command = "hold_x"
v = 1
value = 10

; Disabled for now
[State 180, Strong]
type = VarSet
trigger1 = Command = "hold_y"
v = 1
value = 10

[State 180, Fierce && Short]
type = VarSet
trigger1 = Command = "hold_z" || command = "hold_a"
v = 1
value = ifelse(command="hold_z",50,70)

[State 180, Forward & Roundhouse]
type = VarSet
trigger1 = command = "hold_b" || command = "hold_c"
v = 1
value = ifelse(command="hold_b",90,110)

[State 180, Normal Henchmen & Snap]
type = ChangeState
trigger1 = var(1) <= 19 || var(1) >= 100 
value = ifelse (var(1)<=19,181,186)

; Disabled for now
[State 180, Grenade Toss]
type = ChangeState
trigger1 = var(1) = [20,39]
value = 181

[State 180, Out of Sync]
type = ChangeState
trigger1 = var(1) = [40, 59]
value = 183

[State 180, Hook]
type = ChangeState
trigger1 = var(1) = [60, 79]
value = 184

[State 180, WaveMotion]
type = ChangeState
trigger1 = var(1) = [80, 99]
value = 185

;---------------------------------------------------------------------------
; Win 1 (Jab) Normal Win (done)
[Statedef 181]
type = S
movetype = I
ctrl = 0
anim = 181
velset = 0,0,0

[State 181, 0]
type = AssertSpecial
trigger1 = time = [0, 600]
flag = roundnotover

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

[State 181, 2]
type = Screenbound
trigger1 = time >= 66
value = 0
movecamera = 1,0

[State 181, Snap]
type = PlaySnd
trigger1 = animelem = 8
value = 0,12

[State 181, MissionComplete]
type = PlaySnd
trigger1 = animelem = 12
value = 1,6
channel = 0

[State 181, Bleach El Gato 1]
type = Explod
trigger1 = time = 70 || time = 130 
anim = ifelse(time=70,6200,6201)
id = 6200
postype = left
pos = 0, 0
removetime = ifelse(time=70,60,-1)
ontop = 1
ownpal = 1

[State 181, Brown El Gato 1]
type = Explod
trigger1 = time = 80 || time = 130
anim = ifelse(time=80,6210,6211)
id = 6210
postype = left
pos = 65,0
removetime = ifelse(time=80,50,-1)
ontop = 1
ownpal = 1

[State 181, Bleach El Gato 2]
type = Explod
trigger1 = time = 90 || time = 130 
anim = ifelse(time=90,6200,6201)
id = 6201
postype = left
pos = 130, 0
removetime = ifelse(time=90,40,-1)
ontop = 1
ownpal = 1

[State 181, Brown El Gato 2]
type = Explod
trigger1 = time = 100 || time = 130
anim = ifelse(time=100,6210,6211)
id = 6210
postype = left
pos = 195,0
removetime = ifelse(time=100,30,-1)
ontop = 1
ownpal = 1

[State 181, Bleach El Gato 3]
type = Explod
trigger1 = time = 110 || time = 130 
anim = ifelse(time=110,6200,6201)
id = 6202
postype = left
pos = 260, 0
removetime = ifelse(time=110,20,-1)
ontop = 1
ownpal = 1

;---------------------------------------------------------------------------
; Win 3 (Fierce) Out of Sync (done)
[Statedef 183]
type = S
movetype = I
ctrl = 0
anim = 181
velset = 0,0,0

[State 183, 0]
type = AssertSpecial
trigger1 = time = [0, 600]
flag = roundnotover

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

[State 183, 2]
type = Screenbound
trigger1 = time >= 66
value = 0
movecamera = 1,0

[State 183, Snap]
type = PlaySnd
trigger1 = animelem = 8
value = 0,12

[State 183, MissionComplete]
type = PlaySnd
trigger1 = animelem = 12
value = 1,6
channel = 0

[State 183, Bleach El Gato 1]
type = Explod
trigger1 = time = 70 || time = 130 
anim = ifelse(time=70,6200,6201)
id = 6200
postype = left
pos = 0, 0
removetime = ifelse(time=70,60,-1)
ontop = 1
ownpal = 1

[State 183, Brown El Gato 1]
type = Explod
trigger1 = time = 80 || time = 130
anim = ifelse(time=80,6210,6211)
id = 6210
postype = left
pos = 65,0
removetime = ifelse(time=80,50,-1)
ontop = 1
ownpal = 1

[State 183, Bleach El Gato 2]
type = Explod
trigger1 = time = 90 || time = 130 
anim = ifelse(time=90,6200,6201)
id = 6201
postype = left
pos = 130, 0
removetime = ifelse(time=90,40,-1)
ontop = 1
ownpal = 1

[State 183, Bleach El Gato 3]
type = Explod
trigger1 = time = 100 || time = 130 
anim = ifelse(time=100,6200,6201)
id = 6202
postype = left
pos = 260, 0
removetime = ifelse(time=100,30,-1)
ontop = 1
ownpal = 1

[State 183, Out of Sync Brown El Gato]
type = Explod
trigger1 = time = 150 || time = 160
anim = ifelse(time=150,6210,6211)
id = 6211
postype = left
pos = 195, 0
removetime = ifelse(time=150,10,-1)
ontop = 1
ownpal = 1

;---------------------------------------------------------------------------
; Win 4 (Jab) Hook (done)
[Statedef 184]
type = S
movetype = I
ctrl = 0
anim = 181
velset = 0,0,0

[State 184, 0]
type = AssertSpecial
trigger1 = time = [0, 600]
flag = roundnotover

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

[State 184, 2]
type = Screenbound
trigger1 = time >= 66
value = 0
movecamera = 1,0

[State 184, Snap]
type = PlaySnd
trigger1 = animelem = 8
value = 0,12

[State 184, MissionComplete]
type = PlaySnd
trigger1 = animelem = 12
value = 1,6
channel = 0

[State 184, Bleach El Gato 1]
type = Explod
trigger1 = time = 70 || time = 130 
anim = ifelse(time=70,6200,6201)
id = 6200
postype = left
pos = 0, 0
removetime = ifelse(time=70,60,-1)
ontop = 1
ownpal = 1

[State 184, Brown El Gato 1]
type = Explod
trigger1 = time = 80 || time = 130
anim = ifelse(time=80,6210,6211)
id = 6210
postype = left
pos = 65,0
removetime = ifelse(time=80,50,-1)
ontop = 1
ownpal = 1

[State 184, Bleach El Gato 2]
type = Explod
trigger1 = time = 90 || time = 130 
anim = ifelse(time=90,6200,6201)
id = 6201
postype = left
pos = 130, 0
removetime = ifelse(time=90,40,-1)
ontop = 1
ownpal = 1

[State 184, Bleach El Gato 3]
type = Explod
trigger1 = time = 110 || time = 130 
anim = ifelse(time=110,6200,6201)
id = 6202
postype = left
pos = 260, 0
removetime = ifelse(time=110,20,-1)
ontop = 1
ownpal = 1

[State 184, Brown Hook Man]
type = Explod
trigger1 = time = 100
anim = 6220
id = 6220
postype = left
pos = 195, 0
ontop = 1
ownpal = 1

[State 184, Chain Sound]
type = PlaySnd
trigger1 = time = 105
value = 0, 16

;---------------------------------------------------------------------------
; Win 5 (Forward) Wave Motion (done)
[Statedef 185]
type = S
movetype = I
ctrl = 0
anim = 181
velset = 0,0,0

[State 185, 0]
type = AssertSpecial
trigger1 = time = [0, 600]
flag = roundnotover

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

[State 185, 2]
type = Screenbound
trigger1 = time >= 66
value = 0
movecamera = 1,0

[State 185, Snap]
type = PlaySnd
trigger1 = animelem = 8
value = 0,12

[State 185, MissionComplete]
type = PlaySnd
trigger1 = animelem = 12
value = 1,6
channel = 0

[State 185, Bleach_Henchmen_1]
type = Explod
trigger1 = time = 70 || time = 165 || time = 260 || time = 355 || time = 450 || time = 545 || time = 640
anim = 6230
id = 6230
postype = left
pos = 0, 0
ontop = 1
ownpal = 1

[State 185, Brown_Henchmen_1]
type = Explod
trigger1 = time = 80 || time = 175 || time = 270 || time = 365 || time = 460 || time = 555 || time = 650
anim = 6240
id = 6240
postype = left
pos = 65, 0
ontop = 1
ownpal = 1

[State 185, Bleach_Henchmen_2]
type = Explod
trigger1 = time = 90 || time = 185 || time = 280 || time = 375 || time = 470 || time = 565 || time = 660
anim = 6230
id = 6231
postype = left
pos = 130, 0
ontop = 1
ownpal = 1

[State 185, Brown_Henchmen_2]
type = Explod
trigger1 = time = 100 || time = 195 || time = 290 || time = 385 || time = 480 || time = 575 || time = 670
anim = 6240
id = 6241
postype = left
pos = 195, 0
ontop = 1
ownpal = 1

[State 185, Bleach_Henchmen_3]
type = Explod
trigger1 = time = 110 || time = 205 || time = 300 || time = 395 || time = 490 || time = 585 || time = 680
anim = 6230
id = 6232
postype = left
pos = 260, 0
ontop = 1
ownpal = 1

;---------------------------------------------------------------------------
; Win 6 (Roundhouse) Just Win Pose (done)
[Statedef 186]
type = S
movetype = I
ctrl = 0
anim = 181
velset = 0,0,0

[State 186, 0]
type = AssertSpecial
trigger1 = time = [0, 200]
flag = roundnotover

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

[State 186, 2]
type = Screenbound
trigger1 = time >= 66
value = 0
movecamera = 1,0

[State 186, Snap]
type = PlaySnd
trigger1 = animelem = 8
value = 0,12

[State 186, MissionComplete]
type = PlaySnd
trigger1 = animelem = 12
value = 1,6
channel = 0

;---------------------------------------------------------------------------
; INTRO
[Statedef 191]
type = A
movetype = I
physics = N
ctrl = 0

[State 191, 9]
type = ChangeState
triggerall = facing = 1
trigger1 = p2name = "Sodom by Splode"
value = 10000

[State 191, 9]
type = ChangeState
triggerall = facing = 1
trigger1 = p2name = "Maki4"
value = 10001

[State 191, 9]
type = ChangeState
triggerall = facing = 1
trigger1 = p2name = "'Vega'"
value = 10002

[State 190, 10]
type = ChangeState
triggerall = facing = 1
triggerall = TeamMode =  single
trigger1 = p2name = "Rolento Schugerg"
value = 10003


[State 191, 0]
type = ScreenBound
trigger1 = time >= 29
value = 0
movecamera = 0,0

[State 191, 1]
type = AssertSpecial
trigger1 = Time = [0,200]
flag = Intro

[State 191, 2]
type = PosAdd
trigger1 = time = 30
y = -300

[State 191, 3]
type = ChangeAnim
trigger1 = time = 0
value = 190

[State 191, 4]
type = velset
trigger1 = time = 30
y = 2

[State 191, 5]
type = veladd
trigger1 = time >= 30
y = 0.02

[State 191, 7]
type = ChangeAnim
trigger1 = pos y >= -80 && time >= 30
value = 191
persistent = 0

[State 191, Ready]
type = PlaySnd
trigger1 = anim = 191 && animelem = 2
value = 1,13
channel = 0
persistent = 0

[State 191, 9]
type = ChangeState
trigger1 = pos y >= -10 && vel y > 0
value = 192

;------------------------------------------------------------
; Introduction Against M. Bison

[Statedef 10003]
type = S
ctrl = 0
anim = 2000
velset = 0,0

[State 1500, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = P4Name = "Dan Hibiki"
trigger2 = P3Name = "Dan Hibiki"
value = 0

[State 10000, 5]
type = ChangeAnim
triggerall = Anim = 2000
trigger1 = Time = 68
value = 0



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

[State 10003, Exlod] ;Textbox background
type = Explod
trigger1 = Time = 100
anim = F9510646
postype = left
pos = 160,50
ownpal = 1
sprpriority = 5

[State 10003, Exlod2] ;Text
type = Explod
trigger1 = Time = 80
anim = F100001123
postype = left
pos = 160,50
ownpal = 1
ontop = 1

[State 10003, 4] ;Change to stand state
type = ChangeState
trigger1 = Time = 880
value = 0

;------------------------------------------------------------
; Introduction Against M. Bison

[Statedef 10000]
type = S
ctrl = 0
anim = 2000
velset = 0,0

[State 1500, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = P4Name = "Dan Hibiki"
trigger2 = P3Name = "Dan Hibiki"
value = 0

[State 10000, 5]
type = ChangeAnim
triggerall = Anim = 2000
trigger1 = Time = 68
value = 0



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

[State 10000, Exlod] ;Textbox background
type = Explod
trigger1 = Time = 100
anim = F9510646
postype = left
pos = 160,50
ownpal = 1
sprpriority = 5

[State 10000, Exlod2] ;Text
type = Explod
trigger1 = Time = 80
anim = F10060
postype = left
pos = 160,50
ownpal = 1
ontop = 1

[State 10000, 4] ;Change to stand state
type = ChangeState
trigger1 = Time = 880
value = 0

;------------------------------------------------------------
; Introduction Against M. Bison

[Statedef 10001]
type = S
ctrl = 0
anim = 2000
velset = 0,0

[State 1500, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = P4Name = "Dan Hibiki"
trigger2 = P3Name = "Dan Hibiki"
value = 0

[State 10001, 5]
type = ChangeAnim
triggerall = Anim = 2000
trigger1 = Time = 68
value = 0



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

[State 10001, Exlod] ;Textbox background
type = Explod
trigger1 = Time = 100
anim = F9510
postype = left
pos = 160,50
ownpal = 1
sprpriority = 5

[State 10001, Exlod2] ;Text
type = Explod
trigger1 = Time = 80
anim = F10089
postype = left
pos = 160,50
ownpal = 1
ontop = 1

[State 10001, 4] ;Change to stand state
type = ChangeState
trigger1 = Time = 1100
value = 0

;------------------------------------------------------------
; Introduction Against M. Bison

[Statedef 10002]
type = S
ctrl = 0
anim = 2000
velset = 0,0

[State 1500, 1]
type = ChangeState
triggerall = Time = 0
trigger1 = P4Name = "Dan Hibiki"
trigger2 = P3Name = "Dan Hibiki"
value = 0

[State 10002, 5]
type = ChangeAnim
triggerall = Anim = 2000
trigger1 = Time = 68
value = 0



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

[State 10002, Exlod] ;Textbox background
type = Explod
trigger1 = Time = 100
anim = F9510
postype = left
pos = 160,50
ownpal = 1
sprpriority = 5

[State 10002, Exlod2] ;Text
type = Explod
trigger1 = Time = 80
anim = F10090
postype = left
pos = 160,50
ownpal = 1
ontop = 1

[State 10002, 4] ;Change to stand state
type = ChangeState
trigger1 = Time = 1100
value = 0

; Intro Land
[Statedef 192]
type = S
movetype = I
physics = N
velset = 0,0

[State 192, 0]
type = AssertSpecial
trigger1 = Time = [0,10]
flag = Intro

[State 192, 1]
type = Posset
trigger1 = time = 0
y = 0

[State 192, 2]
type = changeAnim
trigger1 = time = 0
value = 192

[State 192, 9]
type = ChangeState
trigger1 = animtime = 0
value = 0

;---------------------------------------------------------------------------
; TAUNT
[Statedef 1966]
type = S
ctrl = 0
poweradd = 200
anim = 1966
velset = 0,0

;[State 195, Laugh]
;type = PlaySnd
;trigger1 = animelem = 3
;value = 1,7
;channel = 0



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

;---------------------------------------------------------------------------
; TAUNT
[Statedef 195123]
type = S
ctrl = 0
;poweradd = 200
anim = 195
velset = 0,0

[State 195, Laugh]
type = PlaySnd
trigger1 = animelem = 6
value = 1,7
channel = 0

[State 195, 3]
type = helper
trigger1 = animelem = 6
name = "Grenade"
id = 8000
postype = p1
pos = 46, -68
stateno = 196123
ownpal = 1
keyctrl = 1



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

;--------------------
; Grenade State
[Statedef 196123]
type = A
movetype = A
physics = N
anim = 8000
velset = 1.6, -1
ctrl = 0
sprpriority = 2

[State 196, 1b]
type = velset
;trigger1 = time = 0
trigger1 = time <= 1
trigger1 = command = "QCB_a"
x = 1.5
y = -2

;[State 196, 1c]
;type = velset
;trigger1 = time <= 1
;trigger1 = command = "holdback"
;x = 0.6
;y = -1.8

[State 196, 2]
type = veladd
trigger1 = time >= 0
trigger1 = pos y < -5
y = 0.20

[State 196, 3]
type = velset
trigger1 = time >= 0
x = 0.5

[State 196, 4]
type = velset
trigger1 = pos y > 0
y = (vel y * 0.68) * (-1)

[State 196, 5]
type = velset
trigger1 = frontedgedist < -7
trigger2 = backedgedist < -7
x = (vel x * (-1))

[State 196, 7]
type = changeanim
trigger1 = vel y > -0.5
trigger1 = pos y > -1
value = 8001
persistent = 0

[State 196, 8]
type = palfx
trigger1 = time >= 70
trigger1 = timemod = 15, 1
time = 7
add = 64, 0, 0
mul = 300, 192, 192

[State 196, 9]
type = changestate
trigger1 = time = 120
value = 198133

;--------------------------
; Grenade Super Explod
[Statedef 198133]
type = S
movetype = A
anim = 8150111
velset = 0,0

[State 198, 0]
type = posset
trigger1 = time = 0
y = 0

[State 198, 2]
type = HitDef
trigger1 = animelem = 1
animtype = Hard
attr = S, SA
hitflag = M
pausetime = 10,10
damage = 53,7
getpower = 90,60
givepower = 60,44
priority = 3, Miss
sparkno = 2
sparkxy = -20,0
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -6
guard.dist = -5
palfx.time = 30
palfx.add = 40, 10, 10
palfx.mul = 284, 192, 192
palfx.sinadd = 64, 5,5, 6

[State 198, FireB]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-40
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 198, FireA]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-80
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1
persistent = 0

[State 198, 3]
type = playsnd
trigger1 = animelem = 1
value = 0,21

[State 198,9]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------------------------------
; TAUNT
[Statedef 195124]
type = S
ctrl = 0
;poweradd = 200
anim = 195
velset = 0,0

[State 195, Laugh]
type = PlaySnd
trigger1 = animelem = 6
value = 1,7
channel = 0

[State 195, 3]
type = helper
trigger1 = animelem = 6
name = "Grenade"
id = 8000
postype = p1
pos = 46, -68
stateno = 196124
ownpal = 1
keyctrl = 1

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

;--------------------
; Grenade State
[Statedef 196124]
type = A
movetype = A
physics = N
anim = 8000
velset = 1.6, -1
ctrl = 0
sprpriority = 2

[State 196, 1b]
type = velset
;trigger1 = time = 0
trigger1 = time <= 1
trigger1 = command = "QCB_b"
x = 3.5
y = -2

;[State 196, 1c]
;type = velset
;trigger1 = time <= 1
;trigger1 = command = "holdback"
;x = 0.6
;y = -1.8

[State 196, 2]
type = veladd
trigger1 = time >= 0
trigger1 = pos y < -5
y = 0.15

[State 196, 3]
type = velset
trigger1 = time >= 0
x = 1

[State 196, 4]
type = velset
trigger1 = pos y > 0
y = (vel y * 0.73) * (-1)

[State 196, 5]
type = velset
trigger1 = frontedgedist < -7
trigger2 = backedgedist < -7
x = (vel x * (-1))

[State 196, 7]
type = changeanim
trigger1 = vel y > -0.5
trigger1 = pos y > -1
value = 8001
persistent = 0

[State 196, 8]
type = palfx
trigger1 = time >= 70
trigger1 = timemod = 15, 1
time = 7
add = 64, 0, 0
mul = 300, 192, 192

[State 196, 9]
type = changestate
trigger1 = time = 120
value = 198134

;--------------------------
; Grenade Super Explod
[Statedef 198134]
type = S
movetype = A
anim = 8150111
velset = 0,0

[State 198, 0]
type = posset
trigger1 = time = 0
y = 0

[State 198, 2]
type = HitDef
trigger1 = animelem = 1
animtype = Hard
attr = S, SA
hitflag = M
pausetime = 10,10
damage = 70,10
getpower = 90,60
givepower = 60,44
priority = 3, Miss
sparkno = 2
sparkxy = -20,0
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -6
guard.dist = -5
palfx.time = 30
palfx.add = 40, 10, 10
palfx.mul = 284, 192, 192
palfx.sinadd = 64, 5,5, 6

[State 198, FireB]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-40
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 198, FireA]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-80
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1
persistent = 0

[State 198, 3]
type = playsnd
trigger1 = animelem = 1
value = 0,21

[State 198,9]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------------------------------
; TAUNT
[Statedef 195125]
type = S
ctrl = 0
;poweradd = 200
anim = 195
velset = 0,0

[State 195, Laugh]
type = PlaySnd
trigger1 = animelem = 6
value = 1,7
channel = 0

[State 195, 3]
type = helper
trigger1 = animelem = 7
name = "Grenade"
id = 8000
postype = p1
pos = 46, -68
stateno = 196125
ownpal = 1
keyctrl = 1

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

;--------------------
; Grenade State
[Statedef 196125]
type = A
movetype = A
physics = N
anim = 8000
velset = 1.6, -1
ctrl = 0
sprpriority = 2

[State 196, 1b]
type = velset
;trigger1 = time = 0
trigger1 = time <= 1
trigger1 = command = "QCB_c"
x = 3.5
y = -2

;[State 196, 1c]
;type = velset
;trigger1 = time <= 1
;trigger1 = command = "holdback"
;x = 0.6
;y = -1.8

[State 196, 2]
type = veladd
trigger1 = time >= 0
trigger1 = pos y < -5
y = 0.12

[State 196, 3]
type = velset ;velmul
trigger1 = time >= 0
x = 1.7

[State 196, 4]
type = velset
trigger1 = pos y > 0
y = (vel y * 0.62) * (-1)

[State 196, 5]
type = velset
trigger1 = frontedgedist < -7
trigger2 = backedgedist < -7
x = (vel x * (-1))

[State 196, 7]
type = changeanim
trigger1 = vel y > -0.5
trigger1 = pos y > -1
value = 8001
persistent = 0

[State 196, 8]
type = palfx
trigger1 = time >= 70
trigger1 = timemod = 15, 1
time = 7
add = 64, 0, 0
mul = 300, 192, 192

[State 196, 9]
type = changestate
trigger1 = time = 120
value = 198135

;--------------------------
; Grenade Super Explod
[Statedef 198135]
type = S
movetype = A
anim = 8150111
velset = 0,0

[State 198, 0]
type = posset
trigger1 = time = 0
y = 0

[State 198, 2]
type = HitDef
trigger1 = animelem = 1
animtype = Hard
attr = S, SA
hitflag = M
pausetime = 10,10
damage = 90,15
getpower = 90,60
givepower = 60,44
priority = 3, Miss
sparkno = 2
sparkxy = -20,0
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -6
guard.dist = -5
palfx.time = 30
palfx.add = 40, 10, 10
palfx.mul = 284, 192, 192
palfx.sinadd = 64, 5,5, 6

[State 198, FireB]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-40
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 198, FireA]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-80
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1
persistent = 0

[State 198, 3]
type = playsnd
trigger1 = animelem = 1
value = 0,21

[State 198,9]
type = destroyself
trigger1 = animtime = 0


;---------------------------------------------------------------------------
; TAUNT
[Statedef 195]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
;poweradd = 10
anim = 100123
ctrl = 0
sprpriority = 2

[State 270, RoundHouse]
type = PlaySnd
trigger1 = animelem = 3
value = 1, 5
channel = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 11
y = 0

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


[State 220, 2]
type = HitDef
trigger1 = animelem >= 3
attr = S, SA
animtype  = UP
damage    = 64,3
getpower = 60,16
givepower = 30,22
hitflag = MA
guardflag = MA
pausetime = 0, 0
sparkno = 2
guard.sparkno; = 40
sparkxy = -10,-30
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 1500
air.hittime = 1500
ground.velocity = -2,-5
air.velocity = -2,-5
Fall = 1
fall.recover = 0
down.bounce = 1

[State 1000, Fim]
type = ChangeState
trigger1 = Time = 20
value = 1201123
ctrl = 1

;---------------------------------------------------------------------------------------------
;Change to Walk
[Statedef 1201123]
type = S

[State 1001, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,400

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [0,200]
value = 1202123

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [201,400]
value = 1202123

;---------------------------------------------------------------------------------------------
;Change to Walk
[Statedef 1202123]
type = S
movetype = I
physics = N
ctrl = 0
anim = 1202123
velset = 0,0
spriority = 0

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

;--------------------
; Grenade State
[Statedef 196]
type = A
movetype = A
physics = N
anim = 8000
velset = 1.6, -1
ctrl = 0
sprpriority = 2

[State 196, 1b]
type = velset
trigger1 = time <= 1
trigger1 = command = "holdfwd"
x = 4
y = -2

[State 196, 1c]
type = velset
trigger1 = time <= 1
trigger1 = command = "holdback"
x = 0.6
y = -1.8

[State 196, 2]
type = veladd
trigger1 = time >= 0
trigger1 = pos y < -5
y = 0.20

[State 196, 3]
type = velmul
trigger1 = time >= 0
x = 0.99

[State 196, 4]
type = velset
trigger1 = pos y > 0
y = (vel y * 0.66) * (-1)

[State 196, 5]
type = velset
trigger1 = frontedgedist < -7
trigger2 = backedgedist < -7
x = (vel x * (-1))

[State 196, 7]
type = changeanim
trigger1 = vel y > -0.5
trigger1 = pos y > -1
value = 8001
persistent = 0

[State 196, 8]
type = palfx
trigger1 = time >= 70
trigger1 = timemod = 15, 1
time = 7
add = 64, 0, 0
mul = 300, 192, 192

[State 196, 9]
type = changestate
trigger1 = time = 120
value = 198

;--------------------------
; Grenade Super Explod
[Statedef 198]
type = S
movetype = A
anim = 8150111
velset = 0,0

[State 198, 0]
type = posset
trigger1 = time = 0
y = 0

[State 198, 2]
type = HitDef
trigger1 = animelem = 1
animtype = Hard
attr = S, SA
hitflag = M
pausetime = 10,10
damage = 85,3
getpower = 60,16
givepower = 30,22
priority = 3, Miss
sparkno = 2
sparkxy = -20,0
ground.type = Low
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -6
guard.dist = -5
palfx.time = 30
palfx.add = 40, 10, 10
palfx.mul = 284, 192, 192
palfx.sinadd = 64, 5,5, 6

[State 198, FireB]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-40
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 198, FireA]
type = Explod
trigger1 = movehit = 1 && numexplod(8300) < 4
anim = 8300
id = 8300
postype = p2
pos = -10,-80
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1
persistent = 0

[State 198, 3]
type = playsnd
trigger1 = animelem = 1
value = 0,21

[State 198,9]
type = destroyself
trigger1 = animtime = 0

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

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

[State 200, 5]
type = HitDef
trigger1 = AnimElem = 2,=1
attr = S, NA
damage    = 25,1
getpower = 60,16
givepower = 30,22
animtype = Light
air.animtype = Back
guardflag = MA
hitflag = MAF
;priority = 5, Hit
pausetime = 10,10
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-65
hitsound = S6,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -4
air.hittime  = 6
air.velocity = -2,-2
yaccel = 0.4

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

;---------------------------------------------------------------------------
; STAND_SHORT_A
[Statedef 210]
type     = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2, =1
attr = S, NA
animtype  = Light
air.animtype = Back
damage    = 23,1
getpower = 25,12
givepower = 12,6
hitflag = MAF
guardflag = MA
pausetime = 9,9
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-75
hitsound   = S6,4
guardsound = S6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -4
air.velocity = -2,-2
yaccel = 0.4

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

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

[State 220, w1]
type = width
trigger1 = animelemtime(3) >=0 && animelemtime(4) < 0
value = 8

[State 220, w1]
type = width
trigger1 = animelemtime(4) >=0
value = 16

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

[State 220, 4]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage    = 45,2
getpower = 40,14
givepower = 20,12
animtype = Medium
air.animtype = Back
guardflag = MA
hitflag = MAF
;priority = 5, Hit
pausetime = 10,10
sparkno = 1
guard.sparkno = 40
sparkxy = -20,-80
hitsound = S6,2
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -6
air.velocity = -3,-3
yaccel = 0.4

[State 220, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------------------
; STAND_B Standing Forward Neutral
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 2
;poweradd= 60
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

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

[State 230, 2]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = S, NA
animtype  = Medium
animtype = Back
damage    = 43
getpower = 40,14
givepower = 20,12
hitflag = MAF
guardflag = MA
;priority = 4, Hit
pausetime = 10,10
sparkno = 1
guard.sparkno = 40
sparkxy = -20,-60
hitsound   = S6,5
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -3, -3
yaccel = 0.4

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

;-------------------------------------------------------------------------------------------
; STAND_B Standing Forward Close
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  = 2
;poweradd= 60
ctrl = 0
velset = 0,0
anim = 235
sprpriority = 2

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

[State 235, 2]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = S, NA
animtype  = Medium
air.animtype = Back
damage    = 65,3
getpower = 60,16
givepower = 30,22
hitflag = MAF
guardflag = MA
;priority = 4, Hit
pausetime = 10,10
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-50
hitsound   = S6,6
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -8
air.velocity = -4, -2
yaccel = 0.4

[State 235, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------------------
; STANDING BATON STAND
[Statedef 240]
type    = A
movetype= A
physics = N
juggle  = 2
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

[State 240, BatonSound]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 10

[State 240, Voice]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 5
channel = 0

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
air.animtype = Back
damage    = 62,3
getpower = 60,16
givepower = 30,22
hitflag = MAF
guardflag = MA
sparkno = 2
guard.sparkno = 40
;priority = 6, Hit
pausetime = 10,10
sparkxy = -20,-40
hitsound   = S6,6
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -4
air.velocity = -4,-2
yaccel = 0.4

[State 240, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 241

[Statedef 241]
type = C
movetype = I
physcis = C
anim = 241

[State 241, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1 

;------------------------------------------------------------------------------------------
; STAND_FIERCE_Z Close
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 250
;poweradd = 80
sprpriority = 2

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

[State 250, 3]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = S, NA
damage    = 70,3
getpower = 60,16
givepower = 30,22
animtype = Heavy
air.animtype = Back
guardflag = M
hitflag = MAF
;priority = 4, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-75
hitsound = S6,3
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -9
air.velocity = -4, -2
yaccel = 0.4

[State 250, Clsoe Fierce]
type = PlaySnd
trigger1 = animelem = 3
value = 1, 1
channel = 0

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

;------------------------------------------------------------------------------------------
; Standing Standard Fierce
[Statedef 260]
type    = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 260
;poweradd = 90
sprpriority = 2

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

[State 260, 1]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = S, NA
damage = 20,3 ; done
getpower = 40,16
givepower = 20,6
animtype = Heavy
air.animtype = Back
guardflag = HA
hitflag = MA
;priority = 3, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-75
hitsound = S6,3
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -11
air.velocity = -4,-2
yaccel = 0.4

[State 260, 3]
type = PLaySnd
trigger1 = animelem = 4
value = 0, 8

[State 260, 4]
type = Explod
trigger1 = animelem = 4
anim = F40
;id = 7700
postype = p1
pos = 143, 4
sprpriority = 3
ownpal = 1

[State 260, 5]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage = 56,3 ; done
getpower = 40,16
givepower = 20,6
animtype = Heavy
guardflag = HA
hitflag = MA
;priority = 3, Hit
pausetime = 11,11
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-20
hitsound = S6,3
guardsound = S6,0
ground.type = LOW
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -10

[State 260, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; STAND_ROUNDHOUSE_C
[Statedef 270]
type    = S
movetype= A
physics = S
juggle  = 3
;poweradd= 90
ctrl = 0
velset = 0,0
anim = 270
sprpriority = 2

[State 270, RoundHouse]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 2
channel = 0

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

[State 270, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Heavy
air.animtype = Back
damage    = 63,3
getpower = 60,16
givepower = 30,22
hitflag = MAF
guardflag = MA
sparkno = 2
guard.sparkno = 40
;priority = 3, Hit
pausetime = 12,12
sparkxy = -20,-70
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -8
air.velocity = -4, -2
yaccel = 0.4

[State 270, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; STAND_ROUNDHOUSE_C
[Statedef 270777]
type    = S
movetype= A
physics = S
juggle  = 3
;poweradd= 90
ctrl = 0
velset = 0,0
anim = 270
sprpriority = 2

[State 270, RoundHouse]
type = PlaySnd
trigger1 = animelem = 4
value = 1, 2
channel = 0

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

[State 270, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype  = Heavy
air.animtype = Back
damage    = 13,3
getpower = 60,16
givepower = 30,22
hitflag = MAF
guardflag = MA
sparkno = 2
guard.sparkno = 40
;priority = 3, Hit
pausetime = 12,12
sparkxy = -20,-70
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -5
air.velocity = -4, -2
;yaccel = 0.4
fall = 1

[State 270, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Jab X
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 1
;poweradd= 30
ctrl = 0
anim = 400
sprpriority = 2

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

[State 400, 2]
type = HitDef
trigger1 = animelem = 2, =1
attr = C, NA
damage    = 25,1
getpower = 25,12
givepower = 12,6
animtype  = Light
air.animtype = Back
hitflag = MAF
guardflag = MA
pausetime = 9,9
;priority = 5, Hit
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-35
hitsound   = S6,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 111
ground.hittime  = 12
ground.velocity = -4
air.hittime  = 6
air.velocity = -2,-2
yaccel = 0.4

[State 400, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Crouching Short A
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 5
ctrl = 0
anim = 410
;poweradd = 30
sprpriority = 2

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

[State 410, 1]
type = HitDef
trigger1 = AnimElem = 2,=1
attr = C, NA
damage    = 20,1
getpower = 25,12
givepower = 12,6
animtype = Light
guardflag = L
hitflag = MF
;priority = 5, Hit
pausetime = 8,8
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-5
hitsound = S6,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 11
ground.velocity = -4
air.hittime  = 6

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

;---------------------------------------------------------------------------
; CROUCH_STRONG_Y
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 2
ctrl = 0
anim = 420
;poweradd = 60
sprpriority = 2

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

[State 420, 1]
type = HitDef
trigger1 = animElem = 3 || animelem = 7 || animelem = 11
attr = C, NA
damage    = 15,2
getpower = 25,12
givepower = 12,6
animtype = Medium
air.animtype = Back
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 5,5
sparkno = 1
guard.sparkno = 40
sparkxy = -20,-30
hitsound = S6,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -8
air.velocity = -3, -3
yaccel = 0.4

[State 420, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; CROUCH_B FORWARD
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 2
ctrl = 0
anim = 430
;poweradd = 60
sprpriority = 2

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

[State 430, 1]
type = HitDef
trigger1 = AnimElem = 2,=1
attr = C, NA
damage    = 60,2
getpower = 40,14
givepower = 20,12
animtype = Medium
guardflag = L
hitflag = MF
;priority = 4, Hit
pausetime = 10,10
sparkno = 1
guard.sparkno = 40
sparkxy = -20,-5
hitsound = S6,5
guardsound = S6,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -6
air.hittime  = 6

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

;---------------------------------------------------------------------------
; CROUCH_FIERCE_Z
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 3
ctrl = 0
anim = 440
;poweradd = 80
sprpriority = 2

[State 440, W1]
type = width
trigger1 = animelemtime(1) >=0 && animelemtime(2) < 0
value = 15

[State 440, W2]
type = width
trigger1 = animelemtime(2) >=0 && animelemtime(3) < 0
value = 30

[State 440, W3]
type = width
trigger1 = animelemtime(3) >=0
value = 45

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

[State 440, 1]
type = HitDef
trigger1 = AnimElem = 4,=1
attr = C, NA
damage = 64,3
getpower = 60,16
givepower = 30,22
animtype = Heavy
air.animtype = Back
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-40
hitsound = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -8
air.velocity = -4,-2
yaccel = 0.4

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

;---------------------------------------------------------------------------
;CROUCH_ROUNDHOUSE_C
[Statedef 450]
type    = C
movetype= A
physics = N
juggle  = 3
;poweradd= 90
ctrl = 0
anim = 450
sprpriority = 2

[State 450, 1]
type = velmul
trigger1 = 1 && animelemtime(3)>=1
x = 0.75

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

[State 450, 3]
type = velset
trigger1 = animelem = 3,=1
x = 15

[State 450, 5]
type = HitDef
trigger1 = AnimElem = 4
attr = C, NA
damage    = 80,3
getpower = 60,16
givepower = 30,22
hitflag = MF
guardflag = L
;priority = 4, Hit
pausetime = 12,12
sparkxy = -20,-10
sparkno = 2
guard.sparkno = 40
hitsound   = S6,6
guardsound = S6,0
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -2.5,-6
guard.velocity = -5
fall = 1
yaccel = 0.5

[State 450, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;JUMP_X	JAB Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
;poweradd= 30
ctrl = 0
anim = 600
sprpriority = 2

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

[State 600, 2]
type = HitDef
trigger1 = animElem = 2,=1
attr = A, NA
damage    = 25,1
getpower = 25,12
givepower = 12,6
guardflag = HA
hitflag = MAF
animtype = Light
air.animtype = Back
priority = 5, Hit
pausetime = 9,9
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-60
hitsound   = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -4
air.type = low
air.velocity = -2,-2
;airguard.velocity = -4,-3
yaccel = 0.4

;---------------------------------------------------------------------------
;JUMP_SHORT_A
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 1
;poweradd= 30
ctrl = 0
anim = 610
sprpriority = 2

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

[State 610, 2]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = A, NA
damage    = 24,1
getpower = 25,12
givepower = 12,6
guardflag = HA
hitflag = HAF
animtype = Light
air.animtype = Back
priority = 5, Hit
pausetime = 9,9
sparkno = 0
guard.sparkno = 40
sparkxy = -20,-65
hitsound   = S6,4
guardsound = S6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -2
air.type = Low
air.velocity = -2,-2
;airguard.velocity = -4,-3
yaccel = 0.4

;---------------------------------------------------------------------------
; JUMP_STRONG_Y
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 3
;poweradd= 60
ctrl = 0
anim = 620
sprpriority = 2

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

[State 620, 3]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 6 || AnimElem = 10
attr = A, NA
damage    = 15,2
getpower = 40,14
givepower = 20,12
guardflag = HA
animtype = Medium
air.animtype = Back
hitflag = MAF
priority = 4, Hit
pausetime = 2,2
sparkno = 1
guard.sparkno = 40
sparkxy = -10,-30
hitsound   = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -3, -3
;airguard.velocity = -4,-3.5
yaccel = 0.4

;---------------------------------------------------------------------------
;JUMP_FORWARD_B
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
;poweradd= 60
ctrl = 0
anim = 630
sprpriority = 2

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

[State 630, 3]
type = HitDef
trigger1 = AnimElem = 3,=1
attr = A, NA
animtype = Medium
air.animtype = Back
damage    = 40,2
getpower = 40,14
givepower = 20,12
guardflag = HA
hitflag = MAF
priority = 4, Hit
sparkno = 1
guard.sparkno = 40
pausetime = 10,10
sparkxy = -20,-15
hitsound   = S6,5
guardsound = S6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 15
ground.velocity = -6
air.velocity = -3, -3
;airguard.velocity = -4,-3.5
yaccel = 0.4

;---------------------------------------------------------------------------
;JUMP Forward FORWARD_B
[Statedef 640]
type    = A
movetype= A
physics = N
juggle  = 2
;poweradd= 60
ctrl = 0
anim = 640
sprpriority = 2

[State 640, 0]
type = velmul
trigger1 = time = 0
x = 0.5

[State 640, 1]
type = Gravity
trigger1 = 1

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

[State 640, Voice]
type = PLaySnd
trigger1 = animelem = 1
value = 1,5
channel = 0

[State 640, 4]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
animtype = medium
damage    = 64,3
getpower = 60,16
givepower = 30,22
guardflag = HA
hitflag = MAF
priority = 4, Hit
sparkno = 2
guard.sparkno = 40
pausetime = 10,10
sparkxy = -20,0
hitsound   = S6,3
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -4
air.type = Low
air.velocity = -1, -1
;airguard.velocity = -4,-3.5

[State 640, 7]
type = ChangeState
trigger1 = command = "holdback"
trigger1 = animelemno(0) = 3
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 645

[State 640, 8]
type = ChangeState
;trigger1 = command = "holdfwd"
trigger1 = animelemno(0) = 3
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 641

[State 640, 9]
type = SelfState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 52

;---------------------------------------------------------------------------
; Baton Stand to Forward Hop
[Statedef 641]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 641
velset = 0,0
sprpriority = 2

[State 641, 0]
type = posset
trigger1 = time = 0
y = 0

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

[State 641, 9]
type = ChangeState
trigger1 = animelem = 3
value = 642

[Statedef 642]
type = A
movetype = I
physics = N
velset = 3,-6.5

[State 641, 1]
type = Gravity
trigger1 = 1

[State 641, 3]
type = ctrlset
trigger1 = animelem = 6
value = 1

[State 641, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1099

;---------------------------------------------------------------------------
;Quick Baton Stand KKK
[Statedef 644]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 645

[State 644, 1]
type = Gravity
trigger1 = 1

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

[State 644, 3]
type = pLaySnd
trigger1 = animelem = 1
value = 1,5
channel = 0

[State 644, 7]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 647

;---------------------------------------------------------------------------
;Baton Stand to Backwards Hop
[Statedef 645]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 641
velset = 0,0
sprpriority = 2

[State 645, 0]
type = posset
trigger1 = time = 0
y = 0

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

[State 645, 9]
type = ChangeState
trigger1 = animelem = 3
value = 646

[Statedef 646]
type = A
movetype = I
physics = N
velset = -3,-6.5

[State 646, 1]
type = Gravity
trigger1 = 1

[State 646, 3]
type = ctrlset
trigger1 = animelem = 6
value = 1

[State 646, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1099

;---------------------------------------------------------------------------
;Baton Stand to Backwards Hop from Quick KKK
[Statedef 647]
type    = S
movetype= I
physics = S
ctrl = 0
anim = 641
velset = 0,0

[State 647, 0]
type = posset
trigger1 = time = 0
y = 0

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

[State 647, 9]
type = ChangeState
trigger1 = animelem = 3
value = 648

[Statedef 648]
type = A
movetype = I
physics = N
velset = -3,-6.5

[State 648, 1]
type = Gravity
trigger1 = 1

[State 648, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1099

;---------------------------------------------------------------------------
;JUMP_FIERCE_Z
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 3
;poweradd= 90
ctrl = 0
anim = 650
sprpriority = 2

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

[State 650, 3]
type = HitDef
trigger1 = AnimElem = 5
attr = A, NA
damage = 70,3
getpower = 60,16
givepower = 30,22
animtype = Hard
air.animtype = Back
guardflag = HA
hitflag = MAF
priority = 3, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-10
hitsound   = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -8
air.velocity = -4,-2
yaccel = 0.4

;---------------------------------------------------------------------------
;JUMP_RoundHouse_C
[Statedef 66011]
type    = A
movetype= A
physics = A
juggle  = 3
;poweradd= 90
ctrl = 0
anim = 66011

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

[State 660, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 63,3
getpower = 60,16
givepower = 30,22
guardflag = HA
animtype = Heavy
air.animtype = Back
hitflag = MAF
priority = 3, Hit
pausetime = 9,9
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-45
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -6
air.velocity = -4,-2
yaccel = 0.4



;---------------------------------------------------------------------------
;JUMP_RoundHouse_C
[Statedef 660]
type    = A
movetype= A
physics = A
juggle  = 3
;poweradd= 90
ctrl = 0
anim = 660

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

[State 660, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = A, NA
damage    = 68,3
getpower = 60,16
givepower = 30,22
guardflag = HA
animtype = Heavy
air.animtype = Back
hitflag = MAF
priority = 3, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-15
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -6
air.velocity = -4,-2
yaccel = 0.4

;=============================================================================================
; Punch Alpha/Zero Counter
[Statedef 800]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 800
poweradd = -1000
sprpriority = 1

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

[State 800, Sound]
type = PlaySNd
trigger1 = time = 0
value = 0,13
volume = 100

[State 800, Explod]
type = Explod
trigger1 = animelem = 1
anim = 7800
postype = p1
pos = 20, -67
pausemovetime = 30
sprpriority = 0

[State 800, 2]
type = pause
trigger1 = animelem = 1
time = 30
anim = -1
movetime = 30

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

[State 800, 9]
type = ChangeState
trigger1 = animtime = 0
value = 810

; Actual Punch Zero Counter
[Statedef 810]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2060
sprpriority = 2

[State 810, 1]
type = NotHitBy
trigger1 = 1
value = A, NP, SP
time = 1

[State 810, widthadd1]
type = width
trigger1 = animelemtime(6) <= 0
value = 40

[STate 810, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1,4
channel = 0

[State 810, posadd_1]
type = posadd
trigger1 = animelem = 3
x = 30

[State 810, posadd_2]
type = posadd
trigger1 = animelem = 10
x = 20

[State 810, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 25
value = 0, 7

[State 810, 3]
type = posadd
trigger1 = animelem = 12
x = 48

[State 810, 4]
type = width
trigger1 = animelemtime(6) >= 0 && animelemtime(34) < 0
edge = 30,20

[State 810, 5]
type = HitDef
trigger1 = AnimElem = 12 || animelem = 16
attr = S, SA
damage    = 40
animtype = Hard
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 1,4
sparkno = 2
guard.sparkno = 40
sparkxy = -10,-30-(time*2)
hitsound = S6,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -5
air.velocity = -5,-5
ground.cornerpush.veloff = -3
forcestand = 1
mindist = 70, -50, 0
maxdist = 70, 0, 0

[State 2060, 6]
type = HitDef
trigger1 = AnimElem = 20
attr = S, SA
damage    = 30
animtype = Hard
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 4,12
sparkno = 2
guard.sparkno = 40
sparkxy = -15,-70
hitsound = S6,1
guardsound = S6,0
ground.type = Low
fall = 1
p2stateno = 820
p2getp1state = 1
fall.recover = 0

[State 810, SpinEffect]
type = Explod
trigger1 = movehit = 1 && p2stateno = 820
anim = 7850
id = 7850
postype = p2
pos = 0, -50
bindtime = -1
ownpal = 1
sprpriority = 4
persistent = 0
ignorehitpause = 1

[State 810, 7]
type = posadd
trigger1 = animelem = 41
x = 30

[State 810, 8]
type = ChangeState
trigger1 = animtime = 0
value = 1099

[State 810, 9]
type = null;changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

; ******* Hit By Alpha Counter DP *****
[Statedef 820]
type = A
movetype = H
physics = N
velset = 0,0

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

[State 820, 2]
type = posfreeze
trigger1 = hitshakeover = 0

[State 820, 3]
type = velset
trigger1 = hitshakeover = 1
x = -3.8
y = -7
persistent =  0

[State 820, 4]
type = veladd
trigger1 = hitshakeover = 1
y = 0.43

[State 820, 9]
type = selfstate
trigger1 = pos y >= 35 && vel y > 0
value = 5100

;=============================================================================================
; Kick Zero Counter (done)
[Statedef 850]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 850
poweradd = -750

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

[State 850, Sound]
type = PlaySNd
trigger1 = time = 0
value = 0,13
volume = 100

[State 850, Explod]
type = Explod
trigger1 = animelem = 1
anim = 7800
postype = p1
pos = 20, -67
pausemovetime = 30

[State 850, 2]
type = pause
trigger1 = animelem = 1
pos = 30, -80
time = 30
anim = -1
movetime = 30

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

[State 850, 9]
type = ChangeState
trigger1 = animtime = 0
value = 860

; Actual Kick Escape (done)
[Statedef 860]
type = A
movetype = I
physics = N
ctrl = 0
velset = 8,-5
anim = 860
sprpriority = 0

[State 860, 0]
type = veladd
trigger1 = 1
y = 0.6

[State 860, 1]
type = PlaySnd
trigger1 = animelem = 1
trigger1 = prevstateno != 940 || prevstateno != 980
value = 1,3
channel = 0

[State 860, KickThrowSound]
type = PlaySnd
triggerall = time = 5
trigger1 = prevstateno = 940
trigger2 = prevstateno = 980
value = 1,12
channel = 0	

[State 860, 2]
type = NotHitBy
trigger1 = time >= 0
value = SCA
time = 1

[State 860, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 870

;=================================================================================
; Kick Counter Jump Land (done)
[Statedef 870]
type = C
movetype = I
physics = S
velset = 0, 0
anim = 870

[State 870, 0]
type = turn
trigger1 = time = 0
trigger1 = p2dist X < -5

[State 870, 2]
type = posset
trigger1 = time = 0
y = 0

[State 870, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 0,0

[State 870, 9]
type = changestate
trigger1 = animtime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; PUNCH THROW FORWARD/BACKWARD
[Statedef 900]
type    = S
movetype= A
physics = S
juggle  = 13
ctrl = 0
velset = 0,0
anim = 900
sprpriority = 2



[State 800, 1]
type = HitDef
trigger1 = animelem = 2
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
ground.velocity = 4,-4
p1facing = ifelse (command = "holdfwd", -1, 1)
p2facing = 1
p1stateno = 910
p2stateno = 920
fall = 1


[State 900, grabmiss]
type = playsnd
trigger1 = animelem = 3
value = 1, 9
volume = 50

[State 900, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Rolento's Punch Throw State
[Statedef 910]
type = S
movetype = A
physics = S
anim = 910
velset = 0,0
ctrl = 0
sprpriority = 2

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

;[State 910, Width1]
;type = width
;trigger1 = animelemtime(1) >= 0 && animelemtime(3) < 0
;edge = 40,80

[State 910, 2]
type = null;ScreenBound
trigger1 = animelemtime(1) >= 0 && animelemtime(7) < 0
value = 0

[State 910, T1]
type = targetbind
trigger1 = animelemtime(2) < 0
pos = 35, 0

[State 910, TimeOut]
type = ChangeState
trigger1 = time < 10
trigger1 = p2stateno != 920
value = 0
ctrl = 1

[State 910, T2]
type = targetbind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 55, -85

[State 910, T3]
type = targetbind
trigger1 = animelemtime(3) >= 0 && animelemtime(4) < 0
pos = -70, -85

[State 910, Width2]
type = width
trigger1 = animelemtime(3) >= 0 && animelemtime(8) < 0
edge = 80,20

[State 910, 2]
type = turn
trigger1 = animelem = 3

[State 910, 3]
type = posadd
trigger1 = animelem = 3
x = 15

[State 910, T4]
type = targetbind
trigger1 = animelemtime(4) >=0 && animelemtime(5) < 0
pos = -10, -110

[State 910, T5]
type = targetbind
trigger1 = animelemtime(5) >= 0 && animelemtime(6) < 0
pos = 40, -120

[State 910, T5]
type = targetbind
trigger1 = animelemtime(6) >= 0 && animelemtime(7) < 0
pos = 100, -80

[State 910, Voice]
type = PlaySnd
trigger1 = Animelem = 6
value = 1,3
channel = 0

[State 910, T5]
type = targetbind
trigger1 = animelem = 7
time = 1
pos = 100, 10


[State 802, LifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 7
value = -75


[State 910, 8]
type = TargetPowerAdd
Trigger1 = AnimElem = 7
value = 50

[State 910, 8]
type = PowerAdd
Trigger1 = AnimElem = 7
value = 60

[State 910, TargetState]
type = TargetState
trigger1 = AnimElem = 7,1
value = 921

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

;------------------------------------
; Throwed by Punch Throw
[Statedef 920]
type = A
movetype = H
physics = N

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

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

[State 920, 2]
type = ScreenBound
trigger1 = animelemtime(7) < 0
value = 0
movecamara = 1,0

[State 920, 3]
type = sprpriority
trigger1 = animelem = 1
value = 0

[State 920, 4]
type = sprpriority
trigger1 = animelem = 3
value = 2

;--------------------------
; Throwed to Air
[Statedef 921]
type = A
movetype = H
physics = N

[State 921, 2]
type = VelSet
trigger1 = time = 0
x = 5
y = -5

[State 921, 4]
type = SelfState
trigger1 = time = 1
value = 5050

;---------------------------------------------------------------------------
; KICK THROW FORWARD/BACKWARD
[Statedef 930]
type    = S
movetype= A
physics = S
juggle  = 33
ctrl = 0
velset = 0,0
anim = 900

[State 930, 1]
type = HitDef
trigger1 = animelem = 2
trigger1 = P2BodyDist X <= 20
attr = S, NT   
p2facing = -1
p1facing = ifelse(command="holdfwd",-1,1)
hitflag = M-
priority = 2, Miss
sparkno = 45647
hitsound = S0,14
p1stateno = 940
p2stateno = 950
p2getp1state = 1
fall = 1

[State 930, grabmiss]
type = playsnd
trigger1 = animelem = 3
value = 1, 9
volume = 50



[State 930, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Rolento's Kick Throw State
[Statedef 940]
type = S
movetype = A
physics = S
juggle  = 33
anim = 940
velset = 0,0
ctrl = 0

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

[State 940, GrenadeHelper]
type = helper
trigger1 = time = 1
name = "Grenades"
id = 8050
postype = p1
facing = 1
pos = 0,0
stateno = 945
ownpal = 1

[State 940, Voice]
type = PlaySnd
trigger1 = time = 0
value = 1,5
channel = 0

[State 940, Width]
type = width
trigger1 = animelemtime(1) >= 0
edge = 80,0

[State 940, T1]
type = targetbind
trigger1 = animelemtime(2) < 0
pos = 50, 0

[State 940, Spr2]
type = SprPriority
trigger1 = animelem = 2
value = 0

[State 940, T2]
type = targetbind
trigger1 = animelemtime(2) >=0 && animelemtime(3) < 0
pos = 50, 0

[State 940, T3]
type = targetbind
trigger1 = animelem = 3
time = 1
pos = 50, 0


[State 940, 9]
type = ChangeState
trigger1 = animtime = 0
value = 860

; Grenades on Victim --------------------------------
[Statedef 945]
type = A
juggle  = 33
movetype = I
physics = N
anim = 8050
sprpriority = 3

[State 945, 0]
type = turn
trigger1 = time = 0
trigger1 = p2dist x > 0

[State 945, 2]
type = palfx
trigger1 = time = 35
time = 8
add = 64, 0, 0
mul = 300, 192, 192

[State 945, BombSound]
type = PlaySnd
trigger1 = time = 43
value = 0,21
volume = 75

[State 945, 2]
type = changeanim
trigger1 = time = 43
value = 9999

[State 945, FireA]
type = Explod
trigger1 = time = 43 || time = 44
anim = 8300
id = 8300
postype = p2
pos = -10,-40
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 945, FireA]
type = Explod
trigger1 = time = 43 || time = 44
anim = 8300
id = 8301
postype = p2
pos = -10,-80
random = 50,30
bindtime = -1
sprpriority = 3
ownpal = 1

[State 945, sbomb1]
type = explod
trigger1 = time = 43
id = 8150
anim = 8150
pos = -20,-85
postype = p1
random = 20,20
ownpal = 1
sprpriority = 4

[State 945, sbomb2]
type = explod
trigger1 = time = 43
id = 8200
anim = 8200
pos = -40,-55
postype = p1
random = 20,20
ownpal = 1
sprpriority = 5

[State 945, sbomb3]
type = explod
trigger1 = time = 43
id = 8151
anim = 8150
pos = 0,-45
postype = p1
random = 20,20
ownpal = 1
sprpriority = 6

[State 910, 8]
type = PowerAdd
trigger1 = time = 43
value = 50


[State 945,9]
type = destroyself
trigger1 = time = 50

;------------------------------------
; Throwed by Kick Throw
[Statedef 950]
type = A
juggle  = 33
movetype = H
physics = N

[State 950, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 950

[State 950, 2]
type = ScreenBound
trigger1 = animelemtime(4) < 0
value = 0

[State 950, 3]
type = sprpriority
trigger1 = animelem = 1
value = 0

[State 950, 4]
type = sprpriority
trigger1 = animelem = 2
value = 2

[State 802, LifeAdd]
type = LifeAdd
trigger1 = time = 43
value = -100



[State 910, 8]
type = PowerAdd
trigger1 = time = 43
value = 50



[State 950, 7]
type = palfx
trigger1 = time = 43
time = 40
add = 64, 0, 0
mul = 300, 192, 192

[State 950, 8]
type = VelSet
trigger1 = time = 43
x = -4
y = -6

[State 950, 9]
type = SelfState
trigger1 = time = 43
value = 5050

;---------------------------------------------------------------------------
; AIR KICK THROW/GRAB
[Statedef 970]
type    = A
movetype= A
physics = A
juggle  = 0
poweradd= 0
ctrl = 0
anim = 970

[State 970, 2]
type = HitDef
trigger1 = animelem = 2
trigger1 = P2BodyDist X <= 20
trigger1 = P2BodyDist Y <= 10
attr = A, NT   
p2facing = -1
hitflag = AF
priority = 2, Miss
sparkno = 56462
hitsound = S0,14
p1stateno = 980
p2stateno = 990
p2getp1state = 1
fall = 1

[State 970, 3]
type = HitDef
trigger1 = animelem = 2
trigger1 = P2BodyDist X <= 20
trigger1 = P2BodyDist Y <= 10
trigger1 = command = "holdfwd"
attr = A, NT   
p1facing = -1
p2facing = -1
hitflag = AF
priority = 2, Miss
sparkno = 456457
hitsound = S0,14
p1stateno = 980
p2stateno = 990
p2getp1state = 1
fall = 1

[State 970, grabmiss]
type = playsnd
trigger1 = movehit = 0
trigger1 = animelem = 3
value = 1, 9
volume = 50

;---------------------------------------------------------------------------
; Rolento's Air Throw State
[Statedef 980]
type = A
movetype = A
physics = A
anim = 960
velset = 0,0
ctrl = 0

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

[State 980, 2]
type = PosFreeze
trigger1 = time < 38

[State 980, GrenadeHelper]
type = helper
trigger1 = time = 1
name = "Grenades"
id = 8050
postype = p1
facing = 1
pos = 0,0
stateno = 945
ownpal = 1

[State 940, Voice]
type = PlaySnd
trigger1 = time = 0
value = 1,5
channel = 0

[State 980, T1]
type = targetbind
trigger1 = animelemtime(2) < 0
pos = 40, -5

[State 980, Spr2]
type = SprPriority
trigger1 = animelem = 2
value = 0

[State 980, T2]
type = targetbind
trigger1 = animelemtime(2) >= 0 && animelemtime(3) < 0
pos = 40, -5

[State 980, 9]
type = ChangeState
trigger1 = animtime = 0
value = 860

;-----------------------------------
; Throwed by Air Throw
[Statedef 990]
type = A
movetype = H
physics = N
velset = 0,0

[State 990, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 950

[State 990, 3]
type = sprpriority
trigger1 = animelem = 1
value = 0

[State 990, 4]
type = sprpriority
trigger1 = animelem = 3
value = 2

[State 990, 5]
type = posfreeze
trigger1 = 1

[State 990, LifeMinus]
type = LifeAdd
trigger1 = time = 43
value = -150

[State 990, 7]
type = palfx
trigger1 = time = 43
time = 40
add = 64, 0, 0
mul = 300, 192, 192

[State 990, 8]
type = VelSet
trigger1 = time = 43
x = -4
y = -6

[State 990, 9]
type = SelfState
trigger1 = time = 43
value = 5050




;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 2000577]
type = S
movetype = I
physics = S
ctrl = 0
;poweradd = 70
velset = 0,0
anim = 2000221
juggle = 5
sprpriority = 2

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

[State 3060, 2]
type = targetstate
trigger1 = time = 0
value = 50

type = selfstate
trigger1 = time = 0
value = ifelse(statetype = A, 50,0)
ctrl = 1

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20


[State 3000, SuperPause]
type = SuperPause
triggerall = Anim = 2000221
trigger1 = AnimElem = 1
anim = 100
time = 45
pos = 0,-56
movetime = 45
poweradd = -2000

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 5
value = 2,0
volume = 75

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 6
value = 1,5
volume = 75

;[State 3000, Pause]
;type = Pause
;trigger1 = time = 5
;time = 45

;[State 3000, Pause]
;type = PosFreeze
;trigger1 = time = 5
;time = 45



[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 200055577
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 200055577]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2000558
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[STate 2000,1]
type = width
trigger1 = animelemtime(3) >= 0
value = 30

[STate 2000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

[State 2000, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 20 || animelem = 40
value = 0, 7

[State 2000, 1]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 11 || AnimElem = 16
attr = S, SA
damage    = 18, 7
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,ifelse((animelemtime(4)<0 || animelemtime(15)>=0),8,2)
sparkno = 3
guard.sparkno = 41
sparkxy = -10,(-40-ceil(time*1.5))
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1
air.velocity = -1,-1
;p2stateno = 300544
;ground.cornerpush.veloff = 0
air.type = Low
;forcestand = 1
yaccel = 0.4

[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

[State 0, ]
type = ChangeState
trigger1 = movecontact = 1 && time >= 20
value = 42022377
elem = 7
ignorehitpause = 1
persistent = 0


;==================================================================================
; Patriot Circle Alpha 3 First Set
[Statedef 42022377]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 210077
;poweradd = 60
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 10

[STate 2100, 1]
type = width
trigger1 = animelem = 3, >= 0
value = 30

[State 2100, 2]
type = posadd
trigger1 = animelemtime(5) < 0
x = 4

[State 2100, 3]
type = makedust
trigger1 = animelemtime(5) < 0
pos = -10, -2
spacing = 3

[STate 2100, 4]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

[State 2100, DualHit]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
attr = S, SA
damage    = 30, 8
animtype = Hard
guardflag = MA
numhits = 2
hitflag = MAF
priority = 4, Hit
pausetime = 4,6
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-60
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 21
ground.hittime  = 21
;p2stateno = 300544
ground.velocity = -1
air.velocity = -2, -2
forcestand = 1

[State 2100, SingleHits]
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
damage    = 30, 8
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-60+time
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 41
ground.hittime  = 41
ground.velocity = -1
;p2stateno = 300544
air.velocity = -2,-2
forcestand = 1

[State 2100, 9]
type = changestate
trigger1 = animtime = 0
value = 213077
ctrl = 1


;==================================================================================
; Patriot Circle Alpha 3 Second Set
[Statedef 213077]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2130
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 2

[STate 2130,1]
type = width
trigger1 = time >= 0
value = 30

[State 2130, 3]
type = makedust
trigger1 = time >= 0 && time <= 13
pos = -10, -2
spacing = 3

[State 2130,2]
type = posadd
trigger1 = time >= 0
trigger1 = time <= 13
x = 4

[STate 2130, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

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

[State 2130, DualHit]
type = HitDef
trigger1 = AnimElem = 11
attr = S, SA
damage    = 35, 1
animtype = Hard
guardflag = HA
hitflag = MA
priority = 4, Hit
pausetime = 4,8
numhits = 2
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-70
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4, -2.5
air.velocity = -4,-2.5
fall = 1
fall.recover = 0
yaccel = .25
;forcestand = 1

[State 2130, SingleHits]
type = HitDef
trigger1 = AnimElem = 12
trigger2 = AnimElem = 13
attr = S, SA
damage    = 43, 1
animtype = Medium
guardflag = HA
hitflag = MA
;priority = 4, Hit
pausetime = 4,8
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-70+time
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4, -2.5
air.velocity = -4,-2.5
fall = 1
fall.recover = 0
yaccel = .25
;forcestand = 1

[State 2130, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 2000554]
type = S
movetype = I
physics = S
ctrl = 0
;poweradd = 70
velset = 0,0
anim = 2000221
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

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

[State 3060, 2]
type = targetstate
trigger1 = time = 0
value = 50

type = selfstate
trigger1 = time = 0
value = ifelse(statetype = A, 50,0)
ctrl = 1


[State 3000, SuperPause]
type = SuperPause
triggerall = Anim = 2000221
trigger1 = AnimElem = 1
anim = 100
time = 45
pos = 0,-56
movetime = 45
poweradd = -1000

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 5
value = 2,0
volume = 75

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 6
value = 1,5
volume = 75

;[State 3000, Pause]
;type = Pause
;trigger1 = time = 5
;time = 45

;[State 3000, Pause]
;type = PosFreeze
;trigger1 = time = 5
;time = 45



[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 2000555
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 2000555]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2000558
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[STate 2000,1]
type = width
trigger1 = animelemtime(3) >= 0
value = 30

[STate 2000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

[State 2000, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 20 || animelem = 40
value = 0, 7

[State 2000, 1]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 11 || AnimElem = 16
attr = S, SA
damage    = 14, 7
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,ifelse((animelemtime(4)<0 || animelemtime(15)>=0),8,2)
sparkno = 3
guard.sparkno = 41
sparkxy = -10,(-40-ceil(time*1.5))
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1
air.velocity = -1,-1
;p2stateno = 300544
;ground.cornerpush.veloff = 0
air.type = Low
;forcestand = 1
yaccel = 0.4

[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

[State 0, ]
type = ChangeState
trigger1 = movecontact = 1 && time >= 20
value = 420223
elem = 7
ignorehitpause = 1
persistent = 0


;---------------------------------------------------------------------------
; CROUCH_STRONG_Y


[Statedef 420223]
type    = C
movetype= A
physics = C
juggle  = 2
ctrl = 0
anim = 420223
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

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

[State 420, 1]
type = HitDef
trigger1 = animElem = 3 || animelem = 7 || animelem = 11
attr = C, NA
damage    = 15,2
animtype = Medium
air.animtype = Back
guardflag = MA
hitflag = MAF
;priority = 4, Hit
pausetime = 5,5
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-30
hitsound = S6,1
guardsound = S6,0
ground.type = Low
ground.slidetime = 13
ground.hittime  = 15
;p2stateno = 300544
ground.velocity = -1
air.velocity = -1, -1
yaccel = 0.4

[State 420, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 260123
ctrl = 1

;---------------------------------------------------------------------------
; Crouching
[Statedef 11123]
type    = C
physics = C
anim = 11
sprpriority = 0

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[State 420, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 260123

;------------------------------------------------------------------------------------------
; Standing Standard Fierce
[Statedef 260123]
type    = S
movetype= A
physics = S
juggle  = 3
velset = 0,0
ctrl = 0
anim = 270
;poweradd = 90
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 2

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

[State 260, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
damage = 48,3 ; done
animtype = Heavy
air.animtype = Back
guardflag = MAF
hitflag = HAF
;priority = 3, Hit
pausetime = 12,12
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-85
hitsound   = S6,6
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 17
ground.velocity = -4, -2.5
air.velocity = -4,-2.5
fall = 1
fall.recover = 0
yaccel = .25




;[State 260, 5]
;type = HitDef
;trigger1 = AnimElem = 5
;attr = S, NA
;damage = 56,3 ; done
;getpower = 40,16
;givepower = 20,6
;animtype = Heavy
;guardflag = MA
;hitflag = HAF
;pausetime = 11,11
;sparkno = 2
;guard.sparkno = 40
;sparkxy = -20,-20
;hitsound = S6,3
;guardsound = S6,0
;ground.type = Low
;p2stateno = 300544
;ground.slidetime = 15
;ground.hittime  = 17
;ground.velocity = -4, -2.5
;air.velocity = -4,-2.5
;fall = 1
;fall.recover = 0
;yaccel = .25

[State 260, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1



;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 20005788]
type = S
movetype = I
physics = S
ctrl = 0
;poweradd = 70
velset = 0,0
anim = 2000221
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

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

[State 3060, 2]
type = targetstate
trigger1 = time = 0
value = 50

type = selfstate
trigger1 = time = 0
value = ifelse(statetype = A, 50,0)
ctrl = 1


[State 3000, SuperPause]
type = SuperPause
triggerall = Anim = 2000221
trigger1 = AnimElem = 1
anim = 100
time = 45
pos = 0,-56
movetime = 45
poweradd = -3000

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 5
value = 2,0
volume = 75

[State 3000, A-ismSuperSound]
type = PlaySnd
trigger1 = time = 6
value = 1,5
volume = 75

;[State 3000, Pause]
;type = Pause
;trigger1 = time = 5
;time = 45

;[State 3000, Pause]
;type = PosFreeze
;trigger1 = time = 5
;time = 45



[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 2000555778
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 2000555778]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2000558
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[STate 2000,1]
type = width
trigger1 = animelemtime(3) >= 0
value = 30

[STate 2000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

[State 2000, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 20 || animelem = 40
value = 0, 7

[State 2000, 1]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 11 || AnimElem = 16
attr = S, SA
damage    = 14, 7
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,ifelse((animelemtime(4)<0 || animelemtime(15)>=0),8,2)
sparkno = 3
guard.sparkno = 41
sparkxy = -10,(-40-ceil(time*1.5))
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1
air.velocity = -1,-1
;p2stateno = 300544
;ground.cornerpush.veloff = 0
air.type = Low
;forcestand = 1
yaccel = 0.4

[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

[State 0, ]
type = ChangeState
trigger1 = movecontact = 1 && time >= 20
value = 420223778
elem = 7
ignorehitpause = 1
persistent = 0


;==================================================================================
; Patriot Circle Alpha 3 First Set
[Statedef 420223778]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 210077
;poweradd = 60
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[STate 2100, 1]
type = width
trigger1 = animelem = 3, >= 0
value = 30

[State 2100, 2]
type = posadd
trigger1 = animelemtime(5) < 0
x = 4

[State 2100, 3]
type = makedust
trigger1 = animelemtime(5) < 0
pos = -10, -2
spacing = 3

[STate 2100, 4]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

[State 2100, DualHit]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage    = 22, 8
animtype = Hard
guardflag = MA
numhits = 2
hitflag = MAF
priority = 4, Hit
pausetime = 3,6
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-60
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 21
ground.hittime  = 21
;p2stateno = 300544
ground.velocity = -1
air.velocity = -1, -1
forcestand = 1

[State 2100, SingleHits]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6
attr = S, SA
damage    = 22, 8
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,6
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-60+time
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -1
;p2stateno = 300544
air.velocity = -1,-1
forcestand = 1

[State 2100, 9]
type = changestate
trigger1 = animtime = 0
value = 2130778
ctrl = 1


;==================================================================================
; Patriot Circle Alpha 3 Second Set
[Statedef 2130778]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2130111
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 20

[STate 2130,1]
type = width
trigger1 = time >= 0
value = 30

[State 2130, 3]
type = makedust
trigger1 = time >= 0 && time <= 13
pos = -10, -2
spacing = 3

[State 2130,2]
type = posadd
trigger1 = time >= 0
trigger1 = time <= 13
x = 4

[STate 2130, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

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

[State 2130, DualHit]
type = HitDef
trigger1 = AnimElem = 11
trigger2 = AnimElem = 12
attr = S, SA
damage    = 16, 1
animtype = Hard
guardflag = HA
hitflag = MA
priority = 4, Hit
pausetime = 4,8
numhits = 2
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-70
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
;p2stateno = 300544
ground.velocity = -3
air.velocity = -3,-3
;fall = 1
;fall.recover = 0
yaccel = .25
;forcestand = 1

[State 2130, SingleHits]
type = HitDef
trigger1 = AnimElem = 13
attr = S, SA
damage    = 20, 1
animtype = Medium
guardflag = HA
hitflag = MA
;priority = 4, Hit
pausetime = 4,8
sparkno = 3
guard.sparkno = 41
sparkxy = -10,-70+time
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
;p2stateno = 300544
ground.slidetime = 29
ground.hittime  = 29
ground.velocity = -4
air.velocity = -3,-3
;fall = 1
;fall.recover = 0
yaccel = .25
;forcestand = 1

[State 2130, 9]
type = changestate
trigger1 = animtime = 0
value = 2060777
ctrl = 1


;--------------------------------------------
; Patriot Circle Alpha 2/3 Third Set Combined
[Statedef 2060777]
type = S
movetype = A
physics = S
ctrl = 0
;poweradd = 60
velset = 0,0
anim = 2060
juggle = 5
sprpriority = 2

[State 3020, 2]
type = AfterImage
trigger1 = AnimElem = 2
time = 1

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact = 0
time = 2

[State 3020, 2]
type = AfterImageTime
trigger1 = MoveContact
time = 2

[STate 2060, widthadd1]
type = width
trigger1 = animelemtime(6) <= 0
value = 40

[STate 2060, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1,4
channel = 0

[State 2060, posadd]
type = posadd
trigger1 = animelem = 3
x = 30

[State 2060, posadd]
type = posadd
trigger1 = animelem = 10
x = 20

[State 2060, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 25
value = 0, 7

[State 2060, 3]
type = posadd
trigger1 = animelem = 12
x = 48

[State 2060, 4]
type = width
trigger1 = animelemtime(6) >= 0 && animelemtime(34) < 0
edge = 30,20




[State 2060, 5]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
damage    = 33, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 2
guard.sparkno = 40
numhits = 2
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -4,-3
air.type = Low
;ground.cornerpush.veloff = -3
forcestand = 1

[State 2060, 6]
type = HitDef
trigger1 = AnimElem = 16
attr = S, SA
damage    = 43, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 3
guard.sparkno = 41
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4, -4
air.velocity = -4,-3
fall = 1


[State 2060, 7]
type = posadd
trigger1 = animelem = 41
x = 30

[State 2060, 8]
type = ChangeState
trigger1 = animtime = 0
trigger1 = prevstateno = 800
value = 1099

[State 2060, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------
; Patriot Circle Alpha 2/3 Third Set Combined
[Statedef 2060]
type = S
movetype = A
physics = S
ctrl = 0
;poweradd = 60
velset = 0,0
anim = 2060
juggle = 5
sprpriority = 2



[STate 2060, widthadd1]
type = width
trigger1 = animelemtime(6) <= 0
value = 40

[STate 2060, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1,4
channel = 0

[State 2060, posadd]
type = posadd
trigger1 = animelem = 3
x = 10

[State 2060, posadd]
type = posadd
trigger1 = animelem = 10
x = 5

[State 2060, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 25
value = 0, 7

[State 2060, 3]
type = posadd
trigger1 = animelem = 12
x = 15

[State 2060, 4]
type = width
trigger1 = animelemtime(6) >= 0 && animelemtime(34) < 0
edge = 30,20




[State 2060, 5]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
damage    = 43, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,6
sparkno = 2
guard.sparkno = 40
numhits = 2
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 22
ground.hittime  = 22
ground.velocity = -7
air.velocity = -4,-3
air.type = Low
;ground.cornerpush.veloff = -3
forcestand = 1

[State 2060, 6]
type = HitDef
trigger1 = AnimElem = 16
attr = S, SA
damage    = 63, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4, -4
air.velocity = -4,-3
fall = 1


[State 2060, 7]
type = posadd
trigger1 = animelem = 41
x = 30

[State 2060, 8]
type = ChangeState
trigger1 = animtime = 0
trigger1 = prevstateno = 800
value = 1099

[State 2060, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1




; Dizzied by Chouhatsu Densetsu
[Statedef 300544]
type = S
movetype = H
physics = S
ctrl = 0
;poweradd = -150



[State 3005, 0]
type = ChangeState
trigger1 = Pos Y < -5    ; Go to air hit state instead
value = 5050

[State 921, 2]
type = VelSet
trigger1 = anim = 5050
x = -5
y = -5


[State 3005, 0]
type = ChangeAnim
trigger1 = time = 0
trigger1 = selfanimexist(5300)  ; check for dizzy anim
trigger1 = anim != 5300
value = 5300

[State 3005, 1]
type = ChangeAnim2
trigger1 = time = 0
trigger1 = !selfanimexist(5300)
trigger1 = anim != 3005
value = 5300  ; fake dizzy anim

[State 3005, 2]
type = SelfState
trigger1 = time = 120
value = 0
ctrl = 1

[State 3005, 3]
type = PowerAdd
trigger1 = time > 0
value = -1



;=====================================================================================================
; Stinger_A Start (done)
[Statedef 1000]
type = C
physics = C
movetype = I
ctrl = 0
anim = 1000
sprpriority = 2

[State 1000, 0]
type = velset
trigger1 = time >= 0
x = 0

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

[State 1000, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1005

;---------------------------------------------------------------
; Stinger_A Jump (done)
[Statedef 1005]
type = A
movetype = I
physics = N
ctrl = 0
velset = 0, -9
anim = 1010
sprpriorty = 2

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

[State 1005, 0]
type = velset
trigger1 = time >= 0
x = 0

[State 1005, 1]
type = veladd
trigger1 = 1
y = 0.50

[State 1005, 4]
type = ChangeAnim
trigger1 = vel Y >= -1
value = 1020
persistent = 0

[State 1005, 8]
type = ChangeState
trigger1 = command = "x" || command = "a"
value = 1040

[State 1005, 8b]
type = ChangeState
trigger1 = command = "y" || command = "b"
value = 1050

[State 1005, 8c]
type = ChangeState
trigger1 = command = "z" || command = "c"
value = 1060

[State 1005, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;==================================================================================================
; Stinger_B Start (done)
[Statedef 1010]
type = C
physics = C
movetype = I
ctrl = 0
anim = 1000
sprpriority = 2

[State 1010, 1]
type = velset
trigger1 = time >= 0
x = 0

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

[State 1010, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1015

;---------------------------------------------------------
; Stinger_B Jump (done)
[Statedef 1015]
type = A
movetype = I
physics = N
velset = 0, -10
anim = 1010
sprpriority = 2

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

[State 1015, 0]
type = velset
trigger1 = time >= 0
x = 0

[State 1015, 1]
type = veladd
trigger1 = 1
y = 0.55

[State 1015, 4]
type = ChangeAnim
trigger1 = vel Y >= -1
value = 1020
persistent = 0

[State 1005, 8]
type = ChangeState
trigger1 = command = "x" || command = "a"
value = 1040

[State 1005, 8b]
type = ChangeState
trigger1 = command = "y" || command = "b"
value = 1050

[State 1005, 8c]
type = ChangeState
trigger1 = command = "z" || command = "c"
value = 1060

[State 1015, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;==================================================================================================
; Stinger_C Start (done)
[Statedef 1020]
type = C
physics = C
movetype = I
ctrl = 0
anim = 1000
sprpriority = 2

[State 1020, 1]
type = velset
trigger1 = time >= 0
x = 0

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

[State 1020, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1025

;---------------------------------------------------------
; Stinger_C Jump (done)
[Statedef 1025]
type = A
movetype = I
physics = N
velset = 0, -11
anim = 1010
sprpriority = 2

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

[State 1025, 0]
type = velset
trigger1 = time >= 0
x = 0

[State 1025, 1]
type = veladd
trigger1 = 1
y = 0.61

[State 1025, 4]
type = ChangeAnim
trigger1 = vel Y >= -1
value = 1020
persistent = 0

[State 1005, 8]
type = ChangeState
trigger1 = command = "x" || command = "a"
value = 1040

[State 1005, 8b]
type = ChangeState
trigger1 = command = "y" || command = "b"
value = 1050

[State 1005, 8c]
type = ChangeState
trigger1 = command = "z" || command = "c"
value = 1060

[State 1025, 9]
type = ChangeState
trigger1 = pos Y >= -5 && vel Y > 0
value = 1095

;==================================================================================================
; Stinger_EX Start (done)
[Statedef 1030]
type = C
physics = C
movetype = I
ctrl = 0
anim = 1000

[State 1030, 1]
type = velset
trigger1 = time >= 0
x = 0

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

[State 1030, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1035

;---------------------------------------------------------
; Stinger_EX Jump (done)
[Statedef 1035]
type = A
movetype = I
physics = N
velset = 0, -12.5
anim = 1010

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

[State 1035, 0]
type = velset
trigger1 = time >= 0
x = 0

[State 1035, 1]
type = veladd
trigger1 = 1
y = 0.7

[State 1035, 4]
type = ChangeAnim
trigger1 = vel Y >= -1
value = 1020
persistent = 0

[State 1035, 8]
type = ChangeState
trigger1 = command = "x" || command = "y" || command = "z"
trigger2 = command = "a" || command = "b" || command = "c"
value = 1065

[State 1035, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;-------------------------------------
; Stinger Knife Spin_X_A (done)
[Statedef 1040]
type = A
movetype = A
physics = N
velset = 0, 0
anim = 1040
sprpriority = 2

[State 1040, 3]
type = PlaySnd
trigger1 = animelem = 6
value = 1,11
channel = 0
volume = -50

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

[State 1065, 5.2]
type = helper
trigger1 = animelem = 6,1
id = 1071
name = "knife y"
pos = 20,-43
postype = p1
stateno = 1074
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1040, 7]
type = veladd
trigger1 = time >= 17
y = 0.65

[State 1040, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;-------------------------------------
; Stinger Knife Spin_Y_B (done)
[Statedef 1050]
type = A
movetype = A
physics = N
velset = 0, 0
anim = 1040
sprpriority = 2

[State 1050, 3]
type = PlaySnd
trigger1 = animelem = 6
value = 1,11
channel = 0
volume = -50

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

[State 1065, 5.2]
type = helper
trigger1 = animelem = 6,1
id = 1071
name = "knife y"
pos = 20,-43
postype = p1
stateno = 1074
helpertype = normal
keyctrl = 0
ownpal = 1



[State 1065, 5.3]
type = helper
trigger1 = animelem = 6,1
id = 1072
name = "knife z"
pos = 21,-44
postype = p1
stateno = 1078
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1050, 7]
type = veladd
trigger1 = time >= 17
y = 0.65

[State 1050, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;-------------------------------------
; Stinger Knife Spin_Z_C (done)
[Statedef 1060]
type = A
movetype = A
physics = N
velset = 0, 0
anim = 1040
sprpriority = 2

[State 1060, 3]
type = PlaySnd
trigger1 = animelem = 6
value = 1,11
channel = 0
volume = -50

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

[State 1065, 5.1]
type = helper
trigger1 = animelem = 6,1
name = "knife x"
id = 1070
pos = 18,-45
postype = p1
stateno = 1070
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1065, 5.2]
type = helper
trigger1 = animelem = 6,1
id = 1071
name = "knife y"
pos = 20,-43
postype = p1
stateno = 1074
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1065, 5.3]
type = helper
trigger1 = animelem = 6,1
id = 1072
name = "knife z"
pos = 21,-44
postype = p1
stateno = 1078
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1060, 7]
type = veladd
trigger1 = time >= 17
y = 0.65

[State 1060, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;-------------------------------------
; Stinger Knife Spin_EX (done)
[Statedef 1065]
type = A
movetype = A
physics = N
velset = 0, 0
anim = 1040
sprpriority = 2

[State 1065, 3]
type = PlaySnd
trigger1 = animelem = 6
value = 1,11
channel = 0
volume = -50

[State 1065, 3]
type = Playsnd
trigger1 = animelem = 2
value = 0, 19
channel = 0
volume = 50
 
[State 1065, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 9
PalBright   = 0 , 0,  0
PalContrast =  128, 128, 128
PalAdd      = 0,0,0
PalMul      = 1,1,1
TimeGap  = 1
FrameGap = 3
Trans = Add1
time = 2

[State 1065, Afterimage]
type = AfterImageTime
trigger1 = (Time >= 0) && (AnimElemTime(8) < 0)
time = 2

[State 1065, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

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

[State 1065, 5.1]
type = helper
trigger1 = animelem = 6,1
name = "knife x"
id = 1070
pos = 18,-45
postype = p1
stateno = 1070
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1065, 5.2]
type = helper
trigger1 = animelem = 6,1
id = 1071
name = "knife y"
pos = 20,-43
postype = p1
stateno = 1074
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1065, 5.3]
type = helper
trigger1 = animelem = 6,1
id = 1072
name = "knife z"
pos = 21,-44
postype = p1
stateno = 1078
helpertype = normal
keyctrl = 0
ownpal = 1

[State 1065, 7]
type = gravity
trigger1 = time >= 17

[State 1065, 9]
type = ChangeState
trigger1 = pos Y >= -5
trigger1 = vel Y > 0
value = 1095

;======================================================================================
; Knife X & A (done)
[Statedef 1070]
type = A
movetype = A
physics = N
ctrl = 0
velset = 3.2, 5
anim = 1070
sprpriority = 3

[State 1070, 3]
type = HitDef
trigger1 = time = 0
attr = A, SP
damage    = 31,7
getpower = 90,60
givepower = 60,44
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 1,8
sparkno = 10
guard.sparkno = 1166444522
sparkxy = -10,10
hitsound = S6,10
guardsound = S0,100
ground.type = low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -4
air.velocity = -3,-2
air.fall = 1

;[State 1070, 4]
;type = explod
;trigger1 = movehit = 1
;ignorehitpause = 1
;persistent = 0
;anim = F10
;postype = p1
;pos = 50,10
;facing = 1

[State 1070, 5]
type = Changestate
trigger1 = moveguarded = 1
value = 1080

[State 1070, 6]
type = HitOverride
trigger1 = time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 1090

[State 1070,8]
type = PlaySnd
trigger1 = pos y >= 0
value = 0,11
persistent = 0

[State 1070,9]
type = DestroySelf
;trigger1 = pos y >= 0
trigger1 = movehit = 1
trigger2 = time = 300
ignorehitpause = 1

[State 1070, 9]
type = ChangeState
trigger1 = pos y >= 0
value = 1090

;======================================================================================
; Knife Y & B (done)
[Statedef 1074]
type = A
movetype = A
physics = N
ctrl = 0
velset = 5, 4.5
anim = 1074
sprpriority = 3

[State 1074, 3]
type = HitDef
trigger1 = time = 0
attr = A, SP
damage    = 51,8
getpower = 90,60
givepower = 60,44
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 1,8
sparkno = 10
guard.sparkno = 1166444522
sparkxy = -10,10
hitsound = S6,10
guardsound = S0,100
ground.type = low
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -4
air.velocity = -3,-2
air.fall = 1

;[State 1074, 4]
;type = explod
;trigger1 = movehit = 1
;ignorehitpause = 1
;persistent = 0
;anim = F12
;postype = p1
;pos = 50,10
;facing = 1

[State 1074, 5]
type = Changestate
trigger1 = moveguarded = 1
value = 1080

[State 1074, 6]
type = HitOverride
trigger1 = time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 1090

[State 1074,7]
type = PlaySnd
trigger1 = pos y >= 0
value = 0,11
persistent = 0

[State 1074,8]
type = DestroySelf
;trigger1 = pos y >= 0
trigger1 = movehit = 1
trigger2 = time = 300
ignorehitpause = 1

[State 1074, 9]
type = ChangeState
trigger1 = pos y >= 0
value = 1090

;======================================================================================
; Knife Z & C (done)
[Statedef 1078]
type = A
movetype = A
physics = N
ctrl = 0
velset = 5.7, 3.7
anim = 1078
sprpriority = 3

[State 1078, 3]
type = HitDef
trigger1 = time = 0
attr = A, SP
damage    = 31,9
getpower = 90,60
givepower = 60,44
animtype = medium
guardflag = MA
hitflag = MAF
priority = 5, Hit
pausetime = 1,8
sparkno = 10
guard.sparkno = 1166444522
sparkxy = -10,10
hitsound = S6,10
guardsound = S0,100
ground.type = Low
ground.slidetime = 14
ground.hittime  = 14
ground.velocity = -4
air.velocity = -3,-2
air.fall = 1

;[State 1078, 4]
;type = explod
;trigger1 = movehit = 1
;ignorehitpause = 1
;persistent = 0
;anim = F12
;postype = p1
;pos = 50,10
;facing = 1

[State 1078, 5]
type = Changestate
trigger1 = moveguarded = 1
value = 1080

[State 1078, 6]
type = HitOverride
trigger1 = time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 1090

[State 1078,8]
type = PlaySnd
trigger1 = pos y >= 0
value = 0,11
persistent = 0

[State 1078,9]
type = DestroySelf
;trigger1 = pos y >= 0
trigger1 = movehit = 1
trigger2 = time = 300
ignorehitpause = 1

[State 1078, 9]
type = ChangeState
trigger1 = pos y >= 0
value = 1090

;------------------------------------------------
; Knife Helper Blocked
[Statedef 1080]
movetype = I
physics = N
velset = -0.8,-2.5
anim = 1070

[State 1080, var(7)Set]
type = varset
trigger1 = time = 1
v = 7
value = 2

[State 1080, var(6)Set]
type = varrandom
trigger1 = time = 0
v = 6
range = 100

[State 1080, 1]
type = veladd
trigger1 = time >= 0
y = 0.3

[State 1080, 4]
type = AngleSet
Trigger1 = Time = 0
value = 0

[State 1080, 5a]
type = AngleAdd
Trigger1 = Time >= 0
trigger1 = var(6) < 50
value = -20

[State 1080, 5b]
type = AngleAdd
Trigger1 = Time >= 0
trigger1 = var(6) >= 50
value = 20

[State 1080, 6]
type = AngleDraw
Trigger1 = Time >= 0
trigger1 = Pos Y <= 5

[State 1080,8]
type = DestroySelf
trigger1 = time = 90

[State 1080,9]
type = ChangeState
trigger1 = pos y >= 0
value = 1090

;----------------------------------------------
; Knife Bounce
[Statedef 1090]
movetype = I
physics = N
velset = 0, -4
anim = 1080

[State 1090, Anim]
type = ChangeAnim
trigger1 = time = 0
trigger1 = var(6) > 0
value = ifelse(var(6)>50,1080,1081)

[State 1090, Speed]
type = null;velset
trigger1 = time = 0
y = -4

[State 1090, MulXSpeed]
type = null;velmul
trigger1 = time >= 0
x = 0.95

[State 1090, 0]
type = velset
trigger1 = time = 0
trigger1 = var(7) != 2
y = -5

[State 1090,1]
type = PlaySnd
trigger1 = pos y >= 0
value = 0,11
persistent = 0

[State 1090, 2]
type = veladd
trigger1 = time >= 0
y = 0.3

[State 1090, 2.5]
type = velset
trigger1 = pos y >= 0
trigger1 = vel y >= 0
trigger1 = var(7) = 2
y = 0

[State 1090, 2.6]
type = velset
trigger1 = pos y >= 5
trigger1 = vel y >= 0
trigger1 = var(7) != 2
y = -3

[State 1090, 3]
type = AngleSet
Trigger1 = animelem = 1 || animelem = 7 || animelem = 13
value = 0

[State 1090, 4]
type = AngleAdd
Trigger1 = timemod = 3,1
trigger1 = animelem = 13, <0
value = 15

[State 1090, 5]
type = AngleDraw
Trigger1 = Time >= 0

[State 1090, 8]
type = varset
trigger1 = time = 60 || time = 59
v = ifelse(time=60,7,6)
value = 0

[State 1090,9]
type = DestroySelf
trigger1 = time = 60

;=================================================================================
; Special Jump Land (missing jump start frame)
[Statedef 1095]
type = C
movetype = I
physics = C
velset = 0, 0
anim = 1095
ctrl = 0

[State 1095, 0]
type = turn
trigger1 = time = 0
trigger1 = p2dist X < -5

[State 1095, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 0,0

[State 1095, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1095, 9]
type = changestate
trigger1 = animtime = 0
value = 11
ctrl = 1

;=================================================================================
; Special Jump Land (with jump start land frame)
[Statedef 1099]
type = S
movetype = I
physics = S
velset = 0, 0
anim = 1099
ctrl = 0

[State 1099, 0]
type = turn
trigger1 = time = 0
trigger1 = p2dist X < -5

[State 1099, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 0,0

[State 1099, 2]
type = posset
trigger1 = time = 0
y = 0

[State 1099, 9]
type = changestate
trigger1 = animtime = 0
value = 11
ctrl = 1

;============================================================================================
; Mekong Air Raid Roll X
[Statedef 1200]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0,0
sprpriority = 2

[State 1200, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1200, 1]
type = velset
trigger1 = time = 1
x = -5.5

[State 1200, 1x]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "x" || command = "a"
value = 1240

[State 1200, 1y]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "y" || command = "b"
value = 1250

[State 1200, 1z]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "z" || command = "c"
value = 1260

[State 1200, 8]
type = velset
trigger1 = time = 16
x = 0

[State 1200, 9]
type = ChangeState
trigger1 = time = 16
value = 11
ctrl = 1


;============================================================================================
; Mekong Air Raid Roll X
[Statedef 1200223]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0,0
sprpriority = 2

[State 1200, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1200, 1]
type = velset
trigger1 = time = 1
x = -5.5





[State 1200, 8]
type = velset
trigger1 = time = 16
x = 0

[State 1200, 1x]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = time = 13
value = 1240



;------------------------------------------------------
; Mekong Air Raid Roll Y
[Statedef 1210]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0, 0

[State 1210, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1210, 1]
type = velset
trigger1 = time = 1
x = -5.5

[State 1210, 1x]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "x" || command = "a"
value = 1240

[State 1210, 1y]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "y" || command = "b"
value = 1250

[State 1210, 1z]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "z" || command = "c"
value = 1260

[State 1210, 8]
type = velset
trigger1 = time = 26
x = 0

[State 1210, 9]
type = ChangeState
trigger1 = time = 26
value = 11
ctrl = 1



;------------------------------------------------------
; Mekong Air Raid Roll Y
[Statedef 1210223]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0, 0

[State 1210, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1210, 1]
type = velset
trigger1 = time = 1
x = -5.5






[State 1210, 8]
type = velset
trigger1 = time = 26
x = 0

[State 1210, 1y]
type = ChangeState
trigger1 = time = 23
value = 1250

;------------------------------------------------------
; Mekong Air Raid Roll Z
[Statedef 1220]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0, 0

[State 1220, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1220, 1]
type = velset
trigger1 = time = 1
x = -5.5

[State 1220, 1x]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "x" || command = "a"
value = 1240

[State 1220, 1y]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "y" || command = "b"
value = 1250

[State 1220, 1z]
type = ChangeState
trigger1 = animelem = 2, >=0
trigger1 = command = "z" || command = "c"
value = 1260

[State 1220, 8]
type = velset
trigger1 = time = 36
x = 0

[State 1220, 9]
type = ChangeState
trigger1 = time = 36
value = 11
ctrl = 1


;------------------------------------------------------
; Mekong Air Raid Roll Z
[Statedef 1220223]
type = S
movetype = I
physics = N
anim = 105
ctrl = 0
velset = 0, 0

[State 1220, 0]
type = posset
trigger1 = time = 0
y = 0

[State 1220, 1]
type = velset
trigger1 = time = 1
x = -5.5

;[State 1220, 1x]
;type = ChangeState
;trigger1 = animelem = 2, >=0
;trigger1 = command = "x" || command = "a"
;value = 1240

;[State 1220, 1y]
;type = ChangeState
;trigger1 = animelem = 2, >=0
;trigger1 = command = "y" || command = "b"
;value = 1250



[State 1220, 8]
type = velset
trigger1 = time = 36
x = 0

[State 1220, 1z]
type = ChangeState
trigger1 = time = 33
value = 1260
;=============================================================================================
; Mekong Air Raid Jump X
[Statedef 1240]
type = C
movetype = I
physics = C
anim = 1200
velset = 0,0

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

[State 1240, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1241

; Mekong Air Raid Attack X
[Statedef 1241]
type = A
movetype = A
physics = N
anim = 1240
;poweradd = 60
velset = 3.1, -12.5
sprpriority = 2

[State 1241, gravity]
type = veladd
trigger1 = 1
y = 0.8

[State 1241, 2]
type = ChangeAnim
trigger1 = animtime = 0 && anim = 1240
value = 1250

[State 1241, 3]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = anim = 1250
value = 0, 1

[State 1241, 5]
type = HitDef
trigger1 = AnimElem = 5 && Anim = 1250
attr = A, SA
damage    = 50,7
getpower = 90,60
givepower = 60,44
animtype = Hard
air.animtype = Back
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,0
hitsound   = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -4, -2
yaccel = 0.4

[State 1241, 8]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = anim = 1250
value = 1095

;--------------------------------------------------------------
; Mekong Air Raid Jump Y
[Statedef 1250]
type = C
movetype = I
physics = C
anim = 1200
velset = 0,0

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

[State 1250, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1251

;------------------------------
; Mekong Air Raid Attack Y
[Statedef 1251]
type = A
movetype = A
physics = N
anim = 1240
;poweradd = 60
velset = 4.6, -12.5
sprpriority = 2

[State 1251, gravity]
type = veladd
trigger1 = 1
y = 0.8

[State 1251, 2]
type = ChangeAnim
trigger1 = animtime = 0
trigger1 = anim = 1240
value = 1250

[State 1251, 3]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = anim = 1250
value = 0, 1

[State 1251, 5]
type = HitDef
trigger1 = AnimElem = 5 && Anim = 1250
attr = A, NA
damage    = 65,10
getpower = 90,60
givepower = 60,44
animtype = Hard
air.animtype = Back
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,0
hitsound   = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.velocity = -4, -2
yaccel = 0.4

[State 1251, 8]
type = ChangeState
trigger1 = pos y >= 0 
trigger1 = anim = 1250
value = 1095

;--------------------------------------------------------------
; Mekong Air Raid Jump Z
[Statedef 1260]
type = C
movetype = I
physics = C
anim = 1200
velset = 0,0

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

[State 1260, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1261

; Mekong Air Raid Attack Z
[Statedef 1261]
type = A
movetype = A
physics = N
anim = 1240
;poweradd = 60
velset = 6.1, -12.5
sprpriority = 2

[State 1261, gravity]
type = veladd
trigger1 = 1
y = 0.8

[State 1261, 2]
type = ChangeAnim
trigger1 = animtime = 0
trigger1 = anim = 1240
value = 1250

[State 1261, 3]
type = PlaySnd
trigger1 = animelem = 3
trigger1 = anim = 1250
value = 0, 1

[State 1261, 5]
type = HitDef
trigger1 = AnimElem = 5
trigger1 = Anim = 1250
attr = A, NA
damage    = 80,10
getpower = 90,60
givepower = 60,44
animtype = Hard
air.animtype = Back
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 12,12
sparkno = 2
guard.sparkno = 40
sparkxy = -20,0
hitsound   = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -7
air.velocity = -4, -2
yaccel = 0.4

[State 1261, 8]
type = ChangeState
trigger1 = pos y >= 0
trigger1 = anim = 1250
value = 1095

;==================================================================================
; Mekong Delta Attack Start
[Statedef 1300]
type = C
movetype = I
physics = C
ctrl = 0
velset = 0,0
anim = 1300

[State 1300, Reset var(4)]
type = varset
trigger1 = time = 0
v = 4
value = 0

[State 1300, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1310

; Mekong Delta Attack Jump Back ----------------------------
[Statedef 1310]
type = A
movetype = I
physics = N
velset = -3.8, -5.5
anim = 1310

[State 1310, 1]
type = playsnd
trigger1 = time = 0
value = 1,2
channel = 0

[State 1310, 2]
type = veladd
trigger1 = time > 0
y = 0.43

[State 1310, 9]
type = ChangeState
trigger1 = pos y >= -5 && vel y > 0
value = 1320

; Mekong Delta Attack Land -------------------------------
[Statedef 1320]
type = C
movetype = I
physics = C
velset = 0, 0
anim = 1320

[State 1320, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 0,0

[State 1320, 1]
type = posset
trigger1 = time = 0
y = 0

[State 1320, 2]
type = VarSet
trigger1 = var(4) = 0
trigger1 = command = "x"
v = 4
value = 3

[State 1320, 3]
type = VarSet
trigger1 = var(4) = 0
trigger1 = command = "y"
v = 4
value = 4

[State 1320, 4]
type = VarSet
trigger1 = var(4) = 0
trigger1 = command = "z"
v = 4
value = 5

[State 1320, 5]
type = ChangeState
trigger1 = var(4) != 0
trigger1 = animelem = 3, =3
value = 1300 + (var(4)*10)

[State 1320, 8]
type = CtrlSet
trigger1 = animelem = 3, =4
value = 1

[State 1320, 9]
type = changestate
trigger1 = animtime = 0
value = 11

; Delta Mekong Attack X rush -----------------------------------------
[Statedef 1330]
type = S
movetype = A
physics = N
anim = 1330
poweradd = 60
sprpriority = 2

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

[State 1330, 2]
type = veladd
trigger1 = time >= 1
trigger1 = movecontact = 0
x = 0.8

[State 1330, 1]
type = NotHitBy
trigger1 = time >= 0
trigger1 = movecontact = 0
value = A ,NP, SP, HP
time = 1

[State 1330, Explod]
type = explod
trigger1 = timemod = 11,1
trigger1 = movecontact = 0
anim = 7750
id = 7750
postype = p1
pos = -36,8
sprpriority = 2
ownpal = 1

[State 1330, Voice]
type = PlaySnd
trigger1 = time = 1
value = 1,8
channel = 0

[State 1330, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage    = 90
animtype = Heavy
air.animtype = Back
guardflag = M
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-20
hitsound = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.velocity = -4,-5
air.fall = 1
yaccel = 0.4

[State 1330, 5]
type = velset
trigger1 = movecontact = 1
x = 0

[State 1330, 6]
type = ChangeState
trigger1 = movecontact = 1
trigger1 = animelem = 4, 1
value = 1380

[State 1330, 9]
type = changestate
trigger1 = time = 17
trigger1 = movecontact = 0
value = 1385

; Delta Mekong Attack Y rush ------------------------------
[Statedef 1340]
type = S
movetype = A
physics = N
poweradd = 60
anim = 1330
sprpriority = 2

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

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

[State 1340, 2]
type = veladd
trigger1 = time >= 1
trigger1 = movecontact = 0
x = 0.75

[State 1340, Explod]
type = explod
trigger1 = timemod = 8,1
trigger1 = movecontact = 0
anim = 7750
id = 7750
postype = p1
pos = -36,8
sprpriority = 2
ownpal = 1

[State 1340, 1]
type = NotHitBy
trigger1 = time >= 0
trigger1 = movecontact = 0
value = A ,NP, SP, HP
time = 1

[State 1340, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage    = 90
animtype = Heavy
air.animtype = Back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-20
hitsound = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8
airguard.velocity = -4,-5
air.type = Low
air.fall = 1
yaccel = 0.4

[State 1340, 5]
type = velset
trigger1 = movecontact = 1
x = 0

[State 1340, 6]
type = ChangeState
trigger1 = movecontact = 1
trigger1 = animelem = 4, =1
value = 1380

[State 1340, 9]
type = changestate
trigger1 = time = 21
trigger1 = movecontact = 0
value = 1385

; Delta Mekong Attack Z rush ---------------------------------------
[Statedef 1350]
type = S
movetype = A
physics = N
poweradd = 60
anim = 1330
sprpriority = 2

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

[State 1350, Voice]
type = PlaySnd
trigger1 = time = 1
value = 1,8
channel = 0

[State 1350, 2]
type = veladd
trigger1 = time >= 1
trigger1 = movecontact = 0
x = 0.75

[State 1350, 1]
type = NotHitBy
trigger1 = time >= 0
trigger1 = movecontact = 0
value = A ,NP, SP, HP
time = 1

[State 1350, Explod]
type = explod
trigger1 = timemod = 9,1
trigger1 = movecontact = 0
anim = 7750
id = 7750
postype = p1
pos = -36,8
sprpriority = 2
ownpal = 1

[State 1350, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
damage    = 90
animtype = Heavy
air.animtype = Back
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-20
hitsound = S6,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8
air.type = Low
air.velocity = -4,-5
air.fall = 1
yaccel = 0.4

[State 1350, 5]
type = velset
trigger1 = movecontact = 1
x = 0

[State 1350, 6]
type = ChangeState
trigger1 = movecontact = 1
trigger1 = animelem = 4, =1
value = 1380

[State 1350, 9]
type = changestate
trigger1 = time = 25
trigger1 = movecontact = 0
value = 1385

;--------------------------------
; Delta Mekong Attack Contact Jump Back
[Statedef 1380]
type = A
movetype = I
physics = N
velset = -2.3, -7.5
anim = 1380

[State 1380, 9]
type = veladd
trigger1 = 1
y = 0.5

[State 1380, 8]
type = ChangeState
trigger1 = pos y >= -5 && vel y > 0
value = 1095

;-----------------------------------
; Delta Mekong Attack Stop
[Statedef 1385]
type = C
movetype = I
physics = C
velset = 0, 0
anim = 11

[State 1385, 1]
type = posset
trigger1 = time = 0
y = 0

[State 1385, 0]
type = turn
trigger1 = time = 0
trigger1 = p2dist X < -5

[State 1385, 9]
type = changestate
trigger1 = time = 4
value = 11
ctrl = 1

;==================================================================================
; Mekong Delta Escape Start
[Statedef 1400]
type = S
movetype = I
physics = S
ctrl = 0
velset = 0,0
anim = 1400
sprpriority = 2

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

[State 1400, 9]
type = ChangeState
trigger1 = animtime = 0
value = 1410

; Mekong Delta Escape Jump ------------------------------------
[Statedef 1410]
type = A
movetype = I
physics = A
anim = 53
sprpriority = 2

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

[State 1410, 0]
type = ScreenBound
trigger1 = animelemtime(4) >= 1
trigger1 = animelemtime(6) < 0
value = 0
movecamera = 0,1

[State 1410, Vel]
type = velset
trigger1 = time = 0
x = backedgedist/14 * (-1)
y = -8.1

[State 1410,2]
type = null;displaytoclipboard
trigger1 = time = 0
text = "The edge is %d, and vel of x is %f."
params = backedgebodydist, vel x

[State 1410, 5]
type = null;velmul
triggerall = time >= 0
trigger1 = animelemtime(6) >= 0
x = 0.9

[State 1410, 5]
type = changestate
triggerall = backedgebodydist < 30
trigger1 = animelemtime(3) >= 1 && animelemtime(6) < 0
value = 1420

[State 1410, 9]
type = ChangeState
trigger1 = time > 0
trigger1 = pos y >= -5
value = 1099

; Stick to Wall ---------------------------
[Statedef 1420]
type = A
movetype = I
physics = N
anim = 9999
velset = 0,0

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

[State 1420, 1]
type = explod
trigger1 = time = 0
anim = 1420
postype = p1
pos = -45, -40
bindtime = -1

[State 1420, 9]
type = ChangeState
trigger1 = time = 8
value = 1430

;------------------------------
; Delta Mekong Escape Forward Jump
[Statedef 1430]
type = A
movetype = I
physics = N
anim = 1430
velset = 4, -10
sprpriority = 2

[State 1430, 0]
type = veladd
trigger1 = 1
y = 0.55

[State 1430, 1]
type = AssertSpecial
trigger1 = 1
flag = noairguard

[State 1430, 2]
type = velset
trigger1 = 1
trigger1 = command != "holdback" && command != "holdfwd"
x = 4

[State 1430, 1]
type = velset
trigger1 = time >= 0
trigger1 = command = "holdback" || command = "holdfwd"
x = ifelse(command="holdback",1.5,7)

[State 1430, 3]
type = CtrlSet
trigger1 = animelem = 4
value = 1

[State 1430, 9]
type = ChangeState
trigger1 = time > 0
trigger1 = pos y >= -5
value = 1099

;-----------------------------------------------------
; Baton Dive from Delta Mekong Escape
[Statedef 1440]
type = A
movetype = A
physics = N
anim = 640
ctrl = 0
sprpriority = 2

[State 1440, 0]
type = veladd
trigger1 = 1
y = 0.55

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

[State 1440, 2]
type = pLaySnd
trigger1 = animelem = 1
value = 1,5
channel = 0

[State 1440, 3]
type = velset
trigger1 = 1
trigger1 = command != "holdback" && command != "holdfwd"
x = 2.5

[State 1440, 4]
type = velset
trigger1 = time >= 0
trigger1 = command = "holdback" || command = "holdfwd"
x = ifelse(command="holdback",-2,6)

[State 1440, 6]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
animtype  = Medium
damage    = 50
hitflag = MAF
guardflag = MA
sparkno = 2
guard.sparkno = 40
priority = 5, Hit
pausetime = 10,10
sparkxy = -20,0
hitsound   = S6,5
guardsound = S6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -6
air.velocity = -4,-4.5
airguard.velocity = -4,-3.5

[State 1440, 9]
type = ChangeState
trigger1 = time > 0
trigger1 = pos y >= -5
value = 1099

;==================================================================================
; Jab Fall Recovery
[Statedef 1500]
type = A
movetype = I
physics = N
ctrl = 0

[State 1500, 1]
type = veladd
trigger1 = 1
y = 0.4

[State 1500, 9]
type = ChangeState
trigger1 = pos y >= -5 && vel y > 0
value = 1501

; Jab Recovery Ground Roll
[Statedef 1501]
type = C
movetype = I
physics = C
anim = 100
velset = 0,0

[State 1501, 1]
type = posset
trigger1 = time = 0
y = 0

[State 1501, 2]
type = playerpush
trigger1 = 1
value = 0

[State 1501, 3]
type = turn
trigger1 = p2dist x < -5
trigger1 = time = 12
persistent = 0

[State 1501, 9]
type = ChangeState
trigger1 = time = 12
value = 11
ctrl = 1

;----------------------------------------------------------------------------------
; Strong Fall Recovery
[Statedef 1510]
type = A
movetype = I
physics = N
ctrl = 0

[State 1510, 1]
type = veladd
trigger1 = 1
y = 0.4

[State 1510, 9]
type = ChangeState
trigger1 = pos y >= -5 && vel y > 0
value = 1511

; Strong Recovery Ground Roll
[Statedef 1511]
type = C
movetype = I
physics = C
anim = 100
velset = 0,0

[State 1511, 1]
type = posset
trigger1 = time = 0
y = 0

[State 1511, 2]
type = playerpush
trigger1 = 1
value = 0

[State 1511, 3]
type = velset
trigger1 = time > 0
x = 5

[State 1511, 8]
type = turn
trigger1 = p2dist x < -5
trigger1 = time = 14
persistent = 0

[State 1511, 9]
type = ChangeState
trigger1 = time = 14
value = 11
ctrl = 1

;----------------------------------------------------------------------------------
; Fierce Fall Recovery
[Statedef 1520]
type = A
movetype = I
physics = N
ctrl = 0

[State 1520, 1]
type = veladd
trigger1 = 1
y = 0.4

[State 1520, 9]
type = ChangeState
trigger1 = pos y >= -5 && vel y > 0
value = 1521

; Fierce Recovery Ground Roll
[Statedef 1521]
type = C
movetype = I
physics = C
anim = 100
velset = 0,0

[State 1521, 1]
type = posset
trigger1 = time = 0
y = 0

[State 1521, 2]
type = playerpush
trigger1 = 1
value = 0

[State 1521, 3]
type = velset
trigger1 = 1
x = 6

[State 1521, 8]
type = turn
trigger1 = p2dist x < -5
trigger1 = time = 19
persistent = 0

[State 1521, 9]
type = ChangeState
trigger1 = time = 19
value = 11
ctrl = 1



;==================================================================================
; Patriot Circle Alpha 2 First Set
[Statedef 2000]
type = S
movetype = A
physics = S
ctrl = 0
;poweradd = 70
velset = 0,0
anim = 2000
juggle = 5
sprpriority = 2

[STate 2000,1]
type = width
trigger1 = animelemtime(3) >= 0
value = 30

[STate 2000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

[State 2000, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 20 || animelem = 40
value = 0, 7

[State 2000, 1]
type = HitDef
trigger1 = AnimElem = 3 || AnimElem = 8 || AnimElem = 11 || AnimElem = 16
attr = S, SA
damage    = 14, 7
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,ifelse((animelemtime(4)<0 || animelemtime(15)>=0),8,2)
sparkno = 2
guard.sparkno = 40
sparkxy = -20,(-40-ceil(time*1.5))
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -4
air.velocity = -4,-2
;ground.cornerpush.veloff = 0
air.type = Low
forcestand = 1
yaccel = 0.4

[State 2000, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------
; Patriot Circle Alpha 2 Second Set
[Statedef 2030]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2030
;poweradd = 70
juggle = 5
sprpriority = 2

[STate 2030,WidthAdd]
type = width
trigger1 = animelemtime(1) >= 0
value = 30

[STate 2030, 1]
type = PlaySnd
trigger1 = animelem = 1
value = 1, 1
channel = 0

[State 2030, 2]
type = PlaySnd
trigger1 = animelem = 1 || animelem = 18 || animelem = 38
value = 0, 7

[State 2030, 1]
type = HitDef
trigger1 = AnimElem = 1 || AnimElem = 6 || AnimElem = 9 || AnimElem = 14
attr = S, SA
damage    = 34, 8
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,ifelse((animelemtime(2)<0 || animelemtime(13)>=0),8,2)
sparkno = 2
guard.sparkno = 40
sparkxy = -20,(-40-ceil(time*1.6))
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
air.velocity = -4,-2
ground.cornerpush.veloff = 0
air.type = Low
forcestand = 1
yaccel = 0.4

[State 2030, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;--------------------------------------------
; Patriot Circle Alpha 2/3 Third Set Combined
[Statedef 2060]
type = S
movetype = A
physics = S
ctrl = 0
;poweradd = 60
velset = 0,0
anim = 2060
juggle = 5
sprpriority = 2

[STate 2060, widthadd1]
type = width
trigger1 = animelemtime(6) <= 0
value = 40

[STate 2060, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1,4
channel = 0

[State 2060, posadd]
type = posadd
trigger1 = animelem = 3
x = 30

[State 2060, posadd]
type = posadd
trigger1 = animelem = 10
x = 20

[State 2060, 2]
type = PlaySnd
trigger1 = animelem = 3 || animelem = 25
value = 0, 7

[State 2060, 3]
type = posadd
trigger1 = animelem = 12
x = 48

[State 2060, 4]
type = width
trigger1 = animelemtime(6) >= 0 && animelemtime(34) < 0
edge = 30,20




[State 2060, 5]
type = HitDef
trigger1 = AnimElem = 12
attr = S, SA
damage    = 43, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 2
guard.sparkno = 40
numhits = 2
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -4,-3
air.type = Low
;ground.cornerpush.veloff = -3
forcestand = 1

[State 2060, 6]
type = HitDef
trigger1 = AnimElem = 16
attr = S, SA
damage    = 43, 9
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,8
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-70
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -4, -4
air.velocity = -4,-3
fall = 1


[State 2060, 7]
type = posadd
trigger1 = animelem = 41
x = 30

[State 2060, 8]
type = ChangeState
trigger1 = animtime = 0
trigger1 = prevstateno = 800
value = 1099

[State 2060, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 3 First Set
[Statedef 2100]
type = S
movetype = A
physics = S
ctrl = 0
velset = 0,0
anim = 2100
;poweradd = 60
juggle = 5
sprpriority = 2

[STate 2100, 1]
type = width
trigger1 = animelem = 3, >= 0
value = 30

[State 2100, 2]
type = posadd
trigger1 = animelemtime(5) < 0
x = 4

[State 2100, 3]
type = makedust
trigger1 = animelemtime(5) < 0
pos = -10, -2
spacing = 3

[STate 2100, 4]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

[State 2100, DualHit]
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
damage    = 24, 8
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
numhits = 2
hitflag = MAF
priority = 4, Hit
pausetime = 3,6
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-60
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -4
air.velocity = -4, -2
forcestand = 1

[State 2100, SingleHits]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6
attr = S, SA
damage    = 22, 8
getpower = 40,14
givepower = 20,12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 4,6
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-60+time
hitsound = S6,1
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 21
ground.hittime  = 21
ground.velocity = -4
air.velocity = -4,-2
forcestand = 1

[State 2100, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;==================================================================================
; Patriot Circle Alpha 3 Second Set
[Statedef 2130]
type = S
movetype = A
physics = S
;poweradd = 60
ctrl = 0
velset = 0,0
anim = 2130
juggle = 5
sprpriority = 2

[STate 2130,1]
type = width
trigger1 = time >= 0
value = 30

[State 2130, 3]
type = makedust
trigger1 = time >= 0 && time <= 13
pos = -10, -2
spacing = 3

[State 2130,2]
type = posadd
trigger1 = time >= 0
trigger1 = time <= 13
x = 4

[STate 2130, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 1, 3
channel = 0

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

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

[State 2130, DualHit]
type = HitDef
trigger1 = AnimElem = 11
attr = S, SA
damage    = 20, 1
getpower = 25,12
givepower = 12,6
animtype = Hard
guardflag = HA
hitflag = MA
priority = 4, Hit
pausetime = 4,8
numhits = 2
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-70
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -4,-2
forcestand = 1

[State 2130, SingleHits]
type = HitDef
trigger1 = AnimElem = 12
trigger2 = AnimElem = 13
attr = S, SA
damage    = 30, 1
getpower = 25,12
givepower = 12,6
animtype = Medium
guardflag = HA
hitflag = MA
;priority = 4, Hit
pausetime = 4,8
sparkno = 2
guard.sparkno = 40
sparkxy = -20,-70+time
hitsound = S6,3
guardsound = S6,0
ground.type = High
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -8
air.velocity = -4,-2
forcestand = 1

[State 2130, 9]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------------
; Override common states (use same number to override) :
;-------------------------------------------------------------------------------------

;-------------------------------------------------------------------------------------
; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11
sprpriority = 0

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

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

;--------------------------------------------------------------------------------------------
; JUMP_UP
[Statedef 40]
type    = S
physics = S
anim = 40
ctrl = 0

[State 40, var(8)set]
type = VarSet
trigger1 = Time = 0
v = 8
value = 0





[State 40, 2]
type = ChangeAnim
triggerall = time = 1
trigger1 = var(8) = -2 || var(8) = 2
value = 50

[State 40, 3]
type = PlaySnd
trigger1 = anim = 50
trigger1 = animelem = 3
value = 0, 10
persistent = 0

[State 40, 4]
type = ChangeState
triggerall = AnimTime = 0 && anim = 50 
trigger1 = var(8) != 0
value = 2041

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

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

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

[State 40, 8]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)

[State 40, 9]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)

[State 40, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Super Jump
[Statedef 2041]
type    = A
physics = A
ctrl = 1
sprpriority = 2

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

; super jump fowward
[State 2041, -1a]
type = VelSet
trigger1 = Time = 0 
trigger1 = var(8) != -2
x = 7.6
y = -7.7

; super jump backwards
[State 2041, 1b]
type = VelSet
trigger1 = Time = 0
trigger1 = var(8) = -2
x = -7.6
y = -8.0

; forward animation coming down
[State 2041, 2.1f]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X > 0
value = 52

; backward animation coming down
[State 2041, 3.1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Vel X < 0
value = 53

;---------------------------------------------------------------------------
; JUMP_LAND
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

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

[State 52, LandTap]
type = PlaySnd
trigger1 = time = 0
value = 0,0

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

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

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

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

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

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

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

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

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

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

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

[Statedef -2]

[State 0, 0] ;Change palette
type = RemapPal
triggerall = TeamMode =  single
trigger1 = p2name = "Rolento Schugerg"
source = 1,1
dest = 1,2
ignorehitpause=1


; Play Block Sound
[State -2, Block]
type = PlaySnd
triggerall = stateno = 150 || stateno = 152 || stateno = 154
trigger1 = time = 0
value = 0, 100

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

[Statedef -3]

; Play Pain Sound Light Hit Air&Ground
[State -3, lightpain]
type = playsnd
triggerall = random < 500
triggerall = time = 1
triggerall = alive = 1
trigger1 = stateno = 5000 && anim = 5000 ; stand high
trigger2 = stateno = 5000 && anim = 5010 ; stand low
trigger3 = stateno = 5010 && anim = 5020 ; crouch
trigger4 = stateno = 5020 && anim = 5000 ; air high
trigger5 = stateno = 5020 && anim = 5010 ; air low
value = 10, 1
volume = 75
channel = 0

; Play Pain Sound Medium Hit Air&Ground
[State -3, midpain]
type = playsnd
triggerall = random < 500
triggerall = time = 1
triggerall = alive = 1
trigger1 = stateno = 5000 && anim = 5001 ; stand high
trigger2 = stateno = 5000 && anim = 5011 ; stand low
trigger3 = stateno = 5010 && anim = 5021 ; crouch
trigger4 = stateno = 5020 && anim = 5001 ; air high
trigger5 = stateno = 5020 && anim = 5011 ; air low
value = 10,2
volume = 75
channel = 0

; Play Pain Sound heavy Hit Air&Ground
[State -3, heavypain]
type = playsnd
triggerall = random < 500
triggerall = time = 1
triggerall = alive = 1
trigger1 = stateno = 5000 && anim = 5002 ; stand high
trigger2 = stateno = 5000 && anim = 5012 ; stand low
trigger3 = stateno = 5010 && anim = 5022 ; crouch
trigger4 = stateno = 5020 && anim = 5002 ; air high
trigger5 = stateno = 5020 && anim = 5012 ; air low
value = 10, 3
volume = 75
channel = 0

; Play Pain Sound Heavy When Tripped and Normal Air Recovery
[State -3, trippedsound]
type = playsnd
triggerall = time = 1
trigger1 = stateno = 5070 ; tripped
trigger1 = anim = 5070
;trigger2 = stateno = 5040 ; air recover
;trigger2 = anim = 5040
value = 10, 3
channel = 0

; Play Stinger Sound When Forced Air Recovery
[State -3, airrecover]
type = playsnd
triggerall = time = 1
trigger1 = stateno = 5210 && anim = 5210
trigger2 = stateno = 5201 && anim = 5200
trigger3 = stateno = 5040 && anim = 5040 ; air recover
value = 1,3
channel = 0

;-------------------------------------------------- E O F --------------------------------------------