

[Data]
life = 1000
attack = 100
defence = 160
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           
yscale = 1          
ground.back = 15    
ground.front = 16    
air.back = 12        
air.front = 12       
height = 60          
proj.attack.dist = 90
proj.doscale = 0     
head.pos = -5, -90   
mid.pos = -5, -60   
shadowoffset = 0    
draw.offset = 0,0    

[Velocity]
walk.fwd  = 2.4      
walk.back = -2.2  
run.fwd  = 4.6, 0    
run.back = -4.5,-3.8
jump.neu = 0,-8.4    
jump.back = -2.55   
jump.fwd = 2.5     
runjump.back = -2.55,-8.1 
runjump.fwd = 4,-8.1      
airjump.neu = 0,-8.1     
airjump.back = -2.55     
airjump.fwd = 2.5         
air.gethit.groundrecover = -.15,-3.5  
air.gethit.airrecover.mul = .5,.2     
air.gethit.airrecover.add = 0,-4.5    
air.gethit.airrecover.back = -1      
air.gethit.airrecover.fwd = 0         
air.gethit.airrecover.up = -2         
air.gethit.airrecover.down = 1.5     

[Movement]
airjump.num = 1      
airjump.height = 35  
yaccel = .44         
stand.friction = .85  
crouch.friction = .82 
stand.friction.threshold = 2         
crouch.friction.threshold = .05       
air.gethit.groundlevel = 25           
air.gethit.groundrecover.ground.threshold = -20 
air.gethit.groundrecover.groundlevel = 10   
air.gethit.airrecover.threshold = -1  
air.gethit.airrecover.yaccel = .35    
air.gethit.trip.groundlevel = 15     
down.bounce.offset = 0, 20            
down.bounce.yaccel = .4              
down.bounce.groundlevel = 12          
down.friction.threshold = .05         

[Quotes]
victory1 = "Error 404, Geeeeeeeeet dunked on"
victory2 = "Have you seen Core Frisk?"
victory3 = "^&^&*(^&*$^&%(*&&()*+%%"
victory4 = "Your just a blip on the radar"


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

[State 170, 0]
type = PlaySnd
trigger1 = time = 1
value = S5000,0



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

;---------------------------------------------------------------------------
;Wins
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = Time = 0
value = 181+(random%4)

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

[State 181, 0]
type = Helper
trigger1 = time = 1
helpertype = normal 
name = "Crack"
ID = 1100
stateno = 1100
pos = 0,0
postype = p1    

[State 181, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S5000,0
channel = 9

[State 181, 2]
type = StopSnd
trigger1 = animelem = 6
channel = 9

[State 181, 3]
type = AssertSpecial
trigger1 = time < 300
flag = roundnotover
;---------------------------------------------------------------------------
;Win 2
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0,0

[state 182, 0]
type = Helper
trigger1 = time = 1
helpertype = normal 
name = "crawling sans"
ID = 1102
stateno = 1102
pos = 10,-30
postype = p1    

[state 182, 1]
type = Helper
trigger1 = time = 120
helpertype = normal 
name = "crawling sans 2"
ID = 1103
stateno = 1103
pos = -10,-30
postype = p1  

[state 182, 2]
type = Helper
trigger1 = time = 240
helpertype = normal 
name = "crawling sans 3"
ID = 1104
stateno = 1104
pos = 0,-50
postype = p1  

[state 182, 3]
type = Helper
trigger1 = time = 300
helpertype = normal 
name = "crawling sans 2"
ID = 1103
stateno = 1103
pos = -10,0
postype = p1 

[state 182, 4]
type = Helper
trigger1 = time = 340
helpertype = normal 
name = "crawling sans"
ID = 1102
stateno = 1102
pos = 10,0
postype = p1 

[state 182, 5]
type = PlaySnd
trigger1 = time = 360
value = S180,0

[state 182, 6]
type = PlaySnd
trigger1 = time = 380
value = S180,0

[state 182, 7]
type = PlaySnd
trigger1 = time = 400
value = S180,0

[state 182, 8]
type = PlaySnd
trigger1 = time = 420
value = S180,0

[state 182, 9]
type = PlaySnd
trigger1 = animelem = 4
value = S5000,0

[State 182, 10]
type = AssertSpecial
trigger1 = time < 500
flag = roundnotover
;---------------------------------------------------------------------------
;Win 3
[Statedef 183]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 183, 0]
type = PlaySnd
trigger1 = time = 1
value = S181,0

[State 183, 1]
type = Helper
trigger1 = time = 100
helpertype = normal 
name = "Error Window"
ID = 1105
stateno = 1105
pos = -150,-10
postype = front

[State 183, 2]
type = AssertSpecial
trigger1 = time < 200
flag = roundnotover
;---------------------------------------------------------------------------
;Win 4
[Statedef 184]
type = S
ctrl = 0
anim = 184
velset = 0,0

[State 184, 0]
type = PlaySnd
trigger1 = time = 1
value = S182,0

[State 181, 1]
type = PlaySnd
trigger1 = animelem = 11
value = S193,0

[State 184, 2]
type = AssertSpecial
trigger1 = time < 220
flag = roundnotover
;---------------------------------------------------------------------------
;Crack
[statedef 1100]
type = S
ctrl = 0
anim = 1100
velset = 0,0

[State 1100, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1100, 1]
type = PlaySnd
trigger1 = animelem = 5
value = S1100,0

[State 1100, 2]
type = DestroySelf
trigger1 = time = 105

;---------------------------------------------------------------------------
;crawling sans
[statedef 1102]
type = S
ctrl = 0
anim = 1102
velset = 0,0

[State 1102, 0]
type = PlaySnd
trigger1 = time = 1
value = S180,0

[State 1102, 1]
type = VelAdd
trigger1 = time = 1
x = 1
y = 0

[State 1102, 2]
type = VelSet
trigger1 = time = 5
x = 0
y = 0

[state 1002, 3]
type = DestroySelf
trigger1 = time = 1000
;---------------------------------------------------------------------------
;crawling sans 2
[statedef 1103]
type = S
ctrl = 0
anim = 1102
velset = 0,0

[State 1103, 0]
type = PlaySnd
trigger1 = time = 1
value = S180,0

[State 1103, 1]
type = VelAdd
trigger1 = time = 1
x = -1
y = 0

[State 1103, 2]
type = VelSet
trigger1 = time = 5
x = 0
y = 0

[state 1003, 3]
type = DestroySelf
trigger1 = time = 1000
;---------------------------------------------------------------------------
;crawling sans 3
[statedef 1104]
type = S
ctrl = 0
anim = 1102
velset = 0,0

[State 1104, 0]
type = PlaySnd
trigger1 = time = 1
value = S180,0

[State 1104, 1]
type = VelAdd
trigger1 = time = 1
x = 0
y = -1

[State 1104, 2]
type = VelSet
trigger1 = time = 5
x = 0
y = 0

[state 1004, 3]
type = DestroySelf
trigger1 = time = 1000
;---------------------------------------------------------------------------
;Error Window
[statedef 1105]
type = S
ctrl = 0
anim = 1105
velset = 0,0

[State 1105, 0]
type = PlaySnd
trigger1 = time = 1
value = S200,0

[State 1105, 1]
type = SprPriority
trigger1 = time = 1
value = 1

[State 1105, 2]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 1105, 3]
type = DestroySelf
trigger1 = time = 300
;---------------------------------------------------------------------------
;intros
[statedef 190]
type = S

[State 190, 0]
type = ChangeState
trigger1 = p2name = "Papyrus underswap" || p4name = "Papyrus underswap"
trigger2 = p2name = "P A P P Y"  || p4name = "P A P P Y" 
trigger3 = p2name = "Paps"  || p4name = "Paps" 
value = 1910

[State 190, 0]
type = ChangeState
trigger1 = p2name = "Sans...? by FourthRhyme" || p4name = "Sans...? by FourthRhyme"
trigger2 = p2name = "errorsans" || p4name = "errorsans"
value = 1911

[State 190, 0]
type = ChangeState
trigger1 = p2name = "Bad Apple Sans"  || p4name = "Bad Apple Sans" 
trigger2 = p2name = "Nega Papyrus"  || p4name = "Papyrus underfell"
value = 1912

[state 190, 0]
type = ChangeState
trigger1 = p2name = "NESS" || p4name = "NESS"
value = 1913

[state 190, 0]
type = ChangeState
trigger1 = p2name = "Genocide Frisk by Endercreeper" || p4name = "Genocide Frisk by Endercreeper"
trigger2 = p2name = "Chara" || p4name = "Chara"
trigger3 = p2name = "Chara by Endercreeper" || p4name = "Chara by Endercreeper"
trigger4 = p2name = "Evil Frisk" || p4name = "Evil Frisk"
value = 1914

[state 190, 0]
type = ChangeState
trigger1 = p2name = "Undertale Papyrus by FourthRhyme" || p4name = "Undertale Papyrus by FourthRhyme"
trigger2 = p2name = "Papyrus" || p4name = "Papyrus"
value = 1915

[state 190, 0]
type = changestate
trigger1 = 1
value = 1900+(Random%5)
ctrl = 0
;---------------------------------------------------------------------------
; Intro
[Statedef 1900]
type = S
ctrl = 0
anim = 1900
velset = 0,0

[State 1900, 0] 
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 1900, 1] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1900, 2]
type = PlaySnd
trigger1 = time = 1
value = S190,0

[State 1900, 3]
type = PlaySnd
trigger1 = animelem = 2
value = S5000,0
channel = 2

[State 1900, 4]
type = PlaySnd
trigger1 = animelem = 5
value = S5000,0
channel = 3

[State 1900, 5]
type = StopSnd
trigger1 = animelem = 4
channel = 2

[State 1900, 6]
type = StopSnd
trigger1 = animelem = 6
channel = 3

[State 1900, 7]
type = PlaySnd
trigger1 = animelem = 6
value = S191,0

[State 1900, 8] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Intro 2
[Statedef 1901]
type = S
ctrl = 0
anim = 1901
velset = 0,0

[State 1901, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1901, 1]
type = Helper
trigger1 = time = 20
helpertype = normal 
name = "Body"
ID = 1101
stateno = 1101
pos = 0,-150
postype = p1   

[State 1901, 2]
type = PlaySnd
trigger1 = time = 45
value = S200,0


[State 1901, 3] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Intro 3
[Statedef 1902]
type = S
ctrl = 0
anim = 1902
velset = 0,0

[State 1902, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1902, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S1300,0

[State 1902, 2]
type = PlaySnd
trigger1 = animelem = 3
value = S5000,0
channel = 11

[State 1902, 3]
type = StopSnd
trigger1 = animelem = 9
channel = 11

[State 1902, 4]
type = PlaySnd
trigger1 = animelem = 9
value = S193,0

[State 1902, 5] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Intro 4
[Statedef 1903]
type = S
ctrl = 0
anim = 1903
velset = 0,0

[State 1903, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1903, 1]
type = PlaySnd
trigger1 = animelem = 2
value = S5000,0
channel = 8

[State 1903, 2]
type = StopSnd
trigger1 = animelem = 8
channel = 8

[State 1903, 3] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Intro 5
[Statedef 1904]
type = S
ctrl = 0
anim = 1904
velset = 0,0

[State 1904, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1904, 1]
type = Helper
trigger1 = time = 1
helpertype = normal 
name = "http://"
ID = 1108
stateno = 1108
pos = 90,0
postype = p1   

[State 1904, 3] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs AUs
[Statedef 1910]
type = S
ctrl = 0
anim = 1910
velset = 0,0

[State 1910, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S192,0


[State 1910, 8] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs Sans...?
[Statedef 1911]
type = S
ctrl = 0
anim = 1911
velset = 0,0

[State 1911, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1911, 1]
type = PlaySnd
trigger1 = animelem = 5
value = S1900,0


[State 1911, 2] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs Underfell
[Statedef 1912]
type = S
ctrl = 0
anim = 1912
velset = 0,0

[State 1912, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1912, 1]
type = PlaySnd
trigger1 = time = 1
value = S1903,0

[State 1912, 2] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs Ness
[Statedef 1913]
type = S
ctrl = 0
anim = 1913
velset = 0,0

[State 1913, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1913, 1]
type = PlaySnd
trigger1 = time = 1
value = S1903,0

[State 1913, 2] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs Chara
[Statedef 1914]
type = S
ctrl = 0
anim = 1914
velset = 0,0

[State 1914, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1914, 1]
type = PlaySnd
trigger1 = time = 1
value = S1904,0
channel = 3

[State 1914, 2]
type = StopSnd
trigger1 = time = 320
channel = 3

[State 1914, 3] 
type = ChangeState
trigger1 = AnimTime = 0
value = 0
;---------------------------------------------------------------------------
;Vs Papyrus
[Statedef 1915]
type = S
ctrl = 0
anim = 1915
velset = 0,0

[State 1915, 0] 
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 1915, 1]
type = PlaySnd
trigger1 = time = 1
value = S1905,0

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

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

[State 195, 2]
type = Helper
trigger1 = time = 5
helpertype = normal 
name = "Random Sans"
ID = 1300+(random%12)
stateno = 1300+(random%12)
pos = 30,-50
postype = p1    

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

;---------------------------------------------------------------------------
;Body
[statedef 1101]
type = S
ctrl = 0
anim = 1101
velset = 0,0

[State 1101, 0]
type = VelAdd
trigger1 = time = 1
x = 0
y = 5

[State 0, VelSet]
type = VelSet
trigger1 = time = 31
x = 0
y = 0

[State 1101, 4]
type = DestroySelf
trigger1 = time = 31
;---------------------------------------------------------------------------
;http://
[statedef 1108]
type = S
ctrl = 0
anim = 1108
velset = 0,0

[State 1108, 0]
type = PlaySnd
trigger1 = time = 1
value = S1902,0
channel = 1

[State 1108, 1]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 1108, 2]
type = StopSnd
trigger1 = time = 380
channel = 1

[state 1108, 3]
type = PlaySnd
trigger1 = time = 375
value = S200,0

[State 1108, 4]
type = DestroySelf
trigger1 = time = 395
;---------------------------------------------------------------------------
;Sans Classic
[statedef 1300]
type = S
ctrl = 0
anim = 1300
velset = 0,0

[State 1300, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1300, 1]
type = PlaySnd
trigger1 = time = 5
value = S1300,0

[State 1300, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans after
[statedef 1301]
type = S
ctrl = 0
anim = 1301
velset = 0,0

[State 1301, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1301, 1]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans fell
[statedef 1302]
type = S
ctrl = 0
anim = 1302
velset = 0,0

[State 1302, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1302, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans fresh
[statedef 1303]
type = S
ctrl = 0
anim = 1303
velset = 0,0

[State 1303, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1303, 1]
type = PlaySnd
trigger1 = time = 1
value = S1300,1

[State 1303, 2]
type = DestroySelf
trigger1 = time = 60
;---------------------------------------------------------------------------
;Sans Mettaton
[statedef 1304]
type = S
ctrl = 0
anim = 1304
velset = 0,0

[State 1304, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1304, 0]
type = PlaySnd
trigger1 = time = 5
value = S1300,2

[State 1304, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans swap
[statedef 1305]
type = S
ctrl = 0
anim = 1305
velset = 0,0

[State 1305, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1305, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans undyne
[statedef 1306]
type = S
ctrl = 0
anim = 1306
velset = 0,0

[State 1306, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

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

[State 1306, 2]
type = DestroySelf
trigger1 = time = 60
;---------------------------------------------------------------------------
;Floe
[statedef 1307]
type = S
ctrl = 0
anim = 1307
velset = 0,0

[State 1307, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1307, 1]
type = PlaySnd
trigger1 = time = 5
value = S1300,4

[State 1307, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Sans possessed
[statedef 1308]
type = S
ctrl = 0
anim = 1308
velset = 0,0

[State 1308, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1308, 1]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Killer Sans
[statedef 1309]
type = S
ctrl = 0
anim = 1309
velset = 0,0

[State 1309, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[state 1309, 1]
type = PlaySnd
trigger1 = time = 5
value = S1300,5

[State 1309, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;King Sans
[statedef 1310]
type = S
ctrl = 0
anim = 1310
velset = 0,0

[State 1310, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[State 1310, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
;Toriel
[statedef 1311]
type = S
ctrl = 0
anim = 1311
velset = 0,0

[State 1311, 0]
type = PlaySnd
trigger1 = time = 1
value = S1100,0

[state 1311, 1]
type = PlaySnd
trigger1 = time = 5
value = S1300,6

[State 131, 2]
type = DestroySelf
trigger1 = time = 40
;---------------------------------------------------------------------------
; Stand Light Punch
[Statedef 200]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 200                       
poweradd = 10                    
sprpriority = 2                  

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 23, 0                
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 8, 8               
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 
              
[State 200, 2]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, 3]
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= 30
ctrl = 0
velset = 0,0
anim = 210
sprpriority = -1

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

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

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Medium
damage    = 57
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-35
hitsound   = 5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 16
ground.velocity = -5.5
air.velocity = -2.5,-4
forcenofall = 1

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

[State 210, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[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= 11
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2

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

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

[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= 30
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Medium
damage    = 63
guardflag = MA
pausetime = 12,12
sparkno = 1
sparkxy = -10,-60
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 17
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= 8
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 = 4,10
sparkno = 0
sparkxy = -10,-42
hitsound   = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 2
ground.hittime  = 4
ground.velocity = -4
air.velocity = -1.5,-3



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

;---------------------------------------------------------------------------
;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.
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 25
ctrl = 0
anim = 410
sprpriority = 2

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

[State 410, 2]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage    = 37
animtype  = Medium
hitflag = MAF
guardflag = M
pausetime = 12,12
sparkno = 1
sparkxy = -10,-55
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 17
ground.velocity = -4
air.velocity = -3,-4

[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= 11
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 = 0
sparkxy = -10,-8
hitsound   = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-3
down.velocity = -5,0
down.hittime = 22

[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.
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 35
ctrl = 0
anim = 440
sprpriority = 2

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

[State 440, 3]
type = HitDef
trigger1 = Time = 0
attr = C, NA
damage    = 72
hitflag = MAFD
guardflag = L
pausetime = 12,12
sparkno = 1
sparkxy = -5,-10
hitsound   = 5,2
guardsound = 6,0
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 17
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= 5
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 = 0
sparkxy = -10,-58
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime  = 8
ground.velocity = -4
air.velocity = -1.3,-3
air.hittime = 14

[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= 30
ctrl = 0
anim = 610
sprpriority = 2

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

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

;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 10
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 = 1
sparkxy = -5,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -4
air.velocity = -2,-3
air.hittime = 14

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

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

[State 0, StopSnd]
type = StopSnd
trigger1 = animelem = 5
channel = 7

[State 640, 4]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage    = 70
guardflag = HA
priority = 4
pausetime = 12,12
sparkno = 1
sparkxy = -10,-40
hitsound   = 5,3
guardsound = 6,0
animtype = Med
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -7
air.velocity = -3,-4
;---------------------------------------------------------------------------
;blaster summon
[Statedef 1000]
type = S
ctrl = 0
anim = 1000
velset = 0,0

[State 1000, 0]
type = Helper
trigger1 = time = 5
helpertype = normal 
name = "Error blaster"
ID = 1001
stateno = 1001
pos = 40,-100
postype = p1  

[State 1000, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Error blaster
[statedef 1001]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1001                                        
sprpriority = 2  

[State 1001, 0]
type = VelAdd
trigger1 = time = 1
x = 0
y = 6

[State 1001, 1]
type = VelSet
trigger1 = time = 16
x = 0
y = 0

[State 1001, 2]
type = PlaySnd
trigger1 = time = 1
value = S1000,0

[State 1001, 3]
type = PlaySnd
trigger1 = animelem = 4
value = S1000,1

[State 1001, 4]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 1+(Random%70)               
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8           
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = 0          
airguard.velocity = 0,0  
air.type = High                  
air.velocity = 0,1    
air.hittime = 15 

[State 1001, 5]
type = DestroySelf
trigger1 = time = 60
;---------------------------------------------------------------------------
;blaster summon 2
[Statedef 1002]
type = S
ctrl = 0
anim = 1000
velset = 0,0

[State 1002, 0]
type = Helper
trigger1 = time = 5
helpertype = normal 
name = "Error blaster 2"
ID = 1003
stateno = 1003
pos = 40,-100
postype = p1  

[State 1002, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Error blaster 2
[statedef 1003]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1001                                        
sprpriority = 2  

[State 1003, 0]
type = VelAdd
trigger1 = time = 1
x = 0
y = 6

[State 1003, 1]
type = VelSet
trigger1 = time = 16
x = 0
y = 0

[State 1003, 2]
type = PlaySnd
trigger1 = time = 1
value = S1000,0

[State 1003, 3]
type = PlaySnd
trigger1 = animelem = 4
value = S1000,1

[State 1003, 4]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 1+(Random%90)               
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 10          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = 0          
airguard.velocity = 0,0  
air.type = High                  
air.velocity = 0,1    
air.hittime = 15 

[State 1003, 5]
type = DestroySelf
trigger1 = time = 60
;---------------------------------------------------------------------------
;Teleport
[statedef 1004]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1004                                      
sprpriority = 2  

[State 1004, 0]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 40,20            
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 10          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1004, 1]
type = PlaySnd
trigger1 = time = 1
value = S5000,0
channel = 22

[State 1004, 2]
type = StopSnd
trigger1 = animelem = 4
channel = 22

[State 1004, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S1004,0
channel = 23

[State 1004, 4]
type = StopSnd
trigger1 = animelem = 9
channel = 23

[State 1004, 5]
type = PosAdd
trigger1 = animelem = 5
x = 100
y = 0

[State 1004, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Teleport 2
[statedef 1005]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1004                                      
sprpriority = 2  

[State 1005, 0]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 40,20           
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 10          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1005, 1]
type = PlaySnd
trigger1 = time = 1
value = S5000,0
channel = 22

[State 1005, 2]
type = StopSnd
trigger1 = animelem = 4
channel = 22

[State 1005, 3]
type = PlaySnd
trigger1 = animelem = 6
value = S1004,0
channel = 23

[State 1005, 4]
type = StopSnd
trigger1 = animelem = 9
channel = 23

[State 1005, 5]
type = PosAdd
trigger1 = animelem = 5
x = -100
y = 0

[State 1005, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;reflect summon
[statedef 1006]
type = S
ctrl = 0
anim = 1006
velset = 0,0

[State 1006, 0]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "reflect"
ID = 1007
stateno = 1007
pos = 40,0
postype = p1    

[State 1006, 1]
type = CtrlSet
trigger1 = time = 20
value = 1000

[State 1006, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;reflect
[statedef 1007]
type = S
ctrl = 0
anim = 1007
velset = 0,0

[State 1007, 0]
type = PlaySnd
trigger1 = time = 1
value = S1,0

[State 1007, 1]
type = DestroySelf
trigger1 = time = 30

[State 1007, 2]
type = HitOverride
trigger1 = time = 1
attr = SCA, AA, AP, AT
stateno = 1008
time = 30


;---------------------------------------------------------------------------
;bone
[statedef 1008]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1008                                     
sprpriority = 2  

[state 1008, 0]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 40, 0                
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 8, 8               
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1008, 1]
type = PlaySnd
trigger1 = time = 1
value = S1006,0



[State 1008, 2]
type = VelAdd
trigger1 = animelem = 2 > 0
x = 5
y = 0
 
[State 1008, 3]
type = DestroySelf
trigger1 = time = 500
trigger2 = movecontact
;---------------------------------------------------------------------------
;String summon
[statedef 1009]
type = S
ctrl = 0
anim = 1009
poweradd = -300 
velset = 0,0

[State 1009]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "string"
ID = 1010
stateno = 1010
pos = 60,0
postype = p1    

[State 1009, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;string
[statedef 1010]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1010                                 
sprpriority = 2 

[State 1010, 0]
type = PlaySnd
trigger1 = time = 1
value = S1,0


[state 1010, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 30, 15                
animtype = Light 
guardflag = MA                          
hitflag = MAF                
priority = 3, Hit                
pausetime = 8, 8               
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = trip              
ground.slidetime = 5            
ground.hittime  = 11             
ground.velocity = -1, -10       
airguard.velocity = -1.9,-.8   
air.type = trip                  
air.velocity = -60,-30      
air.hittime = 15 

[State 1010, 2]
type = DestroySelf
trigger1 = time = 45 
;---------------------------------------------------------------------------
;string grab
[statedef 1011]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1011   
poweradd = -300                         
sprpriority = 2 

[State 1011, 0]
type = PlaySnd
trigger1 = time = 1
value = S1,0

[state 1011, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 0, 0                
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 8, 8               
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 0           
ground.hittime  = 0          
ground.velocity = 0            
airguard.velocity = 0,0   
air.type = High                  
air.velocity = 0,0      
air.hittime = 0
p2stateno = 7000
p1stateno = 1012


[State 1011, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;String grab success
[statedef 1012]
type = S
ctrl = 0
anim = 1012
velset = 0,0

[State 1012, 0]
type = TargetBind
trigger1 = time = 1
pos = 100, 0

[state 1012, 1]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -30

[state 1012, 1]
type = TargetLifeAdd
trigger1 = AnimElem = 4
value = -30

[state 1012, 1]
type = TargetLifeAdd
trigger1 = AnimElem = 6
value = -30

[state 1012, 1]
type = TargetLifeAdd
trigger1 = AnimElem = 8
value = -30

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1012,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 6
value = S1012,0

[state 1012, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;negative summon
[statedef 3000]
type = S
ctrl = 0
anim = 3000
poweradd = -1000
velset = 0,0

[state 3000, 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = s9999
sound = S5001,0
pos = 0,0
movetime = 0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 1

[State 300, 1]
type = Helper
trigger1 = time = 6
helpertype = normal ;player
name = "negative blaster"
ID = 3001
stateno = 3001
pos = -200,25
postype = p1    

[state 3000, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;negative blaster
[statedef 3001]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 3001                       
sprpriority = 2 

[State 3001, 0]
type = SuperPause
trigger1 = Time = 1
time = 55
anim = -1
sound = -1
pos = -170,0
postype = front
move = 55 ;
movetime = 55  ;
darken = 0
unhittable = 1

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nomusic



[State 3001, 2]
type = VelAdd
trigger1 = time = 1
x = 25
y = 0

[State 3001, 3]
type = PlaySnd
trigger1 = time = 1
value = S1000,0

[State 3001, 4]
type = PlaySnd
trigger1 = animelem = 5
value = S1000,1


[state 3001, 5]
type = HitDef
trigger1 = time%5 = 0
attr = S, NA                     
damage = 25, 0                
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8             
sparkno = 0                      
sparkxy = -100, 150               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 0         
ground.hittime  = 0        
ground.velocity = 0            
airguard.velocity = 0,0
air.type = High                  
air.velocity = 0,0      
air.hittime = 1

[State 3001, 6]
type = DestroySelf
trigger1 = time = 135
;---------------------------------------------------------------------------
;404 summon
[statedef 3002]
type = S
ctrl = 0
anim = 3002
poweradd = -1000
velset = 0,0

[state 3002, 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = s9999
sound = S5001,0
pos = 0,0
movetime = 0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 1

[State 0, Helper]
type = Helper
trigger1 = time = 10
helpertype = normal 
name = "404"
ID = 3003
stateno = 3003
pos = 100,-30
postype = p1    

[state 3002, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;404
[statedef 3003]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 3003                    
sprpriority = 2 

[state 3003, 0]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 190, 0                
animtype = Light                          
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 30             
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 0           
ground.hittime  = 10            
ground.velocity = 0,-4            
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 3003, 1]
type = Helper
trigger1 = Time = 105
helpertype = normal 
name = "Random"
ID = 1030+(random%3)
stateno = 1030+(random%3)
pos = 20,0
postype = p1    

[State 3003, 2]
type = Helper
trigger1 = Time = 105
helpertype = normal 
name = "Flip random"
ID = 1040+(random%3)
stateno = 1040+(random%3)
pos = -20,0
postype = p1  

[State 3003, 3]
type = Helper
trigger1 = Time = 185
helpertype = normal 
name = "Random"
ID = 1030+(random%3)
stateno = 1030+(random%3)
pos = 20,0
postype = p1    

[State 3003, 4]
type = Helper
trigger1 = Time = 185
helpertype = normal 
name = "Flip random"
ID = 1040+(random%3)
stateno = 1040+(random%3)
pos = -20,0
postype = p1  

[State 3003, 5]
type = Helper
trigger1 = Time = 245
helpertype = normal 
name = "Random"
ID = 1030+(random%3)
stateno = 1030+(random%3)
pos = 20,0
postype = p1    

[State 3003, 6]
type = Helper
trigger1 = Time = 245
helpertype = normal 
name = "Flip random"
ID = 1040+(random%3)
stateno = 1040+(random%3)
pos = -20,0
postype = p1  

[State 3003, 7]
type = Helper
trigger1 = Time = 325
helpertype = normal 
name = "Random"
ID = 1030+(random%3)
stateno = 1030+(random%3)
pos = 20,0
postype = p1    

[State 3003, 8]
type = Helper
trigger1 = Time = 325
helpertype = normal 
name = "Flip random"
ID = 1040+(random%3)
stateno = 1040+(random%3)
pos = -20,0
postype = p1  

[State 3003, 9]
type = PlaySnd
trigger1 = time = 1
value = S5000,0
channel = 15

[State 3003, 10]
type = StopSnd
trigger1 = animelem = 14
channel = 15

[State 3003, 11]
type = PlaySnd
trigger1 = animelem = 15
value = S5000,0
loop
channel = 6

[State 3003, 12]
type = PlaySnd
trigger1 = animelem = 14
value = S3000,1

[State 3003, 13]
type = StopSnd
trigger1 = time = 300
channel = 6

[State 3003, 14]
type = DestroySelf
trigger1 = time = 350
;---------------------------------------------------------------------------
;Spear
[statedef 1030]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1030                    
sprpriority = 2

[State 1030, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1030, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 40, 20        
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1030, 2]
type = VelAdd
trigger1 = time = 0
x = 35
y = 0

[State 1030, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;---------------------------------------------------------------------------
;Spear flip
[statedef 1040]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1040                    
sprpriority = 2 

[State 1040, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1040, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 40, 20        
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1040, 2]
type = VelAdd
trigger1 = time = 0
x = -35
y = 0

[State 1040, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;----------------------------------------------------------------------------
;Knife
[statedef 1031]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1031		                  
sprpriority = 2 

[State 1031, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1031, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 60, 30       
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1031, 2]
type = VelAdd
trigger1 = time = 0
x = 35
y = 0

[State 1031, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;----------------------------------------------------------------------------
;Knife flip
[statedef 1041]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1041		                  
sprpriority = 2 

[State 1041, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1041, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 60, 30       
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1041, 2]
type = VelAdd
trigger1 = time = 0
x = -35
y = 0

[State 1031, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;----------------------------------------------------------------------------
;Blue Bone
[statedef 1032]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1032		                  
sprpriority = 2 

[State 1032, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1032, 1]
type = HitDef
trigger1 = EnemyNear,Vel X != 0 || EnemyNear,Vel Y != 0
attr = S, NA                     
damage = 70, 35      
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1032, 2]
type = VelAdd
trigger1 = animelem = 1
x = 35
y = 0

[State 1032, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;----------------------------------------------------------------------------
;Blue Bone
[statedef 1042]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 1042		                  
sprpriority = 2 

[State 1042, 0]
type = PlaySnd
trigger1 = time = 0
value = S1006,0

[state 1042, 1]
type = HitDef
trigger1 = EnemyNear,Vel X != 0 || EnemyNear,Vel Y != 0
attr = S, NA                     
damage = 70, 35      
animtype = Light               
guardflag = MA              
hitflag = MAF                
priority = 3, Hit                
pausetime = 0, 8          
sparkno = 0                      
sparkxy = -10, -35               
hitsound = 5, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 3           
ground.hittime  = 10            
ground.velocity = -4             
airguard.velocity = -1.9,-.8    
air.type = High                  
air.velocity = -1.4,-3       
air.hittime = 15 

[State 1042, 2]
type = VelAdd
trigger1 = animelem = 1
x = -35
y = 0

[State 1042, 3]
type = DestroySelf
trigger1 = time = 60
trigger2 = movehit
;----------------------------------------------------------------------------
;The move thats used when you fight Error_Sans
[statedef 3005]
type = S
ctrl = 0
anim = 3005
poweradd = -2000
velset = 0,0

[state 3005, 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = s9999
sound = S5001,0
pos = 0,0
movetime = 0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 1

[State 3005, 1]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 3005, 2]
type = Helper
trigger1 = time = 40
helpertype = normal ;player
name = "z"
ID = 1106
stateno = 1106
pos = -10,-60
postype = p1    

[State 3005, 3]
type = Helper
trigger1 = time = 80
helpertype = normal ;player
name = "z"
ID = 1106
stateno = 1106
pos = -10,-60
postype = p1  

[State 3005, 4]
type = Helper
trigger1 = time = 120
helpertype = normal ;player
name = "z"
ID = 1106
stateno = 1106
pos = -10,-60
postype = p1  

[State 3005, 5]
type = Helper
trigger1 = time = 160
helpertype = normal ;player
name = "z"
ID = 1106
stateno = 1106
pos = -10,-60
postype = p1  

[state 3005, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 3005, 7]
type = HitOverride
trigger1 = time = 1
attr = SCA, AA, AP, AT
stateno = 3006
time = 310
;---------------------------------------------------------------------------
;the move hit
[statedef 3006]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 3006                
sprpriority = 0

[State 3006, 0]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 3006, 1]
type = Helper
trigger1 = time = 60
helpertype = normal 
name = "MISS"
ID = 1107
stateno = 1107
pos = 0,0
postype = p1    

[State 3006, 2]
type = SuperPause
trigger1 = Time = 1
time = 60
anim = -1
sound = -1
pos = -170,0
postype = front
move = 60;
movetime = 60 ;
darken = 0
unhittable = 1

[State 3006, 3]
type = SuperPause
trigger1 = Time = 90
time = 320
anim = -1
sound = -1
pos = -170,0
postype = front
move = 320
movetime = 320 ;
darken = 0
unhittable = 1

[State 3006, 4]
type = PlaySnd
trigger1 = time = 120
value = S3002,0

[State 3006, 5]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 300, 0                
animtype = Light               
hitflag = MAF                
priority = 3, Hit                
pausetime = 0,240              
sparkno = 0                      
sparkxy = 0, 100             
hitsound = s3006, 1                
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 0           
ground.hittime  = 0            
ground.velocity = 0             
airguard.velocity = 0,0  
air.type = High                  
air.velocity = 0,0     
air.hittime = 0

[State 3006, 6]
type = LifeAdd
trigger1 = time = 545
value = 300

[State 3006, 7]
type = PlaySnd
trigger1 = time = 545
value = S3006,0

[State 3006, 7]
type = PlaySnd
trigger1 = animelem = 10
value = S193,0

[state 3006, 9]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Void summon
[statedef 3007]
type = S
ctrl = 0
anim = 3007
poweradd = -2000
velset = 0,0

[state 3005, 0]
type = SuperPause
trigger1 = time = 0
time = 50
anim = s9999
sound = S5001,0
pos = 0,0
movetime = 0
darken = 1
p2defmul = 1
poweradd = 0
unhittable = 1

[State 0, Helper]
type = Helper
trigger1 = time = 10
helpertype = normal 
name = "Error Void"
ID = 3008
stateno = 3008
pos = -80,0
postype = p2   

[state 3007, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Error Void
[statedef 3008]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 1                    
velset = 0,0                     
ctrl = 0                      
anim = 3008              
sprpriority = 2

[state 3008, 0]
type = HitDef
trigger1 = time = 0
attr = S, NA                     
damage = 0, 0                
animtype = Light                            
hitflag = MAF                
priority = 3, Hit                
pausetime = 8, 8               
sparkno = 0                      
sparkxy = -100, 150               
hitsound = s1012, 0                  
guardsound = 6, 0               
ground.type = High              
ground.slidetime = 0           
ground.hittime  = 0          
ground.velocity = 0            
airguard.velocity = 0,0   
air.type = High                  
air.velocity = 0,0      
air.hittime = 0
p2stateno = 7010
p1stateno = 3009

[State 3008, 1]
type = DestroySelf
trigger1 = time = 112
;---------------------------------------------------------------------------
;Void grab
[statedef 3009]
type = S
ctrl = 0
anim = 3009
velset = 0,0
sprpriority = 2

[State 3009, 0]
type = TargetBind
trigger1 = time = 0
pos = 115,-30

[State 3009, 0]
type = TargetBind
trigger1 = time = 60
pos = 65,-30

[State 3009, 0]
type = TargetBind
trigger1 = time = 65
pos = 20,-30

[State 3009, 0]
type = ChangeState
trigger1 = AnimTime = 0
value = 3010
ctrl = 1
;---------------------------------------------------------------------------
;Void hit
[statedef 3010]
type = S
ctrl = 0
anim = 3010
velset = 0,0
sprpriority = 0

[State 3010, 0]
type = PlaySnd
trigger1 = time = 1
value = S3009,0
channel = 4

[state 3010, 1]
type = PlaySnd
trigger1 = time = 1
value = S5000,0
channel = 5

[State 3010, 2]
type = StopSnd
trigger1 = animelem = 40
channel = 4

[State 3010, 3]
type = TargetLifeAdd
trigger1 =  Alive
trigger1 = (time%8)=0
value = -15

[state 3105, TargetState]
type = targetstate
trigger1 = target, life <= 0
value = 7020

[State 3010, 4]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = Win
value = 3011
ctrl = 1
;---------------------------------------------------------------------------
;Void end
[statedef 3011]
type = S
ctrl = 0
anim = 3011
velset = 0,0
sprpriority = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = animelem = 7
channel = 5

[State 0, StopSnd]
type = StopSnd
trigger1 = animelem = 7
channel = 4

[State 3011, 0]
type = DestroySelf
trigger1 = time = 80
;---------------------------------------------------------------------------
;z
[statedef 1106]
type = S
ctrl = 0
anim = 1106
velset = 0,0

[State 1106, 0]
type = VelAdd
trigger1 = time = 1
x = -0.5
y = -1

[State 1106, 1]
type = DestroySelf
trigger1 = time = 70
;--------------------------------------------------------------------------
;MISS
[statedef 1107]
type = S
ctrl = 0
anim = 1107
velset = 0,0

[State 1107, 0]
type = AssertSpecial
trigger1 = 1
flag = nomusic

[State 0, SprPriority]
type = SprPriority
trigger1 = time = 2
value = 1

[state 1107 , 3]
type = SuperPause
trigger1 = Time = 1
time = 25
anim = -1
sound = -1
pos = -170,0
postype = front
move = 25;
movetime = 25;
darken = 0
unhittable = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1012,0

[state 1107, 1]
type = DestroySelf
trigger1 = time = 30
;---------------------------------------------------------------------------
;Grab anim
[statedef 7000]
type = S
movetype = H
physics = S
velset = 0,0

[State 7000, 0]
type = ChangeAnim2
trigger1 = time = 0
value = 7000

[state 7000, 4]
type = SelfState
trigger1 = time = 120
value = 5050
;---------------------------------------------------------------------------
;void anim
[statedef 7010]
type = S
movetype = H
physics = S
velset = 0,0

[State 7010, 0]
type = ChangeAnim2
trigger1 = time = 0
value = 7010

[state 7000, 1]
type = SelfState
trigger1 = time = 350
value = 5050
;---------------------------------------------------------------------------
[statedef 7020]
type = S
movetype = H
physics = S
velset = 0,0

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

;[State 5150, 6] ;Friction
;type = VelMul
;trigger1 = 1
;x = 0.85

;[State 5150, 7] ;Friction
;type = VelSet
;trigger1 = abs(Vel x) < Const(movement.down.friction.threshold)
;persistent = 0
;x = 0

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

[state 5150, invis]
type = assertspecial
trigger1 = numenemy
trigger1 = enemy, name = "errorsans"
trigger1 = var(18) = 9
flag = invisible
ignorehitpause = 1

[state 5150, nopush]
type = playerpush
trigger1 = numenemy
trigger1 = enemy, name = "errorsans"
trigger1 = var(18) = 9
value = 0
ignorehitpause = 1

[State 5110, 画面を揺らす]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, アニメ変更]
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (Anim % 10))
trigger1 = Anim = [5081,5089]
value = 5110 + (Anim % 10)

[State 5110, アニメ変更]
type = ChangeAnim
triggerall = Time = 0
triggerall = Anim != [5110,5119]
trigger1 = Anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (Anim % 10))
value = 5170

[State 5110, アニメ変更]
type = ChangeAnim
triggerall = Time = 0
triggerall = Anim != [5110,5119]
trigger1 = Anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (Anim % 10))
value = 5170 + (Anim % 10)

[State 5110, Fallダメージ]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 座標指定]
type = PosSet
trigger1 = Time = 0
y = 1000



[State 5110, ステート変更]
type = ChangeState
triggerall = !Alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0)
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, Var指定]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 速度乗算]
type = VelMul
trigger1 = 1
x = 0

[State 5110, 自分を揺らす]
type = ForceFeedback
trigger1 = Alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = Sine

[State 5110, 自分を揺らす]
type = ForceFeedback
trigger1 = !Alive
trigger1 = Time = 0
ampl = 200,7,-.467
time = 30
waveform = Sine
;---------------------------------------------------------------------------

[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
;---------------------------------------------------------------------------
[Statedef -2]

[State -2]
type = playsnd
triggerall = time = 1
triggerall = alive
trigger1 = stateno = 5000
trigger2 = stateno = 5010
trigger3 = stateno = 5020
trigger4 = stateno = 5070
trigger5 = stateno = 5080
value = 5001, 0


