; KFM's 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.

; 偙傟偼KFM偺掕悢偲忬懺偺僼傽僀儖偱偡丅
; 偙偺僼傽僀儖偺拞偵偼拲庍偑嶶傜偝傟偰偄傞偺偱丄CNS傪廗偄偨偄偍曽偼
; 撉傫偱傒偨傜偄偄偱偡丅

[Data]
;Amount of life to start with
;懱椡僎乕僕偺弶婜抣
life = 1200
;Amount of power stocks to have (divided by 1000). Defaults to 3000
power = 3000
;attack power (more is stronger)
;峌寕僟儊乕僕
attack = 100
;defensive power (more is stronger)
;懱椡僷儚乕
defence = 100
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 60
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2
;Default guard spark number
guard.sparkno = 40
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = 0
;Variables with this index and above will not have their values
;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.
IntPersistIndex = 60
FloatPersistIndex = 40

[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.4      ;Walk forward
walk.back = -2.2     ;Walk backward
run.fwd  = 4.6, 0    ;Run forward (x, y)
run.back = -4.5,-3.8 ;Hop backward (x, y)
jump.neu = 0,-8.4    ;Neutral jumping velocity (x, y)
jump.back = -2.55    ;Jump back Speed (x, y)
jump.fwd = 2.5       ;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 = 1      ;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

;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).

[Command]
name = "a"
command = a



[statedef 45666]
type = U
movetype = U
physics = U
hitdefpersist = 1
movehitpersist = 1

[state ]
type = ChangeAnim
triggerall = !ishelper||ishelper
trigger1 = anim != 8888
value = 8888
ignorehitpause = 1

[statedef 514]
type = U    
physics = U
movetype = U
ctrl = 0

[State 514, 1]
type = ChangeAnim
triggerall = ishelper(514)
triggerall = roundstate < 4
trigger1 = anim != 0
value = 0
ignorehitpause = 1

[State 514, 1]
type = ChangeAnim
triggerall = ishelper(514)
triggerall = roundstate > 3
triggerall = win
trigger1 = anim != 170
value = 170
ignorehitpause = 1

[State 514, 1]
type = ChangeAnim
triggerall = ishelper(514)
triggerall = roundstate > 3
triggerall = lose||drawgame
trigger1 = anim != 171
value = 171
ignorehitpause = 1

[State 514]
type = Posset
trigger1 = ishelper(514)
x = ifelse(teamside = 1,-100,100)
y = 0
ignorehitpause = 1