; 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
;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 = s7010
;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 = 0.43          ;Horizontal scaling factor.
yscale = 0.43           ;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,-13    ;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,-9.4     ;.
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 = .72        ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

[Quotes]
victory1 = "I'm the best of the group, and nothing you can do will change that!"
victory2 = "For fuck's sake. Do you even have an off switch? Don't you ever know when to stop?"
victory3 = "It's either me or you. We can't exist together. Guess who gets to be the winner?"
victory4 = "Were you under the impression that any of that would work on me? I'm not an idiot..."
victory5 = "You...captain save a ho lookin ass..."
victory6 = "......win."
victory7 = "With this, I renounce my royalty of the past!"
victory8 = ".....what a jackass!"
victory9 = "I'd prefer to have stand-offs with people that actually have some sense of skill....but whatever."
victory10 = "Best wishes, simpleton!"
victory11 = "...you have the look of a....oh, how would you say....a protodork."
victory12 = "This wasn't exactly personal...I just saw what I thought was scum and decided it needed to be taken out. That's all."
victory13 = "Suddenly, I could go for Wendy's. Would you recommend the Baconater?"
victory14 = "Assbutt."
victory15 = "I embrace that which negates logic."
victory16 = "You barked pretty loud, but you whine even louder!"
victory17 = "Don't hold me responsible for any trauma you got from this experience... you did this to yourself!"
victory18 = "I'm manly, and I'm angry. And I'm constantly in pain."
victory19 = "Stop being a scared little idiot! You can't even take a hit!"
victory20 = "Don't you fucking get up after that, I'll rip your head off!"
victory21 = "You're fucking DEAD! Your mother, dead! Your dog, dead! Your fucking shoes, DEAD!"
victory22 = "Game over."
victory23 = "As of typing this, tons of people in Pennslyvania have no electricity, because storms are horrible bastards that ruin everything."
victory24 = "AH-AH-AH! Stay put. I'm gonna put you in a crate and kick you off a pier."
victory25 = "He ruined and repaired me...the rest you know."
victory26 = "Lunch successfully eaten!"

;---------------------------------------------------------------------------
; 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).
;----------------------------------------------------------
; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
value = 78, (random%5)
volume = 255

[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 = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

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

;---------------------------------------------------------
; Run forward
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State any ol way that i fall]
type = PlaySnd
trigger1 = Time = 1
value = 0, 4
channel = 1
volume = 255

[State random vhs noise]
type = PlaySnd
trigger1 = Time = 1
value = 6666, (random%10)
volume = 255

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 1
anim = 101
ID = 4074
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -1
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 1
;ignorehitpause = 
;persistent = 

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[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"
value = 0

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

[State far less depressing]
type = PlaySnd
trigger1 = AnimElem = 3
value = 666, 4

[State far less depressing]
type = PlaySnd
trigger1 = AnimElem = 7
value = 1, 16


[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+random%6

;---------------------------------------------------------------------------
; Win pose 1 - The Classic
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State far less depressing]
type = PlaySnd
trigger1 = AnimElem = 11
value = 666, 0

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

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 199
flag = RoundNotOver

;----------------
; Win pose 2 - pose of two quotes
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 667, (random%5)
volume = 255

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 150
flag = RoundNotOver

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

;-------------------
; Win pose 3 - fuck the fourth wall man
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 3
value = 668, 0
volume = 255

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 170
flag = RoundNotOver

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

; Win pose 4 - reggie jumps into a gameboy
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 2000, 1]
type = explod
trigger1 = time = 0
anim = 1844
scale = .60, .60
pos = 150, 120
postype = left
sprpriority = 6666666666
bindtime = -1

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

[State 181]
type = AssertSpecial
trigger1 = 1
flag = NoMusic

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 0, 20
volume = 255

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 240
flag = RoundNotOver

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

;Win pose 5 - Ultimate Reggie Kombat 3
[Statedef 185]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 181]
type = AssertSpecial
trigger1 = 1
flag = NoMusic

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 0
value = 672, 0
volume = 255

[State 2000, 1]
type = explod
trigger1 = time = 0
anim = 1855
pos = 150, 70
postype = left
sprpriority = 6666666666
bindtime = -1

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 390
flag = RoundNotOver

;Win pose 6 - laughter
[Statedef 186]
type = S
ctrl = 0
anim = 186
velset = 0,0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
trigger3 = AnimElem = 6
value = 666, 12
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 666, 11
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 666, 13
volume = 255

[State 1220, Shake Screen]
type = EnvShake
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
trigger3 = AnimElem = 6
trigger4 = AnimElem = 7
time = 10
ampl = 5
freq = 170

[State 181, 0]
type = AssertSpecial
trigger1 = Time < 350
flag = RoundNotOver



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

[State 190, 1]
type = ChangeState
trigger1 = Time = 0
value = 1900+random%6

;----------------
;Intro 1 - basic
[Statedef 1900]
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 181, Sound]
type = PlaySnd
trigger1 = Time = 2
value = 140, (random%13)
channel = 0
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 17

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 15

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 78, (random%5)
volume = 255

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 1
anim = 1900
ID = 1900
pos = 40,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

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

;Intro 2 - WHAT?!
[Statedef 1901]
type = S
ctrl = 0
anim = 1912
velset = 0,0

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

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 101, 10
volume = 255
channel = 0

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

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

;Intro 3 - ee, no
[Statedef 1902]
type = S
ctrl = 0
anim = 191
velset = 0,0

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

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 54
value = 666, 9
volume = 255
channel = 0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 101, 6
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 144
value = 0, 19
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 9023, 1
volume = 255
channel = 0

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 140
value = 0, 6
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 155
value = 0, 5
volume = 255

[State 0, Explod, i-no]
type = Explod
trigger1 = Time = 1
anim = 1911
ID = 1911
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 140
anim = 251
ID = 251
pos = -10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

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

;Intro 4 - ikeru mono mina shitsu bishu (SP?)
[Statedef 1903]
type = S
ctrl = 0
anim = 1914
velset = 0,0

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

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 16
value = 671,0+random%3
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 126
value = 0, 5
volume = 255

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 1
anim = 1913
ID = 1913
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

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

;Intro 5 - fartastic
[Statedef 1904]
type = S
ctrl = 0
anim = 1914
velset = 0,0

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

[State 181]
type = PlaySnd
trigger1 = Time = 16
value = 673, (random%2)
channel = 0
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 144
value = 0, 21

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 140
value = 0, 6
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 155
value = 0, 5
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 140
value = 674, (random%2)
volume = 255

[State 0, Explod, i-no]
type = Explod
trigger1 = Time = 1
anim = 1915
ID = 1915
scale = 0.50, 0.50
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 140
anim = 251
ID = 251
pos = -10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

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

;Intro 6 - ravi
[Statedef 1905]
type = S
ctrl = 0
anim = 1914
velset = 0,0

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

[State 181]
type = PlaySnd
trigger1 = Time = 2
value = 675, (random%3)
channel = 0
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 144
value = 0, 21

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 140
value = 0, 6
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 155
value = 0, 5
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = Time = 140
value = 676, 0
volume = 255

[State 0, Explod, ravi]
type = Explod
trigger1 = Time = 1
anim = 1916
ID = 1916
scale = 0.40, 0.40
pos = -50,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 140
anim = 251
ID = 251
pos = -10,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
scale = 0.45, 0.45
removetime = -2
sprpriority = 0
ontop = 0
ownpal = 1
;ignorehitpause = 
;persistent = 

[State 191, StopSnd]
type = StopSnd
trigger1 = command = "a" || command = "b" || command = "c" || command = "x" || command = "y" || command = "z" 
channel = 0
persistent = 0

[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 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 11
value = 70, (random%5)
channel = 0
volume = 255

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

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

;----------------------------------------------------------------------------
;Dodge
[Statedef 196]
type = S
movetype = I
physics = N
anim = 300
ctrl = 0
velset = 0,0
sprpriority = -1

[State 0, hitby]
type = hitby
Trigger1 = 1
value = SCA,AT

[State 1020, Afterimage]
type = AfterImage
trigger1 = Time = 0
time = 45
length = 8
;PalBright   =  30, 30,  0
;PalContrast =  70, 70, 20
PalAdd      = 236,0,0
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 2

[State 0, push]
type = playerpush
trigger1 = 1
value = 0

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

[State 0, vel]
type = velset
trigger1 = animelem = 4
x = 4

[State 0, vel]
type = velset
trigger1 = animelem = 5
x = 1.2

[State 0, vel]
type = velset
trigger1 = animelem = 6
x = 0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 4
value = 0, 3

[State 200, 1]
type = PlaySnd
trigger1 = Time = 3
value = 70, 1

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

;---------------------------------------------------------------------------
; Stand 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                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
poweradd = 20                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = s7000
guard.sparkno = s7010                      ;Spark anim no (Def: set above)
sparkxy = -10, -76               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = s1, 14                  ;Sound to play on hit
guardsound = s1, 2                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = -4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -1.4,-3           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air

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

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


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

;---------------------------------------------------------------------------
; Standing strong punch
; CNS difficulty: easy
; Note the width controller. It makes KFM's push box larger, so he doesn't
; stand so close to the opponent. Hit Ctrl-C and look at the red bar at his
; feet.
; The sprpriority for this state is at -1, instead of the usual 2 for
; attacks. This makes KFM appear behind the opponent initially.
; The SprPriority controller in [State 210, 4] brings KFM to the front when
; his arm has swung over.
; To stop KFM from pausing in his swing frame, there is a ChangeAnim in
; [State 210, 3] that detects if the hit has come in contact with the
; opponent during that frame, and switches to the next animation element
; (notice the elem=6 parameter). If you don't see what I mean, try commenting
; out that controller, then hit someone with this attack.
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

[State 210, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-70
hitsound   = s1,3
guardsound = s1,2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

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

; Standing heavy attack
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 250
sprpriority = -1

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

[State 210, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 70
guardflag = MA
pausetime = 15,15
sparkno = s7002
sparkxy = -10,-70
hitsound   = s1,5
guard.sparkno = s7010
guardsound = s1,2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4
fall = 1

[State 210, 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  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

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

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

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
pausetime = 12,12
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-37
hitsound   = s1,3
guardsound = s1,2
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -5
air.velocity = -2.5,-3.5

[State 0, vel]
type = velset
trigger1 = animelem = 14
x = 0


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

;---------------------------------------------------------------------------
; Standing strong kick
; CNS difficulty: easy
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 63
guardflag = MA
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-60
hitsound   = s1,5
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.velocity = -2.2,-3.2

[State 240, 4]
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
;     KFM will get hit instead of trading hits with his 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  = 5
poweradd= 15
ctrl = 0
anim = 400
sprpriority = 2

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

[State 400, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 23
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = L
pausetime = 10,11
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-42
hitsound   = s1,14
guardsound = s1,2
ground.type = Low
ground.slidetime = 4
ground.hittime  = 10
ground.velocity = -4
air.velocity = -1.5,-3

[State 400, 3]
type = CtrlSet
trigger1 = Time = 5
value = 1

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

;---------------------------------------------------------------------------
;Crouching strong punch
; CNS difficulty: easy
; Description: This is a 2-hit move. It is done by having two HitDefs
;     triggered, one for each frame of animation that hits.
;     Notice how the first hit cannot be guarded by an opponent in the
;     air, because of the "M" in the guardflag, meaning it can only
;     be guarded "middle". The second hit has an "MA" guardflag, so
;     it can be guarded both on the ground and in the air.
; CNS レベル: 易
; 詳細: これは殴打が二発・る攻撃です。
; 殴打できるアニメーションの枚は一々HitDefを登録しています。
; 一発目の攻撃のHitDefにはguardflagが「M」（middle＝中段ガード）
; にセットされているので、相手は空中でガードできません。二発目
; の攻撃のguardflagは「MA」（middle+air＝中段＋空中ガード）で、
; 地上、空中でもガードすることができます。
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 30
ctrl = 0
anim = 410
sprpriority = 2

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 9

;This is the first hit, triggered on the 3rd element of animation.
[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 37
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-55
hitsound   = s1,13
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -3,-4

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

;---------------------------------------------------------------------------
;Crouching heavy attack
; CNS difficulty: easy
; Description: This is a 2-hit move. It is done by having two HitDefs
;     triggered, one for each frame of animation that hits.
;     Notice how the first hit cannot be guarded by an opponent in the
;     air, because of the "M" in the guardflag, meaning it can only
;     be guarded "middle". The second hit has an "MA" guardflag, so
;     it can be guarded both on the ground and in the air.
; CNS レベル: 易
; 詳細: これは殴打が二発・る攻撃です。
; 殴打できるアニメーションの枚は一々HitDefを登録しています。
; 一発目の攻撃のHitDefにはguardflagが「M」（middle＝中段ガード）
; にセットされているので、相手は空中でガードできません。二発目
; の攻撃のguardflagは「MA」（middle+air＝中段＋空中ガード）で、
; 地上、空中でもガードすることができます。
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 50
ctrl = 0
anim = 441
sprpriority = 2

[State 3056, PalFXWiz]
type = PalFX
trigger1 = AnimElem = 2
trigger2 = AnimElem = 4
time = 4
add = 0,50,240
mul = 120,224,150
sinadd = 85,55,110,10
invertall = 0
color = 0

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
value = 1, 10

[State 410, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 9

;This is the first hit, triggered on the 3rd element of animation.
[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 70
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = s7002
guard.sparkno = s7010
sparkxy = -10,-55
hitsound   = s0,19
guardsound = s1,2
ground.type = Trip
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4
air.velocity = -3,-4
palfx.time = 50
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
palfx.invertall = 1
palfx.color = 0

[State 410, 4]
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
sprpriority = 2

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

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-8
hitsound   = s1,3
guardsound = s1,2
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

[State 430, 3]
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.
; CNS レベル: 易
; 詳細:
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 30
ctrl = 0
anim = 440
sprpriority = 2

[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 14

[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 72
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -5,-10
hitsound   = s1,5
guardsound = s1,2
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -1.5,-2
air.velocity = -1.2,-3
guard.velocity = -5
fall = 1

[State 440, 4]
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= 11
ctrl = 0
anim = 600
sprpriority = 2

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

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-58
hitsound   = 5,0
guardsound = s1,2
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -4
air.velocity = -1.3,-3

[State 600, 3]
type = CtrlSet
trigger1 = Time = 17
value = 1

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

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 72
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-55
hitsound   = s1,3
guardsound = s1,2
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
;Jump Strong Attack
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 641
sprpriority = 2

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 88
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-55
hitsound   = s1,5
guardsound = s1,2
animtype = Med
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5
air.velocity = -3,-4
fall = 1


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

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

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 26
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = s7000
guard.sparkno = s7010
sparkxy = -5,-35
hitsound   = s1,3
guardsound = s1,2
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -2,-3

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

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

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-40
hitsound   = s1,5
guardsound = s1,2
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -3,-4

;---------------------------------------------------------------------------
; Grab Attempt
[Statedef 280]
type    = S                      
movetype= A
physics = S
ctrl = 0
anim = 810                                                      

[State 280, 1]
type = PlaySnd
trigger1 = Time = 1
value = s101,13
channel = 0

[State 280, 1]
type = PlaySnd
trigger1 = Animelem = 2
value = s0,1

[State 280, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NT                     
damage = 12,0                  
animtype = Light                 
guardflag =                   
hitflag = MF                   
priority = 1              
pausetime = 0,0                 
sparkno = s7000
sparkxy = -30,-90
hitsound   = s1,2
guardsound = -1
guard.sparkno = -1       
ground.type = High               
ground.slidetime = 16       
ground.hittime  = 16          
ground.velocity = -5             
airguard.velocity = -1.9,-.8     
air.type = High                 
air.velocity = -1.4,-3           
air.hittime = 16    
p1stateno = 281
p2stateno = 282

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

;---------------------------------------------------------------------------
;Grab Success
[Statedef 281]
type    = S                      
movetype= I                   
physics = S  
sprpriority = 3                                                   
ctrl = 0                        
anim = 820

[State 281, SprPriority]
type = SprPriority
trigger1 = Animelem = 11
value = -1

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 1
time = 2
pos = 25,0

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 2
time = 3
pos = 27,0

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 3
time = 3
pos = 29,0

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 4
time = 2
pos = 30,0

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 5
trigger2 = Animelem = 6
time = 3
pos = 31,0

[State 281, TargetBind]
type = TargetBind
trigger1 = Animelem = 7
time = 3
pos = 29,0

[State 281, TargetVelAdd]
type = TargetVelAdd
trigger1 = Animelem = 3
x = -4

[State 281, TargetVelSet]
type = TargetVelSet
trigger1 = Animelem = 7
x = -4
y = -5

[State 281, TargetDrop]
type = TargetDrop
trigger1 = Animelem = 7

[State 281, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 5
value = S0,9

[State 281, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 7
value = S1,5

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

[State 281, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 1
value = 11111, 2

[State 281, Explod]
type = Explod
trigger1 = Animelem = 7
anim = 7001
ID = 281
pos = 45,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = 5
ontop = 1
ownpal = 1

[State 281, EnvShake]
type = EnvShake
trigger1 = Animelem = 7
time = 4
freq = 60
ampl = -4

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

;---------------------------------------------------------------------------
; Grab P2 State
[Statedef 282]
type    = S
movetype= H
physics = N
SprPriority = 3

[State 282, ScreenBound]
type = ScreenBound
trigger1 = Time < 21
value = 0
movecamera = 0,0

[State 282, ScreenBound]
type = ScreenBound
trigger1 = Time >= 21
value = 1
movecamera = 1,0

[State 282, ChangeAnim]
type = ChangeAnim2
trigger1 = !time
value = 825

[State 282, LifeAdd]
type = LifeAdd
trigger1 = Animelem = 7
value = -156

[State 282, Gravity]
type = Gravity
trigger1 = Time > 21

[State 282, SelfState]
type = SelfState
triggerall = Time > 29
trigger1 = Pos Y > 0 && Vel Y > 0
value = 5100

;---------------------------------------------------------------------------
; Pavement Saw (weak)
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 8

[State the strongest man and cry]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5, 2
channel = 0

[State ski resort]
type = PlaySnd
trigger1 = AnimElem = 4
trigger4 = AnimElem = 8
value = 0, 2

[State ski resort]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 8

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
x = 14

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 5
x = 4

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 6
trigger2 = AnimElem = 7
trigger3 = AnimElem = 8
x = .5

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Hard
damage    = 45, 4
priority  = 5
guardflag = MA
pausetime = 8,8
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-60
hitsound   = s1,25
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1000, Explod]
type = Explod
trigger1 = Time = 1
anim = 7011
ID = 1000
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = -1
ontop = 0
ownpal = 1
scale = .43,.43
removeongethit = 0

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

;---------------------------------------------------------------------------
; Pavement Saw (strong)
; CNS difficulty: medium
[Statedef 1010]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2


[State 1000, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 8

[State the strongest man and cry]
type = PlaySnd
trigger1 = AnimElem = 1
value = 5, 2
channel = 0

[State ski resort]
type = PlaySnd
trigger1 = AnimElem = 4
trigger4 = AnimElem = 8
value = 0, 2

[State ski resort]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 8

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
trigger5 = AnimElem = 6
x = 15

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 7
x = 4

[State 1000, 2]
type = VelSet
trigger1 = AnimElem = 8
trigger2 = AnimElem = 9
trigger3 = AnimElem = 10
trigger4 = AnimElem = 11
trigger5 = AnimElem = 12
x = .5

[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 4
attr = S, SA
animtype  = Hard
damage    = 45, 4
priority  = 5
guardflag = MA
pausetime = 3,3
sparkno = s7002
guard.sparkno = s7010
sparkxy = -10,-60
hitsound   = s1,25
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1


[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 5
attr = S, SA
animtype  = Hard
damage    = 45, 4
priority  = 5
guardflag = MA
pausetime = 3,3
sparkno = s7002
guard.sparkno = s7010
sparkxy = -10,-60
hitsound   = s1,25
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1


[State 1000, 5] ;Opponent near
type = HitDef
trigger1 = AnimElem = 6
attr = S, SA
animtype  = Hard
damage    = 45, 4
priority  = 5
guardflag = MA
pausetime = 6,6
sparkxy = -10,-60
sparkno = s7002
guard.sparkno = s7010
hitsound   = s1,25
guardsound = s1,2
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -4,-3.5
air.velocity = -4,-3
fall = 1

[State 1001, Explod]
type = Explod
trigger1 = Time = 1
anim = 7011
ID = 1001
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = -1
ontop = 0
ownpal = 1
scale = .43,.43
removeongethit = 0

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

;---------------------------------------------------------------------------
; Harry Lauder's Walking Stick Tree
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State kaatoraito]
type = Helper
trigger1 = AnimElem = 7
name = "Walking Stick Tree"
ID = 1085
stateno = 1085
pos = 0,-80
postype = p1
ownpal = 1

[State 181, footstep]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 7
trigger3 = AnimElem = 13
value = 78, (random%5)
volume = 255

[State 181, footstep]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 3
volume = 255

[State 181, grunt]
type = PlaySnd
trigger1 = AnimElem = 7
value = 477, (random%2)
volume = 255
channel = 0

[State 181, footstep]
type = PlaySnd
trigger1 = AnimElem = 8
value = 1, 19
volume = 255

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

;------------------
; Harry Lauder (Projectile)
[Statedef 1085]
type    = A
movetype= A
physics = N ;not effected by gravity, nor friction
velset = 0,0 ;inital velocity. not accurate
anim = 1051

[State 0, VelSet] ;Pause right quick
type = VelSet
trigger1 = AnimElem = 1
x = 5

[State 0, VelSet] ;Pause right quick
type = VelSet
trigger1 = AnimElem = 6
x = 1

[State 1020, Afterimage]
type = AfterImage
trigger1 = Time = 0
length = 50
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
PalAdd      = -10,-10,-10
PalMul      = .85,.85,.50
TimeGap  = 1
FrameGap = 2
Trans = Add
time = 70

[State 200, 1]
type = HitDef
trigger1 = Time >=0
attr = A, SP ;Air, Special Projectile
damage = 100, 0
animtype = Back
guardflag = MA
hitflag = MA
priority = 3, Hit
pausetime = 0, 12 ; Giving your projectile a pause is always silly. The second number you should change to your pleasure.
sparkno = s10522222
sparkxy = -10, -40
hitsound = s1,12
guard.sparkno = S669
guardsound = s0,12
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -12, 0
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,-4
air.hittime = 12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0 ; Making the projectile get pushed back if it hits a cornered opponent is dumb

[State I'm not taking orders from you anymore]
type = PlaySnd
trigger1 = Time >=0
value = 0, 2
channel = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

[State 0, DestroySelf]
type = ChangeState
trigger1 = MoveContact = 1
value = 1086

;Harry Lauder (crash)
[Statedef 1086]
type    = A
movetype= A
physics = N ;not effected by gravity, nor friction
velset = 0,0 ;inital velocity. not accurate
anim = 1052

[State the drunk]
type = PlaySnd
trigger1 = Time = 10
value = 1, 16

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

;---------------------------------------------------------------------------
; Natural High of Bloodstone (weak)
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1055
ctrl = 0
sprpriority = 2

[State 1060, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 616, 0
channel = 0
volume = 255

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1061

;------------------
; Natural High of Bloodstone (weak, proceed)
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 5.5,-15
anim = 1056
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State 1061, 1]
type = VelAdd
trigger1 = 1
y = .80

[State 1060, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 15
volume = 255

[State 1070, 4]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
animtype  = Medium
getpower  = 0
damage    = 76, 3
priority  = 5
hitflag   = MAF
guardflag = MAF
pausetime = 10,10
sparkno = s7000
guard.sparkno = s7010
sparkxy = -10,-70
hitsound   = s1,5
guardsound = s1,2
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-8
guard.velocity = -7
air.velocity = -1,-8
air.fall = 1
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1062

; Natural High of Bloodstone (land)
[Statedef 1062]
type    = S
movetype= I
physics = S
anim = 1057
sprpriority = 1
velset = 0,0

[State 1056, 1] ;Reset y-position to ground level
type = PosSet
trigger1 = Time = 0
y = 0

[State 1056, 2] ;Play a sound for landing
type = PlaySnd
trigger1 = Time = 0
value = 40, 0

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

; Natural High of Bloodstone (strong)
[Statedef 1063]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1058
ctrl = 0
sprpriority = 2

[State 1060, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 616, 0
channel = 0
volume = 255

[State 1060, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 1064

; Natural High of Bloodstone (strong, proceed)
[Statedef 1064]
type    = A
movetype= A
physics = N
velset = 8.5,-17
anim = 1059
hitdefpersist = 1 ;Keep the HitDef from previous state active

[State 1061, 1]
type = VelAdd
trigger1 = 1
y = .80

[State 1060, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 0, 15
volume = 255

[State 1070, 4]
type = HitDef
trigger1 = AnimElem = 1
attr = S, SA
animtype  = Medium
getpower  = 0
damage    = 70, 2
priority  = 5
hitflag   = MAF
guardflag = MAF
pausetime = 8,10
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-70
hitsound   = s1,5
guardsound = s1,2
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-8
guard.velocity = -7
air.velocity = -1,-8
air.fall = 1
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1070, 4]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
animtype  = Medium
getpower  = 0
damage    = 70, 2
priority  = 5
hitflag   = MAF
guardflag = MAF
pausetime = 10,10
sparkno = s7002
sparkxy = -10,-70
hitsound   = s1,5
guardsound = s1,2
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-8
guard.velocity = -7
air.velocity = -1,-8
air.fall = 1
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1070, 4]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
animtype  = Medium
getpower  = 0
damage    = 50, 2
priority  = 5
hitflag   = MAF
guardflag = MAF
pausetime = 10,10
sparkno = s7002
guard.sparkno = s7010
sparkxy = -10,-70
hitsound   = s1,5
guardsound = s1,2
ground.type = Low
ground.slidetime = 18
ground.hittime  = 18
ground.velocity = -1,-8
guard.velocity = -7
air.velocity = -1,-8
air.fall = 1
fall = 1
fall.animtype = Med
fall.recovertime = 30

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1062

;---------------------------------------------------------------------------
; The Miracle of Sound in Motion (weak)
[Statedef 1070]
type    = S
movetype= A
physics = S
juggle  = 6
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 18

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 70, 4
channel = 0

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = Time = 24
trigger3 = Time = 27
trigger4 = Time = 30
trigger5 = Time = 34
value = 0, 8

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 4
x = -13

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

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 4
name = "Miracle (Weak)"
ID = 1071
stateno = 1071
pos = 30,0
postype = p1
ownpal = 1

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

; Miracle of Sound (weak helper)
[Statedef 1071]
type    = A
movetype= A
physics = N 
velset = 0,0
anim = 1111

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

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = A, SP
damage = 65, 0
animtype = Back
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 8
sparkno = s667
;sparkxy = -10, -40
sparkxy = 0, -10
hitsound = s1,9
guard.sparkno = S669
guardsound = s1,9
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6, -8
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,-4
air.hittime = 12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 1
yaccel = .70
getpower = 5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

; Miracle of Sound (strong helper)
[Statedef 1072]
type    = A
movetype= A
physics = N 
velset = 0,0
anim = 1111

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

[State 200, 1]
type = HitDef
trigger1 = Time >=0
attr = A, SP
damage = 15, 0
animtype = Back
guardflag = MA
hitflag = MAFD
priority = 3, Hit
pausetime = 0, 6
sparkno = s667
;sparkxy = -10, -40
sparkxy = 0, -10
hitsound = s1,9
guard.sparkno = S669
guardsound = s1,9
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6, -8
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,-4
air.hittime = 12
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
fall = 1
yaccel = .70
getpower = 5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = !AnimTime

; The Miracle of Sound in Motion (strong)
[Statedef 1073]
type    = S
movetype= A
physics = S
juggle  = 6
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 0, 18

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
value = 70, 4
channel = 0

[State 1070, 1]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = Time = 24
trigger3 = Time = 27
trigger4 = Time = 30
trigger5 = Time = 34
value = 0, 8

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 4
x = -18

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

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 4
name = "Miracle (Weak)"
ID = 1072
stateno = 1072
pos = 30,0
postype = p1
ownpal = 1
size.xscale = .70
size.yscale = .70

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

;The (Actual) Miracle
; CNS difficulty: easy
[Statedef 10500]
type    = A
movetype= A
physics = N
juggle  = 2
poweradd= 11
ctrl = 0
velset = 0,0
anim = 1101
sprpriority = 2

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 477, 1
channel = 0
volume = 255

[State 600, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 0, 23
volume = 255

[State 600, 1]
type = VelSet
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
trigger6 = AnimElem = 6
y = -1

[State 600, 1]
type = VelSet
trigger1 = AnimElem = 7
trigger2 = AnimElem = 8
trigger3 = AnimElem = 9
y = -4

[State 600, 1]
type = VelSet
trigger1 = AnimElem = 10
y = -3

[State 0, Explod, volante]
type = Explod
trigger1 = AnimElem = 5
anim = 6333
ID = 6333
pos = 70,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 0
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = AnimElem = 6
anim = 6333
ID = 6333
pos = 71,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = AnimElem = 7
anim = 6333
ID = 6333
pos = 60,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = AnimElem = 8
anim = 6333
ID = 6333
pos = 50,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 27
anim = 6333
ID = 6333
pos = 70,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 27
anim = 6333
ID = 6333
pos = -8,-106
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 28
anim = 6333
ID = 6333
pos = 28,-91
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, Explod, volante]
type = Explod
trigger1 = Time = 29
anim = 6333
ID = 6333
pos = -26,-87
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 26
sprpriority = 3
scale = 1.3,1.3
ontop = 1
ownpal = 1
removeongethit = 1

[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 150, 10
hitflag   = MAF
guardflag = MAF
priority = 3
pausetime = 7,8
sparkno = s7001
guard.sparkno = s7010
sparkxy = -10,-58
hitsound   = s0,21
guardsound = s1,8
ground.type = High
ground.slidetime = 5
ground.hittime  = 5
ground.velocity = -2, -8
air.velocity = -2, -8
fall = 1

[State 1052, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 10510
ctrl = 0

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1062

;------------------
;Actual Miracle (falling)
[Statedef 10510]
type    = A
movetype= A
physics = N
velset = 0,0
anim = 1102
ctrl = 0

[State 1051, 1] ;Gravity
type = VelAdd
trigger1 = 1
y = .60

[State 1061, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= -10
value = 1062

;---------------------------------------------------------------------------
; Bye Bye Bye (weak)
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 100
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2

[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = Time = 10
trigger3 = Time = 15
value = 0, 8
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 70, 0
volume = 255
channel = 0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 18
volume = 255

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 2
x = 12

[State 1200, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, SA
animtype  = Hard
damage    = 70, 6
priority  = 5
;hitflag = ML
hitflag = MAFD
guardflag = L
pausetime = 11,11
sparkno = s7001
guard.sparkno = s7010
sparkxy = 0,-65
hitsound   = s0,17
guardsound = s1,2
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -3, -12
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
yaccel = .50
air.velocity = -3.5,-14
airguard.velocity = -3.5,-4.5
palfx.time = 50
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
palfx.invertall = 1
palfx.color = 0
fall = 1

[State 1200, Explod, icy COLD]
type = Explod
trigger1 = Time = [5,25]
anim = 6331
ID = 6331
pos = 60,-10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -2,-3
scale = .8,.8
removetime = 12
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 1

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

;---------------------------------------------------------------------------
; Bye Bye Bye (strong)
; CNS difficulty: easy
[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1210
ctrl = 0
sprpriority = 2


[State 1200, 1]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = Time = 10
trigger3 = Time = 15
trigger4 = AnimElem = 3
trigger5 = AnimElem = 4
trigger6 = AnimElem = 5
value = 0, 8
volume = 255

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 70, 0
volume = 255
channel = 0

[State 181, Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 18
volume = 255

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 2
x = 15

[State 1200, 2]
type = HitDef
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
attr = S, SA
animtype  = Hard
damage    = 70, 6
priority  = 5
hitflag = MAF
guardflag = L
pausetime = 10,10
sparkno = s7002
guard.sparkno = s7010
sparkxy = 0,-65
hitsound   = s0,17
guardsound = s1,2
ground.type = Low
ground.slidetime = 0
ground.hittime  = 18
ground.velocity = 0,0
ground.cornerpush.veloff = 0 ;To push far away when p2 is in corner
guard.velocity = 0
yaccel = .50
air.velocity = 0,0
airguard.velocity = 0,0
palfx.time = 50
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
palfx.invertall = 1
palfx.color = 0
fall = 1

[State 1200, 2]
type = HitDef
trigger1 = AnimElem = 5
attr = S, SA
animtype  = Hard
damage    = 70, 6
priority  = 5
guardflag = L
pausetime = 15,15
sparkno = s7002
sparkxy = 0,-65
hitsound   = s0,17
guard.sparkno = s7010
guardsound = s1,2
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -3, -12
ground.cornerpush.veloff = -12 ;To push far away when p2 is in corner
guard.velocity = -7
yaccel = .50
air.velocity = -3.5,-14
airguard.velocity = -3.5,-4.5
palfx.time = 50
palfx.add = 0,50,240
palfx.mul = 120,224,150
palfx.sinadd = 85,55,110,10
palfx.invertall = 1
palfx.color = 0

[State 1200, Explod, icy COLD]
type = Explod
trigger1 = Time = [15,38]
anim = 6331
ID = 6331
pos = 60,-10
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -2,-3
scale = 1.1,1.1
removetime = 12
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 1

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

;---------------------------------------------------------------------------
; Good Weather for an Airstrike
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = 100
sound = s1,20
poweradd = -1000
unhittable = 1

[State 2000, supers]
type = explod
trigger1 = AnimElem = 1
anim = 6330
pos = -45,240
postype = back
sprpriority = 0
scale = 1.2, 1.2
supermove = 1
facing = 1
removeongethit = 1
ownpal = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 666, 3
channel = 0

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 7
value = 0, 3

[State 1000, knife A]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1051
projanim = 1051
;projhitanim = 1002
;projscale = 1,1
hitsound   = s1,24
guardsound = s1,14
getpower = 0
sparkno = s6332
guard.sparkno = s7010                      ;Spark anim no (Def: set above)
sparkxy = 0,0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = 0,-80
attr = S, SP
damage   = 35,5
yaccel = .80
postype = p1         ;p2,front,back,left,right


[State 1000, knife B]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1051
projanim = 1051
;projhitanim = 1002
;projscale = 1,1
hitsound   = s1,25
guardsound = s1,14
getpower = 0
sparkno = s6332
guard.sparkno = s7010                      ;Spark anim no (Def: set above)
sparkxy = 0,0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = 11,-65
attr = S, SP
damage   = 35,5
yaccel = .80
postype = p1         ;p2,front,back,left,right


[State 1000, knife c]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1051
projanim = 1051
;projhitanim = 1002
;projscale = 1,1
hitsound   = s1,23
guardsound = s1,14
sparkno = s6332
getpower = 0
guard.sparkno = s7010                      ;Spark anim no (Def: set above)
sparkxy = 0,0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = -3,-30
attr = S, SP
damage   = 35,5
yaccel = .80
postype = p1         ;p2,front,back,left,right


[State 1000, knife c]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1051
projanim = 1051
;projhitanim = 1002
;projscale = 1,1
hitsound   = s1,23
guardsound = s1,14
sparkno = s6332
guard.sparkno = s7010                       ;Spark anim no (Def: set above)
sparkxy = 0,0
getpower = 0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = -4,-90
attr = S, SP
damage   = 35,5
yaccel = .80
postype = p1         ;p2,front,back,left,right

[State 1000, knife d]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1051
projanim = 1051
;projhitanim = 1002
;projscale = 1,1
hitsound   = s1,21
guardsound = s1,14
sparkno = s6332 
guard.sparkno = s7010                  ;Spark anim no (Def: set above)
sparkxy = 0,0
getpower = 0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = 3,-70
attr = S, SP
damage   = 35,5
yaccel = .80
postype = p1         ;p2,front,back,left,right


[State 1000, frosty!]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1052
projanim = 1052
;projhitanim = 1002
hitsound   = s1,8
guardsound = s1,14
sparkno = s6331      
guard.sparkno = s7010                ;Spark anim no (Def: set above)
sparkxy = 0,0
getpower = 0
projremove = 1
guardflag = MA    
projremovetime = -1
velocity = 9,0
projscale = .40,.40
remvelocity = 0,0
accel = 0,0
projhits = 1
pausetime = 0, 6
projpriority = 1
projsprpriority = 3
ground.type = Low
yaccel = .50
ground.slidetime = 14
ground.hittime  = 25
ground.velocity = -15
air.animtype = Back
air.velocity = -8,-6
down.velocity = -8,-6
offset = -5,-55
attr = S, SP
damage   = 36,5
yaccel = .80
postype = p1         ;p2,front,back,left,right


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

;---------------------------------------------------------------------------
; Crash Today
[Statedef 3050]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = 100
sound = s1,20
poweradd = -1000
unhittable = 1

[State 2000, supers]
type = explod
trigger1 = AnimElem = 1
anim = 6330
pos = -45,240
postype = back
sprpriority = 0
scale = 1.2, 1.2
supermove = 1
facing = 1
removeongethit = 1

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
value = , NA, SA, AT
time = 6

[State alright crack em]
type = VelSet
trigger1 = AnimElem = 3
trigger2 = AnimElem = 4
x = 15

[State alright crack em]
type = VelSet
trigger1 = AnimElem = 5
x = 3

[State alright crack em]
type = VelSet
trigger1 = AnimElem = 6
x = 0

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 0, 15

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Heavy               ;Make p2 use "Up" type animation on hit
damage    = 100, 40
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 25,45
sparkno = s7002
guard.sparkno = s7010
sparkxy = 0,-110
hitsound   = s1,26
guardsound = s1,5
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0,-25
guard.velocity = -11
air.velocity = -1.3,-25
airguard.velocity = -4.5,-5
envshake.time = 40           ;Parameters for shaking the screen on hit
envshake.ampl = 10
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
p2stateno = 3110
snap = 64,0
getpower = 0

;This controller below makes Kung Fu man change to a success state if he
;successfully hits the Smash Kung Fu Upper.
[State 3050, 4]
type = ChangeState
trigger1 = MoveHit
value = 3051

[State 3051, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3052
ctrl = 0
;------------------
; Crash Today (success)
[Statedef 3051]
type    = S
movetype= A
physics = S
anim = 3051

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Up               ;Make p2 use "Up" type animation on hit
damage    = 150, 12
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 30,50
sparkno = s7002
guard.sparkno = s7010
sparkxy = 0,-110
hitsound   = s1,27
guardsound = 6,0
ground.type = Low
ground.slidetime = 26
ground.hittime  = 26
ground.velocity = -4,-16
guard.velocity = -11
air.velocity = -6,-4
airguard.velocity = -6,-16
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
yaccel = .55  
fall = 1
fall.recover = 0             ;Prevent p2 from recovering
forcestand = 1
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
getpower = 0

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

;------------------
; Crash Today/Malpractice (botched)
[Statedef 3052]
type    = S
movetype= A
physics = S
anim = 3052

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 3
value = 101, 7
channel = 0
volume = 255

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

;------------------
; Get Hit Force Stand Shaking
[Statedef 3110]
type    = S
movetype= H
physics = N
velset = 0,0

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((GetHitVar(groundtype) = 1),5002,5012)

[State 5000, 4] ;Freeze anim
type = ChangeAnim
trigger1 = Time > 0
value = anim

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

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 3111

;------------------
; Didn't We Deserve a Look at You the Way you Really Are(Attempt)
[Statedef 3053]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3050, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 140, 0
channel = 0
volume = 255

[State 3000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = 100
sound = s1,20
poweradd = -2000
unhittable = 1

[State 2000, supers]
type = explod
trigger1 = AnimElem = 1
anim = 6330
pos = -45,240
postype = back
sprpriority = 0
supermove = 1
scale = 1.2, 1.2
facing = 1
removeongethit = 1

[State 3050, Super D]
type = NotHitBy
trigger1 = AnimElem = 2
value = , NA, SA, AT
time = 6

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Heavy
damage    = 100, 40
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 25,45
sparkno = 3
guard.sparkno = s7010
sparkxy = 0,-50
hitsound   = s1,26
guardsound = s1,5
ground.type = Low
ground.slidetime = 10
ground.hittime  = 10
ground.velocity = 0,-25
guard.velocity = -11
air.velocity = -1.3,-25
airguard.velocity = -4.5,-5
envshake.time = 40
envshake.ampl = 10
envshake.freq = 176
p1stateno = 3054
p2facing = 1
p2stateno = 3055
getpower = 0

[State 3051, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 3052
ctrl = 0

;---------------------------------------------------------------------------
;Didn't We Deserve a Look at You the Way you Really Are(Success)
[Statedef 3054]
type    = S                      
movetype= I                   
physics = S  
sprpriority = 3                                                   
ctrl = 0                        
anim = 3002

[State 3054, HitAdd]
type = HitAdd
trigger1 = Time = 70
trigger2 = Animelem = 4
trigger3 = Time = 77
trigger4 = Time = 83
trigger5 = Time = 89
trigger6 = Animelem = 8
trigger7 = Time = 95
trigger8 = Time = 106
trigger9 = Animelem = 12
trigger10 = Time = 101
trigger11 = Animelem = 16
trigger12 = Time = 112
trigger13 = Animelem = 20
trigger14 = Animelem = 23
trigger15 = Animelem = 25
trigger16 = Time = 134
trigger17 = Animelem = 29
trigger18 = Animelem = 40
trigger19 = Animelem = 51
trigger20 = Animelem = 61
trigger21 = Animelem = 62
trigger22 = Animelem = 63
value = 1

[State 3054, Helper]
type = Helper
trigger1 = !Time
name = "Wooden Clone To Beat Your Ass"
ID = 3054
stateno = 3056
pos = 90,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 64

[State 3054, TargetBind]
type = TargetBind
trigger1 = Animelem = 1
time = 64
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Time = [68,124]
time = 3
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Animelem = 22
time = 2
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Time = [129,135]
time = 3
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Time = [137,157]
time = 2
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Time = [158,179]
time = 1
pos = 40,0

[State 3054, TargetBind]
type = TargetBind
trigger1 = Time = [182,188]
time = 3
pos = 40,0

[State 3054, TargetVelAdd]
type = TargetVelAdd
trigger1 = Animelem = 62
x = -3
y = -8

[State 3054, TargetDrop]
type = TargetDrop
trigger1 = Animelem = 62

[State 3054, VelSet]
type = VelSet
trigger1 = Animelem = 62
x = -2
y = -6

[State 3054, Gravity]
type = Gravity
trigger1 = Time > 197

[State 3054, Explod]
type = Explod
trigger1 = Time = [73,172]
anim = 7000
ID = 3054
pos = 40,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
random = 30,90
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 0

[State 3054, Explod]
type = Explod
trigger1 = Animelem = 61
trigger2 = Animelem = 62
trigger3 = Animelem = 63
anim = 7002
ID = 3054
pos = 40,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 1
random = 30,90
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 0

[State 3054, Explod]
type = Explod
trigger1 = Animelem = 59
anim = 7012
ID = 3055
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = .43,.43
sprpriority = 0
ownpal = 1

[State 1220, Shake Screen]
type = EnvShake
trigger1 = Animelem = 4
trigger2 = Animelem = 8
trigger3 = Animelem = 12
trigger4 = Animelem = 25
trigger5 = Animelem = 16
trigger6 = Animelem = 20
trigger7 = Animelem = 23
trigger8 = Animelem = 29
trigger9 = Animelem = 40
trigger10 = Animelem = 51
time = 10
ampl = 5
freq = 170

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 4
trigger2 = Animelem = 8
trigger3 = Animelem = 12
trigger4 = Animelem = 25
value = S1,2+random%2

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 16
trigger2 = Animelem = 20
trigger3 = Animelem = 23
value = S1,12+random%3


[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 29
trigger2 = Animelem = 40
trigger3 = Animelem = 51
value = S1,21+random%5

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 61
trigger2 = Animelem = 62
value = S1,27

[State 3054, PlaySnd]
type = EnvShake
trigger1 = Animelem = 61
trigger2 = Animelem = 62
time = 40
ampl = 5
freq = 170

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 63
value = S1,26

[State 3054, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Time = 70
trigger2 = Animelem = 4
trigger3 = Time = 77
trigger4 = Time = 83
trigger5 = Time = 89
trigger6 = Animelem = 8
trigger7 = Time = 95
trigger8 = Time = 106
trigger9 = Animelem = 12
trigger10 = Time = 101
trigger11 = Animelem = 16
trigger12 = Time = 112
trigger13 = Animelem = 20
trigger14 = Animelem = 23
trigger15 = Animelem = 25
trigger16 = Time = 134
trigger17 = Animelem = 29
trigger18 = Animelem = 40
trigger19 = Animelem = 51
trigger20 = Animelem = 61
trigger21 = Animelem = 62
trigger22 = Animelem = 63
value = -16

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 3
value = S70,4
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 7
value = S477,0
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 12
trigger2 = Animelem = 25
value = S477,1
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 16
value = S616,0
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 21
value = S101,13
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 27
trigger2 = Animelem = 36
trigger3 = Animelem = 168
value = S5,2
channel = 0

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 61
value = S5,3
channel = 0

[State 3054, ChangeState]
type = ChangeState
triggerall = Time > 197
trigger1 = Pos Y > -5 && Vel Y > -5
value = 1062
ctrl = 0

;---------------------------------------------------------------------------
; Lets See You All Black n' Blue
[Statedef 3055]
type    = S
movetype= H
physics = N
SprPriority = -2

[State 3055, ScreenBound]
type = ScreenBound
trigger1 = Time < 219
value = 0
movecamera = 0,0

[State 3055, ScreenBound]
type = ScreenBound
trigger1 = Time >= 219
value = 1
movecamera = 1,0

[State 3055, Gravity]
type = Gravity
trigger1 = Time > 222

[State 3055, ChangeAnim]
type = ChangeAnim2
trigger1 = !time
value = 3004

[State 3055, SelfState]
type = SelfState
triggerall = Time > 222
trigger1 = Pos Y > 0 && Vel Y > 0
value = 5100

;---------------------------------------------------------------------------
;Wooden Beat Down
[Statedef 3056]
type    = S                      
movetype= I                   
physics = S  
sprpriority = -5                                                  
ctrl = 0                        
anim = 3003

[State 3056, Turn]
type = Turn
trigger1 = !Time

[State 3056, PlaySnd]
type = PlaySnd
trigger1 = Time = 36
value = S3056,0
channel = -1

[State 3056, PlaySnd]
type = PlaySnd
trigger1 = Time = 100
value = S3056,1
channel = -1

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 6
trigger2 = Time = 9
trigger3 = Time = 12
trigger4 = Time = 15
trigger5 = Time = 18
trigger6 = Time = 21
trigger7 = Time = 24
trigger8 = Time = 27
trigger9 = Time = 30
trigger10 = Time = 33
trigger11 = Time = 36
trigger12 = Time = 64
value = 1, 14

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 68
value = 190, 0

[State 3056, ChangeAnim]
type = ChangeAnim
trigger1 = Time = 64
value = 30033

[State 3056, PalFXWiz]
type = PalFX
trigger1 = Time = 64
time = 1000
add = 70,40,0
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 70
trigger2 = Time = 101
trigger3 = Time = 128
trigger4 = Time = 134
value = S1,2+random%2

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 77
trigger2 = Time = 83
trigger3 = Time = 89
trigger4 = Time = 95
trigger5 = Time = 106
trigger6 = Time = 112
trigger7 = Time = 124
value = S1,12+random%3

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 118
value = S1,21+random%5

[State 3054, PlaySnd]
type = PlaySnd
trigger1 = Time = 140
value = S1,26

[State 3056, DestroySelf]
type = DestroySelf
trigger1 = Time = 167

;---------------------------------------------------------------------------
; *** Would? Start-up
[Statedef 3070]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3053
sprpriority = 0
ctrl = 0

[State 3070, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 25, -57
anim = 100
sound = s1,20
poweradd = -3000
unhittable = 1

[State 3070, supers]
type = explod
trigger1 = AnimElem = 1
anim = 6330
pos = -45,240
postype = back
sprpriority = 0
scale = 1.2, 1.2
supermove = 1
facing = 1
removeongethit = 1

[State 3070, NotHitBy]
type = NotHitBy
trigger1 = 1
value = ,NA,SA,ST,HT
time = 1

[State 3070, 1]
type = HitDef
trigger1 = !time
attr = S, HA
damage = 0, 0
animtype = Hard
guardflag = MA
hitflag = MAF
getpower  = 0
priority = 10
pausetime = 9,9
sparkno = s7002
guard.sparkno = s7010
sparkxy = -12, -80
hitsound = s1,27
guardsound = s5, 1
ground.type = High
ground.slidetime = 6
ground.hittime  = 17
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 15
envshake.time = 40
envshake.ampl = 10
envshake.freq = 176
kill = 1
guard.kill = 1
p1stateno = 3071
p2stateno = 3072
getpower = 0

[State 3070, 2]
type = PlaySnd
trigger1 = Animelem = 3
value = 0,11

[State 3070, VelAdd]
type = VelAdd
trigger1 = Animelem = 3
x = 28

[State 3070, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = s140,1
channel = 0

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

;---------------------------------------------------------------------------
; *** Would? Success
[Statedef 3071]
type    = S
physics = S
velset = 0,0
anim = 3054
sprpriority = 0
ctrl = 0

[State 3071, ScreenBound]
type = ScreenBound
trigger1 = !time
value = 0
movecamera = 0,0

[State 3071, AssertSpecial]
type = AssertSpecial
trigger1 = time > 0
flag = nobardisplay
flag2 = noFG
flag3 = globalnoshadow
ignorehitpause = 1

[State 181]
type = AssertSpecial
trigger1 = 1
flag = NoMusic

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 11111, 4
channel = 1

[State 3071, PlaySnd STOP]
type = PlaySnd
trigger1 = AnimElem = 76
value = 666,11
channel = 1

[State 3071, BGPalFX]
type = AllPalFX
trigger1 = !time
time = 20
add = 256,256,256
mul = 256,256,256
sinadd = 256,256,256,30

[State 3071, PosSet]
type = PosSet
trigger1 = Animelem = 1
x = ifelse(facing=1,-120,120)

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

[State 3071, Explod]
type = Explod
trigger1 = Animelem = 14
anim = 10500
ID = 3071
pos = 0,-10
postype = p2
facing = 1
vfacing = 1
bindtime = -1
removetime = -2
pausemovetime = 0
scale = .43,.43
sprpriority = -3
ontop = 0
ownpal = 1

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 14
value = S11111,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 19
name = "Wood Chucks"
ID = 3072
stateno = 3013
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 30
name = "Wood Chucks"
ID = 3072
stateno = 3014
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 41
name = "Wood Chucks"
ID = 3072
stateno = 3015
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 52
name = "Wood Chucks"
ID = 3072
stateno = 3016
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 63
name = "Wood Chucks"
ID = 3072
stateno = 3017
pos = 8+Random%-8,-50+Random%-60
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 74
name = "Wood Chucks"
ID = 3072
stateno = 3013
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 74
name = "Wood Chucks"
ID = 3072
stateno = 3014
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 74
name = "Wood Chucks"
ID = 3072
stateno = 3015
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 74
name = "Wood Chucks"
ID = 3072
stateno = 3016
pos = 8+Random%-8,-50+Random%-70
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Helper]
type = Helper
trigger1 = Animelem = 74
name = "Wood Chucks"
ID = 3072
stateno = 3017
pos = 8+Random%-8,-50+Random%-60
postype = p2
facing = -1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
scale = 3,3

[State 3071, Explod]
type = Explod
trigger1 = Animelem = 27
trigger2 = Animelem = 38
trigger3 = Animelem = 49
trigger4 = Animelem = 60
anim = 7011
ID = 3072
pos = 0,0
postype = p1
bindtime = 1
removetime = -2
pausemovetime = 21
scale = .43,.43
sprpriority = -1
ontop = 0
ownpal = 1

[State 2071, HitAdd]
type = HitAdd
trigger1 = Animelem = 19
trigger2 = Animelem = 30
trigger3 = Animelem = 41
trigger4 = Animelem = 52
trigger5 = Animelem = 63
value = 1

[State 2071, HitAdd]
type = HitAdd
trigger1 = Animelem = 74
value = 8

[State 2071, PlaySnd]
type = EnvShake
trigger1 = Animelem = 19
trigger2 = Animelem = 30
trigger3 = Animelem = 41
trigger4 = Animelem = 52
trigger5 = Animelem = 63
trigger6 = Animelem = 74
time = 7
ampl = 5
freq = 170

[State 2071, PlaySnd]
type = EnvShake
trigger1 = Animelem = 74
time = 10
ampl = 5
freq = 170

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 19
trigger2 = Animelem = 30
trigger3 = Animelem = 41
trigger4 = Animelem = 52
trigger5 = Animelem = 63
anim = 7002
ID = 2073
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = -1
random = 10,-30
removetime = -2
pausemovetime = 0
scale = .9,.9
sprpriority = 3
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 73
anim = 7013
ID = 2074
pos = -20,-55
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = .8,.8
sprpriority = 2
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 73
anim = 7014
ID = 2075
pos = -10,-40
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 2
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 73
anim = 7015
ID = 2076
pos = -15,-60
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 2
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 73
anim = 7016
ID = 2077
pos = -10,-60
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 2
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 74
anim = 7002
ID = 2078
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = 0
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 74
anim = 7001
ID = 2078
pos = 10,-45
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = 0
ontop = 1
ownpal = 1

[State 2071, Explod]
type = Explod
trigger1 = Animelem = 74
anim = 7001
ID = 2078
pos = -5,-75
postype = p2
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
sprpriority = 0
ontop = 1
ownpal = 1

[State 2071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 74
value = 1,26

[State 3011, TargetVelAdd]
type = TargetVelAdd
trigger1 = Animelem = 79
y = -13

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 19
trigger2 = Animelem = 30
trigger3 = Animelem = 41
trigger4 = Animelem = 52
trigger5 = Animelem = 63
value = S5,1+random%3
channel = 0

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 14
value = S70,1
channel = 0

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 19
trigger2 = Animelem = 30
trigger3 = Animelem = 41
trigger4 = Animelem = 52
trigger5 = Animelem = 63
value = S1,27

[State 3071, VelSet]
type = VelSet
trigger1 = Animelem = 17
trigger2 = Animelem = 29
trigger3 = Animelem = 40
trigger4 = Animelem = 51
trigger5 = Animelem = 65
x = 32

[State 3071, VelSet]
type = VelSet
trigger1 = Animelem = 27
trigger2 = Animelem = 38
trigger3 = Animelem = 49
trigger4 = Animelem = 60
trigger5 = Animelem = 71
x = 0

[State 3071, Turn]
type = Turn
trigger1 = Animelem = 24
trigger2 = Animelem = 35
trigger3 = Animelem = 46
trigger4 = Animelem = 57
trigger5 = Animelem = 68

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 76
value = S666,0
channel = 0

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = time = 90
value = S1,17

[State 3071, PlaySnd]
type = PlaySnd
trigger1 = Animelem = 35
value = S3010,5

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

;---------------------------------------------------------------------------
; *** Would? P2 State
[Statedef 3072]
movetype = H
physics = N
velset = 0,0
ctrl = 0

[State 3072, PalFXWiz]
type = PalFX
trigger1 = Time = 110
time = 270
add = -20,-50,-50
mul = 254,224,120
sinadd = 0,0,0,10
invertall = 0
color = 256

[State 3072, PalFX]
type = PalFX
trigger1 = time = 300
time = 2
add = 256,256,256
mul = 256,256,256
sinadd = 0,0,0,1
invertall = 0
color = 256

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

[State 3072, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 3055

[State 3072, PosSet]
type = PosSet
trigger1 = time = 1
y = 0

[State 3012, Gravity]
type = Gravity
trigger1 = Time > 307

[State 3072, PosSet]
type = PosSet
trigger1 = time = 1
x = ifelse(facing = 1, 0,ifelse(facing = -1,0,0))

[State 3072, LifeAdd]
type = LifeAdd
trigger1 = Time = 307
value = -450

[State 3012, SelfState]
type = SelfState
trigger1 = Time > 307 && Pos Y > 0 && Vel Y > 0
value = 5100

;---------------------------------------------------------------------------
;Wood Bit 1
[Statedef 3013]
type    = A
physics = N
velset = -4,-9
anim = 7017
sprpriority = 2

[State 3013, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Time*5

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

[State 3013, Gravity]
type = Gravity
trigger1 = 1

[State 3013, DestroySelf]
type = DestroySelf
trigger1 = Time = 24

;---------------------------------------------------------------------------
;Wood Bit 2
[Statedef 3014]
type    = A
physics = N
velset = 4,-9
anim = 7018
sprpriority = 2

[State 3014, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Time*5

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

[State 3014, Gravity]
type = Gravity
trigger1 = 1

[State 3014, DestroySelf]
type = DestroySelf
trigger1 = Time = 24

;---------------------------------------------------------------------------
;Wood Bit 3
[Statedef 3015]
type    = A
physics = N
velset = -4,-12
anim = 7019
sprpriority = 2

[State 3015, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Time*5

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

[State 3015, Gravity]
type = Gravity
trigger1 = 1

[State 3015, DestroySelf]
type = DestroySelf
trigger1 = Time = 24

;---------------------------------------------------------------------------
;Wood Bit 4
[Statedef 3016]
type    = A
physics = N
velset = 4,-12
anim = 7020
sprpriority = 2

[State 3016, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Time*5

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

[State 3016, Gravity]
type = Gravity
trigger1 = 1

[State 3016, DestroySelf]
type = DestroySelf
trigger1 = Time = 24

;---------------------------------------------------------------------------
;Wood Bit 5
[Statedef 3017]
type    = A
physics = N
velset = -4,-12
anim = 7021
sprpriority = 2

[State 3017, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Time*5

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

[State 3017, Gravity]
type = Gravity
trigger1 = 1

[State 3017, DestroySelf]
type = DestroySelf
trigger1 = Time = 24

;---------------------------------------------------------------------------
; Get Hit Force Stand Knocked Back
[Statedef 3111]
type    = S
movetype= H
physics = S

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = ifelse((GetHitVar(groundtype) = 1),5007,5017)

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = SelfState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Death Port Base
[Statedef 8600]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 9999
sprpriority = 4

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

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

[State 8060, Helper]
type = helper
triggerall = time = 0
trigger1 = numhelper(8061) = 0
name = "kocut"
stateno = 8060
id = 8060
sprpriority = 1
pos = 160,255
postype = back
supermovetime = 9999999
pausemovetime = 9999999
ownpal = 0
keyctrl = 0

[State 8600, Explod]
type = explod
trigger1 = time = 0
trigger1 = root,facing = 1
anim = 6053
id = 6053
sprpriority = -4
removetime = -1
bindtime = -1
pos = 0,240
facing = -1
postype = right
ownpal = 1
supermovetime = -1
pausemovetime = -1

[State 8600, Explod]
type = explod
trigger1 = time = 0
trigger1 = root,facing = -1
anim = 6053
id = 6053
sprpriority = -4
removetime = -1
bindtime = -1
pos = 0,240
facing = 1
postype = left
ownpal = 1
supermovetime = -1
pausemovetime = -1

[State 8600, Explod]
type = explod
trigger1 = time = 0
trigger1 = root,facing = 1
anim = 6053
id = 6053
sprpriority = -4
removetime = -1
bindtime = -1
pos = 0,20
facing = -1
postype = right
ownpal = 1
supermovetime = -1
pausemovetime = -1

[State 8600, Explod]
type = explod
trigger1 = time = 0
trigger1 = root,facing = -1
anim = 6053
id = 6053
sprpriority = -4
removetime = -1
bindtime = -1
pos = 0,20
facing = 1
postype = left
ownpal = 1
supermovetime = -1
pausemovetime = -1

[State 8600, PalFX]
type = palfx
trigger1 = time <= 60
add = 0+time*6,0+time*6,0+time*6
time = 1

[State 8600, RemoveExplod]
type = removeexplod
trigger1 = time = 60
id = 6053

[State 8600, Envcolor]
type = envcolor
trigger1 = time = 0
value = 255,255,255
time = 60
under = 1

[State 8600, BGpalFX]
type = bgpalfx
trigger1 = time = 0
add = 255,255,255
time = 60

[State 8600, AssertSpecial]
type = assertspecial
trigger1 = time = [0,60]
flag = nobg
flag2 = nofg
flag3 = nobardisplay

[State 8600, DestroySelf]
type = DestroySelf
trigger1 = Time = 60

;---------------------------------------------------------------------------
; Death Port
[Statedef 8060]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 9999
sprpriority = 4

[State 8060, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S11,1

[State 8060, Explod]
type = explod
trigger1 = time = 0
trigger1 = root,facing = 1
anim = 6054
id = 16020
sprpriority = -2
removetime = -1
bindtime = -1
pos = 0,230
postype = right
ownpal = 1
supermovetime = -1
pausemovetime = -1
facing = -1
scale = 1.3,1.3

[State 8060, RemoveExplod]
type = removeexplod
trigger1 = time = 40
id = 16020

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

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

[Statedef -2]

[State -2, remove explod when not running]
type = Removeexplod
ID = 4074
trigger1 = Anim != 100

;---------------------------------------------------------------------------
;KO Death Port
[State -2, Helper]
type = helper
triggerall = var(27)=1
triggerall = numhelper(8600) = 0
triggerall = numhelper(8066) = 0
triggerall = alive = 0
trigger1 = enemy,hitdefattr = SCA, HA, HP, HT, SA, SP, ST
trigger1 = (var(27):=2)
trigger2 = enemy,stateno >= 3000 && enemy,stateno != [5000,5999]
trigger2 = (var(27):=2)
name = "KO"
stateno = 8600
id = 8600
sprpriority = 1
pos = 160,255
postype = back
supermovetime = 9999999
pausemovetime = 9999999
ownpal = 1
keyctrl = 0

[State -2, VarSet]
type = VarSet
trigger1 = alive = 1
v = 27
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = alive = 0
v = 27
value = 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

[State 0, VarRandom]
type = VarRandom
trigger1 = Time = 1
trigger1 = Anim = [5000,5099]
v = 3
range = 0,14

[State -3]
type = PlaySnd
channel = 5
triggerall = time = 0
triggerall = alive = 1
trigger1 = stateno = [5000,5099]
channel = 0
value = 101, var(3)
