; 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 = 1000
power = 4000		;Amount of maximum power
;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  = 5.4      ;Walk forward
walk.back = -5.4     ;Walk backward
run.fwd  = 10.6, 0    ;Run forward (x, y)
run.back = -10.6, 0 ;Hop backward (x, y)
jump.neu = 0,-8.4    ;Neutral jumping velocity (x, y)
jump.back = -5.55    ;Jump back Speed (x, y)
jump.fwd = 5.5       ;Jump forward Speed (x, y)
runjump.back = -8.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 8,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -5.55      ;Air jump speeds (opt)
airjump.fwd = 5.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).


;---------------------------------------------------------------------------
; Lose by Time Over
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

;---------------------------------------------------------------------------
; Win state decider
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181

;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

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

[State 191, 2]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[state 191, 2]
type = playsnd
trigger1 = time = 60
value = 4,15
volume = 225

[state 191, 2]
type = explod
trigger1 = animelem = 7
anim = 191
removetime = -2
postype = left
pos = -43, -3
ontop = 1

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

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

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

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

;---------------------------------------------------------------------
;Combo #1 (A)

[Statedef 205]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
;Commonly-used controllers:
velset = 0,0                     
ctrl = 0                         
anim = 205                       
poweradd = 40                    
sprpriority = 2                  

[State 205, 1]
type = VelSet
trigger1 = AnimElem = 1
x = 5

[State 205, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 205, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage = 10, 0                   
animtype = Light                
guardflag = MA                   
hitflag = MAF                    
priority = 0, Hit                
pausetime = 8, 10                 
sparkno = S10000                      
sparkxy = -5, -25               
hitsound   = S1,1                 
guardsound = 6, 0                
ground.type = High               
ground.slidetime = 5             
ground.hittime  = 20             
ground.velocity = -4             
airguard.velocity = -1.9,-.8     
air.type = High                  
air.velocity = -1.4,-3           
air.hittime = 12                  

[State 205, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5, 8
volume = 225

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

[State 205,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

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


;part # 2

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 210
sprpriority = 2

[State 210, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 210, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 210, 1]
type = VelSet
trigger1 = AnimElem = 2
x = 8

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5, 9
volume = 225

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

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 20
guardflag = MA
pausetime = 12,15
sparkno = S10000
sparkxy = -5,-25
hitsound   = S1,1
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  =  20
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 210, 3]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 210
elem = 6

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

;part # 3

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 220
sprpriority = 2

[State 220,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 7777, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 220, 1]
type = VelSet
trigger1 = AnimElem = 2
x = 10

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 4
volume = 225

[State 220, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 100, 3

[State 220, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 40
guardflag = MA
pausetime = 12,12
sparkno = S10000
sparkxy = -5,-20
hitsound   = S1,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -10,-2
air.velocity = -2.5,-3.5
fall = 1

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

;-------------------------------------------------------------------
; Kawarimi
[Statedef 777]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= -100
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 2

[State 777, 1]
type = Helper
trigger1 = time = 0
helpertype = normal
stateno = 506
ownpal = 1

[State 777, playsnd]
type = playsnd
value = 0,58
trigger1 = time = 0
Voulume = 225

[State 777, 2]
type = PosAdd
trigger1 = time = 0
x = (P2BodyDist X + 90)

[State 777, 3]
type = Turn
trigger1 = time = 0

[State 777, 4]
type = ChangeState
trigger1 = Time = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Kawarimi (smoke)
[Statedef 506]
type = S
movetype = I
physics = N
juggle = 0
poweradd = 0
ctrl = 0
velset = 0,0
anim = 777
sprpriority = 1

[State 1000, 1]
type = DestroySelf
trigger1 = animtime = 0

;----------------------------------------------------------------------
; Kawarimi (distanced)
[Statedef 507]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= -200
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 2

[State 507, 1]
type = Helper
trigger1 = time = 0
helpertype = normal
stateno = 508
ownpal = 1

[State 507, playsnd]
type = playsnd
value = 0,58
trigger1 = time = 0
voulume = 225

[State 507, 2]
type = PosAdd
trigger1 = time = 0
x = (P2BodyDist X + 300)

[State 507, 4]
type = ChangeState
trigger1 = Time = 0
value = 0
ctrl = 1

;-------------------------------------
;Combo #2 (A)

[Statedef 270]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                      
;Commonly-used controllers:
velset = 0,0                     
ctrl = 0                         
anim = 270                       
poweradd = 40                    
sprpriority = 2                  

[State 270, 1]
type = VelSet
trigger1 = AnimElem = 1
x = 5

[State 270, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 270, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA                     
damage = 10, 0                   
animtype = Light                
guardflag = MA                   
hitflag = MAF                    
priority = 0, Hit                
pausetime = 8, 10                 
sparkno = S10000                      
sparkxy = -5, -25               
hitsound   = S1,1                 
guardsound = 6, 0                
ground.type = High               
ground.slidetime = 5             
ground.hittime  = 20             
ground.velocity = -4             
airguard.velocity = -1.9,-.8     
air.type = High                  
air.velocity = -1.4,-3           
air.hittime = 12                 

[State 270, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5, 8
volume = 225

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

[State 270,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

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


;part # 2

[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 250
sprpriority = 2

[State 250,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 250, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 250, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 250, 1]
type = VelSet
trigger1 = AnimElem = 2
x = 8

[State 250, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 5, 9
volume = 225

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

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    = 30
guardflag = MA
pausetime = 12,15
sparkno = 1
sparkxy = -5,-20
hitsound   = S5,17
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  =  20
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 250, 3]
type = ChangeAnim
trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0
trigger1 = movecontact
ignorehitpause = 1
persistent = 0
value = 250
elem = 6

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

;---------------------------------------------------------------------------
; Kawarimi(distanced) (afterimage)
[Statedef 508]
type = S
movetype = I
physics = N
juggle = 0
poweradd = 0
ctrl = 0
velset = 0,0
anim = 777
sprpriority = 1

[State 507, 1]
type = DestroySelf
trigger1 = animtime = 0

;------------------------------------------------------
;Kawarimi
[State -1, Kawarimi]
type = ChangeState
value = 777
triggerall = command = "b"
triggerall = power >= 100
trigger1 = movetype = H && (statetype = S)

;Kawarimi distanced
[State -1, Kawarimi2]
type = ChangeState
value = 507
triggerall = command = "c"
triggerall = power >= 200
trigger1 = movetype = H && (statetype = S) 



;-----------------------------
;Summoning
[Statedef 870]
type = S
movetype = A
physics = S
velset = 0,0
juggle = 1
anim = 870
poweradd = -1000
ctrl = 0
sprpriority = 2
poweradd = 0

[state 870, 1]
type = explod
trigger1 = time = 60
id = 870
anim = 850
postype = p1
pos = 30, 0
ontop = 1
bindtime = -10
removetime = -10

[State 870, 4]
type = PlaySnd
trigger1 = Time = 55
value = 0, 567
volume = 225

[state 870, 1]
type = helper
trigger1 = time = 60
helpertype = Normal
postype = p1
pos = 30,0
ctrl = 2
stateno = 880
supermovetime = 33
ownpal = 0

[state 870, 1]
type = helper
trigger1 = time = 60
helpertype = Normal
postype = p1
pos = 30,0
ctrl = 2
stateno = 881
supermovetime = 33
ownpal = 0

[State 870, 3]
type = ChangeState
trigger1 = time = 110
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Dog Attack 
[Statedef 880]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 880
sprpriority = 2

[State 880,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 880, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 880, Width]
type = Width
trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)
value = 15,0

[State 880, vel]
type = velset
trigger1 = animelem = 2
x = 20

[State 880, hit]
type = hitdef
trigger1 = animelem = 2
attr = S, NA
poweradd = 10
animtype  = hard
guardflag = 1
damage    = 100,5
pausetime = 0,0
sparkno = 1
sparkxy = -5,-20
hitsound   = S5,15
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 100
ground.velocity = -3,0
air.velocity = -3,0

[state 880, 0]
type = explod
trigger1 = time = 80
id = 880
anim = 850
postype = p1
pos = 0, 0
ontop = 1
bindtime = -10
removetime = -10

[State 880, end]
type = PlaySnd
trigger1 = Time = 70
value = 0, 567
volume = 225

[state 880, 0]
type = destroyself
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Dog Attack 2 
[Statedef 881]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 40
ctrl = 0
velset = 0,0
anim = 881
sprpriority = 4

[State 881, 4]
type = afterimage
trigger1 = animelem = 1
time = 18
length = 15
palbright = 0,0,0
palcontrast = 150,150,150
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1
trans = add1

[State 881, vel]
type = velset
trigger1 = animelem = 1
x = 30

[State 881, hit]
type = hitdef
trigger1 = animelem = 1
attr = S, NA
poweradd = 10
animtype  = hard
guardflag = 1
damage    = 50,5
pausetime = 0,0
sparkno = 1
sparkxy = -5,-20
hitsound   = S5,15
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 100
ground.velocity = -3,0
air.velocity = -3,0

[state 881, 0]
type = explod
trigger1 = time = 80
id = 881
anim = 850
postype = p1
pos = 0, 0
ontop = 1
bindtime = -10
removetime = -10

[State 881, end]
type = PlaySnd
trigger1 = Time = 70
value = 0, 567
volume = 225

[state 881, 0]
type = destroyself
trigger1 = animtime = 0

;--------------------------------------------------------------------
;Shuriken Throw (The Pose)
[Statedef 1111]
type    = S
movetype= A
physics = S
juggle  = 15
poweradd= 10
velset = 0,0
anim = 910
ctrl = 0
sprpriority = 2

[State 1111, 0]
type = PlaySnd
value = 0,3
trigger1 = time = 5

[State 1111, 1]
type = AfterImage
trigger1 = AnimElem = 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 1111, 2]
type = Helper
trigger1 = time = 8
helpertype = normal
pos = 12,-0
postype = p1
stateno = 11000
ownpal = 1

[State 1111, playsnd]
type = playsnd
value = 5000,0
trigger1 = time = 8

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

;------------------------------------------------------
;Shuriken Throw (The Shuriken)
[Statedef 11000]
type    = S
movetype= A
physics = N
juggle = 15
airjuggle = 15
poweradd= 0
velset = 9,0
anim = 900
ctrl = 0
sprpriority = 0

[State 11000, 2]
type = hitdef
trigger1 = time = 0
attr = S, SP
hitflag = MA
getpower = 0
givepower = 0
animtype  = hard
damage  = 10,5
guardflag = MA
pausetime = 0,10
sparkno = S10000
sparkxy = -10,-15
hitsound   = S0,3
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 9
ground.velocity = -2,0
air.velocity = -4,-2
air.fall = 1

[State 11000, 3]
type = AfterImage
trigger1 = AnimElem = 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 11000, 4]
type = destroyself
trigger1 = time = 50


;--------------------------------------------------------------------------------
;Shuriken Throw double (The Pose)
[Statedef 6999]
type    = S
movetype= A
physics = S
juggle  = 15
poweradd= 10
velset = 0,0
anim = 910
ctrl = 0
sprpriority = 2

[State 6999, 0]
type = PlaySnd
value = 0,3
trigger1 = time = 5

[State 6999, 1]
type = AfterImage
trigger1 = AnimElem = 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 6999, playsnd]
type = playsnd
value = 5000,0
trigger1 = time = 8

[State 6999, 2]
type = Helper
trigger1 = time = 11
helpertype = normal
pos = 12,3
postype = p1
stateno = 7000
ownpal = 1

[State 6999, 2]
type = Helper
trigger1 = time = 14
helpertype = normal
pos = 12,-12
postype = p1
stateno = 7000
ownpal = 1

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

;------------------------------------------------------
;Shuriken Throw double (The Shuriken's)
[Statedef 7000]
type    = S
movetype= A
physics = N
juggle = 15
airjuggle = 15
poweradd= 0
velset = 9,0
anim = 900
ctrl = 0
sprpriority = 0

[State 7000, 2]
type = hitdef
trigger1 = time = 0
attr = S, SP
hitflag = MA
getpower = 0
givepower = 0
animtype  = hard
damage  = 10,5
guardflag = MA
pausetime = 0,10
sparkno = S10000
sparkxy = -10,-15
hitsound   = S0,3
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 9
ground.velocity = -2,0
air.velocity = -4,-2
air.fall = 1

[State 7000, 3]
type = AfterImage
trigger1 = AnimElem = 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 7000, 4]
type = destroyself
trigger1 = time = 50

;--------------------------------
;Launch Kick
[Statedef 240]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 240
sprpriority = 2

[State 240,***]
type = AssertSpecial
trigger1 =1
flag = noautoturn

[State 240, 4];←成功したときの残像
type = AfterImage
trigger1 =AnimElem = 1
time = 10
trans = add1
timegap = 1
framegap = 2
length = 8
palbright = 12,12,12
palcontrast = 225,225,225
palpostbright = 0,0,0
paladd = 0,0,0
palmul = 1,1,1

[State 240, 1]
type = VelSet
trigger1 = AnimElem = 1
x = 13

[State 240, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = up
damage    = 25
hitflag = MAFD
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -5,-20
hitsound   = S5,17
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 20
ground.velocity = -1.7,-8
guard.velocity = -6
air.velocity = -1.7,-8
airguard.velocity = -3,-4.5
p2facing = 1
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
;Sword (Stunner)
[Statedef 260]
type = S
movetype = A
physics = S
anim = 260
velset = 0,0
ctrl = 0
sprpriority = 1

[State 260, vel]
type = velset
trigger1 = animelem = 5
x = 3

[State 260, hit]
type = hitdef
trigger1 = animelem = 2
attr = S, NA
poweradd = 10
animtype  = light
guardflag = MA
damage    = 5,5
pausetime = 0,0
sparkno = 1
sparkxy = -5,-20
hitsound   = S5,17
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 100
ground.velocity = -3,0
air.velocity = -3,0

[state 260, end]
type = Changestate
trigger1 = AnimTime = 0
value = 250
ctrl = 1


;----------------------
;Sharingan



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

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



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

[Statedef -3]

;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0
