;===========================================================================
;Robot Master Mayhem - Constants Template V.1
;Template by Acey
;Based on Megaman by Chaotic
;www.infinitymugenteam.com
;===========================================================================

[Data]
life = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 1
guard.sparkno = 40
KO.echo = 0
volumescale = 90
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1
yscale = 1
ground.back = 22
ground.front = 23
air.back = 19
air.front = 20
height = 65
attack.dist = 160
;attack.width = 4,4   
;proj.dist = 90
proj.attack.dist = 90 
proj.doscale = 0
head.pos = 4,-56
mid.pos = 6, -30
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 3       ;Walk forward
walk.back = -2.5    ;Walk backward
run.fwd = 6
run.back = -8,-3
jump.neu = 0,-9.0
jump.back = -3.7
jump.fwd = 3.2
runjump.fwd = 4.4
runjump.back = -4.4
airjump.neu = 0, -8.9
airjump.fwd = 2.5
airjump.back = -2.55

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .45
stand.friction = .80
crouch.friction = .80
;air.friction = .80

[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
Victory1 = "The winner is.."

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 7, 0


[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

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

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

;================================================================ DASH FWD

[State 100, Dash fx]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, Dash fx 2]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, New Dash start fx]
type = Explod
trigger1 = !time
ID = 6088
anim = 6088
postype = p1
pos = 10,0
bindtime = 1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 8500
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 106;0

;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1
ctrl = 0

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

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

;============================================================== DASH BACK

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = 20, -40
bindtime = 1
removetime = -2
vel = 1, 0
ownpal = 1
random = 20, 60
sprpriority = 2
facing = -1

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = 10, -40
bindtime = 1
removetime = -2
vel = .8, 0
ownpal = 1
random = 20, 60
sprpriority = 2
facing = -1

[State 100, New Dash start fx]
type = Explod
trigger1 = !time
ID = 6088
anim = 6088
postype = p1
pos = 0,0
bindtime = 1
facing = -1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1
ctrl = 0


[State 106, VelSet]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

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

[State 106, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8100,0


[State 106, VelSet]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------------------------------------------
; RUN_FWD AI
[Statedef 107]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 7, 0
ctrl = 0

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

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

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 7]
type = Explod
trigger1 = animelem = 1
ID = 6088
anim = 6088
postype = p1
pos = 4,8;-18, 9
bindtime = 1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 8500
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 106;0

;---------------------------------------------------------------------------------------------
;Win Pose Decider
[Statedef 180]
type = S

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,500

[state 181, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [0,100]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 182

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 183

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [301,400]
value = 184

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [401,500]
value = 185

;---------------------------------------------------------------------------------------------
;Win Pose 1
[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 181
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S30,6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 3
value = S35,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 8
value = S36,0
volumescale = 85

[state 181, No Lifebar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 350
flag = roundnotover

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

;---------------------------------------------------------------------------------------------
;Win Pose 2
[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 182
velset = 0,0

[State 182, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S0,2


[state 182, No Lifebar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 182, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 300
flag = roundnotover

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

;---------------------------------------------------------------------------------------------
;Win Pose 3
[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 183
velset = 0,0

[State 183, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 2
value = S1,6


[state 183, No Lifebar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 150
flag = roundnotover

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

;---------------------------------------------------------------------------------------------
;Win Pose 4
[Statedef 184]
type = S
movetype = I
physics = S
ctrl = 0
anim = 184
velset = 0,0

[State 183, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S5,1


[state 183, No Lifebar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 150
flag = roundnotover

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


;---------------------------------------------------------------------------------------------
;Win Pose 5
[Statedef 185]
type = S
movetype = I
physics = S
ctrl = 0
anim = 185
velset = 0,0

[State 183, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S5,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem =9
value = S0,3


[State 0, Explod]
type = Explod
trigger1 = Animelem = 9
anim = 12013
;ID = 12003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .2,.2
sprpriority = -5;7
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = Animelem = 9
anim = 1303
;ID = 1303
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .2,.2
sprpriority = 5;7
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0


[state 183, No Lifebar]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = time <= 200
flag = roundnotover

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



;---------------------------------------------------------------------------------------------


;---------------------------------------------------------------------------------------------
;Introduction Decider
;If you add more [statedef]s as intros, make sure those states
;are added as triggers in [statedef -2] for "Stop Lifebar sound"
;and "Starting Lifebar"
;All intro states are to changestate into [statedef 193] which
;contains the code for the character to move around before the
;match and to have their lifebar be filled up in the traditional
;Megaman style. (Only Team 2 on the right has the lifebar FX)
[Statedef 190]
type = S

[State 190, Life is Empty]
type = LifeSet
trigger1 = TeamSide = 2
value = 1

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,100

[State 190, 2]
type = ChangeState
trigger1 = Enemy,Name = "Rockman" || Enemy,Name = "Mega Man" || Enemy,Name = "Zero" || Enemy,Name = "Bass"  || Enemy,Name = "Axl" || Enemy,Name = "Quint" || Enemy,Name = "Duo" || Enemy,Name = "Proto Man" || Enemy,Name = "Blues"
trigger1 = Var(1) >= 0
value = 194

[State 190, 3]
type = ChangeState
trigger1 = Var(1) <= 25
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(1) < 50
trigger1 = Var(1) >= 25 
value = 192

[State 190, 3]
type = ChangeState
trigger1 = Var(1) >= 50
trigger1 = Var(1) < 75
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(1) >= 75
value = 196


;---------------------------------------------------------------------------------------------
;Intro #1
[Statedef 191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 191
velset = 0,0
;spriority = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S4,1
channel = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 40
value = S37,0
volumescale = 75

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
;flag2 = globalnoshadow

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


;---------------------------------------------------------------------------------------------
;Intro #2
[Statedef 192]
type = S
movetype = I
physics = N
ctrl = 0
anim = 192
velset = 0,0
;spriority = 0

[State 192,2] 
type = PlaySnd
trigger1 = Animelem = 7
value = 25,0+random%2

[State 192,2] 
type = PlaySnd
trigger1 = Animelem = 57
value = 27,0
volumescale = 80

[State 192, Barrel]
type = Explod
trigger1 = animelem = 1
persistent = 0
anim = 1922
sprpriority = 4
postype = p1
pos = 65,0
vel = 0,0
bindtime = 1
ignorehitpause = 1

[State 192, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
;flag2 = globalnoshadow

[State 192, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 199

;-----------------------------------------------
[Statedef 193]; Move around before match
type = S
physics =S
sprpriority = 0

[State 190, Lifebar Sound]
type = PlaySnd
value = S11,3
trigger1 = TeamSide = 2
trigger1 = time = 0
channel = 5

[State -2, Stop Lifebar sound]
type = StopSnd
trigger1 = time = 110
channel = 5

[State 190, LifeBar]
type = LifeAdd
trigger1 = TeamSide = 2
trigger1 = Time < 260
value = 10

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 193]
type = varset
trigger1 = time = 1
var(50) = 0

[State 193]
type = posset
trigger1 = 1
y = 0

[State 193]
type = VelSet
trigger1 = Time = 0
y = 0

[State 193, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 2.4

[State 193, 2]
type = VelSet
trigger1 = command = "holdback"
x = -2.0

[State 193]
type = ChangeAnim
trigger1 = command = "holdfwd"
trigger1 = Anim != 20
value = 20

[State 193]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = Anim != 21
value = 21

[State 193]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
value = 0

[State 193, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State 193]
type = VarSet
trigger1 = roundstate != 2
var(9) = floor(pos x)

[State 193]
type = posset
trigger1 = roundstate = 2
trigger1 = var(9) != 0
x = var(9)

[State 193]
type = varset
trigger1 = roundstate = 2
var(9) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)

;---------------------------------------------------------------------------------------------
;Intro #3
[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 194
velset = 0,0
;spriority = 0



;[State 193]
;type = posset
;trigger1 = 1
;x = 0

;[State 193]
;type = VelSet
;trigger1 = Time = 0
;x = 0

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

;[State 194, VelSet]
;type = VelSet
;trigger1 = p2stateno = 193
;trigger1 = p2bodydist x =[0,10]
;trigger1 = vel X > 10
;x = 0


[State 0, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 12003
ID = 12003
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .2,.2
sprpriority = -5;7
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 0, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 1303
ID = 1303
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .2,.2
sprpriority = 5;7
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 194, Helper]
type = Helper
trigger1 = Animelem = 1
helpertype = normal ;player
name = "DrWilyIntro"
ID = 1944
stateno = 1944
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0


[State 192, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
;flag2 = globalnoshadow

[State 192, ChangeState]
type = ChangeState
trigger1 = !animtime
value = 199

;--------------------------------------------------------
;Intro #3 Helper
[Statedef 1944]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 1944
ctrl = 0
sprpriority = 2

[State 1944,2] 
type = PlaySnd
trigger1 = Animelem = 4
value = 20,1

[State 1944,2] 
type = PlaySnd
trigger1 = Animelem = 20
value = 20,0

[state 1944, 3]
type = BindToParent
trigger1 = parent, stateno = 194
pos = 0,0

[State 1944, 4]
type = DestroySelf
trigger1 = Animtime = 0
trigger2 = parent, stateno != 194

;-----------------------------------------------------------------------------------------------------------------------

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

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

;[State 195, 1]
;type = CtrlSet
;;trigger1 = Time = 40
;trigger1 = AnimTime = 0
;value = 1

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------
;Intro #4
[Statedef 196]
type = S
movetype = I
physics = N
ctrl = 0
anim = 0
velset = 0,0
;spriority = 0



[State 0, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = S4,2
channel = 10

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro
;flag2 = globalnoshadow

[State 191, ChangeState]
type = ChangeState
trigger1 = Time = 250;!animtime
value = 199

;-----------------------------------------------
; NEW Move around before match
[Statedef 199]
type = S
physics =S
sprpriority = 0
Anim = 0

[State 190, Lifebar Sound]
type = PlaySnd
value = S11,3
trigger1 = TeamSide = 2
trigger1 = time = 0
channel = 5

[State -2, Stop Lifebar sound]
type = StopSnd
trigger1 = time = 90
channel = 5

[State 190, LifeBar]
type = LifeAdd
trigger1 = TeamSide = 2
trigger1 = Time < 260
value = 10

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time = 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 193]
type = varset
trigger1 = time = 1
var(50) = 0

[State 193]
type = posset
trigger1 = 1
y = 0

[State 193]
type = VelSet
trigger1 = Time = 0
y = 0

[State 199, AssertSpecial]
type = AssertSpecial
trigger1 = life < lifemax
flag = intro



;---------------------------------------------------------------------------
;Basic Attacks
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Standing Light Punch
[Statedef 200]
type    = S
movetype= A
physics = S
;priority = 4
juggle  = 4
ctrl = 0
anim = 200
poweradd = 15
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 6,random%1

[State 200, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

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

[State 200, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 15,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
guard.sparkno=s6767
sparkxy = -10, -40
hitsound = s8000,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -2
air.type = Low
air.hittime = 15
air.velocity = -2,-5
palfx.time = 15
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0


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


;---------------------------------------------------------------------------
;Standing Medium Punch
[Statedef 210]
type    = S
movetype= A
physics = S
;priority = 4
juggle  = 4
ctrl = 0
anim = 210
poweradd = 55
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 7,random%2

[State 210, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 210, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 210, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 30,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type = High
ground.slidetime = 0
ground.hittime  = 18
ground.velocity = -4
air.type = Low
air.hittime = 18
air.velocity = -4,-7
palfx.time = 18
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0
;envshake.time = 2
;envshake.ampl = 2

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


;---------------------------------------------------------------------------
;Standing Hard Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
poweradd = 35
sprpriority = 2

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



;[State 220, StateTypeSet]
;type = StateTypeSet
;trigger1 = time=17
;statetype = A       ;S,A,C,L;
;movetype = I        ;I,A,H
;physics = A         ;A,C,S,N

[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 220, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage = 35,0
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7000
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = s8000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 30
ground.velocity = -9
air.type = Low
air.hittime = 15
air.velocity = -6,-5
palfx.time = 30
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0
envshake.time = 7
envshake.ampl = 4

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


;---------------------------------------------------------------------------------------------
;Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
poweradd = 15
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 6,random%2

[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElem = 1 || Animelem = 2
x = 1
y = 0

[State 230, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 230, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 20,0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime = 18
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0
palfx.time = 18
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0

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


;---------------------------------------------------------------------------------------------
;Standing medium kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 240
poweradd = 35
sprpriority = 2



[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 7,random%3

[State 240, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElem = 1 || Animelem = 2
x = 3
y = 0


[State 240, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 35,0
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 15
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Standing strong Kick
[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 250
poweradd = 55
sprpriority = 2

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

[State 250, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 0, VelAdd]
type = VelAdd
trigger1 = AnimElem = 1 || Animelem = 2
x = 1
y = 0


;Launch circle
[State 420, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = F4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = F4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 250, HitDef]
type = HitDef
trigger1 = !movehit
trigger1 = !moveguarded
attr = S,NA
damage = 40,0
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7000
sparkxy = -10, -40
guard.sparkno = s6767
hitsound = s8000,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = 0,-12;-12;ground.velocity = -6
air.type = Low
air.hittime = 20
air.velocity = -6,-5
envshake.time = 7
envshake.ampl = 4
ID = 250
nochainID = 250

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit = 1
trigger1 = command = "Up"
value = 7000
ctrl = 1

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

;---------------------------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 400
poweradd = 15
sprpriority = 2

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 6,random%2

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

[State 400, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 15,0
animtype = Light
guardflag = L
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -20
hitsound = s8000,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 7,random%3

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 410, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 410, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 35,0
animtype = Medium
guardflag = L
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 420
poweradd = 35
sprpriority = 2

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 10,6
channel=0

[State 420, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=1;
x = 5

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=2;
x = 10;

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=3
x = 10

;Launch circle
[State 420, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = F4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = F4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,0
animtype = up
hitflag = MA
guardflag = M
priority = 4, Hit
pausetime = 13,14
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,2
guardsound = 6,0
ground.slidetime = 13
ground.hittime = 20
ground.velocity = 0,-12.7
ground.type = Low
air.type = Low
air.hittime = 30
air.velocity =  0,-12.7
envshake.time = 7
envshake.ampl = 4

[State 420, ChangeState]
type = ChangeState
trigger1 = movehit
value = ifelse (var(20)= 1 && movehit,7000, 11)
ctrl = 1

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

;---------------------------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 15
sprpriority = 2

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 6,random%2

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 50,0
volumescale = 75


[State 430, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 15,0
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
poweradd = 35
sprpriority = 2

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 50,1
volumescale = 75

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 640, HitDef]
type=HitDef
triggerall=!var(13)
trigger1=!movecontact
attr=A,NA
hitflag=MAFD
guardflag=L
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=3,Hit
damage=48,0
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=15
guard.hittime=9
yaccel=.8 * const(size.yscale)
ground.velocity=-9.1*const(size.xscale),0
guard.velocity=-9.1*const(size.xscale)
air.velocity=0,-7*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
;fall.yvelocity=0
;fall=0
;air.fall=0
;id = 0
getpower = 0,0; 38,33
givepower = 28,19
envshake.time=9
envshake.ampl=3


[State 640, HitDef]
type=HitDef
triggerall=var(13)
trigger1=!movecontact
attr=A,NA
hitflag=MAF
guardflag=HA
animtype=Medium
air.animtype=Back
fall.animtype=Medium
priority=3,Hit
damage=48,0
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type=High
air.type=High
ground.slidetime=14
ground.hittime=15
air.hittime=15
guard.hittime=9
yaccel=.8 * const(size.yscale)
ground.velocity=-9.1*const(size.xscale),0
guard.velocity=-9.1*const(size.xscale)
air.velocity=0,-7*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
;fall.yvelocity=0
;fall=0
;air.fall=0
;id = 0
getpower = 0,0; 38,33
givepower = 28,19
envshake.time=9
envshake.ampl=3


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

;---------------------------------------------------------------------------------------------
;Crouching strong kick
;LAUNCHER!!
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2

[State 450, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 50,3
volumescale = 75

[State 450, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 450, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,0
animtype = hard
guardflag = L
hitflag = MAF
priority = 4, Hit
pausetime = 13,14
sparkno = s7000
sparkxy = -10, -20
guard.sparkno = s6767
hitsound = s8000,2
ground.type = trip
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -6,0
air.velocity = -6,0
airguard.velocity = -6,0
envshake.time = 7
envshake.ampl = 4

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

;---------------------------------------------------------------------------------------------
;Jumping light punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 600
poweradd = 15
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 6,random%2

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

[State 600, VelAdd]
type = VelAdd
triggerall = enemy,pos y !=0
trigger1 = movehit = 1
x = 0
y = -0.2
ignorehitpause = 1
;persistent = 



[State 600, HitDef]
type = HitDef
trigger1=!movecontact
attr=A,NA
hitflag = MAF
guardflag = H
animtype=Light
air.animtype=Light
fall.animtype=Back
priority=2,Hit
damage=20,0
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = s8000,0
guardsound=S2,0
ground.type=Low
air.type=Low
ground.slidetime=8
ground.hittime=9
air.hittime=18
ground.velocity=-5.625*const(size.xscale),0
guard.velocity=-5.625*const(size.xscale)
air.velocity= 0,((vel y)-.05)*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
palfx.time = 18
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0
;fall.yvelocity=0
;fall=0
;air.fall=0
;id = 0


[State 600, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50



;---------------------------------------------------------------------------------------------
;Jumping medium punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 610
poweradd = 35
sprpriority = 2

[State 210,2] 
type = PlaySnd
trigger1 = Animelem = 1
value = 7,random%2

[State 610, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 600, VelAdd]
type = VelAdd
triggerall = enemy,pos y !=0
trigger1 = movehit = 1
x = 0
y = -0.1
ignorehitpause = 1
;persistent = 

[State 610, HitDef]
type=HitDef
trigger1=!movecontact
attr=A,NA
hitflag = MAF
guardflag = H
animtype=Medium
air.animtype=Medium
fall.animtype=Back
priority=3,Hit
damage=48,0
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -70
guard.sparkno = s6767
hitsound = s8000,1
guardsound = 6,0
ground.type=Low
air.type=Low
ground.slidetime=14
ground.hittime=15
air.hittime=18
guard.hittime=9
yaccel=.8 * const(size.yscale)
ground.velocity=-9.1*const(size.xscale),0
guard.velocity=-9.1*const(size.xscale)
air.velocity=0,-7*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0
palfx.time = 18
palfx.color = 0
palfx.add = 240,128,0
palfx.sinadd = 48,50,32,16
palfx.invertall = 0
;fall.yvelocity=0
;fall=0
;air.fall=0
;id = 0

[State 610, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50


;---------------------------------------------------------------------------------------------
;Jumping strong punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 620
poweradd = 55
sprpriority = 2

[State 620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = s10,5

[State 620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = s8400,2

[State 620, PosAdd]
type = PosAdd
trigger1 = animelem=2
y = -5

;mvc combo
[State 620, HitDef]
type = HitDef
triggerall = enemy,BackEdgeBodyDist >=20 && pos y <= -200 && (prevstateno = [600,640])
trigger1 = time = 0
attr = A,NA
damage = 55,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -24, 10
air.fall = 1
air.hittime = 25
kill = 0
envshake.time = 7
envshake.ampl = 4

[State 620, HitDef]
type = HitDef
triggerall = pos y >= -199 && (prevstateno = [600,640])
trigger1 = time = 0
attr = A,NA
damage = 50,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -13, 6
air.fall = 1
air.hittime = 25
kill = 1
envshake.time = 7
envshake.ampl = 4


[State 620, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 45,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -13, 6
air.fall = 1
air.hittime = 25
kill = 1


[State 620, Helper]
type = Helper
trigger1 = enemy,BackEdgeBodyDist >=20 && pos y <= -200 && (prevstateno = [600,640]) && MoveHit
helpertype = normal
name = "Punch"
;ID = 
stateno = 621
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
;size.xscale = 
;size.yscale = 
;size.ground.back = 
;size.ground.front = 
;size.air.back = 
;size.air.front = 
;size.height = 
;size.proj.doscale = 
;size.head.pos = , 
;size.mid.pos = , 
;size.shadowoffset = 
;ignorehitpause = 
;persistent = 

[State 620, TargetState]
type = TargetState
triggerall = enemy,BackEdgeBodyDist >=20
trigger1 = pos y <= -200 && (prevstateno = [600,640]) && MoveHit
;trigger1 = movehit = 1
value = 4415

[State 620, SelfState]
type = SelfState
triggerall = enemy, backedgedist >=20
trigger1 = pos y <= -200 && (prevstateno = [600,640]) && MoveHit
;trigger1 = movehit = 1
value = 4410
ignorehitpause = 0

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


;-----------------------------------------------------------------------------
;RMM Combo System
[Statedef 621]
type    = A
juggle  = 0
velset = 0,0
anim = 620
ctrl = 0
sprpriority = 9

[State 1499, 3]
type = changeanim
trigger1 = time = 0
value = 620
elem = 2

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 251, DestroySelf]
type = DestroySelf
trigger1 = time = 15;Animtime = 0
;---------------------------------------------------------------------------------------------
;Jumping light kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 630
poweradd = 15
sprpriority = 2

[State 630, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 600, VelAdd]
type = VelAdd
triggerall = enemy,pos y !=0
trigger1 = movehit = 1
x = 0
y = -0.1
ignorehitpause = 1
;persistent = 

[State 630, HitDef]
type=HitDef
trigger1=!movecontact
attr=A,NA
hitflag = MAF
guardflag = H
animtype=Light
air.animtype=Light
fall.animtype=Back
priority=2,Hit
damage=20,0
pausetime = 8,8
sparkno = s7000
sparkxy = -10, -60
guard.sparkno = s6767
hitsound = s8000,3
guardsound = 6,0
ground.type=High
air.type=High
ground.slidetime=8
ground.hittime=11
air.hittime=18
ground.velocity=-5.625*const(size.xscale),0
guard.velocity=-5.625*const(size.xscale)
air.velocity=0,-8*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0



[State 630, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50


;---------------------------------------------------------------------------------------------
;Jumping medium kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 640
poweradd = 55
sprpriority = 2

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 1,5
channel=0

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 600, VelAdd]
type = VelAdd
triggerall = enemy,pos y !=0
trigger1 = movehit = 1
x = 0
y = -0.1
ignorehitpause = 1
;persistent = 

[State 640, HitDef]
type = HitDef
trigger1 = !Time
attr = A,NA
damage = 45,0
animtype = Medium
air.animtype=Medium
fall.animtype=Back
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 8,8
sparkno = s7000
sparkxy = -15, -30
sparkno = s7000
guard.sparkno = s6767
hitsound = s8000,3
guardsound = 6,0
ground.type=High
air.type=High
ground.slidetime=8
ground.hittime=11
air.hittime=18
ground.velocity=-5.625*const(size.xscale),0
guard.velocity=-5.625*const(size.xscale)
air.velocity=0,-3*const(size.yscale)
airguard.velocity=-5.625*const(size.xscale),0
down.velocity=-5.625*const(size.xscale),-8*const(size.yscale)
down.hittime=20
ground.cornerpush.veloff=0
fall.xvelocity=0

[State 640, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------------------------
;Jumping strong kick
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 650
poweradd = 55
sprpriority = 2

[State 650, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = s8400,2

;mvc combo
[State 650, HitDef]
type = HitDef
triggerall = var(8)>2
triggerall = enemy,BackEdgeBodyDist >=20 && pos y <= -200 && (prevstateno = [600,640])
trigger1 = time = 0
attr = A,NA
damage = 55,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -24, 10
air.fall = 1
air.hittime = 25
kill = 0
envshake.time = 7
envshake.ampl = 4

[State 650, HitDef]
type = HitDef
triggerall = pos y >= -199 && (prevstateno = [600,640])
trigger1 = time = 0
attr = A,NA
damage = 50,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -13, 6
air.fall = 1
air.hittime = 25
kill = 1
envshake.time = 7
envshake.ampl = 4


[State 650, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 45,0
animtype = Heavy
hitflag = MAF
guardflag = H
priority = 4, Hit
pausetime = 13,14
sparkno = s7003
sparkxy = -15, -30
guard.sparkno = s6767
hitsound =s8000,2
guardsound = S8500,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -13, 6
air.fall = 1
air.hittime = 25
kill = 1
envshake.time = 7
envshake.ampl = 4


[State 650, Helper]
type = Helper
trigger1 = enemy,BackEdgeBodyDist >=20 && pos y <= -200 && (prevstateno = [600,640]) && MoveHit
helpertype = normal
name = "Kick"
;ID = 
stateno = 651
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
;size.xscale = 
;size.yscale = 
;size.ground.back = 
;size.ground.front = 
;size.air.back = 
;size.air.front = 
;size.height = 
;size.proj.doscale = 
;size.head.pos = , 
;size.mid.pos = , 
;size.shadowoffset = 
;ignorehitpause = 
;persistent = 

[State 650, TargetState]
type = TargetState
triggerall = enemy,BackEdgeBodyDist >=20
trigger1 = pos y <= -200 && (prevstateno = [600,640]) && MoveHit
;trigger1 = movehit = 1
value = 4415

[State 650, SelfState]
type = SelfState
triggerall = enemy, backedgedist >=20
trigger1 = pos y <= -200 && (prevstateno = [600,640]) && MoveHit
;trigger1 = movehit = 1
value = 4410
ignorehitpause = 0

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


;-----------------------------------------------------------------------------
;RMM Combo System
[Statedef 651]
type    = A
juggle  = 0
velset = 0,0
anim = 650
ctrl = 0
sprpriority = 9

[State 1499, 3]
type = changeanim
trigger1 = time = 0
value = 650
elem = 3

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 251, DestroySelf]
type = DestroySelf
trigger1 = time = 15;Animtime = 0

;---------------------------------------
;Slide Foward
[Statedef 700]
type = S
physics = N
movetype= I
anim = 700
ctrl = 0
velset = 0,0
sprpriority = -1

[State 100, 7]
type = Explod
trigger1 = animelem = 3
ID = 6088
anim = 6088
postype = p1
pos = 50,10;-18, 9
bindtime = 1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

[State 7000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S40,0
volumescale = 75

[State 700, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 6.6

[State 700, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 700, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 700, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 700, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 700, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------
;Slide Back
[Statedef 701]
type = S
physics = N
movetype= I
anim = 701
ctrl = 0
velset = 0,0
sprpriority = -1

[State 100, 7]
type = Explod
trigger1 = animelem = 3
ID = 6089
anim = 6089
postype = p1
pos = -30,11;-18, 9
bindtime = 1
removetime = -2
vel = 0, 0
ownpal = 1
sprpriority = 5
removeongethit = 0

[State 7000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S40,0
volumescale = 75

[State 701, Width]
type = Width
trigger1 = 1
edge = 5,0

[State 701, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = -6.6

[State 701, Velocity]
type = VelSet
trigger1 = AnimElem = 7
x = 0

[State 701, HitBy]
type = HitBy
trigger1 = time <= 20
value = SCA;, NT,ST,HT

[State 701, Push]
type = PlayerPush
trigger1 = AnimElemTime(2) > 0
value = 0

[State 701, AfterImage]
type = Afterimage
trigger1 = AnimElem = 3
time = 15
length = 10
FrameGap = 5
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 701, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------
;Dodge
[Statedef 730]
type = S
physics = S
movetype = I
anim = 730
ctrl = 0
velset = 0,0

[State 730, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S100,0
volumescale = 100
channel = -1

;[State 730, PlaySnd]
;type = PlaySnd
;trigger1 = animelem = 2
;value = S3,0
;volume = 0
;channel = -1
;freqmul = 2.0

[State 730, Position]
type = PosSet
trigger1 = AnimElem = 1
y = 0

[State 730, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 730, HitBy]
type = HitBy
trigger1 = 1
value = SCA, NT,ST,HT

[State 730, AfterImage]
type = Afterimage
trigger1 = AnimElem = 1
time = 26
length = 10
FrameGap = 6
PalBright = 1,1,1
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .5,.5,.5
trans = add1

[State 730, StateChange]
type = Changestate
trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = MA-
priority = 1, Miss
sparkno = -1
priority = 2
p1facing = ifelse (command = "holdback",-1,1)
p2facing = 1
p1stateno = 801
p2stateno = 802
guard.dist = 0
fall.xvelocity = -3
fall.yvelocity = -4
fall = 1
fall.recover = 1
fall.damage = 80
down.bounce = -4
kill = 1
fall.envshake.time = 8

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

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

;------------------------------------------------------
[Statedef 801]
type    = S
movetype= A
physics = N
anim = 801
sprpriority = 2
poweradd = 25

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=1
pos = 35,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=2
pos = 35,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=3
pos = 45,-10

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 4
value = 803

[State 191, Explod 1]
type = Explod
trigger1 = animelem=2
anim = 7002
ID = 7002
pos = 0, -50
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause=0

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

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


;--------------------------------------------------
[Statedef 802]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority= 1

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

[State 815, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 802

;------------------------------------------------------
[Statedef 803]
type    = A
movetype= H
physics = N
velset = -6,-4

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (SelfAnimExist(5060));Not if hit off ground anim
value = 5030

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = time>=4
y = .4

[State 816, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0




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

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = MA-
priority = 1, Miss
sparkno = -1
priority = 2
p1facing = ifelse (command = "holdback",-1,1)
p2facing = 1
p1stateno = 811
p2stateno = 812
guard.dist = 0
fall.xvelocity = -3
fall.yvelocity = -4
fall = 1
fall.recover = 1
fall.damage = 80
down.bounce = -4
kill = 1
fall.envshake.time = 8

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

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

;------------------------------------------------------
[Statedef 811]
type    = S
movetype= A
physics = N
anim = 811
sprpriority = 2
poweradd = 25

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=1
pos = 50,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=2
pos = 50,0

[State 0, TargetBind]
type = TargetBind
trigger1 = animelem=3
pos = 60,-10

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 4
value = 813

[State 191, Explod 1]
type = Explod
trigger1 = animelem=2
anim = 7002
ID = 7002
pos = 0, -50
postype = p2  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 4
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
ignorehitpause=0

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

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

;--------------------------------------------------
[Statedef 812]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority= 1

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

[State 815, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 812

;------------------------------------------------------
[Statedef 813]
type    = A
movetype= H
physics = N
velset = -4,-3

[State 816, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (SelfAnimExist(5060));Not if hit off ground anim
value = 5030

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = time>=4
y = .4

[State 816, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0

;----------------------------------------------------------------------
;Start Super Jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimTime = 0
anim = 9007
ID = 9007
pos = 0,20
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
;supermove =999
;pausemove =999
scale = .35,.35
sprpriority = 3
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 0

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

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

;---------------------------------------------
;Super Jump
[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-14.2;-14.3;-14.5

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 41

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

;[State 7001, Explod]
;type = Explod
;trigger1 = Time = 0
;ID = 474
;anim = 6669
;postype = p1
;pos = 0, 30
;bindtime = 1
;removetime = -2
;ownpal = 1
;sprpriority = 2
;scale = .5,.5

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;---------------------------------------------------------------------------------------------
;Super Jump
[Statedef 7002]
type    = A
physics = A
ctrl = 1

[State 7002, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7002, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

;-------------------------------------------------------------------------------------------
[Statedef 8882]
type = S
physics = S
anim = 0
sprpriority = 1
ctrl = 0

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

[State 8882, ChangeState]
type = Changestate
trigger1 = time = 30
value = 8883

[Statedef 8883]
type = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 8883, PlaySnd]
type = PlaySnd
trigger1 = (AnimElem = 5) || (AnimElem = 9)
value = 8100,0

[State 8883, VelSet]
type = VelSet
trigger1 = 1
x = 8

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

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 8883, ChangeState]
type = ChangeState
trigger1 = p2bodydist x <= 190
value = 101
ctrl = 0

;---------------------------------------------------------------------------------------------


;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1111
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 53,-50
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = Time = 0
value = 1,0
channel = 0

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

;Guard Push (Crouch)
[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 121
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 33,-45
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6310, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;Guard Push (Air)
[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 122
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 3333
postype = p1
pos = 33,-55
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7

[State 6320, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

;Guard Push (Helper)
[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1112
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18



;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------Tech Roll ------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Roll

[Statedef 890]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 890, 1]
type = VelSet
trigger1 = Time != 1
x = 4

[State 890, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 890, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 890, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 890, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 890, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 890, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 890, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Roll

[Statedef 895]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 895, 1]
type = VelSet
trigger1 = Time != 1
x = 5

[State 895, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 895, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 895, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 895, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 895, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 895, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 895, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Roll

[Statedef 898]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 898, 1]
type = VelSet
trigger1 = Time != 1
x = 6

[State 898, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 898, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 898, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 898, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 898, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 898, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 898, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;------------------------------ Recovery Roll ------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Foward Recovery Roll

[Statedef 831]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 831
sprpriority = -1

[State 831, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 831, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

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

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 831, 6]
type = ChangeState
trigger1 = time = 15
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Foward Recovery Roll

[Statedef 832]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 831
sprpriority = -1

[State 832, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 832, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 832, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 832, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 832, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 832, 6]
type = ChangeState
trigger1 = time = 20
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Foward Recovery Roll

[Statedef 840]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 840
sprpriority = -1

[State 840, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 840, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 840, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 840, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 840, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 840, 6]
type = ChangeState
trigger1 = time = 30
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Near Backward Recovery Roll

[Statedef 850]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 832
sprpriority = -1

[State 850, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

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

[State 850, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

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

[State 850, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 850, 6]
type = ChangeState
trigger1 = time = 15
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Medium Backward Recovery Roll

[Statedef 855]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 855, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 855, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 855, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 855, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 855, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 855, 6]
type = ChangeState
trigger1 = time = 20
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Far Backward Recovery Roll

[Statedef 860]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 860, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 860, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

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

[State 860, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 860, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 860, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

[State 860, 6]
type = ChangeState
trigger1 = time = 30
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; Recovery Roll - Variable "Reset"

[State -2, 1]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

;-------------------------------------------------------------------------
; A.I. - Far Foward Recovery Roll

[State -2, 2]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
triggerall = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 840

;-------------------------------------------------------------------------
; A.I. - Far Backward Recovery Roll

[State -2, 3]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
trigger1 = (StateNo = 5050)||(StateNo = 5071)||(StateNo = 50700)
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 55

;-------------------------------------------------------------------------
; A.I. - Lie Down Forward Recovery Roll

[State -2, 4]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 832

;-------------------------------------------------------------------------
; A.I. - Lie Down Backward Recovery Roll

[State -2, 5]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
trigger1 = (StateNo = 5120)&&(StateNo = 51200)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 855
;---------------------------------------------------
;Boss Icons
[Statedef 8300] ;Boss Icons
type=A
physics=N
velset=0,0
anim=9741

[State 8300, Circle]
type=explod
trigger1= !numexplod(8830)
anim = 8300 + (root,var(35))
ID=8300
sprpriority=64
postype=p1
facing=facing
removetime=32
pausemovetime=-1
supermovetime=-1
ownpal=1

[State 8300, VelSet]
type = VelSet
trigger1 = time = 15
x = -1.7
y = 2

[State 8300, Scale]
type=modifyexplod
trigger1= time<15
ID=8300
scale=.7,.7
trans=addalpha
alpha=256,0
bindtime = -1

[State 8300, Scale]
type=modifyexplod
trigger1= time>=15
ID= 8300
scale= .5-.0625*(time-15), .5-.0625*(time-15)
trans= addalpha
alpha= 256-32*(time-15), 32*(time-15)
bindtime = -1

[State 8300, Safety]
type=removeexplod
trigger1= time>=30
[State 8290, End]
type=destroyself
trigger1= time>=30

;------------------------------
;Turning Circle
[Statedef 8505]
physics=N
anim = 8505

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

[State 8505, trans]
type=trans
trigger1=1
trans=addalpha
alpha=200,256

[State 8505, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 8505, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .8-(Time*.1/4), .8-(Time*.1/2)
value = 45

;[State 8505: AllPalFX]
;type = PalFX
;trigger1 = 1
;time = 1
;add= 10-(Time)*8,10-(Time)*8,10-(Time)*8

[State 8505: SprPriority]
type = SprPriority
trigger1 = 1
value = 999

[State 8505: DestroySelf]
type = DestroySelf
trigger1 = Time = 33

;------------------------------------------------------------------------
;AI POOR CODED
[StateDef 9741]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9741, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9741, PauseCheck]
type = VarSet
trigger1 = (GameTime>(Parent,var(57)))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)+(var(4):=0)

[State 9741, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9741, DirTurnOnAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = !var(9)
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = !(var(4):=1)
var(59) = var(4)

[State 9741, DirTurnOffAI]
type = ParentVarSet
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = (var(4):=0)

[State 9741, ButtonTurnOnAI]
type = ParentVarSet
triggerall = var(1)
triggerall = !var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
var(59) = 1

[State 9741, ButtonTurnOffAI]
type = ParentVarSet
triggerall = !var(2)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9741, UnPauseCheck]
type = VarSet
triggerall = var(2)
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(2) = 2)
trigger8 = (var(2):=0)
var(2) = 2

[State 9741, Goodbye]
type = DestroySelf
triggerall = (var(1):=1)
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

;----------------------------------------------------------------
;AI POOR CODED
[StateDef 9742]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9742, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9742, PauseCheck]
type = VarSet
trigger1 = (GameTime>Parent,var(57))
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)
trigger4 = Parent,var(59)
trigger5 = (var(3):=0)
var(2) = (var(3):=1)

[State 9742, Facing]
type = Turn
trigger1 = (var(9):=(Facing != Parent,Facing))

[State 9742, ParentDirCheck]
type = VarSet
trigger1 = (Parent,command = "holdfwd")
trigger2 = (Parent,command = "holdback")
trigger3 = (Parent,command = "holdup")
trigger4 = (Parent,command = "holddown")
trigger5 = (var(6):=0)
var(6) = 1

[State 9742, ParentButtonCheck]
type = VarSet
trigger1 = (Parent,command = "a")
trigger2 = (Parent,command = "b")
trigger3 = (Parent,command = "c")
trigger4 = (Parent,command = "x")
trigger5 = (Parent,command = "y")
trigger6 = (Parent,command = "z")
trigger7 = (Parent,command = "start")
trigger8 = (var(7):=0)
var(7) = 1

[State 9742, SameButtonCheck]
type = VarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = NumPartner
trigger1 = (Parent,command = "a")
trigger1 = (Partner,command = "a")
trigger2 = (Parent,command = "b")
trigger2 = (Partner,command = "b")
trigger3 = (Parent,command = "c")
trigger3 = (Partner,command = "c")
trigger4 = (Parent,command = "x")
trigger4 = (Partner,command = "x")
trigger5 = (Parent,command = "y")
trigger5 = (Partner,command = "y")
trigger6 = (Parent,command = "z")
trigger6 = (Partner,command = "z")
trigger7 = (Parent,command = "start")
trigger7 = (Partner,command = "start")
trigger8 = (var(8):=0)
var(8) = 1

[State 9742, DirTurnOnAI]
type = ParentVarSet
trigger1 = var(1)
trigger1 = var(6)
trigger1 = !var(3)
trigger1 = !var(4)
trigger1 = !var(9)
var(59) = 1

[State 9742, DirTurnOffAI]
type = ParentVarSet
triggerall = var(6)
triggerall = !var(3)
triggerall = Parent,var(59)
trigger1 = (command = "holdfwd")
trigger1 = (Parent,command = "holdfwd")
trigger2 = (command = "holdback")
trigger2 = (Parent,command = "holdback")
trigger3 = (command = "holdup")
trigger3 = (Parent,command = "holdup")
trigger4 = (command = "holddown")
trigger4 = (Parent,command = "holddown")
var(59) = 0

[State 9742, ButtonTurnOnAI]
type = ParentVarSet
trigger1 = var(5)
trigger1 = var(7)
trigger1 = !var(2)
trigger1 = !var(8)
var(59) = 1

[State 9742, ButtonTurnOffAI]
type = ParentVarSet
triggerall = var(7)
triggerall = !var(2)
triggerall = !var(8)
trigger1 = (command = "a")
trigger1 = (Parent,command = "a")
trigger2 = (command = "b")
trigger2 = (Parent,command = "b")
trigger3 = (command = "c")
trigger3 = (Parent,command = "c")
trigger4 = (command = "x")
trigger4 = (Parent,command = "x")
trigger5 = (command = "y")
trigger5 = (Parent,command = "y")
trigger6 = (command = "z")
trigger6 = (Parent,command = "z")
trigger7 = (command = "start")
trigger7 = (Parent,command = "start")
var(59) = -1

[State 9742, UnPauseCheck]
type = VarSet
triggerall = var(2)
triggerall = !var(4)
trigger1 = var(7)
trigger2 = (var(2) = 2)
trigger2 = (var(2):=0)
var(2) = 2

[State 9742, Goodbye]
type = DestroySelf
trigger1 = Parent,var(59)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

[State 9742, HitPauseCheck]
type = VarSet
trigger1 = var(6)
trigger2 = var(7)
trigger3 = !(Parent,HitPauseTime)
var(4) = Parent,HitPauseTime

[State 9742, Delay]
type = VarSet
trigger1 = (var(1):=1)
var(5) = !var(7)


;------------------
; XOR Method's HitPauseTime Helper State
[StateDef 9743]
type = S
movetype = I
physics = N
anim = 9741
ctrl = 0

[State 9743, Safety]; Just in case your opponent is very poorly coded.
type = SelfState
trigger1 = !IsHelper
value = 0

[State 9743, HitPauseTime]
type = VarSet
trigger1 = !(Parent,HitPauseTime)
trigger2 = (GameTime>Parent,var(57))
var(1) = Parent,HitPauseTime

[State 9742, Goodbye]
type = DestroySelf
trigger1 = (Parent,var(59) = 1)
trigger2 = !(Parent,Alive)
trigger3 = (RoundState != 2)

;---------------------------------------
;KO Final Hit
[Statedef 9900]
type = S
movetype = I
physics = N

[State 9900]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

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

[State 9900, Dramatic KO Helper]
type = helper
triggerall = (root,alive || enemy,alive)
trigger1 = roundstate = 3 && (root,life <= 0 || enemy,life <= 0)
helpertype = Normal
id = 9901
pos = 0,0
postype = p1
name = "K.O."
stateno = 9901
supermovetime = 9999999999
pausemovetime = 9999999999
persistent = 0
ignorehitpause = 1

;------------------------------------
;KO Final Hit Continue
[Statedef 9901]
type = S
movetype = I
physics = N

[State 0, ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible
;flag3 = nokoslow;<------------optional
ignorehitpause = 1

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

[State 9901, pause]
type = Pause
trigger1 = 1
time = 20;<---adjust to your likings
ignorehitpause = 1
persistent = 0

[State 9901, DestroySelf]
type = DestroySelf
trigger1 = time >= 20

;-------------------------------------------
; Ffffffinish!!
[StateDef 30000]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noshadow

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1


[State 9999, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = f30000,0
ignorehitpause = 1

[State 0, BGPalFX]
type = BGPalFX
trigger1 = Time<15
time = 1
add = -100,-100,-100
color = 0

[State 8400: AllPalFX]
type = AllPalFX
trigger1 = Time<20 && time%4=0
time = 1
add = 255,255,255

[State 9999, Short Pause]
type = Pause
trigger1 = Time = 1
time = 30
movetime = 15
ignorehitpause = 1
