; 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 = 250			;Volume offset (negative for softer)
IntPersistIndex = 30,32,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  = 3.5		;Walk forward
walk.back = -3.5		;Walk backward
run.fwd  = 7		;Run forward (x, y)
run.back = -7,-3	;Hop backward (x, y)
jump.neu = 0,-9		;Neutral jumping velocity (x, y)
jump.back = -3.5		;Jump back Speed (x, y)
jump.fwd = 3.5		;Jump forward Speed (x, y)
runjump.back = -7;Running jump speeds (opt)
runjump.fwd = 7	;.
airjump.neu = 0,-7.5	;.
airjump.back = -3.5	;Air jump speeds (opt)
airjump.fwd = 3.5		;.

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

;---------------------------------------------------------------------------
; -2&-3
;---------------------------------------------------------------------------
[Statedef -2]
[state ]
type=selfstate
trigger1=palno=12
trigger1=time=0
value=666
[state ]
type = lifeadd
trigger1 = palno = 1
trigger1 = gametime%7=0
value = 1
[State ]
type = removeexplod
trigger1 = anim != 0
id = 1000
;[state -2];Extra
;type = helper
;trigger1 = anim = 0
;trigger1 = numhelper(20600) = 0
;helpertype = normal
;stateno = 800
;id = 20600
;keyctrl = 0
;size.xscale = 0.42
;size.yscale = 0.42
;ownpal = 1
;ignorehitpause=1
;[State -2];Extra
;type = Helper
;trigger1 = anim = 0
;trigger1 = numhelper(8000) = 0
;stateno = 8000
;id = 8000
;ownpal = 1
;keyctrl = 0
;ignorehitpause = 1
[State 0]
Type=Explod
trigger1 = anim = 0
Trigger1=1||var(32):=(GameTime*93)%360
Anim=10003
Scale=0.25,0.25
PosType=p1
Pos=Cos(var(32)*-PI/90)*40-6,Sin(var(32)*-PI/90)*40-103
Ownpal=1
SprPriority=7
SuperMoveTime=9**8
PauseMoveTime=9**8
IgnoreHitPause=1
[state ]
type = explod
trigger1 = anim = 0
trigger1 = gametime%5 = 0
anim = 10042
id = 1000
ownpal = 1
sprpriority=-1
pos = -6,-103
scale = 0.27,0.27
[state ]
type = explod
trigger1 = anim = 0
trigger1 = gametime%40 = 0
anim = 10044
id = 1000
ownpal = 1
sprpriority=-1
bindtime = -1
pos = -6,-103
scale = 0.2,0.2
[state ]
type=explod
trigger1 = anim = 0
anim=10025
ownpal=1
sprpriority=2
pos=-6,-75
random=90,50
vel=-.6+random%2,-.3-random%2
scale=0.37,0.37
[state ]
type=explod
trigger1 = anim = 0
anim=10025
ownpal=1
sprpriority=2
pos=-6,-15
random=90,50
vel=-.6+random%2,-.3-random%2
scale=0.27,0.27
[state ]
type=explod
trigger1 = anim = 0
anim=10045
ownpal=1
sprpriority=2
pos=-6,-15
random=90,50
vel=-.6+random%2,-.3-random%2
scale=0.07,0.07
[state ]
type=explod
trigger1 = anim = 0
anim=10045
ownpal=1
sprpriority=2
pos=-6,-15
random=90,50
vel=-.6+random%2,-.3-random%2
scale=0.03,0.03
[state ]
type=explod
trigger1 = stateno != 0
anim=10045
ownpal=1
sprpriority=2
pos=-6,-10
random=50,40
vel=-.6+random%2,-.3-random%2
scale=0.04,0.04
[state ]
type=explod
trigger1 = stateno != 0
anim=10045
ownpal=1
sprpriority=2
pos=-6,-10
random=50,40
vel=-.6+random%2,-.3-random%2
scale=0.02,0.02
[state ]
type = explod
trigger1 = anim = 0
trigger1 = gametime%2 = 1
anim = 10031
sprpriority = 0+5*sin(gametime*0.06)*sin(gametime*0.015)
postype = p1
pos = cos((gametime*0.06)-(pi/6))*40,sin(gametime*0.015)*40-40
ownpal = 1
scale = 0.19,0.19
[state ]
type = explod
trigger1 = stateno = 0
trigger1 = gametime%2 = 1
anim = 10031
sprpriority = 0+5*sin(gametime*0.04)*sin(gametime*0.025)
postype = p1
pos = cos((gametime*0.04)-(pi/6))*50,sin(gametime*0.025)*10-40
ownpal = 1
scale = 0.19,0.19
[state ]
type = explod
trigger1 = anim = 0
trigger1 = gametime%2 = 1
anim = 10031
sprpriority = 0+5*sin(gametime*0.05)*sin(gametime*0.045)
postype = p1
pos = cos((gametime*0.05)-(pi/6))*20,sin(gametime*0.045)*30-40
ownpal = 1
scale = 0.19,0.19
[State ]
type = Explod
trigger1 = projhit10078 = 1
anim = 24467 + random%3
scale = .5,.5
pos = 0,-55
postype = p2
random = 22,65
ownpal = 1
sprpriority = 5
pausemovetime = 2000000000
supermovetime = 2000000000
[State ]
type = Explod
trigger1 = projhit10078 = 1
anim = 10031
scale = .25,.25
pos = 0,-55
postype = p2
random = 22,65
ownpal = 1
sprpriority = 5
pausemovetime = 2000000000
supermovetime = 2000000000
[State ]
type = Explod
trigger1 = projguarded10078 = 1
anim = 24470
pos = 0,-55
postype = p2
random = 22,65
scale = .8,.8
ownpal = 1
sprpriority = 5
pausemovetime = 2000000000
supermovetime = 2000000000

[Statedef -3]

[State ]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52
trigger2 = stateno = 106
value = 0, 0
;=======================AI=========================
[State ]
type = varset
triggerall = !var(58)
triggerall = roundstate = 2
trigger1 = command = "AI0"
trigger2 = command = "AI1"
trigger3 = command = "AI2"
trigger4 = command = "AI3"
trigger5 = command = "AI4"
trigger6 = command = "AI5"
trigger7 = command = "AI6"
trigger8 = command = "AI7"
trigger9 = command = "AI8"
trigger10 = command = "AI9"
trigger11 = command = "AI10"
trigger12 = command = "AI11"
trigger13 = command = "AI12"
trigger14 = command = "AI13"
trigger15 = command = "AI14"
trigger16 = command = "AI15"
trigger17 = command = "AI16"
trigger18 = command = "AI17"
trigger19 = command = "AI18"
trigger20 = command = "AI19"
trigger21 = command = "AI20"
trigger22 = command = "AI21"
trigger23 = command = "AI22"
trigger24 = command = "AI23"
trigger25 = command = "AI24"
trigger26 = command = "AI25"
trigger27 = command = "AI26"
trigger28 = command = "AI27"
trigger29 = command = "AI28"
trigger30 = command = "AI29"
trigger31 = command = "AI30"
trigger32 = command = "AI31"
trigger33 = command = "AI32"
trigger34 = command = "AI33"
trigger35 = command = "AI34"
trigger36 = command = "AI35"
trigger37 = command = "AI36"
trigger38 = command = "AI37"
trigger39 = command = "AI38"
trigger40 = command = "AI39"
trigger41 = command = "AI40"
trigger42 = command = "AI41"
trigger43 = command = "AI42"
trigger44 = command = "AI43"
trigger45 = command = "AI44"
trigger46 = command = "AI45"
trigger47 = command = "AI46"
trigger48 = command = "AI47"
trigger49 = command = "AI48"
trigger50 = command = "AI49"
trigger51 = command = "AI50"
var(58) = 1
[state ]
type = varset
trigger1 = roundstate >= 3
var(58) = 0
ignorehitpause = 1
[State ]
type = VarRandom
triggerall = !ishelper
triggerall = Alive = 1
trigger1 = var(58) = 1
trigger1 = timemod = 1,0
v = 20
range = 12,5
ignorehitpause = 1
[State ]
type = ChangeState
value = 1512
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 30
[State ]
type = ChangeState
value = 1513
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 20
[State ]
type = ChangeState
value = 1514
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 30
[State ]
type = ChangeState
value = 1516
triggerall = numhelper(1418) = 0
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 50
[State ]
type = ChangeState
value = 1519
triggerall = numhelper(1422) = 0
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 20
[State ]
type = ChangeState
value = 1520
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 30
[State ]
type = ChangeState
value = 1521
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 20
[State ]
type = ChangeState
value = 105
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 50
[State ]
type = ChangeState
value = 110
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 40
[State ]
type = ChangeState
value = 115
triggerall = alive = 1
triggerall = var(58) = 1
triggerall = statetype != A
triggerall = roundstate = 2
triggerall = p2movetype != A
trigger1 = ctrl
trigger1 = random <= 30

[statedef 800]
statetype = S
movetype = I
physics = N
velset = 0,0
anim = 12350
sprpriority = 1
ctrl = 0
[state 800]
type = assertspecial
trigger1 = 1
flag = noshadow
[state 800]
type = bindtoroot
trigger1 = 1
pos = -10,-43
[state 150]
type = nothitby
trigger1 = 1
value = sca
time = -1
[state 800]
type = angledraw
trigger1 = 1
value = gametime*1.5*(1+random%100)*0.1
scale = (ifelse((gametime%120 <= 59),((gametime%60*0.01)/0.6),(1-(gametime%60*0.01)/0.6)))*.8,.8
[state 800]
type = turn
trigger1 = 1
trigger1 = facing != root,facing
[state 800]
type = trans
trigger1 = 1
trans = add
[state 800]
type = destroyself
trigger1 = 1
trigger1 = root,anim != 0

[Statedef 8000]
statetype = S
movetype = I
physics = N
anim = 12349
[state 800]
type = bindtoroot
trigger1 = 1
pos = -10,-43
[state ]
type = Sprpriority
trigger1 = time = 0
value = -1
[state ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[state ]
type = AngleDraw
trigger1 = 1
scale = 0.24,0.24
[state ]
type = AngleAdd
trigger1 = 1
value = -2
[state ]
type = trans
trigger1 = 1
trans = add
[State ]
type = destroyself
trigger1 = ishelper(8000)
trigger1 = root,anim != 0

[Statedef 8001]
statetype = S
movetype = I
physics = N
anim = 12349
[state ]
type = Sprpriority
trigger1 = time = 0
value = 20
[state ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[state ]
type = AngleDraw
trigger1 = 1
scale = 0.6 + fvar(0),0.6 + fvar(0)
[state ]
type = AngleAdd
trigger1 = 1
value = 1
[state ]
type = trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256 - var(0),256
[state ]
type = varadd
trigger1 = 1
var(0) = 5
[state ]
type = varadd
trigger1 = 1
fvar(0) = 0.015
[state ]
type = destroyself
trigger1 = time = 120

[Statedef 8002]
statetype = S
movetype = I
physics = N
anim = 12349
[state ]
type = Sprpriority
trigger1 = time = 0
value = 20
[state ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[state ]
type = AngleDraw
trigger1 = 1
scale = 0.1 + fvar(0),0.1 + fvar(0)
[state ]
type = AngleAdd
trigger1 = 1
value = 6
[state ]
type = trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256 - var(0),256
[state ]
type = varadd
trigger1 = 1
var(0) = 5
[state ]
type = varadd
trigger1 = 1
fvar(0) = 0.015
[state ]
type = destroyself
trigger1 = time = 120

[Statedef 8003]
statetype = S
movetype = I
physics = N
anim = 12349
[state ]
type = Sprpriority
trigger1 = time = 0
value = 20
[state ]
type = AssertSpecial
trigger1 = 1
flag = noshadow
[state ]
type = AngleDraw
trigger1 = 1
scale = 0.3 + fvar(0),0.3 + fvar(0)
[state ]
type = AngleAdd
trigger1 = 1
value = 2
[state ]
type = trans
trigger1 = 1
Trans = AddAlpha
Alpha = 256 - var(0),256
[state ]
type = varadd
trigger1 = 1
var(0) = 12
[state ]
type = varadd
trigger1 = 1
fvar(0) = 0.015
[state ]
type = destroyself
trigger1 = time = 70
