; Constants and state file.
; There are comments scattered through this file, so you may like to
; take a look if would like to learn more about the cns.

[Data]
life = 1000			;Amount of life to start with
power = 3000		;Amount of maximum power
attack = 100		;attack power (more is stronger)
defence = 100		;defensive power (more is stronger)
fall.defence_up = 50	;Percentage to increase defense everytime player is knocked down
liedown.time = 60		;Time which player lies down for, before getting up
airjuggle = 15		;Number of points for juggling
sparkno = 2			;Default hit spark number for HitDefs
guard.sparkno = 40	;Default guard spark number
KO.echo = 0			;1 to enable echo on KO
volume = 0			;Volume offset (negative for softer)
IntPersistIndex = 60	;Variables with this index and above will not have their values
FloatPersistIndex = 40  ;reset to 0 between rounds or matches. There are 60 int variables,
  				;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
  				;If omitted, then it defaults to 60 and 40 for integer and float
  				;variables repectively, meaning that none are persistent, i.e. all
  				;are reset. If you want your variables to persist between matches,
  				;you need to override state 5900 from common1.cns.


[Size]
xscale = 1			;Horizontal scaling factor.
yscale = 1			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 60			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = -5, -90	;Approximate position of head
mid.pos = -5, -60		;Approximate position of midsection
shadowoffset = 0		;Number of pixels to vertically offset the shadow
draw.offset = 0,0		;Player drawing offset in pixels (x, y)

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

[Movement]
airjump.num = 0		;Number of air jumps allowed (opt)
airjump.height = 35	;Minimum distance from ground before you can air jump (opt)
yaccel = .44		;Vertical acceleration
stand.friction = .85	;Friction coefficient when standing
crouch.friction = .82	;Friction coefficient when crouching

;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

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

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

[State 20, 3]
type = ChangeAnim
triggerall = enemynear, name != "helibonus"
triggerall = vel x > 0
trigger1 = Anim != 20  && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = enemynear, name != "helibonus"
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = enemynear, name = "helibonus"
trigger1 = anim != 0
value = 0
;elem = 1
;ignorehitpause =
;persistent =

; RUN_FWD
[Statedef 100]
type    = S
movetype = I
physics = N
anim = 100
sprpriority = 1
velset = 5, 0

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 7
value = 171,13

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

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

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd";Time = 135
value = 0
ctrl = 1

; RUN_FWD
[Statedef 105]
type    = S
movetype = I
physics = N
anim = 105
sprpriority = 1
velset = -5, 0
ctrl = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 6
x = 0

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

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

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

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


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



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


; Lose by Time Over
; CNS difficulty: basic
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 172,9

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
[Statedef 180]
type = S

[State 180,Winpose decider]
type = ChangeState
trigger1 = Time = 0
value = 181 + ((Random * 3) / 1000)


;---------------------------------------------------------------------------
; Win pose 1
; CNS difficulty: basic
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

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

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

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

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = 172,7

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

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

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

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

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 190]
type = S
anim = 9999

[State 190,Winpose decider]
type = ChangeState
trigger1 = Time = 0
value = 191 + ((Random * 3) / 1000)


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

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 172,10

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

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


[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 199
ID = 199
pos = 0,-70
postype = p1  ;p2,front,back,left,right
vel = 7,-3
accel = 0,0.2
random = 0,0
removetime = 40
scale = 1,1
sprpriority = 5

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

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

[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 172,4

[State 190, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 191

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


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

[State 100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 171,14

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

[State 100, PlaySnd]
type = PlaySnd
trigger1 = anim = 193 && animelem = 1
value = 52,0

[State 100, PlaySnd]
type = PlaySnd
trigger1 = anim = 193 && animelem = 3
value = 171,15

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = -300
;ignorehitpause =
;persistent =

[State 0, VelSet]
type = VelSet
trigger1 = pos y > -150 &&pos y <-110
y = 4

[State 0, VelSet]
type = VelSet
trigger1 = pos y > -110 &&pos y <-90
y = 3

[State 0, VelSet]
type = VelSet
trigger1 = pos y > -90 &&pos y <-75
y = 2

[State 0, VelSet]
type = VelSet
trigger1 = pos y > -75 &&pos y <-51
y = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 198
ID = 198
pos = -16,-54
postype = p1
bindtime = -1
removetime = -1
removeongethit = 1
sprpriority = -5
;persistent =



[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(198) > 0&& anim = 193
id = 198
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 = anim = 193 && animelem = 3
anim = 198
ID = 199
pos = -20,-40
postype = p1
bindtime = 1
removetime = 100
removeongethit = 1
vel = 0,-5
sprpriority = -5

[State 0, Explod]
type = Explod
trigger1 = anim = 193 && animelem = 1
anim = 197
ID = 197
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
removeongethit = 1
vel = 0,0
sprpriority = -15


[State 0, Explod]
type = Explod
trigger1 = anim = 193 && animelem = 3
anim = 194
ID = 194
pos = 0,0
postype = p1
bindtime =1
removetime = 100
removeongethit = 1
vel = 0,-5
sprpriority = -4




[State 0, VelSet]
type = VelSet
trigger1 = pos y > -10
y = 0

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time > 0 && vel y = 0 && anim!= 193
value = 193

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


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

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


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

;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1
ctrl = 0
anim = 200
poweradd = 15
sprpriority = 2

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

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 20, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 9, 9
sparkno = 0
sparkxy = -10, -82
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 7
ground.hittime  = 7
ground.velocity = -6.5
air.velocity = -2.3,-2
air.hittime = 12
guard.slidetime = 10
guard.hittime = 10
guard.velocity = -6

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

;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 35
ctrl = 0
anim = 210
sprpriority = 1


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


[State 210, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 30
priority = 3,hit
hitflag = MAF
guardflag = MA
pausetime = 9,9
sparkno = 1
sparkxy = -10,-80
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 14
ground.velocity = -7.6
air.velocity = -3,-5
guard.slidetime = 13
guard.hittime = 13
guard.velocity = -7


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

;---------------------------------------------------------------------------
; Standing Strong Punch
; CNS difficulty: easy
[Statedef 220]
type = S
movetype = A
physics = S
ctrl = 0
anim = 220
poweradd = 55
juggle = 4
sprpriority = 1

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

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

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

[State 220, 5]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
hitflag = MAF
guardflag = MA
pausetime = 9, 9
animtype = back
priority = 4, hit
sparkno = 2
sparkxy = -10,-80
damage = 60
hitsound = 5,4
guardsound = 6,0
hitsound = S0, 11
guardsound = S0, 12
ground.velocity = -7, -3
ground.hittime = 10
air.velocity = -7, -1
air.hittime = 12
guard.slidetime = 16
guard.hittime = 18
guard.velocity = -9
fall = 1

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

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 15
ctrl = 0
anim = 230
sprpriority = 1


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


[State 230, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Light
damage    = 15
hitflag = MAF
guardflag = MA
priority = 3,hit
pausetime = 9,9
sparkno = 0
sparkxy = -10,-73
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -7
air.velocity = -4, -1
air.hittime = 12
guard.slidetime = 11
guard.hittime = 13
guard.velocity = -6


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

;---------------------------------------------------------------------------
; Standing Medium Kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 3
poweradd= 35
ctrl = 0
anim = 240
sprpriority = 1


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

[State 240, 3]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NA
animtype  = Medium
damage    = 30
hitflag = MAF
guardflag = MA
pausetime = 9,9
priority = 3, hit
sparkno = 1
sparkxy = -10,-65
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -8.6
air.velocity = -4.5, -1.2
air.hittime = 15
guard.slidetime = 13
guard.hittime = 15
guard.velocity = -6.5

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

;---------------------------------------------------------------------------
; Standing Strong Kick
; CNS difficulty: easy
[Statedef 250]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 250
juggle = 4
poweradd = 50

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

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


[State 200, 1]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
hitflag = MAF
guardflag = MA
pausetime = 9, 9
animtype = back
priority = 4, hit
damage = 70
sparkno = 2
sparkxy = -5, -80
hitsound = 5,4
guardsound = 6,0
ground.velocity = -7, -3
ground.hittime = 10
air.velocity = -7, -1
air.hittime = 12
guard.slidetime = 16
guard.hittime = 18
guard.velocity = -9
fall = 1

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

;---------------------------------------------------------------------------
; Crouching Light Punch
; CNS difficulty: easy
; Description: Simple crouching attack. The HitDef's guardflag parameter
;     is set to "L", meaning that the move can only be guarded low
;     (crouching), and not by standing or jumping opponents.
;     Like for all light attacks, it's a good idea to keep the slidetime
;     and hittime parameters at a smaller number, so the opponent isn't
;     stunned for too long. For all crouching attacks you have to
;     remember to set the attr parameter to indicate that it is crouching
;     attack. In this case, "C, NA" stands for "crouching, normal attack".
;     The HitDef's priority is set at 3, instead of the default of 4,
;     so this attack has a lower priority than most others, meaning the
;     player will get hit instead of trading hits with the opponent if
;     their attack collision boxes (Clsn1) intersect each other's Clsn2
;     boxes at the same time.
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 2
poweradd= 20
ctrl = 0
anim = 400
sprpriority = 2


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


[State 400, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 15
priority  = 3,hit
animtype  = Light
hitflag = MAF
guardflag = MA
pausetime = 9,9
sparkno = 0
sparkxy = -10,-50
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 7
ground.hittime  = 9
ground.velocity = -4
air.velocity = -3, -1
air.hittime = 10
guard.slidetime = 12
guard.hittime = 14
guard.velocity = -4.4

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

;---------------------------------------------------------------------------
; Crouching Medium Punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 30
ctrl = 0
anim = 410


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

[State 400, HitDef]
type = HitDef
trigger1 = animelem = 2
attr = C, NA
damage = 25
priority = 3, hit
hitflag = MAF
guardflag = M
pausetime = 9,9
hitsound = 5,1
guardsound = 6,0
sparkno = 1
sparkxy = -10,-50
hitsound   = S0,10
guardsound = S0,12
animtype = medium
ground.type = Low
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -2
guard.velocity = -2
air.velocity = -3,-6


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

;---------------------------------------------------------------------------
; Crouching Strong Punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 40
ctrl = 0
anim = 420

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

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

[State 400, HitDef]
type = HitDef
trigger1 = animelem = 3
attr = C, NA
damage = 45
priority = 4, hit
guardflag = L
pausetime = 9,9
sparkno = 2
sparkxy = -5, -90
hitsound = 5,2
guardsound = 6,0
animtype = Up
ground.type = Hard
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 0,-12
guard.velocity = -5
air.velocity = -2,-11

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

;---------------------------------------------------------------------------
; Crouching Light Kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 430


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


[State 400, HitDef]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage = 15
priority = 3,hit
hitflag = MAFD
guardflag = L
pausetime = 9,9
sparkno = 0
sparkxy = -10,-10
hitsound = 5,0
guardsound = 6,0
animtype = Light
ground.type = Low
ground.slidetime = 9
ground.hittime  = 9
ground.velocity = -3.7
air.velocity = -3,-1
down.velocity = -3,-3
down.hittime = 20
guard.slidetime = 14
guard.hittime = 18
guard.velocity = -6

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

;---------------------------------------------------------------------------
; Crouching Medium Kick
; CNS difficulty: easy
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 35
ctrl = 0
anim = 440
sprpriority = 2


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


[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 45
animtype = medium
hitflag = MAFD
guardflag = L
pausetime = 9,9
priority = 3,hit
sparkno = 1
sparkxy = -5,-55
hitsound = 5,1
guardsound = 6,0
ground.type = low
ground.slidetime = 15
ground.hittime  = 16
ground.velocity = -9
air.velocity = -4, -4.5
guard.slidetime = 17
guard.hittime = 21
guard.velocity = -7

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

;---------------------------------------------------------------------------
; Crouch Strong Kick
; CNS difficulty: easy
; Description: This move uses "Trip" for the "ground.type" parameter in
;     its HitDef. It's a special type that puts the opponent in a tripped
;     animation as he falls. Also, the hitflag parameter in the HitDef
;     is set to "MAFD". The "D" indicates that a downed opponent can be
;     hit by the attack.
[Statedef 450]
type    = C
movetype= A
physics = C
ctrl = 0
anim = 450
juggle = 5
poweradd = 60


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

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

[State 450, 3]
type = HitDef
trigger1 = time = 0
attr = C, NA
hitflag = M
guardflag = L
pausetime = 9, 9
damage = 75
priority= 3,hit
animtype = hard
sparkno = 2
sparkxy = -5, -21
hitsound = 5,2
guardsound = 6,0
ground.type = trip
ground.velocity = -2.5, -4
guard.slidetime = 11
guard.hittime = 24
guard.velocity = -10
fall = 1
fall.recover = 0


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

;---------------------------------------------------------------------------
; Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 16
ctrl = 0
anim = 600
sprpriority = 2


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


[State 600, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 15
guardflag = HA
priority = 3, hit
pausetime = 9,9
sparkno = 0
sparkxy = -10,-92
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -6
air.velocity = -1.3,-4.8
air.hittime = 15
guard.slidetime = 6
guard.hittime = 6
guard.velocity = -4.5

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

;---------------------------------------------------------------------------
; Jump Medium Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 35
ctrl = 0
anim = 610
sprpriority = 2


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

[State 610, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 30
guardflag = HA
priority = 3,hit
pausetime = 9,9
sparkno = 1
sparkxy = -10,-55
hitsound = 5,1
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -8
air.velocity = -1.3,-1
guard.slidetime = 7
guard.hittime = 7
guard.velocity = -6

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

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 620
juggle = 2
poweradd = 50
sprpriority = 1

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


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

[State 630, 4]
type = HitDef
trigger1 = time = 0
attr = A, NA
hitflag = MAF
guardflag = HA
pausetime = 9, 9
damage = 65
animtype = hard
sparkno = 2
priority= 4,hit
sparkxy = -5, -24
hitsound = 5,2
guardsound = 6,0
ground.type = high
ground.slidetime = 13
ground.hittime = 15
ground.velocity = -8.5
air.velocity = -7, 10
guard.slidetime = 6
guard.hittime = 6
guard.velocity = -5.4
air.fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2


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


[State 630, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 20
hitflag = MAF
guardflag = HA
priority = 3,hit
pausetime = 9,9
sparkno = 0
sparkxy = -5,-40
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = -7
air.velocity = -1.3, -4.8
air.hittime = 15
guard.slidetime = 5
guard.hittime = 5
guard.velocity = -4

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

;---------------------------------------------------------------------------
; Jump Medium Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 35
ctrl = 0
anim = 640
sprpriority = 2


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

[State 640, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 35
guardflag = HA
priority = 3,hit
pausetime = 9,9
sparkno = 1
sparkxy = -10,-60
hitsound = 5,1
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -9
air.velocity = -1.3,-4.8
air.hittime = 15
guard.slidetime = 5
guard.hittime = 5
guard.velocity = -4.6

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

;---------------------------------------------------------------------------
; Jump Strong Kick
; CNS difficulty: easy
[Statedef 650]
type    = A
movetype= A
physics = A
ctrl = 0
anim = 650
juggle = 2
poweradd = 55


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



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

[State 650, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
pausetime = 9, 9
damage = 70
animtype = hard
priority = 3,hit
sparkno = 2
sparkxy = -5, -18
hitsound = 5,4
guardsound = 6,0
ground.type = high
ground.slidetime = 15
ground.hittime = 16
ground.velocity = -9.4
air.velocity = -5, 10
guard.slidetime = 5
guard.hittime = 5
guard.velocity = -4.4
air.fall = 1
fall.recover = 0

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

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

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

[State 800, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = ifelse(Command = "holdfwd",1,-1)
p2facing = -1
p1stateno = 810
p2stateno = 820
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = ifelse(PalNo > 6, 0, 1)
fall.recover = 0
fall.damage = 80


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

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

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
sprpriority = 2

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

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

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

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 811
ID = 811
pos = 0,0
postype = p1  ;p2,front,back,left,right
removetime = -2
scale = 1,1
sprpriority = -2
ontop = 0
shadow = 0,0,0
ownpal = 0
bindtime = -1
removeongethit = 1
;ignorehitpause =
;persistent =


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

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 2
pos = 60,0

[State 810, TargetBind]
type = TargetBind
trigger1 = AnimElem = 3
pos = 10,-80

[State 810, TargetState]
type = TargetState
trigger1 = AnimElem = 4
value = 830


[State 810, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 8600,0

[State 810, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 4
value = 50

[State 810, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -50

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

[Statedef 820]
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 = 820

[Statedef 830]
type    = A
movetype= H
physics = N
velset = -10,-4
poweradd = 50

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

[State 816, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0) && (!SelfAnimExist(5060));Not if hit off ground anim
value = 830

[State 816, PosAdd]
type = PosAdd
trigger1 = Time = 0
Y = 40

[State 816, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

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

;fall after attack
;Air Attack Falling
[Statedef 900]
type    = A
movetype= I
physics = A
anim = 44
sprpriority = 1

[State 900, Turn]
type = Turn
trigger1 = P2Dist X < -5

[State 900, VelSet]
type = VelSet
trigger1 = FrontEdgeBodyDist <= 0
x = 0

[State 900, ChangeState]
type = ChangeState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 52

;---------------------------------------------------------------------------
; Throw - Attempt
; CNS difficulty: medium-advanced
; Description: Throws are not difficult to make, although then can be
;     tedious at times. Throw attempt states have a HitDef of a
;     special format. The key parameters in a throw are p1stateno
;     and p2stateno. If the HitDef successfully connects, then
;     the attacker will change to the state number specified by
;     p1stateno, and the opponent will be change to the state
;     number assigned to p2stateno. The special thing about p2stateno
;     is that the opponent will be temporarily brought into the
;     attacker's state file. In this case, no matter who the
;     opponent is, he will be taken to state 820 of this file (kfm.cns)
;     and remain here until the end of the throw (look at his debug
;     information when he is being thrown; the text changes to yellow
;     to mean that he is in another player's state file).
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800


[State 100, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 0,0
; Notes: The '-' symbol in the hitflag field means that it only affects
;   players who are not in a hit state. This prevents the player from combo-ing
;   into the throw. The priority should be set to a low number, such as
;   1 or 2, so that the throw does not take precedence over normal attacks.
;   The type of priority must always be set to "Miss" or "Dodge" for throws,
;   otherwise strange behavior can result.
[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1          ;No spark
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face player
p1stateno = 810       ;On success, player changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in player's cns
;fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
; Throwing the opponent
; Description: In this state, the player throws the opponent by binding him to
;     various offsets based on his current frame of animation. For
;     example, [State 810, Bind 1] binds the opponent to an offset of
;     28 pixels in front of the player. That puts him around where the hand
;     is at. Is is important to keep the opponent bound using a
;     TargetBind controller at all times, until you let him go. This
;     is especially important if your player has a Clsn2 box that
;     allows him to get hit while throwing someone. Each time a player
;     gets hit, all his bound targets will be set to a fall state. If
;     the opponent is not bound, then he might get stuck in his thrown
;     state when his attacker is knocked out of the throw halfway.
; Notes: There is a TargetLifeAdd controller to decrease the opponent's
;     life, and a TargetState controller to change his state to a
;     falling state when KFM lets go of him.
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

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

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

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


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

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

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

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

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

;---------------------------------------------------------------------------
; Opponent Thrown
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by the throw HitDef. The important thing here is to use a
;     ChangeAnim2 controller. The difference between ChangeAnim2 and
;     ChangeAnim is that ChangeAnim2 changes the player's animation to
;     an action in the AIR file of the attacker (in this case, kfm.air),
;     whereas ChangeAnim always changes the player to an action in his
;     own AIR file. Look at Action 820 in kfm.air for some extra
;     comments.
[Statedef 820]
type    = A
movetype= H
physics = N
velset = 0,0

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

;---------------------------------------------------------------------------
; Opponent thrown into the air
; (a custom gethit state)
; Description: This state has the opponent flying through the air and
;     falling down onto the ground. The SelfState controller sets the
;     opponent back using to his own state file when he his the ground.
;     Controllers 821,2 and 821,3 allow the opponent to recover by
;     hitting his recovery command when he is falling.
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

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

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

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground


;---{Super Jump}---
[Statedef 700]
type = A
movetype = I
physics = N
anim = 40
velset = 0,0
ctrl = 0

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

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

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

[State 0, ]
type = explod
trigger1 = time = 1
anim = F61
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

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

[State 0, ]
type = VelSet
trigger1 = animtime = 0
x = ifelse(var(0)=0, const(velocity.jump.neu.x), ifelse(var(0)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)*1.5

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

[Statedef 701]
type    = A
physics = A
ctrl = 1
anim = 41
;velset = 0, -15

[State 0, ]
type = explod
trigger1 = time = 0
anim = F700
postype = p1
pos = 0,0 ;const(size.head.pos.y)-40
vel = 0,1
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, ]
type = VarRandom
trigger1 = time >= 0
v = 50
range = -2, 2

[State 0, ]
type = explod
trigger1 = vel y <= -0.5 && numexplod(701) <= 5 && timemod = 3,1
anim = F701
id = 701
postype = p1
pos = const(size.mid.pos.x),const(size.mid.pos.y)-20
random = 20+const(size.air.back)+const(size.air.front),15
vel = var(50),1
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

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

[State 0, ]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
x = -0.1

[State 0, ]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
x = 0.25

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

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

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

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



;hyper coisas
;----- begin of Hyper Effects Helpers-----
;;;;;###################################################################################

;----------------------------[2002 UM MAX2 BG]----------------------------------
[Statedef 40001]
anim = 9999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

;[State 40001, Tile #1-7]
;type = Explod
;triggerall = !numexplod(15600)
;trigger1 = !time
;anim = 15600
;ID = 15600
;pos = 0,0
;postype = left  ;p2,front,back,left,right
;removetime = 10
;pausemovetime = -1
;supermovetime = -1
;scale = 1.1,1.1
;sprpriority = -20
;ownpal = 1
;ignorehitpause = 1
;bindtime = -1
;persistent = 0

[State 40001, Tile #1-7]
type = Explod
trigger1 = !time
trigger2 = numexplod(15601) = 0
anim = 15600
ID = 15601
pos = 0,0
postype = left  ;p2,front,back,left,right
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1.1,1.1
sprpriority = -9999
ownpal = 1
ignorehitpause = 1
bindtime = -1

[State 40001, Glass Break]
type = ChangeState
;trigger1 = root, stateno != 3300 && root, stateno != 3350
;trigger2 = root, stateno = 3300 && root,animelemtime(61) = 1  || root, stateno = 3350 && root,animelemtime(50) = 1
trigger1 = root, stateno !=[3000,4999]
;trigger2 = root, NumHelper(8400) !=0|| root, NumHelper(8420) !=0
value = stateno+1

[Statedef 40002]
anim = 9999

;[State 40002, RemoveExplod]
;type = RemoveExplod
;trigger1 = !time
;id = 15600

[State 40002, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 15601

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S14001,0
volume = 200

[State 40001, Glass Break]
type = Explod
triggerall = !numexplod(15640)
trigger1 = !time
anim = 15604
ID = 15640
pos = 0,0
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
scale = 1,1
sprpriority = -20
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;--------------------------[2002 UM MAX2 PORTRAIT]------------------------------
[Statedef 40003]
anim = 9999

[State 40001, P1 BG]
type = Explod
triggerall = !numexplod(15650)
triggerall = teamside = 1
trigger1 = !time
anim = 15605
ID = 15650
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P2 BG]
type = Explod
triggerall = !numexplod(15651)
triggerall = teamside = 2
trigger1 = !time
anim = 15606
ID = 15651
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P1 PORTRAIT]
type = Explod
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15607
ID = 15660
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40001, P2 PORTRAIT]
type = Explod
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15607
ID = 15661
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15650
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15650
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15651
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15651
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15660
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15660
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15661
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15661
scale = 1,1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 60

[Statedef 40004]
anim = 9999

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

; Initialize (at the start of the round)
[Statedef 5900]
type = S


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

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

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

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


;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2]
type = VarSet
triggerall = stateno != 1100 && stateno != 1101 ;& stateno != 1002
trigger1 = var(44) < 12
v = 44
value = 12



[State 0, PowerAdd]
type = PowerAdd
trigger1 = timemod = 20,0
value = 2




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

;---------------------------------------------------------------------------
[Statedef -3]
[State -3, Landing Dust]
type = Explod
triggerall =  NumExplod(60) < 1
triggerall = Time = 3
trigger1 = StateNo = 52 ;Jump land
trigger2 = PrevStateNo = 52 && StateNo = 11 ;Jump land/crouch
persistent = 0
ID = 60
anim = 60
postype = p1
pos = 7, 3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = -2
ownpal = 1

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1 && Var(20) != 2
trigger1 = StateNo = 52 ;Jump land
value = 52, 0


[State -2, gethits]         ; custom gethit sounds
type = PlaySnd
triggerall = (stateno = [5000,5210]) && (Time = 0) && (!IsHelper)
trigger1 = anim = 5002  ; standing hard hit high
trigger2 = anim = 5012  ; stand hard hit low
trigger3 = anim = 5022  ; crouching hard hit
trigger4 = anim = 5030  ; air hit
trigger5 = anim = 5070  ; tripped
persistent = 0
value = 5000,2

[State -2, gethits]         ; custom gethit sounds
type = PlaySnd
triggerall = (stateno = [5000,5210]) && (Time = 0) && (!IsHelper)
trigger1 = anim = 5001  ; standing hard hit high
trigger2 = anim = 5011  ; stand hard hit low
trigger3 = anim = 5021  ; crouching hard hit
persistent = 0
value = 5000,1

[State -3, PlaySnd]
type = PlaySnd
trigger1 = (Life <= 0) && (var(50) = 0)
value = 5300,0

[State -3, VarSet]
type = VarSet
trigger1 = Life <= 0
v = 50
value = 1
