; Josh Geary'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.

;VARIABLES
;var(0): Temp
;var(1): AI
;var(3); Makes Josh Do Super Jump once he hits the player on State 420
;var(4); Makes Josh Do Super Jump once he hits the player on State 450
;var(8); IDK What It Does
;var(11): Speed
;var(12): MoveContact
;var(13); Air Combos
;var(18); temp bound states
;var(19); Makes his AttackMulSet less cheap in his 1p-11p
;var(40) Cheap Moment Mode, For 1p-11p Mode Only
;Var(41) Cheap Moment Mode, For 12p Mode Only
;var(43) - var(48); run
;var(51); IDK What It Does 2
;Var(55)     = Combo Announcer, Text Display
;Var(56)     = Combo Announcer, Sound
;Var(57)    = Combo Announcer, Danger
;Var(58)    = Combo Announcer, Normalize Score

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


[Size]
xscale = 0.4 ;1			;Horizontal scaling factor.
yscale = 0.4 ;1			;Vertical scaling factor.
ground.back = 15		;Player width (back, ground)
ground.front = 16		;Player width (front, ground)
air.back = 12		;Player width (back, air)
air.front = 12		;Player width (front, air)
height = 60			;Height of player (for opponent to jump over)
attack.dist = 160		;Default attack distance
proj.attack.dist = 90	;Default attack distance for projectiles
proj.doscale = 0		;Set to 1 to scale projectiles too   
head.pos = 0, -100	;Approximate position of head
mid.pos = 0, -65		;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.7		;Walk forward
walk.back = -2.6		;Walk backward
run.fwd  = 4.9, 0		;Run forward (x, y)
run.back = -4.7,-5.3	;Hop backward (x, y)
jump.neu = 0,-8.4		;Neutral jumping velocity (x, y)
jump.back = -2.55		;Jump back Speed (x, y)
jump.fwd = 2.5		;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1;Running jump speeds (opt)
runjump.fwd = 4,-8.1	;.
airjump.neu = 0,-8.1	;.
airjump.back = -2.55	;Air jump speeds (opt)
airjump.fwd = 2.5		;.

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

;-----------------------------------------------------------------------------
;Win Quotes - You can have up to 100 win quotes

[Quotes]
victory1 = "HA HA HA!!! You'll Never Beat Me!!"
victory2 = "GAME OVER IDIOTS!!!"
victory3 = "I Am Strong, Tough, And POWERFUL!!!!!"
victory4 = "You Lose!!!"
victory5 = "I Am The Mighty Josh!"
victory6 = "Nobody Will Mess With Me Now!"
victory7 = "See? You'll Never Beat Me! NEVER!!!!"
victory8 = "YEAH YUH!!!"
victory9 = "Yes! I am the biggest champion of the world!"
victory10 = "In Your Face!"
victory11 = "Who's next?"
victory12 = "I won... was this my final test?!"
victory13 = "I won... was this my final test?! WAS IT?!?!"
victory14 = "I am so smart. I am so smart. I am so smart. S-M-R-T ... Uh, I mean S-M-A-R-T."
victory15 = "Ha, yeah! Who's the big man now, heh?"
victory16 = "Can't touch this!"
victory17 = "Chuck Norris has got nothing on Me!"
victory18 = "You're history, pal!"
victory19 = "I'm Not a Faggot, You Are a Faggot!"
victory20 = "Another day, another victory."
victory21 = "Back to You, Fuckers!"
victory22 = "You faggots have nothing on me!"
victory23 = "Winner!"
victory24 = "Behold! The Mighty Josh!"
;---------------------------------------------------------------------------
; Format:
; [Statedef STATENO]
; type = ?      S/C/A/L  stand/crouch/air/liedown
; movetype = ?  I/A/H    idle/attack/gethit
; physics = ?   S/C/A/N  stand/crouch/air/none
; juggle = ?             air juggle points move requires
;
; [State STATENO, ?]     ? - any number you choose
; type = ?
; ...

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

[State 1056, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S7,0

[State 1056, 1]
type = PlaySnd
trigger1 = animelem = 4
value = S170, 0

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

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

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,164

[State 180, ステート変更]
type = ChangeState
trigger1 = numhelper(13500) >= 1
trigger1 = pos y != 0
value = 1883

[State 180, ChangeState]
type = ChangeState
trigger1 = Var(14) = 1
value = 189
ctrl = 0

[State 180, ステート変更]
type = ChangeState
trigger1 = var(4) = 1
value = 185

[State 180, ChangeState]
type = ChangeState
trigger1 = Var(7) = 1
;trigger1 = WinPerfect
value = 1880
ctrl = 0

[State 180, ChangeState]
type = ChangeState
trigger1 = Var(22) = 1
;trigger1 = WinPerfect
value = 1881
ctrl = 0

[State 180, 2]
type = ChangeState
trigger1 = WinPerfect
value = 184 ;3

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [0,32]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [33,64]
value = 182

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [50,75]
value = 183

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [75,90]
value = 187

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [75,105]
value = 188

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [98,121]
value = 1882

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [101,136]
value = 1884 ;2

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [125,150]
value = 1885 ;2

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [132,164]
value = 1886 ;2

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

[State 181, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = S180, 0
volume = 255

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

;---------------------------------------------------------------------------
; Win pose 2: Yeah Yuh!!
; CNS difficulty: basic
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 181, 2]
type = PlaySnd
trigger1 = animelem = 2 ;time = 0
value = S181,0
volume = 255
;channel = 1

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

;---------------------------------------------------------------------------
; 勝利ポーズ（ドナルドガールと一緒）
; CNS レベル: 基本
[Statedef 183]
type = S
ctrl = 0
anim = 182 ;1
velset = 0,0

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 1
value = 182, 0

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

; Win pose PERFECT - EarthBound Win
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 184]
type = S
ctrl = 0
anim = 1801
velset = 0,0

[State 183, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
trigger1 = WinPerfect
value = 1801, 0+random%2 ;3
volume = 255

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

[State Perfect]
type = PlaySnd
trigger1 = time = 60
trigger1 = WinPerfect
value = S1800,0

[State Win Perfect]
type = Explod
trigger1 = time = 60
trigger1 = WinPerfect
anim = 1800
ID = 1800
postype = left
facing = 1
pos = 130,45
vel = -3,0
SCALE = .50,.50
removetime = -2
sprpriority = 5
ontop = 1

[State No More]
type = ModifyExplod
trigger1 = time > 80
Id = 1800
Trans = AddAlpha
Alpha = 256-((time-80)*8),((time-80)*8)

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nomusic

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,500]
flag = roundnotover

;---------------------------------------------------------------------------
; 勝利ポーズ待機（ドナルドガールと一緒）
; CNS レベル: 基本
[Statedef 185]
type = S
ctrl = 0
anim = 183 ;2
velset = 0,0

[State 180, ステート変更]
type = ChangeState
trigger1 = var(4) = 0
value = 186 ;183

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

;---------------------------------------------------------------------------
; 勝利ポーズ（ドナルドガールと一緒）
; CNS レベル: 基本
[Statedef 186]
type = S
ctrl = 0
anim = 182 ;1
velset = 0,0

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 1
value = 182, 0

[State 181, 2]
type = AssertSpecial
trigger1 = Time = [0,120]
flag = roundnotover

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

;-------------------------------------------------------------------------
; Win pose 4: Who's Next?
; CNS difficulty: basic
[Statedef 187]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 182, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S183,0
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

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

;-------------------------------------------------------------------------------
; Victory 5 - I am so S-M-R-T
[Statedef 188]
type = S
ctrl = 0
anim = 185 ;2
velset = 0,0,0

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 4,=1
value = 184,0 ;0,10

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

;---------------------------------------------------------------------------
[Statedef 189]
type = S
ctrl = 0
anim = 186
velset = 0,0

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 27 ;5
value = 4500,0

[State 1050, エフェクト表示]
type = Explod
trigger1 = Time = 27 ;5
anim = 3528
postype = P1
pos = 0, 0
scale = 1,1
bindtime = -1
sprpriority = 5
ownpal = 1
removeongethit = 1
ignohitpause = 1

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

;---------------------------------------------------------------------------
; Win pose SGS Win
; CNS difficulty: basic
[Statedef 1880]
type = S
ctrl = 0
anim = 187
velset = 0,0

[State 190, 3] ;Play SFEX2 Ryu Voice
type = PlaySnd
trigger1 = animelem = 1
value = 185, 0

[state 181, 1]
type = assertspecial
trigger1 = time < 250
flag = roundnotover
;flag2 = nobardisplay

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

;---------------------------------------------------------------------------
; Win pose 999 Hit SGS Win
; CNS difficulty: basic
[Statedef 1881]
type = S
ctrl = 0
anim = 187
velset = 0,0

[State 190, 3] ;Play SFEX2 Ryu Voice
type = PlaySnd
trigger1 = animelem = 1
value = 185, 0

[state 181, 1]
type = assertspecial
trigger1 = time < 700 ;650 ;450 ;250
flag = roundnotover
flag2 = nomusic
flag3 = nobardisplay

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

;---------------------------------------------------------------------------
; Win pose 6: Enemy Down
; CNS difficulty: basic
[Statedef 1882]
type = S
ctrl = 0
anim = 188
velset = 0,0

[State 181, 1]
type = PlaySnd
trigger1 = Time = 47 ;42 ;AnimElem = 1
value = S186, 0
volume = 255

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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0, 300]
flag = roundnotover

;-------------------------------------------------------------------------------
; Road Roller DA! Victory - WRYYYYYYYYY!!!
[Statedef 1883]
type = S
ctrl = 0
anim = 189
velset = 0,0,0

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 100,1, WRYYYYYYY]
type = PlaySnd
trigger1 = animelem = 2 ;Time = 0
value = 16500,0 ;1

[State 100,1, WRYYYYYYY]
type = PlaySnd
trigger1 = time = 4 ;animelem = 2 ;Time = 0
value = 16500,1 ;3 ;4

[State 186, EnvShake]
type = EnvShake
trigger1 = time = 4 ;animelem = 3
time = 250
freq = 100
ampl = -4

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

;---------------------------------------------------------------------------
; Win pose: Salute
; CNS difficulty: basic
[Statedef 1884]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1880 ;5
velset = 0,0

[State 100,1, Twang]
type = PlaySnd
trigger1 = animelem = 3 ;2 ;Time = 0
value = 187,0 ;16500,0 ;1

[State 185, Explod]
type = Explod
trigger1 = AnimElem = 3 ;2
pos = 0,0 ;IfElse(Facing=1,0,1),0 ;0,0
anim = 1851
postype = Left ;Back ;p1
vel = 0,0 ;1,0
removetime = -1
bindtime = -1
sprpriority = 5
ontop = 1
removeongethit = 1
scale = 1,1 ;1.3,1.3
facing = 1
vfacing = 1

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

[State 181, PlaySnd]
type = PlaySnd
trigger1 = time = 0 ;animelem = 6 ;5 ;4
value = S187,1 ;0
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

[State 183, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = nomusic

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = Time = [0,600]
flag = RoundNotOver
;-------------------------------------------------------------------------------
;Woo-Hoo!
[Statedef 1885]
type = S
movetype = I
physics = N
anim = 1991
ctrl = 0
velset = 0,0

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

[State 1991, PlaySnd]
type = PlaySnd
trigger1 = Time = 11
value = S4,7+random%3 ;S0,14
volume = 0
channel = -1

[State 1991, VelSet]
type = VelSet
trigger1 = Time > 10
x = 6
y = -7.15

[State 1991, VelAdd]
type = VelAdd
trigger1 = Time > 13
x = 0.5
y = -0.5
persistent = 3

[State 1991, AssertSpecial]
type = AssertSpecial
trigger1 = Time <= 210
flag = roundnotover

[State 1991, AssertSpecial]
type = AssertSpecial
trigger1 = Time > 10
flag = NoBarDisplay

;---------------------------------------------------------------------------
; Win pose: Backwards Cap Dance
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 1886]
type = S
ctrl = 0
anim = 1881
velset = 0,0

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [0,660]
flag = roundnotover

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animtime = 0
trigger2 = animelem = 25
trigger3 = animelem = 28
trigger4 = animelem = 30
trigger5 = animelem = 33
trigger6 = animelem = 43 ;25
trigger7 = animelem = 46 ;28
trigger8 = animelem = 48 ;30
trigger9 = animelem = 51 ;33
value = S188,1 ;S0,22

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 30
trigger2 = animelem = 48
value = S188,2 ;S0,23

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S188,0 ;S1,22
channel = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 37
value = S188,3 ;S0,23

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem = 55
value = S188,4 ;S0,23

[State 0, StopSnd]
type = StopSnd
trigger1 = animtime = 0
channel = 0

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

;---------------------------------------------------------------------------
; INTRO decider
;---------------------------------------------------------------------------
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 2
range = 0,112

[State 190, Intro Against Bosh Meary]
type = ChangeState
trigger1 = enemy,Name = "Bosh Meary" && enemy,authorname = "ABSOLUTE-Yveltal" ;btw this char is lost, SO GOOD LUCK FUCKING FINDING THAT SHIT
trigger2 = enemy,Name = "Josh Geary V2" && enemy,authorname = "Bosh Meary+edits by Black_Kyurem" ;same with this too
;trigger3 = enemy,Name = "Josh Geary AKA: Joey Slikk" && enemy,authorname = "Josh Geary"
value = 194
ctrl = 0

[State 190, Intro Against Kung Fu Man]
type = ChangeState
trigger1 = enemy,Name = "Kung Fu Man"
value = 193
ctrl = 0

[State 190, Intro Against Daniel/Rudy]
type = ChangeState
trigger1 = enemy,Name = "Daniel"
trigger2 = enemy,Name = "Daniel Gajardo Pulgar"
trigger3 = enemy,Name = "Dan" && enemy,authorname = "Daniel9999999"
trigger4 = enemy,Name = "Dan"  && enemy,authorname = "Daniel9999999/Masterhand128"
trigger5 = enemy,Name = "Rudy" && enemy,authorname = "jade_midori"
value = 196
ctrl = 0

[State 190, 2]
type = ChangeState
trigger1 = Var(2) = [0,32]
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [10,40]
value = 192

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [25,64]
value = 197 ;196

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [36,75]
value = 198 ;196

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [45,99]
value = 199 ;196

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [58,105]
value = 1910 ;196

[State 190, 3]
type = ChangeState
trigger1 = Var(2) = [64,112]
value = 1911 ;196
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

[State 190, 0]
type = PlaySnd
trigger1 = Time = 1
value = S190, 0
volume = 255
channel = 15

[State 190, 0]
type = PlaySnd
trigger1 = animelem = 2
value = S190, 1
channel = 17 ;15

[State 190, 0]
type = PlaySnd
trigger1 = animelem = 6
value = S50, 0
channel = 16 ;15

[State 190, 0]
type = PlaySnd
trigger1 = animelem = 6
value = S1900, 0
channel = 15

[State 190, 0]
type = PlaySnd
trigger1 = animelem = 31
value = S40, 1
channel = 15

[State 192, 1]
type = PlaySnd
trigger1 = AnimElem = 33
value = S190, 2+random%3
volume = 100
channel = 15

[State 106, 3]
type = Explod
trigger1 = AnimElem = 6
anim = 1900
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 0.4,0.4 ;1,1
removetime = 31

[State 191, Dust]
type = Explod
trigger1 = AnimElem = 31
anim = 7104 ;f60
ID = 7104 ;60
sprpriority = -2
postype = p1
scale = 1,1 ;0.5,0.5
ownpal = 1
pausemovetime = -1
supermovetime = -1

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

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;Intro 2 2010 Josh Geary
[Statedef 192]
type = S
ctrl = 0
anim = 191
velset = 0,0,0

[State 10190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay
flag3 = nomusic

[State 194,1] ;"Let's all go out for frosty chocolate milkshakes!"
type = PlaySnd
trigger1 = AnimElem = 1
value = 191, 0
channel = 15

[State 194,2]; POOF!
type = PlaySnd
trigger1 = AnimElem = 18
value = 191, 1
channel = 15

[State 194,2]; "OH MY GOD!"
type = PlaySnd
trigger1 = AnimElem = 24
value = 191, 2
channel = 16

[State 106, 3]
type = Explod
trigger1 = AnimElem = 18
anim = 3006
pos = 0,0
bindtime = -1
sprpriority = 5
ownpal = 1
scale = 1,1

[State 194, 4]
type = EnvShake
trigger1 = AnimElem = 18
trigger2 = AnimElem = 19
trigger3 = AnimElem = 20
trigger4 = AnimElem = 21
time = 15
ampl = -2
freq = 60
phase = 60

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

;---------------------------------------------------------------------------
; Introduction 3: Kung Fu Josh Geary
; CNS difficulty: basic
[Statedef 193]
type = S
ctrl = 0
anim = 192
velset = 0,0

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

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

[State 361, snd]
type = PlaySnd
trigger1 = AnimElem = 10 ;3 ;6 ;10
value = 1060,0 ;1
channel = 17

[State 194, ワープエフェ]
type = Explod
trigger1 = AnimElem = 10 ;2 ;10
anim = 20001 ;4360
ID = 20001 ;4360
ownpal = 1
postype = P1
pos = 0,-70
sprpriority = 3
scale = 0.8,0.8
supermovetime = 99999
;trans = add

[State 192, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;--------------------------------------------------------------------------
;Intro vs. Bosh Meary
[Statedef 194]
type = S
ctrl = 0
anim = 193
velset = 0,0

;[State 10196, VarSet]
;type = VarSet
;triggerall = p1name = "JGeary2013 Norman " && enemynear,Authorname = "Josh Geary" ; by Josh Geary
;triggerall = p3name = "JGeary2013 Norman " && enemynear,Authorname = "Josh Geary"
;trigger1 = 1
;v = 1
;value = 1
;range = 6,8

[State 196,Vs.Special]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay

[State 196, PlaySnd]
type = PlaySnd
;triggerall = anim = 193 ;9
trigger1 = AnimElem = 3
value = S192,0
channel = 15

[State 193, Voice 1]
type = PlaySnd
trigger1 = Animelem = 4 ;ElemTime(2) = 0
value = S192,2
channel = 17 ;0

[State 196, sound1]
type = PlaySnd
;triggerall = anim = 193 ;9
trigger1 = animelem = 9 ;10 ;9 ;Time = 1
value = 192, 1 ;8
channel = 16

[State 196, 2]
type = ChangeState
trigger1 = AnimTime = 0;300
value = 0

;---------------------------------------------------------------------------
; Introduction 4: Old Daniel Cosplay
; CNS difficulty: basic
[Statedef 196]
type = S
ctrl = 0
anim = 194 ;2
velset = 0,0

[State 192, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 194 ;2

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

[State 361, snd]
type = PlaySnd
trigger1 = AnimElem = 8 ;10 ;3 ;6 ;10
value = 1060,0 ;1
channel = 17

[State 194, ワープエフェ]
type = Explod
trigger1 = AnimElem = 8 ;10 ;2 ;10
anim = 20001 ;4360
ID = 20001 ;4360
ownpal = 1
postype = P1
pos = 0,-70
sprpriority = 3
scale = 0.8,0.8
supermovetime = 99999
;trans = add

[State 192, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Introduction 5: Backwards Cap
; CNS difficulty: basic
[Statedef 197]
type = S
ctrl = 0
anim = 196 ;2
velset = 0,0

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

[State 194,1] ;"If you ask Me Why I have a Backwards Cap here, It's Because I Want to, OK?"
type = PlaySnd
trigger1 = AnimElem = 1
value = 193, 0
channel = 15

[State 361, snd]
type = PlaySnd
trigger1 = AnimElem = 20 ;10 ;3 ;6 ;10
value = 1060,0 ;1
channel = 17

[State 194, ワープエフェ]
type = Explod
trigger1 = AnimElem = 20 ;10 ;2 ;10
anim = 20001 ;4360
ID = 20001 ;4360
ownpal = 1
postype = P1
pos = 0,-70
sprpriority = 3
scale = 0.8,0.8
supermovetime = 99999
;trans = add

[State 192, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Introduction 6: Username 666 Hand
; CNS difficulty: basic
[Statedef 198]
type = S
ctrl = 0
anim = 197
velset = 0,0

[State 194, 特殊効果]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nomusic

[state -2,]
type = AssertSpecial
trigger1 = 1
flag = NobardIsplay
flag2 = Nofg
flag3 = Nobg
ignorehitpause = 1

[State 194, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 0
value = 666, 0
channel = 15 ;2

[State 196, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2
value = 194,2
channel = 16 ;3 ;2

[State 194, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 240
value = 194, 1
channel = 17 ;3 ;2

[State 194, 音を鳴らす]
type = PlaySnd
trigger1 = Time = 156
value = 194, 0
channel = 17 ;3 ;2

[state ]
type=Explod
triggerall = !numexplod(9010)
trigger1 = Time = 1
id = 9010
anim = 9010
postype = left
pos = 120,265
random = 0,0
sprpriority = 209999999
removetime = 369 ;339 ;289 ;389
bindtime = -1
scale = 1.2,1.2
ontop = 1
ownpal = 0
vel = 0,0
accel = 0,0
facing = 1
vfacing = 1
ignorehitpause = 1
supermovetime = 99999999
pausemovetime = 99999999

[state -2,]
type = Explod
triggerall = !numexplod(9015)
trigger1 = Time = 1
id = 9015
anim = 9015
postype = left
pos = 195,240
random = 0,0
sprpriority = 210000000
removetime = 369 ;339 ;289 ;389
bindtime = -1
scale = .75,.75
ontop = 1
ownpal = 0
vel = 0,0
accel = 0,0
facing = 1
vfacing = 1
ignorehitpause = 1
supermovetime = 99999999
pausemovetime=99999999

[State 190, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Intro 7: I've read this book before
[Statedef 199]
type     = S
movetype = I
physics  = N
ctrl = 0
anim = 198
velset = 0,0

[State 194, ????]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194, ?????]
type = PlaySnd
trigger1 = Time = 20
value = 199,0+random%2 ;1900, 4
channel = 15

[State 194, ??????]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Intro 8: Who was I supposed to Fight Again?
[Statedef 1910]
type     = S
movetype = I
physics  = N
ctrl = 0
anim = 1910
velset = 0,0

[State 194, ????]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 195, ?????]
type = PlaySnd
trigger1 = Time = 1
value = 1081,0 ;8000, 4
channel = 15

[State 194, ?????]
type = PlaySnd
trigger1 = animelem = 17 ;Time = 20
value = 1990,0; +random%2 ;1900, 4
channel = 16

[State 194, ??????]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------
; Introduction 9: Yukkuri Joey Slikk
; CNS difficulty: basic
[Statedef 1911]
type = S
ctrl = 0
anim = 1911
velset = 0,0

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

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

;[State 361, snd]
;type = PlaySnd
;trigger1 = AnimElem = 10 ;3 ;6 ;10
;value = 1060,0 ;1
;channel = 17

;[State 194, ワープエフェ]
;type = Explod
;trigger1 = AnimElem = 10 ;2 ;10
;anim = 20001 ;4360
;ID = 20001 ;4360
;ownpal = 1
;postype = P1
;pos = 0,-70
;sprpriority = 3
;scale = 0.8,0.8
;supermovetime = 99999
;;trans = add

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 6 ;14 ;Time = 27 ;5
value = 1990,1 ;4500,0
channel = 16

[State 181, 音を鳴らす]
type = PlaySnd
trigger1 = AnimElem = 2 ;10 ;Time = 27 ;5
value = 6000,2 ;4500,0
channel = 17

[State 1050, エフェクト表示]
type = Explod
trigger1 = AnimElem = 2 ;10 ;Time = 27 ;5
anim = 3528
postype = P1
pos = 0, 0
scale = 1,1
bindtime = -1
sprpriority = 5
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 192, 4] ;Change to stand state
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;Rematch Intro
[Statedef 1950]
type = S
ctrl = 0
anim = 1950 ;1
velset = 0,0,0

[State 10190,1]
type = AssertSpecial
trigger1 = 1
flag = Intro
flag2 = nobardisplay
;flag3 = nomusic

[State 194,1] ;"You've Came Back for a Rematch, Huh?"
type = PlaySnd
trigger1 = AnimElem = 2 ;1
value = 1950, 0
channel = 15

[State 194,5]
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
type = S
ctrl = 0
velset = 0,0

[State 195, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 5 ;20
range = 0,42 ;55

[State 190, 6]
type = ChangeState
trigger1 = Var(5) = [0,32]
value = 19550

[State 190, 7]
type = ChangeState
trigger1 = Var(5) = [10,42]
value = 19551

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

;[State 195, 0]
;type = StopSnd
;trigger1 = time = 0
;channel = 1

[State 195, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S195,0
channel = 0 ;1

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

;---------------------------------------------------------------------------
; Taunt: In Your Face!
; CNS difficulty: easy
[Statedef 19551]
type = S
ctrl = 0
anim = 19510 ;195 ;+random<500,1956
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 100,1]
type = PlaySnd
trigger1 = AnimElem = 3
;trigger2 = anim = 195
value = 195,1 ;0 ;+random%2
channel = 0

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

;---------------------------------------------------------------------------
; ??
; CNS ???: ??
[Statedef 19552]
type = S
ctrl = 0
anim = 19511 ;195
velset = 0,0
movetype = I
poweradd= -100
physics = S
sprpriority = 2

[State 195, ?????]
type = PlaySnd
trigger1 = Time = 1
value = 1081,0 ;8000, 4

[State 195, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 195, ??]
type = NotHitBy
trigger1 = time = 4 ;2
value = SCA
time = 5

[State 195]
type = HitOverride
trigger1 = AnimElem = 5 ;2
attr = SCA, NA, SA, HA, NT, ST, HT, NP, SP, HP
stateno = 19553 ;196
time = 40

[State 195]
type = posset
trigger1 = 1
y = 0

[State 195]
type = ReversalDef
trigger1 = AnimElem = 3 ;2
reversal.attr = SCA, NA, SA, HA, NT, ST, HT, AT
p1stateno = 19553 ;196
pausetime = 1,3
hitsound = -1 ;S3800, random%4
sparkno = -1 ;S5611
sparkxy = 12,-18
attr = SCA, NA, SA, HA, NT, ST, HT, AT
time = 40

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

;---------------------------------------------------------------------------
[Statedef 19553]
type = S
ctrl = 0
anim = 199 ;196
velset = 0,0
movetype = I
poweradd= 0
physics = S
sprpriority = 2

[State 196, ?????]
type = PlaySnd
trigger1 = Time = 1
value = 192,0 ;10000, 4

[State 196, ?????]
type = PlaySnd
trigger1 = Time = 1
value = 199, 2 ;8000, 9

[State 751, エフェクト表示]
type = Explod
trigger1 = Time = 0 ;6
anim = 9315
ID = 9315
sprpriority = 7
ontop = 1
postype = p2
pos = -8, -65
bindtime = 1
ownpal = 1
pausemovetime = 10000
supermovetime = 10000

[State 196, ??????]
type = ChangeState
trigger1 = AnimTime = 0
value = 19554 ;198
ctrl = 1
;---------------------------------------------------------------------------
[Statedef 19554]
type    = C
movetype= I
physics  = C
velset = 0,0
ctrl = 0
anim = 19512 ;198
sprpriority = 3

[State 198]
type = posset
trigger1 = 1
y = 0

[State 198, 2]
type = Posset
trigger1 = enemynear,alive
trigger1 = facing = 1
trigger1 = Time = 0
x = enemynear,Pos x+100

[State 198, 2]
type = Posset
trigger1 = enemynear,alive
trigger1 = facing = -1
trigger1 = Time = 0
x = enemynear,pos x-100

[State 198, 0]
type = Pause
trigger1 = time = 1
time = 46 ;36
movetime = 46 ;36

[State 198, 2]
type = Posadd
trigger1 = enemynear,alive=0
trigger1 = Time = 0
x = p2dist x+130

[State 198, 0]
type = Turn
trigger1 = time = 0

[State 198, Some moments of invincibility]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 36

[State 198, ??????]
type = ChangeState
Trigger1 = time = 40 ;30
value = 0
Ctrl = 1

;---------------------------------------------------------------------------
; Standing Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 1				;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 layering priority to 2 (in front)

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 200 + var(11)

[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 25, 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 = 0				;Spark anim no (Def: set above)
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -76		;X-offset for the "hit spark" rel. to p2,
					;Y-offset for the spark rel. to p1
hitsound = S5, 0			;Sound to play on hit
guardsound = S6, 0			;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  = 12		;Time opponent is in hit state
ground.velocity = -3 ;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, 0

[State 200, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 200, 2]
type = CtrlSet
trigger1 = animelem = 5
value = 10 ;25 ;10 ;1

;[State 200, 2]
;type = ChangeState
;triggerall = Time = [8,11]
;trigger1 = command = "x"
;value = 200
;ctrl = 0

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,1]
trigger1 = movecontact
value = 210

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [2,3]
trigger1 = movecontact
value = 230

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

;---------------------------------------------------------------------------
; Standing Medium Punch
; CNS difficulty: easy
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 210

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 210 + var(11)

[State 210, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = 59,2
guardflag = MA
pausetime = 12,12
;sparkno = 1 ;S8001
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -76 ;-5,-64
;guard.sparkno = S8011
hitsound = S5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -4 ;5.5
air.velocity = -2.5,-4

[State 210, 2]
type = CtrlSet
trigger1 = animelem = 8
value = 1

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

[State 210, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 220 + var(11)

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

[State 200,HitDef]
type = HitDef
trigger1 = Time = 0 ;AnimElem = 3
attr = S, NA
animtype = Hard
damage    = 63,0 ;ifelse(Var(39)=1,91,84)
;getpower = 144,36
;givepower = 36
guardflag = MA
;hitflag = MAF
pausetime = 13,12
;sparkno = 2 ;S2000+(random%3)
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
;guard.sparkno = S2010
sparkxy = -10, -76 ;0,-60
hitsound = S5, 2
guardsound = S6, 1
ground.type = High ;Low
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -5 ;7
air.hittime = 13
air.velocity = -4,-5
yaccel = .4

[State 220, 2]
type = CtrlSet
trigger1 = animelem = 5
value = 1

[State 220, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,2
channel = 1

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

;---------------------------------------------------------------------------
; Standing Light Kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
velset = 0,0
anim = 230

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 230 + var(11)

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

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = light ;Medium
damage    = 26
guardflag = MA
pausetime = 12,12
;sparkno = 0
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-24
hitsound   = S5,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 10
ground.hittime  = 11
ground.velocity = -3 ;4
air.velocity = -2.5,-3.5

[State 230, 2]
type = CtrlSet
trigger1 = animelem = 7
value = 4 ;10 ;25 ;10 ;1

[State 230, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,1]
trigger1 = movecontact
value = 210

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 240 + var(11)

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 35
guardflag = MA
pausetime = 12,12
;sparkno = 1
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-52
hitsound   = S5,4
guardsound = S6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -4 ;5
air.velocity = -2.2,-3.2

[State 240, 2]
type = CtrlSet
trigger1 = animelem = 6
value = 4 ;10 ;25 ;10 ;1

[State 240, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 250 + var(11)

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

[State 250,HitDef]
type = HitDef
trigger1 = AnimElem = 5
attr = S, NA
animtype = Hard
damage    = 45
;getpower = 144,36
;givepower = 36
guardflag = M
hitflag = MAF
pausetime = 12,12
;sparkno = 2 ;S2000+(random%3)
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
;guard.sparkno = S2010
sparkxy = 0,-65
hitsound = S5, 5
guardsound = S6, 1
ground.type = low
ground.slidetime = 16
ground.hittime  = 16
ground.velocity = -7,-5
air.hittime = 13
air.velocity = -7,-5
fall = 1
yaccel = .4

[State 250, 2]
type = CtrlSet
trigger1 = animelem = 12
value = 4 ;10 ;25 ;10 ;1

[State 250, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,3
channel = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 400 + var(11)

[State 400, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 25, 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 = 0				;Spark anim no (Def: set above)
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -76		;X-offset for the "hit spark" rel. to p2,
					;Y-offset for the spark rel. to p1
hitsound = S5, 0			;Sound to play on hit
guardsound = S6, 0			;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  = 12		;Time opponent is in hit state
ground.velocity = -3 ;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 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 400, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 400, 2]
type = CtrlSet
trigger1 = animelem = 5
value = 10 ;25 ;10 ;1

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,1]
trigger1 = movecontact
value = 410

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [2,3]
trigger1 = movecontact
value = 430

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 410 + var(11)

[State 410, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = 49,2
guardflag = MA
pausetime = 12,12
;sparkno = 1 ;S8001
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -75 ;-5,-64
;guard.sparkno = S8011
hitsound = S5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -4 ;5.5
air.velocity = -2.5,-4

[State 410, 2]
type = CtrlSet
trigger1 = animelem = 8
value = 1

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

[State 410, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 420 + var(11)

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

[State 420, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 62
animtype  = Medium
hitflag = MAF
guardflag = MA
pausetime = 8,12
;sparkno = 2
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-115
hitsound = S5,6
guardsound = S6,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = 0 ,-12.2
guard.velocity = -18
air.type = low
air.velocity = 0,-16
yaccel = .5 ;66
;p2stateno = 226
p2facing = 1
fall = 1

[State 420, 2]
type = CtrlSet
trigger1 = animelem = 6
value = 1

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

[State 420, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,2
channel = 1

[State 410, 3]
type = ChangeState
triggerall = (Movehit) && (time = [9,11])
trigger1 = command = "holdup"
trigger2 = var(3)
value = 1045
ctrl = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 430 + var(11)

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

[State 430, 2]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 28
animtype  = Light
hitflag = MAFD
guardflag = M ;L
pausetime = 12,12
;sparkno = 0
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-10
hitsound   = S5,3
guardsound = S6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -3 ;5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 20

[State 430, 3]
type = CtrlSet
trigger1 = animelem = 8
value = 1

[State 430, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,3]
trigger1 = movecontact
value = 410

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 440 + var(11)

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

[State 450, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 67
hitflag = MAFD
guardflag = MA ;L
pausetime = 12,12
;sparkno = 1
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -5,-10
hitsound   = S5,4
guardsound = S6,0
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, 3]
type = CtrlSet
trigger1 = animelem = 11
value = 1

[State 440, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 450 + var(11)

[State 450, 2]
type = PlaySnd
trigger1 = animelem = 6
value = 0, 4

[State 450, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 70
hitflag = MAFD
guardflag = MA ;L
pausetime = 5,12
;sparkno = 3
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -5,-95
hitsound   = s5,7
guardsound = s6, 0
;guard.sparkno = s6000
ground.type = High
animtype = Up
ground.slidetime = 10
ground.hittime  = 5
ground.velocity = -1,-15
air.velocity = -1,-12.5
guard.velocity = -5
fall = 1

[State 450, 4]
type = CtrlSet
trigger1 = animelem = 11
value = 1

[State 450, 4]
type = PlaySnd
trigger1 = animelem = 6 ;time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,4
channel = 1

[State 450, 5]
type = ChangeState
triggerall = (Movehit) && (time = [9,11])
trigger1 = command = "holdup"
trigger2 = var(4)
value = 1045
ctrl = 1

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

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 600 + var(11)

[State 600, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA			;Attribute: Standing, Normal Attack
damage = 25, 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 = 0				;Spark anim no (Def: set above)
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -76		;X-offset for the "hit spark" rel. to p2,
					;Y-offset for the spark rel. to p1
hitsound = S5, 0			;Sound to play on hit
guardsound = S6, 0			;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  = 12		;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 600, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 600, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 600, 2]
type = CtrlSet
trigger1 = animelem = 5
value = 10 ;25 ;10 ;1

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,4]
trigger1 = movecontact
value = 630

[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 610 + var(11)

[State 610, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage = 59,2
guardflag = MA
pausetime = 12,12
;sparkno = 1 ;S8001
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10, -76 ;-5,-64
;guard.sparkno = S8011
hitsound = S5,1
guardsound = S6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 610, 2]
type = CtrlSet
trigger1 = animelem = 8
value = 1

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

[State 610, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,4]
trigger1 = movecontact
value = 640

[State 610, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------------
; Jump Strong Punch
; CNS difficulty: easy
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 70
ctrl = 0
anim = 620

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 620 + var(11)

;[State 620,HitDef]
;type = HitDef
;trigger1 = AnimElem = 5
;attr = A, NA
;animtype = Hard
;damage   = 87,10
;getpower = 134,36
;givepower = 36
;guardflag = MA ;HA
;hitflag = MAF
;pausetime = 12,12
;sparkno = 3 ;S2000
;guard.sparkno = S2010
;sparkxy = -10,-20
;hitsound = S5, 2
;guardsound = S6, 1
;ground.type = High
;ground.slidetime = 8
;ground.hittime  = 10
;guard.slidetime = 16
;guard.hittime = 16
;ground.velocity = -4
;ground.velocity = -5,1
;air.velocity = -10,10
;air.hittime = 13
;air.velocity = -4,-5
;air.fall = 1
;fall = 1

[State 620, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 78
guardflag = MA ;HA
priority = 4
pausetime = 15,15 ;20,10
;sparkno = 3 ;s6004
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-20 ;8
hitsound   = s5,2
guardsound = s6, 1
;guard.sparkno = s6000
animtype = Up
ground.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -5,1
air.velocity = -10,10
fall = 1

[State 620, 2]
type = CtrlSet
trigger1 = animelem = 10
value = 5

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

[State 610, 4]
type = PlaySnd
trigger1 = animelem = 4 ;time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,4
channel = 1

[State 620, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 630 + var(11)

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

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 28
guardflag = MA ;HA
priority = 3
pausetime = 8,8
;sparkno = 0
sparkno = S8000				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -5,-55
hitsound   = S5,0
guardsound = S6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -4
air.velocity = -2,-3

[State 630, 4]
type = PlaySnd
trigger1 = time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,0
channel = 1

[State 630, 2]
type = CtrlSet
trigger1 = animelem = 7
value = 5

[State 8, 0]
type = ChangeState
triggerall = var(1)
triggerall = var(8) = [0,4]
trigger1 = movecontact
value = 610

[State 630, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 640 + var(11)

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

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 36
guardflag = MA ;HA
priority = 4
pausetime = 12,12
;sparkno = 1
sparkno = S8001 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-10
hitsound   = S5,4
guardsound = S6,0
animtype = Med
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -5
air.velocity = -3,-4

[State 640, 4]
type = PlaySnd
trigger1 = animelem = 2 ;time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,1
channel = 1

[State 640, 2]
type = CtrlSet
trigger1 = animelem = 5
value = 5

[State 640, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

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

[State 200,Anim]
type = ChangeAnim
trigger1 = time = 0
value = 650 + var(11)

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

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 50
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
;sparkno = 3
sparkno = S8002 ;0				;Spark anim no (Def: set above)
guard.sparkno = S8011
sparkxy = -10,-20
hitsound = S5,8
guardsound = S6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 12
ground.velocity = -5 ,0
airguard.velocity = -1.8,-.8
air.type = High
air.velocity = -8,6 ;-7,5
air.hittime = 20
p2facing = 1
fall = 1
air.fall = 1

[State 650, 4]
type = PlaySnd
trigger1 = animelem = 2 ;time = 0
trigger1 = random < 500
;trigger1 = palno != 10
value = S4,2
channel = 1

[State 650, 2]
type = CtrlSet
trigger1 = animelem = 6
value = 5

[State 650, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1

;---------------------------------------------------------------------
; ゲージ溜め動作
[Statedef 700]
type = S
movetype = I
physics = N
ctrl = 0
anim = 700
velset = 0, 0

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

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = 1, 0 ;3
channel = 1
persistent = 0

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

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time < 11
value = 5

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time < 21
value = 7

[State 4100,Poweradd]
type = Poweradd
trigger1 = Time >= 21
value = 12

[State 700, 9]
type = ChangeState
triggerall = var(51) = 0
;trigger1 = command != "charge"
trigger1 = !var(0) && (Command != "hold_y" || Command != "hold_b")
trigger2 = var(0) && RoundState = 2 && (inguarddist || P2bodydist X <= 50)
trigger3 = Power >= 5000
value = 701
ctrl = 1

;------------------- 終了
[Statedef 701]
type = S
movetype = I
physics = N
ctrl = 0
anim = 701
velset = 0, 0

[State 820,PlaySnd]
type = Stopsnd
trigger1 = Time = 0
channel = 1
persistent = 0

[State 820,PlaySnd]
type = Stopsnd
trigger1 = Time = 0
channel = 0
persistent = 0

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

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

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

[State 900, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NT
hitflag = M-
sparkno = -1
priority = 1, Miss
;sparkxy = -10, -42
sprpriority = 1
p1sprpriority = 1
hitsound = S1,1
p1stateno = 810
p2stateno = 820
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1
fall = 1

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

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

[State 901, 0]
type = NotHitBy
trigger1 = AnimElem = 1
value = SCA

[State 901, Whoosh]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 6
trigger3 = AnimElem = 10
trigger4 = AnimElem = 14
trigger5 = AnimElem = 18
;trigger6 = AnimElem = 22
;trigger7 = AnimElem = 26
value = S0, 4

[State 901, Yahoo]
type = PlaySnd
trigger1 = AnimElem = 1
value = S4, 5

[State 901, 1]
type = TargetBind
trigger1 = AnimElem = 1
time = 10
pos = 45, -5 ;-9

[State 901, 2]
type = TargetBind
trigger1 = AnimElem = 2
trigger2 = AnimElem = 6
trigger3 = AnimElem = 10
trigger4 = AnimElem = 14
trigger5 = AnimElem = 18
;trigger6 = AnimElem = 22
;trigger7 = AnimElem = 26
time = 5
pos = 25, -80 ;50

[State 901, 3]
type = TargetBind
trigger1 = AnimElem = 3
trigger2 = AnimElem = 7
trigger3 = AnimElem = 11
trigger4 = AnimElem = 15
trigger5 = AnimElem = 19
;trigger6 = AnimElem = 23
;trigger7 = AnimElem = 27
time = 5
pos = -15, -80 ;50

[State 901, 4]
type = TargetBind
trigger1 = AnimElem = 4
trigger2 = AnimElem = 8
trigger3 = AnimElem = 12
trigger4 = AnimElem = 16
;trigger5 = AnimElem = 20
;trigger6 = AnimElem = 24
time = 5
pos = -15, -70 ;40

[State 901, 5]
type = TargetBind
trigger1 = AnimElem = 5
trigger2 = AnimElem = 9
trigger3 = AnimElem = 13
trigger4 = AnimElem = 17
;trigger5 = AnimElem = 21
;trigger6 = AnimElem = 25
time = 5
pos = 25, -70 ;40

[State 901, 6]
type = TargetLifeAdd
trigger1 = AnimElem = 20 ;8 ;0 ;4 ;0 ;24 ;16
;trigger1 = PalNo != 11
trigger2 = AnimElem = 20 ;8 ;0 ;4 ;0 ;24 ;16
;trigger2 = PalNo != 8
value = -125

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 20 ;8 ;0 ;4 ;0
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 20 ;8 ;0 ;4 ;0

; turn away at end
;[State 901, 7]
;type = Turn
;;trigger1 = AnimTime = 0
;trigger1 = AnimElem = 20
;trigger1 = NumTarget
;trigger1 = facing = target,facing

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

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

[State 902, 1]
type = AngleSet
trigger1 = 1
value = 90

[State 902, 2]
type = AngleDraw
trigger1 = Time > 7 ;10

[State 902, blah]
type = turn
trigger1 = animelem=3
trigger2 = animelem=5
trigger3 = animelem=7
trigger4 = animelem=9
trigger5 = animelem=11
trigger6 = animelem=13
trigger7 = animelem=15
trigger8 = animelem=17
;trigger9 = animelem=19
;trigger10 = animelem=21
;trigger11 = animelem=23

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

;-------------------------------------------------------------------------------
;Josh Throw P2 in Air
[Statedef 821]
type = A
movetype = H
physics = A
juggle = 15
velset = 10, -6.5

[State 903, 1]
type = PosSet
trigger1 = Time = 0
X = enemyNear, Pos X
Y = 0

[State 903, 2]
type = SelfState
value = 5050
trigger1 = Life <= 0

[State 903, 3]
type = SelfState
value = 5050
trigger1 = Life > 0

;---------------------------------------------------------------------------
[Statedef 1045]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1


[State 1045, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 1045, 2]
type = VarSet
trigger1 = command = "holdfwd"
trigger2 = var(42) = -1
sysvar(1) = 1

[State 1045, 3]
type = VarSet
trigger1 = command = "holdback"
sysvar(1) = -1

[State 1045, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x))) * 1.35
y = 1.65*const(velocity.jump.y)

[State 1045, 5]
type = VelSet
trigger1 = AnimTime = 0
trigger1 = prevstateno = 100
trigger1 = sysvar(1) = 1
x = const(velocity.runjump.fwd.x)


[State 1045, Afterimage]
type = AfterImage
trigger1 = time = 0
length = 30
PalBright   =  0,0,0
PalContrast =  120,120,220
PalAdd      =  0,0,0
PalMul      = 1,1,1
TimeGap  = 1
FrameGap = 5
Trans = Add
time = 20

[State 1045, Super Jump Afterimage]
type = null
trigger1 = time = 0
length = 100
PalBright   =  320, 320, 320
PalContrast =  10, 10, 10
PalAdd      =  80,80,100
PalMul      = .50,.50,.50
TimeGap  = 1
FrameGap = 5
Trans = Add
time = 30

[State 720, Dust];(code By DShizNetZ, Effects by IMT(Taken from EMWｴs Paper Mario))
type = Explod
trigger1 = (Time = 0) && (Pos Y >= 0)
anim = 1045
pos = -10,0
postype = p1
sprpriority = 5
supermove = 1
bindtime = 1
shadow = -1,0,0
scale=.7,.7

[State 1045, 8]
type = PlaySnd
trigger1 = time = 0
value = 1045,0

[State 1045, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

[State 1045, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 421

;-----------------------------------------------------------
; Special finish helper
[Statedef 9997]
anim = 9999

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S9999,0 ;3
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

[State 8740, a3]
type = Explod
trigger1 = time = 0
anim = 8740;8789
id = 8740
pos = 0,0
postype = back
ontop = 1
bindtime = -1
supermovetime = 999
pausemovetime= 999
sprpriority = 20
removetime = -2
ignorehitpause = 1
scale = .5,.5
removeongethit = 1
ownpal = 1

;-----------------------------------------------------------
; Super finish helper
[Statedef 9999]
anim = 9999

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S9999,0
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S9999,1 ;0
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

[State 9999, Explod]
type = Explod
trigger1 = time = 0
;trigger2 = WinKO
anim = 8400
pos = 0,0
postype = left
facing = 1
vfacing = 1
bindtime = -1
;removetime = 100
scale = 1,1
sprpriority = -10

;---------------------------------------------------------------------------
;Spark Helper
;------------------------ 1
[Statedef 2005]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 4110, Explod]
type = Explod
trigger1 = Time = 0 && NumExplod(2005) = 0
anim = 8006+random%3 ;F3 ;2310
id = 2005
pos = 0,ifelse(IsHelper(2005)=1,(Parent,Var(20)),0)
postype = P1
sprpriority = 8
bindtime = -1
ownpal = 0
removetime = 18
facing = ifelse((Random=[0,499]),-1,1)
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, Varset]
type = Varset
trigger1= Time = 0
ignorehitpause = 1
var(1) = 0
persistent = 0

[State 4110, Varadd]
type = Varadd
trigger1= Time >= 8
ignorehitpause = 1
var(1) = -24

[State 4110, PalFX]
type = PalFX
trigger1= Time > 0
add = Var(1)-1,Var(1)-1,Var(1)-1
time = 1

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 0 && NumExplod(2005) = 0

;---------------------------------------------------------------------------
; Super Start Spark Helper
;------------------------ 1
[Statedef 2300]
type = A
movetype = I
physics = N
ctrl = 0
anim = 20000
velset = 0,0
ownpal = 1

[State 820,PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 20,2 ;1, 9
persistent = 0

[State 3000, BGPalFX]
type = BGPalFX
trigger1 = 1
time = 1
add = 0,0,0
mul = 32,32,32
sinadd = 0,0,0,1
invertall = 0
color = 256

;Super Spark left half, facing right
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X <= 0
trigger1 = Facing = 1
anim = 7004 ;2305
postype = P1
pos = 0,0
facing = -1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;Super Spark right half, facing right
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X > 0
trigger1 = Facing = 1
anim = 7004 ;2305
postype = P1
pos = 0,0
facing = 1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

;Super Spark left half, facing left
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X < 0
trigger1 = Facing = -1
anim = 7004 ;2305
postype = P1
pos = 0,0
facing = 1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;Super Spark right half, facing left
[State 3000, 1]
type = Explod
trigger1 = Time = 3
trigger1 = Pos X > 0
trigger1 = Facing = -1
anim = 7004 ;2305
postype = P1
pos = 0,0
facing = -1
sprpriority = 6
pausemovetime = 99999999999999
supermovetime = 99999999999999
persistent = 0

[State 3000, Hyper Portrait]
type = explod
trigger1 = Time = 3 ;animelem = 2 ;1 ;2 ;time = 0
anim = 6000
postype = back
sprpriority = -3
pausemovetime = 99999999999999
supermovetime = 99999999999999 ;-1
removetime = 39 ;-1 ;39 ;40 ;70
pos = 0,0
bindtime = -1
removeongethit = 1

[State 3000, Explod]
type = Explod
trigger1 = Time = 3 ;animelem = 2 ;1 ;2 ;time = 0
anim = 4500
ID = 4500
pos = 0,0
postype = left
facing = 1
bindtime = -1
removetime = 39 ;-1 ;39 ;40 ;70
sprpriority = -7
ownpal = 1
pausemovetime = 99999999999999
supermovetime = 99999999999999 ;-1 ;39 ;40 ;70
removeongethit = 1

;Fade out
[State 4001, Fade Out]
type=palfx
trigger1= Time = 30
time=12
sinadd=-255,-255,-255,60

[State 4110, DestroySelf]
type = DestroySelf
trigger1 = Time > 39

;-----------------------------------------------------------
; KO'ed helper
[Statedef 61000]
anim = 9998

[State 9999, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S9999,2
volume = 255
channel = -1
lowpriority = -1
freqmul = 1.0
loop = 0
pan = 0
abspan = 0
ignorehitpause = 0
persistent = 0

[State -2, 死亡カットイン]
type=Explod
;triggerall = life <= 0
;triggerall = RoundState = 3
trigger1 = time = 0 ;Lose
anim=6101
pos=0, -10 ;-20 ;-45 ;0 ;35 ;12
postype=back
sprpriority=-4
supermove=1
ownpal = 1
bindtime=50 ;85 ;90
vel=0,0
removetime=50 ;85 ;90 ;60
scale = 1.05,1.05 ;1.20,1.20

[State -2, 演出]
type=Explod
;triggerall = life <= 0
;triggerall = RoundState = 3
trigger1 = time = 0 ;Lose
anim=10010
pos=0, 0 ;0
postype=back
sprpriority=-4
supermove=1
ownpal = 1
bindtime=50 ;85 ;90 ;60
vel=0,0
removetime=50 ;85 ;90 ;60
;scale = 1,2

[State -2, 演出]
type=Explod
;triggerall = life <= 0
;triggerall = RoundState = 3
trigger1 = time = 0 ;Lose
anim=10010
pos=0, 20 ;0
postype=back
sprpriority=-4
supermove=1
ownpal = 1
bindtime=50 ;85 ;90 ;50
vel=0,0
removetime=50 ;85 ;90 ;60
;scale = 1,2

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

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

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

[Statedef -3]

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

[State -3, Jumping Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 50 ;Jump Start
value = 50, 0

[State -3, Hopping Back Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 105 ;Jump Start
value = 50, 0

[State -3, Pain Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 5100
trigger2 = stateno = 5170
value = s5000,0

; kill intro sounds if intro is skipped
[State -3, stopsound]
type = StopSnd
trigger1 = RoundState = 2
id = 190
channel = 15 ;2

; kill intro sounds if intro is skipped
[State -3, stopsound]
type = StopSnd
trigger1 = RoundState = 2
id = 190
channel = 16 ;3 ;2

; kill intro sounds if intro is skipped
[State -3, stopsound]
type = StopSnd
trigger1 = RoundState = 2
id = 190
channel = 17 ;16 ;3 ;2

[State -3, varrandom]
type = VarRandom
triggerall = stateno != [200,700]
trigger1 = Time = 0
v = 8
range = 0,3

;By Default, aereal raves are on, disable to achieve a more CvS styled gameplay
;And to avoid the AI to make them as well
[State -3, Aereal Raves]
type = VarSet
trigger1 = 1
var(13) = 1 ;0

[State -3, Helper3]
type = Helper
triggerall = WinKO
triggerall = !numhelper(9999)
trigger1 = stateno = 1050
trigger2 = stateno = 1075 ;1213
;trigger3 = stateno = 1253
;trigger4 = stateno = 1412
helpertype = normal
name = "Special EX Finish Helper"
ID = 9999
stateno = 9997
pos = 0,0
postype = p1
ownpal = 1
ignorehitpause = 1

[State -3, Helper]
type = Helper
triggerall = Lose
trigger1 = !numhelper(61000)
helpertype = normal
name = "KO'ed Helper"
ID = 61000
stateno = 61000
pos = 0,0
postype = p1
ownpal = 1
ignorehitpause = 1

[State -3, Helper]
type = Helper
triggerall = WinKO
triggerall = !numhelper(9999)
trigger1 = stateno = 3003 ;3000
trigger2 = stateno = 3013
trigger3 = stateno = 3023
;trigger4 = stateno = 13503
;trigger4 = stateno = 3037
helpertype = normal
name = "Super Finish Helper"
ID = 9999
stateno = 9999
pos = 0,0
postype = p1
ownpal = 1
ignorehitpause = 1

[State -3,]
type = Varset
trigger1 = EnemyNear,GethitVar(hitcount) >=0
trigger1 = PalNo != 12 || Var(40) != 1
v = 19 ;10
value = 0 + (EnemyNear,GethitVar(hitcount))

[State -3,]
type = Varset
trigger1 = EnemyNear,movetype != H
trigger1 = PalNo != 12 || Var(40) != 1
v = 19 ;10
value = 0

[State -3,]
type = AttackMulSet
trigger1 = Var(19) > 0
trigger1 = Var(19) < 10
trigger1 = PalNo != 12 || Var(40) != 1
value = 1.0 - (var(19) * 0.078)

[State -3,]
type = AttackMulSet
trigger1 = EnemyNear,movetype != H
trigger1 = PalNo != 12 || Var(40) != 1
value = 1

;---------------------------------------(AI)
[State -1,セレスティアルスター]
type = ChangeState
value = 4200
TriggerAll=RoundState=2
triggerall = Var(1) != 0
triggerall = Var(40) || Var(41) ;!NumExplod(38000)
;triggerall = Var(41)
triggerall = Power >= 5000
trigger1 = ctrl
trigger1=Random <= 200

[State -3,瞬獄殺]
Type = ChangeState
Value = 4800
TriggerAll=var(1) != 0
TriggerAll=StateType!=A
TriggerAll=RoundState=2
TriggerAll=P2BodyDist X=[20,190]
TriggerAll=P2BodyDist Y>=-80
TriggerAll=Ctrl||StateNo = 100
;triggerall = roundno >= 2
triggerall = power >= 5000
triggerall = life <= (LifeMax/2)
TriggerAll=Random <= 1500 ;Random<=var(1)*60||var(1)>9
Trigger1 = (PrevStateNo=[5000,5270])
Trigger2 = (PrevStateNo=[120,159])
