[Data]
life = 1100
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 21
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 0
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = 1           ;Horizontal scaling factor.
yscale = 1           ;Vertical scaling factor.
ground.back = 25     ;Player width (back, ground)
ground.front = 26    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
height = 60      ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = -5, -90   ;Approximate position of head
mid.pos = -5, -60    ;Approximate position of midsection
shadowoffset = 0     ;Number of pixels to vertically offset the shadow
draw.offset = 0,0    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 1.8      ;Walk forward
walk.back = -1.8     ;Walk backward
run.fwd  = 7.5, 0    ;Run forward (x, y)
run.back = -7.5, 0 ;Run backward (x, y)
jump.neu = 0,-7.5    ;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 = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .28         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

;---------------------------------------------------------------------------
; 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
; CNS レベル: 基本
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

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

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

[State 180, Randomizer]
type = VarRandom
trigger1 = Time = 0
v = 3
range = 0,2

[State 180, 1]
type = ChangeState
trigger1 = Time = 0 && var(3) = 1
value = 181

[State 180, 1]
type = ChangeState
trigger1 = Time = 0 && var(3) = 0
value = 182

[State 180, 1]
type = ChangeState
trigger1 = Time = 0 && var(3) = 2
value = 183
;---------------------------------------------------------------------------
; Win pose 1 - Yoga
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 10 && var(2) = 0
value = 10,0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 10 && var(2) = 1
value = 10,1

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

;---------------------------------------------------------------------------
; Win pose 2 - Dance
[Statedef 182]
type = S
ctrl = 0
anim = 180
velset = 0,0

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

;---------------------------------------------------------------------------
; Win pose 3 - Meditation
[Statedef 183]
type = S
ctrl = 0
velset = 0,0

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

[state 183, animation]
type = changeanim
trigger1 = Time = 0 && var(6) = 0
value = 182

[state 183, animation]
type = changeanim
trigger1 = Time = 0 && var(6) = 1
value = 183

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 3 && var(5) = 0
value = 10,0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 3 && var(5) = 1
value = 10,2

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

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

[State 200, 1]
type = PlaySnd
trigger1 = Time = 30 && var(2) = 0
value = 10,0

[State 200, 1]
type = PlaySnd
trigger1 = Time = 30 && var(2) = 1
value = 10,3

[state 193, Bandana]
type=explod
trigger1 = Animelem = 7
anim = 191
ID = 191
pos = -43,-34
vel = -1, 1.5
postype = p1
sprpriority = 5
bindtime = 1

[State 180, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 191

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

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

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


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

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

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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S                  
movetype= A                  
physics = S                
juggle  = 1                
ctrl = 0                        
anim = 200                       
poweradd = 20                    
sprpriority = 2                  

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage    = 15
animtype = Light
getpower = 10,5
givepower = 11,8 
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-80
hitsound = S2, 0                  
guardsound = S2, 6
ground.type = High
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -6
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
air.velocity = -3
ground.cornerpush.veloff = -7
air.fall = 1
fall.recovertime = 16                

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

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

;---------------------------------------------------------------------------
; Standing medium punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 210

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 210, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-52
hitsound   = S2,1
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26

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

;---------------------------------------------------------------------------
; Standing strong punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 95
ctrl = 0
anim = 220

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 5
value = 0, 2

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 53
getpower = 30,15
givepower = 15,8
guardflag = MA
pausetime = 9,9
sparkno = S702
guard.sparkno = S711
sparkxy = 0,-45
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28

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

;---------------------------------------------------------------------------
; Close Stand Light Punch
; CNS difficulty: easy
[Statedef 201]
type    = S                  
movetype= A                  
physics = S                
juggle  = 1                
ctrl = 0                        
anim = 201                       
poweradd = 20                    
sprpriority = 2                  

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage    = 15
animtype = Light
getpower = 10,5
givepower = 11,8 
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-80
hitsound   = S2,0
guardsound = S2, 6
ground.type = High
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -6
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
air.velocity = -3
ground.cornerpush.veloff = -7
air.fall = 1
fall.recovertime = 16 

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

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

;---------------------------------------------------------------------------
; Close Standing medium punch (launcher)
[Statedef 211]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
anim = 211

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 3
value = 10, 4

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

[State 410, launcher spark]
type = Explod
trigger1 = movehit
anim = 703
pos = p2dist x,-102
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 410, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
damage    = 55
animtype  = Up
hitflag = MAF
guardflag = MA
pausetime = 15,10
sparkno = S701
guard.sparkno = S711
sparkxy = 0,-102
hitsound   = S2,1
guardsound = S2, 6
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = 0,-13
air.velocity = 0,-13
yaccel = .4

[State 1100, 5]
type = ChangeState
trigger1 = (Movecontact = 1) && (command = "holdup")
value = 999
ctrl = 1

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

;---------------------------------------------------------------------------
;Close Standing strong punch
[Statedef 221]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 95
ctrl = 0
anim = 221

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 3
value = 0, 2

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 3
value = 10, 5

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 53
getpower = 30,15
givepower = 15,8
guardflag = MA
pausetime = 9,9
sparkno = S702
guard.sparkno = S711
sparkxy = 0,-50
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28

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

;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
anim = 230
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 15
getpower = 10,5
givepower = 11,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-40
hitsound   = S2,3
guardsound = S2, 6
sparkno = S700
guard.sparkno = S711
ground.type = Low
ground.slidetime = 11
ground.hittime  = 14
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.velocity = -5.5
air.velocity = -3
ground.cornerpush.veloff = -6.5
air.fall = 1
fall.recovertime = 16

[State 230, 3]
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
anim = 240
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-80
hitsound   = S2,4
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = high
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26

[State 240, 4]
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= 95
ctrl = 0
anim = 250
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 5
value = 0, 2

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Back
damage    = 63
guardflag = MA
pausetime = 9,9
sparkxy = 0,-80
getpower = 30,15
givepower = 15,8
hitsound   = S2,5
guardsound = S2, 6
ground.type = Low
air.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -6
ground.velocity = -8,-6
air.velocity = -10,-6
sparkno = S702
guard.sparkno = S711
fall = 0
fall.recover = 1
yaccel = .4 

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

;---------------------------------------------------------------------------
;Close Standing light kick
; CNS difficulty: easy
[Statedef 231]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 22
ctrl = 0
anim = 231
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 15
getpower = 10,5
givepower = 11,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-40
hitsound   = S2,3
guardsound = S2, 6
sparkno = S700
guard.sparkno = S711
ground.type = Low
ground.slidetime = 11
ground.hittime  = 14
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.velocity = -5.5
air.velocity = -3
ground.cornerpush.veloff = -6.5
air.fall = 1
fall.recovertime = 16

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

;---------------------------------------------------------------------------
;Close Standing Medium kick
; CNS difficulty: easy
[Statedef 241]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 65
ctrl = 0
anim = 241
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-80
hitsound   = S2,4
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = high
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26

[State 240, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Close Standing strong kick
; CNS difficulty: easy
[Statedef 251]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 95
ctrl = 0
anim = 251
sprpriority = 2

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 4
value = 10, 6

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Back
damage    = 63
guardflag = MA
pausetime = 9,9
sparkxy = 0,-50
getpower = 30,15
givepower = 15,8
hitsound   = S2,5
guardsound = S2, 6
ground.type = Low
guard.sparkno = S711
air.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -6
ground.velocity = -8,-6
air.velocity = -10,-6
sparkno = S702
fall = 0
fall.recover = 1
yaccel = .4 

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

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 20
ctrl = 0
anim = 400
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 401

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 200, 1]
type = HitDef
triggerall = P2bodydist X < 40
trigger1 = time = 0
attr = S, NA
damage    = 15
animtype = Light
getpower = 10,5
givepower = 11,8 
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-45
hitsound = S2, 0                  
guardsound = S2, 6
ground.type = low
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -6
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
air.velocity = -3
ground.cornerpush.veloff = -7
air.fall = 1
fall.recovertime = 16 

[State 200, 1]
type = HitDef
triggerall = P2bodydist X >= 40
trigger1 = time = 0
attr = S, NA
damage    = 15
animtype = Light
getpower = 10,5
givepower = 11,8 
guardflag = MA
hitflag = MAF
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-23
hitsound = S2, 0                  
guardsound = S2, 6
ground.type = low
ground.slidetime = 13
ground.hittime  = 13
ground.velocity = -6
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
air.velocity = -3
ground.cornerpush.veloff = -7
air.fall = 1
fall.recovertime = 16                

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

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

;---------------------------------------------------------------------------
;Crouching Medium punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 65
ctrl = 0
anim = 410
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 411

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

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

[State 210, 2]
type = HitDef
triggerall = P2bodydist X < 40
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-45
hitsound   = S2,1
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26

[State 210, 2]
type = HitDef
triggerall = P2bodydist X >= 40
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
guardflag = MA
pausetime = 8,8
sparkxy = 0,-23
hitsound   = S2,1
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = Low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26


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

;---------------------------------------------------------------------------
;Crouching Strong punch
[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 6
poweradd= 90
ctrl = 0
anim = 420
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 421

[State 200, Velset when not chained from dash]
type = Velset
triggerall = PrevStateno != [100,105]
trigger1 = Time = 0
x = 0
y = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 5
value = 0, 2

[State 210, 2]
type = HitDef
triggerall = P2bodydist X < 40
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 53
getpower = 30,15
givepower = 15,8
guardflag = MA
pausetime = 9,9
sparkno = S702
guard.sparkno = S711
sparkxy = 0,-45
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28

[State 210, 2]
type = HitDef
triggerall = P2bodydist X >= 40
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = 53
getpower = 30,15
givepower = 15,8
guardflag = MA
pausetime = 9,9
sparkno = S702
guard.sparkno = S711
sparkxy = 0,-23
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28

[State 410, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 22
ctrl = 0
anim = 430
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 431

[state 430, dash]
type = velset
triggerall = P2bodydist X > 40
triggerall = anim = 430
trigger1 = time >= 6
trigger1 = time <= 14
x = 5

[state 430, dash]
type = velset
trigger1 = time > 14
x = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 4
triggerall = anim = 430
value = 0, 4

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

[State 230, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Light
damage    = 15
getpower = 10,5
givepower = 11,8
hitflag = MAFD
guardflag = L
pausetime = 8,8
sparkxy = 0,-5
hitsound   = S2,3
guardsound = S2, 6
sparkno = S700
guard.sparkno = S711
ground.type = Low
ground.slidetime = 11
ground.hittime  = 14
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.velocity = -5.5
air.velocity = -3
ground.cornerpush.veloff = -6.5
air.fall = 1
fall.recovertime = 16

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

;---------------------------------------------------------------------------
;Crouch Medium Kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 65
ctrl = 0
anim = 440
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 441

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

[state 430, dash]
type = velset
triggerall = P2bodydist X > 40
triggerall = anim = 440
trigger1 = time >= 6
trigger1 = time <= 16
x = 5

[state 430, dash]
type = velset
trigger1 = time > 16
x = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 4
triggerall = anim = 440
value = 0, 4

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

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA    
animtype  = Medium
damage    = 32
getpower = 20,10                  
givepower = 15,8
hitflag = MAFD
guardflag = L
pausetime = 8,8
sparkxy = 0,-5
hitsound   = S2,4
guardsound = S2, 6
sparkno = S701
guard.sparkno = S711
ground.type = low
ground.slidetime = 16
ground.hittime  = 18
ground.velocity = -10
air.velocity = -5
guard.velocity = -8
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -6
ground.cornerpush.veloff = -9.5
air.fall = 1
fall.recovertime = 26

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

;---------------------------------------------------------------------------
;Crouch Strong Kick
[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 7
poweradd= 90
ctrl = 0
anim = 450
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
trigger1 = time = 0
value = 451

[state 430, dash]
type = velset
triggerall = P2bodydist X > 40
triggerall = anim = 450
trigger1 = time >= 6
trigger1 = time <= 18
x = 5

[state 430, dash]
type = velset
trigger1 = time > 18
x = 0

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 4
triggerall = anim = 450
value = 0, 4

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 4
triggerall = anim = 450
value = 10, 5

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

[State 450, 1]
type = HitDef
trigger1 = time = 0
attr = C, NA
damage    = 45
animtype  = High
getpower = 30,15
givepower = 15,8
hitflag = MAFD
guardflag = L
pausetime = 9,9
sparkxy = 0,-5
guard.sparkno = S711
hitsound   = S2, 4
guardsound = S2, 6
ground.type = Trip
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = 0,-2
guard.hittime = 36
guard.ctrltime = 36
air.velocity = -2,-2
airguard.velocity = -2,-2
guard.velocity = -2
sparkno = S702
fall = 1

[State 440, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Jump Light Punch
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 600
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
triggerall = p2statetype = A
trigger1 = time = 0
value = 601

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

[State 600, 3]
type = HitDef
triggerall = anim = 600
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 15
getpower  = 10
givepower = 10
guardflag = HA
priority = 3, Hit
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,20
hitsound   = S2, 0
guardsound = S2, 6
ground.type = High
ground.slidetime = 10
ground.hittime = 12
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

[State 600, 3]
type = HitDef
triggerall = anim = 601
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 15
getpower  = 10
givepower = 10
guardflag = HA
priority = 3, Hit
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-30
hitsound   = S2, 0
guardsound = S2, 6
ground.type = High
ground.slidetime = 10
ground.hittime = 12
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 8
trigger1 = var(3) = 1
value = 1
;---------------------------------------------------------------------------
;Jump Medium Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 65
ctrl = 0
anim = 610
sprpriority = 2

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635
trigger1 = Time = 0
y = 0

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 35
trigger1 = time = 0
value = 611 

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

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Medium
damage    = 22
getpower  = 20
givepower = 15
guardflag = HA
priority = 3, Hit
pausetime = 8,8
sparkno = S701
guard.sparkno = S711
sparkxy = -10,-73
hitsound   = S2,1
guardsound = S2, 6
ground.type = Low
ground.slidetime = 14
ground.hittime = 15
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 8
trigger1 = var(3) = 1
value = 1

;---------------------------------------------------------------------------
;Jump Strong Punch
[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 95
ctrl = 0
anim = 620
sprpriority = 2

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 40
triggerall = p2statetype = A
trigger1 = time = 0
value = 621

[State 630, 1]
type = PlaySnd
trigger1 = animelem = 3
value = 0, 2

[State 610, 3]
type = HitDef
triggerall = anim = 620
trigger1 = Time = 0
attr = A, NA
guardflag = HA
animtype = Hard
damage = 45
getpower  = 10
priority  = 5
guardflag = HA
pausetime = 12,12
sparkno = S702
guard.sparkno = S711
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6 
guard.velocity = -5
air.velocity = -8,5
airguard.velocity = -5, 1
yaccel = .8

[State 610, 3]
type = HitDef
triggerall = anim = 621
trigger1 = Time = 0
attr = A, NA
guardflag = HA
animtype = Hard
damage = 45
getpower  = 10
priority  = 5
guardflag = HA
pausetime = 12,12
guard.sparkno = S711
sparkno = S702
sparkxy = 0,-45
hitsound   = S2,2
guardsound = S2, 6
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6 
guard.velocity = -5
air.velocity = -8,5
airguard.velocity = -5, 1
yaccel = .8

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 8
trigger1 = var(3) = 1
value = 1
;---------------------------------------------------------------------------
;Spiral Head Butt
[Statedef 625]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 95
ctrl = 0
anim = 625
sprpriority = 2

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 635, vel]
type = velset
trigger1 = time >= 10
trigger1 = time < 42
x = 6.5
y = 3.5

[state 635, vel]
type = velset
trigger1 = animelem = 10
x = 0
y = 0

[State 630, 1]
type = PlaySnd
trigger1 = time = 10
value = 0, 2

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
guardflag = HA
animtype = Hard
damage = 45
getpower  = 10
priority  = 5
guardflag = HA
pausetime = 12,12
sparkno = S702
guard.sparkno = S711
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -6 
guard.velocity = -5
air.velocity = -8,5
airguard.velocity = -5, 1
yaccel = .8

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 14
trigger1 = var(3) = 1
value = 1
;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 3
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 35
trigger1 = time = 0
value = 631

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

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 15
getpower  = 10
givepower = 8
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-30
hitsound   = S2,3
guardsound = S2, 6
ground.type = High
ground.slidetime = 10
ground.hittime = 12
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 6
trigger1 = var(3) = 1
value = 1

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

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 635, vel]
type = velset
trigger1 = time >= 10
x = 6.5
y = 3.5

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

[State 630, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Light
damage    = 15
getpower  = 10
givepower = 8
guardflag = HA
priority = 3
pausetime = 8,8
sparkno = S700
guard.sparkno = S711
sparkxy = 0,-30
hitsound   = S2,3
guardsound = S2, 6
ground.type = High
ground.slidetime = 10
ground.hittime = 12
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

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

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635
trigger1 = Time = 0
y = 0

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 35
trigger1 = time = 0
value = 641

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

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Medium
damage    = 22
getpower  = 20
givepower = 15
guardflag = HA
priority = 3
sparkno = S701
guard.sparkno = S711
pausetime = 8,8
sparkxy = 0,-30
hitsound   = S2,4
guardsound = S2, 6
ground.type = High
ground.slidetime = 14
ground.hittime = 15
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4


[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 6
trigger1 = var(3) = 1
value = 1

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

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 635, vel]
type = velset
trigger1 = time >= 10
x = 5
y = 5

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

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype = Medium
damage    = 22
getpower  = 20
givepower = 15
guardflag = HA
priority = 3
sparkno = S701
guard.sparkno = S711
pausetime = 8,8
sparkxy = 0,0
hitsound   = S2,4
guardsound = S2, 6
ground.type = High
ground.slidetime = 14
ground.hittime = 15
ground.velocity = -5
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -15
air.hittime = 16
air.velocity = -1,-5
airguard.velocity = -6
air.fall = 1
fall.recovertime = 25
yaccel = .4

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

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 400, 1]
type = changeanim
triggerall = P2bodydist X <= 35
trigger1 = time = 0
value = 651
 
[State 630, 1]
type = PlaySnd
trigger1 = animelem = 5
value = 0, 2

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype  = Hard
damage    = 80
getpower  = 0
priority  = 5
guardflag = HA
pausetime = 12,12
sparkno = S702
guard.sparkno = S711
sparkxy = 0,-80
hitsound   = S2,5
guardsound = S2, 6
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8, 0
guard.velocity = -5
air.velocity = -10,4
airguard.velocity = -5, 1
;p2stateno = 1025
yaccel = .8

[State 1052, 3]
type = CtrlSet
trigger1 = AnimElem = 9
trigger1 = var(3) = 1
value = 1

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

[State 200, Velset when chained from spiral kick]
type = Velset
triggerall = PrevStateno = 635 || PrevStateno = 645
trigger1 = Time = 0
y = 0

[state 635, vel]
type = velset
trigger1 = time >= 10
x = 4
y = 6

[State 630, 1]
type = PlaySnd
trigger1 = time = 10
value = 0, 2

[State 640, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
animtype  = Hard
damage    = 80
getpower  = 0
priority  = 5
guardflag = HA
pausetime = 12,12
sparkno = S702
guard.sparkno = S711
sparkxy = 0,8
hitsound   = S2,5
guardsound = S2, 6
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -8, 0
guard.velocity = -5
air.velocity = -10,4
airguard.velocity = -5, 1
;p2stateno = 1025
yaccel = .8

;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[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 
sparkxy = 0,-68        
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", -1, 1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 810       ;On success, KFM changes to state 810
p2stateno = 820       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent
[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd = 60

[State 410, spark]
type = Explod
trigger1 = time = 1
anim = 704
pos = 50,-68
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(2) < 0
pos = 28, 0

[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge = 60,0

[State 810, Bind 2-4]
type = TargetBind
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(5) < 0
pos = 58, 0

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElemTime(5) >= 0 && AnimElemTime(6) < 0
pos = 47, 0

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElemTime(6) >= 0 && AnimElemTime(7) < 0
pos = 41, -60

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElemTime(7) >= 0 && AnimElemTime(8) < 0
pos = 25, -75

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElemTime(8) >= 0 && AnimElemTime(9) < 0
pos = 15, -90

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElemTime(9) >= 0 && AnimElemTime(10) < 0
pos = -5, -96

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElemTime(10) >= 0 && AnimElemTime(11) < 0
pos = -14, -90

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = -50, -50

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 11
value = -78

[State 810, Throw 11]
type = TargetState
trigger1 = AnimElem = 11
value = 821

[State 810, Turn 12]
type = Turn
trigger1 = AnimElem = 12

[State 810, Pos 15]
type = PosAdd
trigger1 = AnimElem = 15
x = -10

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

;---------------------------------------------------------------------------
;Thrown 
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by KFM's 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 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 820

;---------------------------------------------------------------------------
;Thrown - thrown into the air
[Statedef 821]
type    = A
movetype= H
physics = N
velset = 7.5,-5
poweradd = 40

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
[Statedef 830]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[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  
sparkxy = 0,-68        
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 835       ;On success, KFM changes to state 810
p2stateno = 840       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
Throw - Throwing the opponent
[Statedef 835]
type    = S
movetype= A
physics = N
anim = 850
poweradd = 60
sprpriority = -1

[State 410, spark]
type = Explod
trigger1 = time = 1
anim = 704
pos = 50,-68
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 410, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 70,-60
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Back
damage    = 63
guardflag = MA
pausetime = 0,0
sparkxy = 0,-32
getpower = 30,15
givepower = 15,8
hitsound   = S2,5
guardsound = -1
ground.type = Low
air.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -6
ground.velocity = -8,-6
air.velocity = -10,-6
sparkno = -1
guard.sparkno = -1
fall = 1
yaccel = .4

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 27, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 3
pos = 27, -54

[State 810, Bind 1]
type = TargetBind
trigger1 = time = 28
pos = 27, 0

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

;---------------------------------------------------------------------------
;Thrown 
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by KFM's 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 840]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

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

;---------------------------------------------------------------------------
;Air Throw - Attempt
[Statedef 850]
type    = A
movetype= A
physics = A
juggle  = 0
ctrl = 0
anim = 860
sprpriority = 2

[state 850, vel]
type = velset
trigger1 = movecontact
trigger1 = time >= 0
x = 0
y = 0

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = A-          ;Affect only Air people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno = -1  
sparkxy = 0,-68        
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 855       ;On success, KFM changes to state 810
p2stateno = 860       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

[State 1052, 3]
type = CtrlSet
trigger1 = AnimTime = 0
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
anim = 1008

;---------------------------------------------------------------------------
;Air Throw - Throwing the opponent
[Statedef 855]
type    = S
movetype= A
physics = N
anim = 870
velset = 0,0
poweradd = 60
sprpriority = -1

[State 410, spark]
type = Explod
trigger1 = time = 1
anim = 704
pos = 50,-68
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 410, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 70,-60
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Back
damage    = 63
guardflag = MA
pausetime = 0,0
sparkxy = 0,-32
getpower = 30,15
givepower = 15,8
hitsound   = S2,5
guardsound = -1
ground.type = Low
air.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -6
ground.velocity = -8,-6
air.velocity = -10,-6
sparkno = -1
guard.sparkno = -1
fall = 1
yaccel = .4

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 27, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 3
pos = 27, -54

[State 810, Bind 1]
type = TargetBind
trigger1 = time = 28
pos = 27, 0

[State 1052, 3]
type = CtrlSet
trigger1 = AnimTime = 0
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
anim = 1008

;---------------------------------------------------------------------------
;Thrown 
; (a custom gethit state)
; Description: This is the state that the opponent changes to after being
;     hit by KFM's 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 860]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 855
;---------------------------------------------------------------------------
; Guard Push(Stand)
[Statedef 550]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 550
ctrl = 0

[State 550, NotHitBy]
Type = NotHitBy
trigger1 = Time = 0
Value = SCA
Time = 37

[State 550, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6600
name = "Guard Push F"
pos = 0,0
postype = p1
stateno = 590
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 550, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6601
name = "Guard Push B"
pos = 0,0
postype = p1
stateno = 580
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 550, Spark]
type = Explod
trigger1 = Time = 0
pos = 67, -61
postype = p1
anim = 718
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 550, SFX]
type = PlaySnd
trigger1 = Time = 0
value = 2, 9
ignorehitpause = 1

[State 550, Speech]
type = PlaySnd
trigger1 = Time = 0
value = 10, 4
channel = 0
ignorehitpause = 1

[State 550, Stop]
type = Velset
trigger1 = Time = [0,30]
x = 0
y = 0

[State 550, Done]
type = ChangeState
trigger1 = AnimTime = 0
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; Guard Push (Crouch)
[Statedef 560]
type    = C
movetype= I
physics = C
velset = 0,0
anim = 560
ctrl = 0

[State 560, NotHitBy]
Type = NotHitBy
trigger1 = Time = 0
Value = SCA
Time = 37

[State 560, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6600
name = "Guard Push F"
pos = 0,0
postype = p1
stateno = 590
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 560, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6601
name = "Guard Push B"
pos = 0,0
postype = p1
stateno = 580
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 560, Spark]
type = Explod
trigger1 = Time = 0
pos = 67, -48
postype = p1
anim = 718
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 550, SFX]
type = PlaySnd
trigger1 = Time = 0
value = 2, 9
ignorehitpause = 1

[State 550, Speech]
type = PlaySnd
trigger1 = Time = 0
value = 10, 4
channel = 0
ignorehitpause = 1

[State 560, Stop]
type = Velset
trigger1 = Time = [0,30]
x = 0
y = 0

[State 560, Done]
type = ChangeState
trigger1 = AnimTime = 0
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; Guard Push (Air)
[Statedef 570]
type    = A
movetype= I
physics = A
velset = 0,0
anim = 570
ctrl = 0

[State 570, NotHitBy]
Type = NotHitBy
trigger1 = Time = 0
Value = SCA
Time = 37

[State 570, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6600
name = "Guard Push F"
pos = 0,0
postype = p1
stateno = 590
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 570, Push Block]
type = Helper
trigger1 = Time = 0
ID = 6601
name = "Guard Push B"
pos = 0,0
postype = p1
stateno = 580
helpertype = normal
keyctrl = 0
ownpal = 1
ignorehitpause = 1

[State 570, Spark]
type = Explod
trigger1 = Time = 0
pos = 66, -89
postype = p1
anim = 718
sprpriority = 5
ownpal = 1
ignorehitpause = 1

[State 550, SFX]
type = PlaySnd
trigger1 = Time = 0
value = 2, 9
ignorehitpause = 1

[State 550, Speech]
type = PlaySnd
trigger1 = Time = 0
value = 10, 4
channel = 0
ignorehitpause = 1

[State 570, Stop]
type = Velset
trigger1 = Time = [0,30]
x = 0
y = 0

[State 570, Done]
type = ChangeState
trigger1 = AnimTime = 0
value = 132
ctrl = 1

;---------------------------------------------------------------------------
; Guard Push Fwd
[Statedef 580]
type    = A
movetype= I 
physics = N
velset = 0,0
anim = 580

[State 580, Not Get Hit]
type = NotHitBy
Trigger1 = Time >= 0
value = , AA ,AP ,AT
Time = 1

[State 580, Push]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 580, Shove]
type = VelSet
trigger1 = Time >= 0
x = 15

[State 580, Done]
type = DestroySelf
trigger1 = Time = 30

;---------------------------------------------------------------------------
; Guard Push Back
[Statedef 590]
type    = A
movetype= I 
physics = N
velset = 0,0
anim = 580

[State 590, Not Get Hit]
type = NotHitBy
Trigger1 = Time >= 0
value = , AA ,AP ,AT
Time = 1

[State 590, Push]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 590, Shove]
type = VelSet
trigger1 = Time >= 0
x = -15

[State 590, Done]
type = DestroySelf
trigger1 = Time = 30

;-------------------------------------------------------------------------
;Super Jump
[Statedef 999]
type    = A
physics = A
ctrl = 1
anim = 41
velset = 0, -13

[State 1000, FireB]
type = Explod
trigger1 = Animelem = 1
persistent = 1
anim = 710
id = 710
postype = p1
pos = 0,15
sprpriority = -1
ownpal = 1

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

;[State 999, ChangeAnim] ;Change to jumping forward anim
;type = ChangeAnim
;trigger1 = Anim != 43
;trigger1 = Anim != 42
;trigger1 = Time = 10
;value = 41

[State 180, Superjump Var]
type = VarSet
trigger1 = 1
var(3) = 1

[State 999, 1a]
type = VelAdd
triggerall = Vel X >= -4
trigger1 = Time >= 0
trigger1 = Time < 65
trigger1 = command = "holdback"
;trigger1 = Anim != 43
x = -0.1

[State 999, 1b]
type = VelAdd
triggerall = Vel X <= 4.5
trigger1 = Time >= 0
trigger1 = Time < 65
trigger1 = command = "holdfwd"
;trigger1 = Anim != 42
x = 0.1

[State 999, 2a]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,2]
x = 3

[State 999, 2b]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,2]
x = -3.5

[State 1310, 6]
type = Turn
;trigger1 = Time = 10
trigger1 = p2dist X < -5

[State 999, ChangeAnim] ;Change to jumping forward anim
type = ChangeAnim
trigger1 = Vel X > 0
trigger1 = Time = [0,2]
value = 42

[State 998, ChangeAnim2] ;Change to jumping back anim
type = ChangeAnim
trigger1 = Vel X < 0
trigger1 = Time = [0,2]
value = 43

;---------------------------------------------------------------------------
;Mid Punch Throw - Attempt
[Statedef 900]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[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  
sparkxy = 0,-68        
sprpriority = 1       ;Draw in front of p2
p1facing = ifelse (command = "holdfwd", 1, -1) ;Turn if holding forwards
p2facing = 1          ;Force p2 to face KFM
p1stateno = 910       ;On success, KFM changes to state 810
p2stateno = 920       ;If hit, p2 changes to state 820 in KFM's cns
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1              ;Force p2 into falling down

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

;---------------------------------------------------------------------------
;Mid Punch Throw - Throwing the opponent
[Statedef 910]
type    = S
movetype= A
physics = N
anim = 850
poweradd = 60
sprpriority = -1

[State 410, spark]
type = Explod
trigger1 = time = 1
anim = 704
pos = 50,-68
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 410, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 70,-60
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[State 240, 2]
type = HitDef
trigger1 = Time = 0
attr = S, NA
animtype  = Back
damage    = 63
guardflag = MA
pausetime = 0,0
sparkxy = 0,-32
getpower = 30,15
givepower = 15,8
hitsound   = S2,5
guardsound = -1
ground.type = Low
air.type = Low
ground.slidetime = 12
ground.hittime  = 12
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -6
ground.velocity = -8,-6
air.velocity = -10,-6
sparkno = -1
guard.sparkno = -1
fall = 1
yaccel = .4

[State 810, Grab Sound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1, 1

[State 810, Throw Sound]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 27, 0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 3
pos = 27, -54

[State 810, Bind 1]
type = TargetBind
trigger1 = time = 28
pos = 27, 0

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

;---------------------------------------------------------------------------
;Thrown 
[Statedef 920]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 2

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 855
;---------------------------------------------------------------------------
; Yoga Fire
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1001
helpertype = normal
ownpal = 1
ID = 1000

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

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1001]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 3.5,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 1000, FireB]
type = Explod
trigger1 = time = 0
persistent = 1
anim = 715
id = 715
postype = p1
pos = -30,60
bindtime = -1
removetime = 999
sprpriority = 99
ownpal = 1

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
ID = 715

[State 1000, FireB]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
persistent = 1
anim = 716
id = 716
postype = p1
pos = -30,60
bindtime = -1
sprpriority = 99
ownpal = 1

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1016
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
guard.sparkno = S711
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
trigger4 = time > 200

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1016]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1011
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = time = 0
ID = 715

[State 1000, FireB]
type = Explod
trigger1 = time = 0
persistent = 1
anim = 716
id = 716
postype = p1
pos = -30,60
bindtime = -1
sprpriority = 99
ownpal = 1

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = animtime=0
;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1017]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1011
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = animtime=0
;---------------------------------------------------------------------------
; Yoga Fire 2
[Statedef 1002]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1002
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1003
helpertype = normal
ownpal = 1
ID = 1000

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

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1003]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 4,0
sprpriority = 6

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 1000, FireB]
type = Explod
trigger1 = time = 0
persistent = 1
anim = 715
id = 715
postype = p1
pos = -30,60
bindtime = -1
removetime = 999
sprpriority = 99
ownpal = 1

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
ID = 715

[State 1000, FireB]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
persistent = 1
anim = 716
id = 716
postype = p1
pos = -30,60
bindtime = -1
sprpriority = 99
ownpal = 1

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1016
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
guard.sparkno = S711
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
trigger4 = time > 200
;---------------------------------------------------------------------------
; Yoga Fire 3
[Statedef 1004]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1003
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1005
helpertype = normal
ownpal = 1
ID = 1000

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

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1005]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 4.5,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 1000, FireB]
type = Explod
trigger1 = time = 0
persistent = 1
anim = 715
id = 715
postype = p1
pos = -30,60
bindtime = -1
removetime = 999
sprpriority = 99
ownpal = 1

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
ID = 715

[State 1000, FireB]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
persistent = 1
anim = 716
id = 716
postype = p1
pos = -30,60
bindtime = -1
sprpriority = 99
ownpal = 1

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1016
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
guard.sparkno = S711
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -100
trigger4 = time > 200
;---------------------------------------------------------------------------
; Yoga Fire
[Statedef 1010]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 90
anim = 1005
velset = Vel X / 2, Vel Y / 2
ctrl = 0
sprpriority = 2

[State 710, 1]
type = VelMul
trigger1 = Time = 0
x = .2 ;.05
y = .2  ;.02

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1011
helpertype = normal
ownpal = 1
ID = 1000

[State 712, Whoops!]
type = PosSet
trigger1 = Pos Y >= -20
y = -20

[State 1052, 3]
type = CtrlSet
trigger1 = Animtime = 0
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
anim = 1008

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1011]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 3.5,0
sprpriority = 6

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT


[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1017
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
trigger4 = time > 200

;---------------------------------------------------------------------------
; Yoga Fire 2
[Statedef 1012]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 90
anim = 1006
velset = Vel X / 2, Vel Y / 2
ctrl = 0
sprpriority = 2

[State 710, 1]
type = VelMul
trigger1 = Time = 0
x = .2 ;.05
y = .2  ;.02

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1013
helpertype = normal
ownpal = 1
ID = 1000

[State 712, Whoops!]
type = PosSet
trigger1 = Pos Y >= -20
y = -20

[State 1052, 3]
type = CtrlSet
trigger1 = Animtime = 0
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
anim = 1008
;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1013]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 4,0
sprpriority = 6

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow


[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1017
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
trigger4 = time > 200
;---------------------------------------------------------------------------
; Yoga Fire 3
[Statedef 1014]
type    = A
movetype= A
physics = N
juggle  = 4
poweradd= 90
anim = 1007
velset = Vel X / 2, Vel Y / 2
ctrl = 0
sprpriority = 2

[State 710, 1]
type = VelMul
trigger1 = Time = 0
x = .2 ;.05
y = .2  ;.02

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 10, 8

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 5

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 57,-50
name = "Fireball"
sprpriority = 98
stateno = 1015
helpertype = normal
ownpal = 1
ID = 1000

[State 712, Whoops!]
type = PosSet
trigger1 = Pos Y >= -20
y = -20

[State 1052, 3]
type = CtrlSet
trigger1 = Animtime = 0
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
anim = 1008
;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1015]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1010
velset = 4.5,0
sprpriority = 6

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT


[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1017
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = movehit
value = 2, 7

[state 1011, spark]
type = Explod
trigger1 = movehit
anim = 707
pos = 0,0
postype = P1
ontop = 1
ownpal = 1
ignorehitpause = 1
persistent = 0

[state 1011, spark]
type = Explod
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
anim = 1011
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = Hard
damage    = 55
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 5,5
sparkno = -1
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = -10
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = -10
air.velocity = -4,-5
air.fall = 1
fall.recovertime = 28
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = Movecontact
trigger2 = Moveguarded
trigger3 = FrontEdgeDist < -50
trigger4 = time > 200
;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 1026]
type    = A
movetype= H
physics = N

[State 1026, Velocity]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
y = .45

[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 1027

[State 1026, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 1027]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1027, No scroll]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1027

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 1028

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 1028]
type    = A
movetype= H
physics = N

[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

[State 1028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -6

[State 1028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 1.6

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

[State 1028, Gravity]
type = VelAdd
trigger1 = 1
y = .35

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

[State 1028, Hit ground]
type = SelfState
trigger1 = (Vel y > 0) && (Pos y >= 0)
value = 5100

;---------------------------------------------------------------------------
; Yoga Flame!
[Statedef 1030]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1035
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 9

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 51,-50
name = "Fireball"
sprpriority = 98
stateno = 1031
helpertype = normal
postype = p1
bindtime = -1
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1031]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1030
velset = 0,0
sprpriority = 6

[state 1035,1]
type = bindtoparent
Pos = 51,-50
trigger1 = 1
time = -1

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1032
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 30
trigger2 = parent, stateno != 1030
anim = 1031
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = up
damage    = 55,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
guard.sparkno = S711
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-15
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 30
trigger2 = parent, stateno != 1030

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1032]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1031
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 8889: ParentVarSet]
type = ParentVarSet
triggerall = (Parent, Var(5) != 1)
trigger1 = animtime = 0
var(5) = 1

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = animtime=0
;---------------------------------------------------------------------------
; Yoga Flame!
[Statedef 1035]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1036
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 9

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 51,-50
postype = p1
bindtime = -1
name = "Fireball"
sprpriority = 98
stateno = 1036
helpertype = normal
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1036]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1030
velset = 0,0
sprpriority = 6

[state 1035,1]
type = bindtoparent
Pos = 51,-50
trigger1 = 1
time = -1

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1032
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 49
trigger2 = parent, stateno != 1035
anim = 1031
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = (Time%25) = 0
trigger1 = Time <= 49
attr = S, SP
animtype  = up
damage    = 50,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
guard.sparkno = S711
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-10
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75


[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 49
trigger2 = parent, stateno != 1035
;---------------------------------------------------------------------------
; Yoga Flame!
[Statedef 1040]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1037
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 9

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
postype = p1
bindtime = -1
Pos = 51,-50
name = "Fireball"
sprpriority = 98
stateno = 1041
helpertype = normal
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1041]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1030
velset = 0,0
sprpriority = 6

[state 1035,1]
type = bindtoparent
Pos = 51,-50
trigger1 = 1
time = -1

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1032
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 67
trigger2 = parent, stateno != 1040
anim = 1031
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = (Time%22) = 0
trigger1 = Time <= 67
attr = S, SP
animtype  = up
damage    = 45,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
guard.sparkno = S711
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-10
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75


[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 67
trigger2 = parent, stateno != 1040

;---------------------------------------------------------------------------
; Yoga Blast!
[Statedef 1050]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1040
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 10

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 51,-50
name = "Fireball"
sprpriority = 98
stateno = 1051
helpertype = normal
postype = p1
bindtime = -1
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1051]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1032
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[state 1035,1]
type = bindtoparent
Pos = 35,-80
trigger1 = 1
time = -1

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1052
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 26
trigger2 = parent, stateno != 1050
anim = 1033
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, SP
animtype  = up
damage    = 55,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
guard.sparkno = S711
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-15
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 26
trigger2 = parent, stateno != 1050

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1052]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1033
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 8889: ParentVarSet]
type = ParentVarSet
triggerall = (Parent, Var(5) != 1)
trigger1 = animtime = 0
var(5) = 1

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = animtime=0
;---------------------------------------------------------------------------
; Yoga Blast!
[Statedef 1055]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1041
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 10

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
Pos = 51,-50
postype = p1
bindtime = -1
name = "Fireball"
sprpriority = 98
stateno = 1056
helpertype = normal
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1056]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1032
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[state 1035,1]
type = bindtoparent
Pos = 35,-80
trigger1 = 1
time = -1

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1052
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 41
trigger2 = parent, stateno != 1055
anim = 1033
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = (Time%21) = 0
trigger1 = Time <= 41
attr = S, SP
animtype  = up
damage    = 50,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
hitsound   = S2,2
guardsound = S2, 6
guard.sparkno = S711
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-10
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75


[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 41
trigger2 = parent, stateno != 1055
;---------------------------------------------------------------------------
; Yoga Blast!
[Statedef 1060]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 90
velset = 0,0
anim = 1042
ctrl = 0
sprpriority = 2

[State 100, dust]
type = explod
trigger1 = animelem = 4
sprpriority = 99
anim = 706
pos = -15,5

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 10

[State 1000, 1]
type = PlaySnd
trigger1 = animelem = 4
value = 0, 6

[State 2000, 1]
type = Helper
trigger1 = Animelem = 4
postype = p1
bindtime = -1
Pos = 51,-50
name = "Fireball"
sprpriority = 98
stateno = 1061
helpertype = normal
ownpal = 1
ID = 1030

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = var(5) = 1
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Fireball animation
[Statedef 1061]
type    = S
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = N
anim = 1032
velset = 0,0
sprpriority = 6

[State 703, No Shadows!]
type = Assertspecial
trigger1 = 1
flag = noshadow

[state 1035,1]
type = bindtoparent
Pos = 35,-80
trigger1 = 1
time = -1

[State 11001, NotHitBy]
type = NotHitBy
trigger1 = Time >= 0
time = 99
value = SCA, NA, SA, HA, NT, ST, HT

[State 11001, HitBy]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 99
ignorehitpause = 1

[State 11001, HitOverride]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 99
stateno = 1052
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1011, hit sound]
type = PlaySnd
trigger1 = time = 0
trigger1 = movehit
value = 2, 8

[state 1011, spark]
type = Explod
trigger1 = time > 56
trigger2 = parent, stateno != 1060
anim = 1033
pos = 0,0
postype = P1
ownpal = 1
sprpriority = 99
ignorehitpause = 1
persistent = 0

[State 210, 2]
type = HitDef
trigger1 = (Time%23) = 0
trigger1 = Time <= 56
attr = S, SP
animtype  = up
damage    = 45,10
getpower = 30,15
givepower = 15,8
hitflag = MAF
guardflag = MA
pausetime = 0,5
sparkno = s707
sparkxy = 0,0
guard.sparkno = S711
hitsound   = S2,2
guardsound = S2, 6
ground.type = low
ground.slidetime = 21
ground.hittime  = 24
ground.velocity = 0,-15
guard.slidetime = 11
guard.hittime = 11
airguard.velocity = -10
guard.velocity = 0
air.velocity = 0,-10
fall = 1
fall.recover = 0
palfx.time = 20
palfx.add = 32,0,0
palfx.mul = 300,192,192
palfx.sinadd = 64, 5, 5, 6
yaccel = .75


[State 1040, No pushing for you!]
type = PlayerPush
trigger1 = 1
value = 0

[State 8000, 2]
type = Destroyself
trigger1 = time > 56
trigger2 = parent, stateno != 1060
;---------------------------------------------------------------------------
; Light Kung Fu Upper
; CNS difficulty: easy
; Description: This is a simple special attack that can hit twice. Notice
;     the use of the Width controller to keep opponents from getting too
;     close to KFM during his uppercut (press Ctrl-C, and look at the
;     yellow bar at KFM's feet during the move).
;     The second HitDef has some interesting parameters. fall.recovertime
;     is used to prevent the opponent (p2) from recovering immediately
;     after being hit (eg. press x+y with KFM to recover). This gives the
;     attacking KFM a chance to follow up with an extra attack, such as
;     a Kung Fu Knee. The yaccel parameter, set at 0.4, makes p2 fall at a
;     greater value of acceleration than the default, which is 0.35.
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(13) < 0
value = 5,0

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

[State 1100, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Med
damage    = 52, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkxy = 0,-48
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1100, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage    = 55, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1,-9.5
guard.velocity = -6
air.velocity = -1,-7.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1                   ;Make p2 fall down
fall.recovertime = 40      ;40 ticks before p2 can recover from fall
yaccel = .4                ;p2 will accelerate down at .4 pixels/sec^2 when falling

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

;---------------------------------------------------------------------------
; Strong Kung Fu Upper
[Statedef 1110]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 1110
ctrl = 0
sprpriority = 2

[State 1110, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(14) < 0
value = 5,0

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

[State 1110, 2]
type = HitDef
trigger1 = Time = 0
attr = S, SA
animtype  = Med
damage    = 57, 4
priority  = 5
guardflag = MA
pausetime = 4,8
sparkxy = 0,-48
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1110, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage    = 60, 4
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
ground.velocity = -1,-10.5
guard.velocity = -6
air.velocity = -1,-8.5
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 50
yaccel = .4

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

;---------------------------------------------------------------------------
; Fast Kung Fu Upper
[Statedef 1120]
type    = S
movetype= A
physics = S
juggle  = 6
poweradd= -330
velset = 0,0
anim = 1120
ctrl = 0
sprpriority = 2

[State 1120, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(14) < 0
value = 5,0

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

[State 1120, Afterimage]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

[State 1120, Blink Yellow]
type = PalFX
trigger1 = Time = 0
time = 20
add = 32,16,0
sinadd = 64,32,5,3

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

[State 1120, 2]
type = HitDef
trigger1 = Time = 0
trigger2 = AnimElem = 4
attr = S, SA
animtype  = Med
damage    = 30, 4
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 6,10
sparkxy = 0, ifelse(Time = 0, -48, -55)
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 21
ground.velocity = -3
guard.velocity = -6
air.velocity = -2,-2
airguard.velocity = -4,-4.5
p2facing = 1

[State 1120, 3]
type = HitDef
trigger1 = AnimElem = 7
attr = S, SA
animtype  = Up
damage    = 68, 4
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 12,12
sparkxy = 0,-110
hitsound   = 5,2
guardsound = 6,0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 21
ground.velocity = -1.2,-11
guard.velocity = -6
air.velocity = -1.2,-9
airguard.velocity = -4,-4.5
p2facing = 1
fall = 1
fall.recovertime = 60
yaccel = .4

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

;--------------------------------------------------------------------
;3ha's Teleport
[Statedef 1300]
type    = S
movetype= I
physics = S
velset = 0,0
ctrl = 0
anim = 1300
sprpriority = 2

[State 210, 1]
type = PlaySnd
trigger1 = Animelem = 3
value = 10, 7

[State 1300, 2]
type = playsnd
trigger1 = time = 15
value = 5,0

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

[State 1300, 4]
type = Explod
trigger1 = time = 19
ID = 3000
anim = 1350
postype = p1
pos = 0, -70
removetime = 7
bindtime = -1
sprpriority = 2
scale = .75, 1.3

[State 1300, 5]
type = ModifyExplod
trigger1 = time = [20,25]
ID = 3000
scale = (time*1.5-27) *.40, (25.2 - time) * 0.1

[State 1300, 6]
type = PalFX
trigger1 = Time = 11
time = 20
sinadd =  255,255,255,38
ignorehitpause = 1

[State 1300, 7]
type = VarSet
trigger1 = Time = 0
trigger1 = command = "teleport1"
var(2) = 1

[State 1300, 8]
type = VarSet
trigger1 = Time = 0
trigger1 = command = "teleport2"
var(2) = 2

[State 1300, 9]
type = VarSet
trigger1 = Time = 0
trigger1 = command = "teleport3"
var(2) = 3

[State 1300, 10]
type = VarSet
trigger1 = Time = 0
trigger1 = command = "teleport4"
var(2) = 4

[State 1300, 11]
type = ChangeState
trigger1 = AnimTime = 0
value = 1310

;------------------------------------------
[Statedef 1310]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1380

[State 1310, 1]
type = VarSet
trigger1 = Time = 0
var(4) = floor(P2Dist x)

[State 1310, 2]
type = velset
trigger1 = Time = 0 && var(2) = 1
x = (var(4) + 100) / 10

[State 1310, 3]
type = velset
trigger1 = Time = 0 && var(2) = 2
x = (var(4) - 100) / 10

[State 1310, 4]
type = velset
trigger1 = Time = 0 && var(2) = 3
x = (var(4) + 200) / 10

[State 1310, 5]
type = velset
trigger1 = Time = 0 && var(2) = 4
x = (var(4) - 200) / 10

[State 1310, 6]
type = Turn
trigger1 = Time = 10
trigger1 = p2dist X < -5

[State 1310, 7]
type = PalFX
trigger1 = Time = 0
time = 18
sinadd =  255,255,255,36
ignorehitpause = 1

[State 1320, 1]
type = playsnd
trigger1 = time = 5
value = 5,1

[State 1310, 8]
type = ChangeState
trigger1 = Time = 10
value = 1320

;-------------------------------------------------
[Statedef 1320]
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1310
sprpriority = 2

[State 1320, 2]
type = NotHitBy
trigger1 = time < 16
value = SCA
time = 1

[State 1320, 3]
type = Explod
trigger1 = time = 0
ID = 3000
anim = 1350
postype = p1
pos = 0, -70
removetime = 6
bindtime = -1
sprpriority = 2

[State 1320, 4]
type = ModifyExplod
trigger1 = time = [0,5]
ID = 3000
scale = (6 - time) * 0.6, time * 0.2

[State 1320, 6]
type = Changeanim
trigger1 = animTime = 0
value = 1320

[State 1320, 7]
type = Veladd
trigger1 = time >= 27
y = .22

[State 1320, 8] 
type = null;ctrlset
trigger1 = time >= 23 && Pos Y < 0
value = 1

[State 1052, 3]
type = CtrlSet
trigger1 = time >=23
trigger1 = var(3) = 1
value = 1

[State 1320, 9] 
type = ChangeState
trigger1 = time >= 23
value = 1330

;-------------------------------------------------
[Statedef 1330]
type    = A
movetype= I
physics = A
velset = 0,0
anim = 1320
sprpriority = 2

[State 1052, 3]
type = CtrlSet
trigger1 = var(3) = 1
value = 1
;-------------------------------------------------
; Yoga Inferno
[Statedef 2000]
type = S
movetype = A
physics = S
velset = 0, 0
ctrl = 0
sprpriority = 1
anim = 2000

[State 790, Super Pause BG]
type = Explod
trigger1 = time = 15
anim = 714
postype = left
ID = 714
pos = 0,0
supermovetime = 9999
removetime = 36
bindtime = 9999
sprpriority = -4

[State 3100, Portrait Explod]
type = Explod
trigger1 = Time = 15
anim = 8055
postype = back
pos = 0,8
ownpal = 1
removetime = 30
ignorehitpause = 1
sprpriority = -1
supermovetime = 40
removeongethit = 1

[state 3050, WZZZ!]
type=playsnd
trigger1= time=15
value = 13,0

[State 4120, 1]
type = SuperPause
trigger1 = time = 15
pos = -19, -73
time = 30
anim = s712
poweradd = -1000

[State 3500, Background]
type = Explod
trigger1 = AnimElem = 4 && NumExplod(798) < 1
anim = 713
ID = 798
postype = left
pos = -80, -40
bindtime = -1
removetime = -1
sprpriority = -4
removeongethit = 1
ownpal = 1

[State 1702, 1]
type = PlaySnd
trigger1 = time = 0
value = 10,12

[State 0, 1]
type = VarSet
trigger1 = time = 0
v = 10
value = 0

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

[State 0, 1]
type = Projectile
triggerall = time < 150
trigger1 = Time > 21
trigger1 = time%5=0
projanim = 2010
projremove = 0
projremovetime = 45
projheightbound = -999, 999
velocity = var(11)/2, var(10)/10
postype = p1
offset = 40, -55
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Hard
damage = 10, 2
pausetime = 0, 8
sparkno = S707
sparkxy = 10, 0
guard.sparkno = S711
hitsound = S2, 2
guardsound = 6, 0
ground.type = Low
ground.hittime = 12
guard.hittime = 13
ground.velocity = -2, -2
guard.velocity = -9
air.velocity = -1, -3
getpower = 0
givepower = 20
palfx.time = 45
palfx.add = 255,125,0
palfx.sinadd = 40,40,0,4
palfx.color = 0
fall = 1
fall.recover = 0
hitonce = 1
persistent = 1

[State 2100, 6]
type = VarAdd
trigger1 = command = "holdup"
trigger1 = time > 21
v = 10
value = -5

[State 2100, 7]
type = VarAdd
trigger1 = command = "holddown"
trigger1 = time > 21
v = 10
value = 5

[State 2100, 8]
type = VarSet
trigger1 = var(10) >= 58
v = 10
value = 58

[State 2100, 9]
type = VarSet
trigger1 = var(10) <= -58
v = 10
value = -58

[State 2100, 8]
type = VarSet
trigger1 = var(10) = 0
v = 11
value = 10

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 0
trigger1 = var(10) < 15
trigger2 = var(10) < 0
trigger2 = var(10) > -15
v = 11
value = 9

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 15
trigger1 = var(10) < 30
trigger2 = var(10) < -15
trigger2 = var(10) > -30
v = 11
value = 8

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 30
trigger1 = var(10) < 45
trigger2 = var(10) < -30
trigger2 = var(10) > -45
v = 11
value = 7

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 45
trigger1 = var(10) < 60
trigger2 = var(10) < -45
trigger2 = var(10) > -60
v = 11
value = 6

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 60
;trigger1 = var(10) < 75
trigger2 = var(10) < -60
;trigger2 = var(10) > -75
v = 11
value = 5

[State 2100, 11]
type = ChangeState
trigger1 = Time = 200
value = 0
ctrl = 1
;-------------------------------------------------
; Yoga Inferno
[Statedef 2100]
type = A
movetype = A
physics = N
velset = Vel X / 2, Vel Y / 2
ctrl = 0
sprpriority = 2
anim = 2100

[State 710, 1]
type = VelMul
trigger1 = Time = 0
x = .2 ;.05
y = .2  ;.02

[State 712, Whoops!]
type = PosSet
trigger1 = Pos Y >= -20
y = -20

[State 790, Super Pause BG]
type = Explod
trigger1 = time = 15
anim = 714
postype = left
ID = 714
pos = 0,0
supermovetime = 9999
removetime = 36
bindtime = 9999
sprpriority = -4

[State 3100, Portrait Explod]
type = Explod
trigger1 = Time = 15
anim = 8055
postype = back
pos = 0,8
ownpal = 1
removetime = 30
ignorehitpause = 1
sprpriority = -1
supermovetime = 40
removeongethit = 1

[state 3050, WZZZ!]
type=playsnd
trigger1= time=15
value = 13,0

[State 4120, 1]
type = SuperPause
trigger1 = time = 15
pos = -19, -73
time = 30
anim = s712
poweradd = -1000

[State 3500, Background]
type = Explod
trigger1 = AnimElem = 4 && NumExplod(798) < 1
anim = 713
ID = 798
postype = left
pos = -80, -40
bindtime = -1
removetime = -1
sprpriority = -4
removeongethit = 1
ownpal = 1

[State 1702, 1]
type = PlaySnd
trigger1 = time = 0
value = 10,12

[State 0, 1]
type = VarSet
trigger1 = time = 0
v = 10
value = 0

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

[State 0, 1]
type = Projectile
triggerall = time < 150
trigger1 = Time > 21
trigger1 = time%5=0
projanim = 2010
projremove = 0
projremovetime = 45
projheightbound = -999, 999
velocity = var(11)/2, var(10)/10
postype = p1
offset = 40, -55
attr = S, HP
hitflag = MAFD
guardflag = MA
animtype = Hard
damage = 10, 2
pausetime = 0, 8
sparkno = S707
sparkxy = 10, 0
guard.sparkno = S711
hitsound = S2, 2
guardsound = 6, 0
ground.type = Low
ground.hittime = 12
guard.hittime = 13
ground.velocity = -2, -2
guard.velocity = -9
air.velocity = -1, -3
getpower = 0
givepower = 20
palfx.time = 45
palfx.add = 255,125,0
palfx.sinadd = 40,40,0,4
palfx.color = 0
fall = 1
fall.recover = 0
hitonce = 1
persistent = 1

[State 2100, 6]
type = VarAdd
trigger1 = command = "holdup"
trigger1 = time > 21
v = 10
value = -5

[State 2100, 7]
type = VarAdd
trigger1 = command = "holddown"
trigger1 = time > 21
v = 10
value = 5

[State 2100, 8]
type = VarSet
trigger1 = var(10) >= 58
v = 10
value = 58

[State 2100, 9]
type = VarSet
trigger1 = var(10) <= -58
v = 10
value = -58

[State 2100, 8]
type = VarSet
trigger1 = var(10) = 0
v = 11
value = 10

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 0
trigger1 = var(10) < 15
trigger2 = var(10) < 0
trigger2 = var(10) > -15
v = 11
value = 9

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 15
trigger1 = var(10) < 30
trigger2 = var(10) < -15
trigger2 = var(10) > -30
v = 11
value = 8

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 30
trigger1 = var(10) < 45
trigger2 = var(10) < -30
trigger2 = var(10) > -45
v = 11
value = 7

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 45
trigger1 = var(10) < 60
trigger2 = var(10) < -45
trigger2 = var(10) > -60
v = 11
value = 6

[State 2100, 8]
type = VarSet
trigger1 = var(10) > 60
;trigger1 = var(10) < 75
trigger2 = var(10) < -60
;trigger2 = var(10) > -75
v = 11
value = 5

[State 1052, 3]
type = CtrlSet
trigger1 = Time = 200
trigger1 = var(3) = 1
value = 1

[State 1000, 7]
type = ChangeState
trigger1 = Time = 200
value = 51
anim = 1008

;---------------------------------------------------------------------------
; Triple Kung Fu Palm (hyper)
; CNS difficulty: medium
; Notes: Notice that the HitDefs in supers have "getpower = 0". This makes
;        sure KFM doesn't recharge his super guage as he hits.
;        Also, the attributes for the HitDefs is "HA" for "hyper attack",
;        ie. "attr = S, HA".
;        Notice how the first HitDef is reused twice by allowing it to
;        trigger on two animation elements.
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2

[State 3000, Width]
type = Width
trigger1 = AnimElem = 2, >= 0
value = 15,0

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

[State 3000, Super B]
type = AfterImage
trigger1 = AnimElem = 2, 1
time = 2

[State 3000, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 1 && Time < 60
time = 2

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

[State 3000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 30
value2 = C, NA
time = 1

[State 3000, 1]
type = PlaySnd
trigger1 = AnimElem = 4
trigger2 = AnimElem = 11
trigger3 = AnimElem = 18
value = 0, 3

[State 3000, 2]
type = PosAdd
trigger1 = AnimElem = 2
x = 20

[State 3000, 3]
type = PosAdd
trigger1 = AnimElem = 3
trigger2 = AnimElem = 10
trigger3 = AnimElem = 12
trigger4 = AnimElem = 17
trigger5 = AnimElem = 19
trigger4 = AnimElem = 29
x = 10

[State 3000, 4]
type = VelSet
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
trigger3 = AnimElem = 19
x = 6

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

[State 3000, 5]
type = HitDef
trigger1 = AnimElem = 5
trigger2 = AnimElem = 12
attr = S, HA
animtype  = Hard
damage    = 72,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -6
air.velocity = -3,-3
air.fall = 1
fall.animtype = Hard
fall.recover = 0

[State 3000, 6]
type = HitDef
trigger1 = AnimElem = 19
attr = S, HA
animtype  = Hard
damage    = 75,4
getpower  = 0
priority  = 6
guardflag = MA
pausetime = 15,15
sparkxy = -10,-60
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 40
ground.hittime  = 40
ground.velocity = -5, -4
guard.velocity = -12
air.velocity = -5,-4
airguard.velocity = -3,-3
fall.animtype = Hard
fall = 1
fall.recover = 0

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

;---------------------------------------------------------------------------
; Smash Kung Fu Upper (hyper)
; CNS difficulty: medium
; Description: This is very similar to KFM's Strong and Light Kung Fu Uppers.
;     There is just one HitDef, for a screen-shaking hit. The envshake
;     parameters are used to make this effect. You can find out more about
;     each parameter in the CNS documentation.
;     The fall.recover parameter is set at 0, meaning that p2 cannot recover
;     from the fall by entering his recovery command (for KFM, that is x+y).
;     This gives the attacking KFM a chance to follow up with another attack,
;     such as the Fast Kung Fu Palm.
;     Note that there is a ChangeState controller used to make KFM change to
;     a success state if he hits. The success state has KFM hold his arm
;     up longer for a dramatic effect.
[Statedef 3050]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3050
ctrl = 0
sprpriority = 2

[State 3050, Width]
type = Width
trigger1 = AnimElemTime(4) >= 0 && AnimElemTime(16) < 0
value = 5,0

[State 3050, Super A]
type = SuperPause
trigger1 = AnimElem = 2
pos = -5, -55
anim = 100
sound = 20, 0
poweradd = -1000

[State 3050, Super B]
type = AfterImage
trigger1 = AnimElem = 2
time = 2

[State 3050, Super C]
type = AfterImageTime
trigger1 = AnimElemTime(2) >= 0
time = 2

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

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

[State 3050, 2]
type = HitDef
trigger1 = Time = 0
attr = S, HA
animtype  = Up               ;Make p2 use "Up" type animation on hit
damage    = 155, 12
getpower  = 0
priority  = 5
guardflag = MA
pausetime = 30,30
sparkno = 3
sparkxy = 0,-110
hitsound   = 5,4
guardsound = 6,0
ground.type = Low
ground.slidetime = 30
ground.hittime  = 30
ground.velocity = -1.3,-25
guard.velocity = -11
air.velocity = -1.3,-25
airguard.velocity = -4.5,-5
envshake.time = 25           ;Parameters for shaking the screen on hit
envshake.ampl = 7
envshake.freq = 176
p2facing = 1                 ;Force p2 to face p1 on hit
fall = 1
fall.recover = 0             ;Prevent p2 from recovering
fall.damage = 70             ;p2 will take 70 damage on hitting the ground
fall.envshake.ampl = 6       ;Parameters for shaking the screen on fall
fall.envshake.freq = 178
fall.envshake.time = 15
mindist = 50,-100            ;Keep p2 a minimum of 50 pixels away from p1, and no higher than 100 pixels up
maxdist = 100,-10            ;Keep p2 a maximum of 100 pixels away from p1, and no lower than 10 pixels below
yaccel = .8                  ;Accelerate p2 downwards rapidly

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

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

;------------------
; Smash Kung Fu Upper (success)
; Description: This is the state that KFM changes to if he successfully hits
;     with Smash Kung Fu Upper. KFM holds his arm high for a short while
;     longer, then changes back to his idle stand state.
[Statedef 3051]
type    = S
movetype= A
physics = S
anim = 3051

[State 3051, 1]
type = AfterImageTime
trigger1 = AnimTime < -2
time = 2

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


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

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

[State 1000, FireB]
type = Explod
trigger1 = Time = 6
trigger2 = Time = 10
trigger3 = Time = 14
persistent = 1
anim = 101
id = 101
postype = p1
pos = 21,-67
scale = 1,1
random = 50,60
sprpriority = 99
ownpal = 1
vel = -4,0

[State 1000, FireB]
type = Explod
trigger1 = Time = 8
trigger2 = Time = 12
trigger3 = Time = 16
persistent = 1
anim = 101
id = 101
postype = p1
pos = 21,-67
scale = .5,.5
random = 50,60
sprpriority = -1
ownpal = 1
vel = -4,0

[State 100, 1]
type = VelSet
trigger1 = time > 3
trigger1 = time < 25
x = const(velocity.run.fwd.x)

[State 100, 1]
type = VelSet
trigger1 = time > 25
x = 0

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
ctrl=1
value = 0

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 105]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = time > 3
trigger1 = time < 25
x = const(velocity.run.back.x)

[State 100, 1]
type = VelSet
trigger1 = time > 25
x = 0

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = animtime = 0
ctrl=1
value = 0

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 1300, 6]
type = PalFX
trigger1 = Time = 14
time = 21
sinadd =  255,255,255,43
ignorehitpause = 0

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 1320, 1]
type = playsnd
trigger1 = time = 14
value = 5,0

[State 1320, 1]
type = playsnd
trigger1 = time = 20
value = 5,1

[State 5040, 5]
type = Velset
trigger1 = time >= 12
trigger1 = time <= 30
y = 0
x = 0

[State 5040, 3]
type = CtrlSet
trigger1 = time >= 12
trigger1 = time <= 30
value = 0

[State 5040, 3]
type = CtrlSet
trigger1 = time > 30
value = 1

[State 5040, 5]
type = VelAdd
trigger1 = time < 12
trigger2 = time > 30
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = A
movetype= H
physics = A
anim = 5200

[state 5201, 1]
type = changestate
trigger1=1
value = 5210
;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 1300, 6]
type = PalFX
trigger1 = Time = 0
time = 20
sinadd =  255,255,255,38
ignorehitpause = 1

[State 1320, 1]
type = playsnd
trigger1 = time = 0
value = 5,0

[State 1320, 1]
type = playsnd
trigger1 = time = 10
value = 5,1

[State 5040, 5]
type = Velset
trigger1 = time >= 0
trigger1 = time <= 18
y = 0
x = 0

[State 5040, 3]
type = CtrlSet
trigger1 = time <= 17
value = 0

[State 5040, 3]
type = CtrlSet
trigger1 = time >= 18
value = 1

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 10
trigger1 = p2dist X < -20

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 18
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1
;---------------------------------------------------------------------------
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[state 5120, 1]
type = posadd
trigger1 = time = 0
x = 40

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

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

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

[statedef -2]

[State -180, a]
type = VarSet
trigger1 = stateno != [1300,1330]
var(2) = 0

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = Stateno != [2000,5000]
ID = 798

[State -2, Explodes.... LEAVE ME ALONE]
type = RemoveExplod
trigger1 = winko
ID = 798

[State -180, a]
type = VarSet
trigger1 = stateno != 51
trigger1 = stateno != 999
trigger1 = stateno != [600,699]
trigger1 = stateno != [850,860]
trigger1 = stateno != [1010,1015]
trigger1 = stateno != [1300,1330]
trigger1 = stateno != 2100
var(3) = 0

[State -2, yoga flame bug destroyer]
type = VarSet
trigger1 = stateno != [1030,1040]
trigger1 = stateno != [1050,1060]
var(5) = 0

[State -2, Land Dust]
type = Explod
triggerall = time = 1
trigger1 = stateno = 52 
anim = 708
postype = p1
pos = -5, 0
bindtime = 1
removetime = -2
sprpriority = -5

[State -2, Finish Noise ]
type = playsnd
trigger1 = winko && (Var(8)= 0) && numexplod(709) = 0 && stateno != [2000,2100]
ignorehitpause = 1
value = 13,0

[State -2, Finish Noise ]
type = playsnd
trigger1 = winko && (Var(8)= 0) && numexplod(709) = 0 && stateno = [2000,2100]
ignorehitpause = 1
value = 100,0

[State -2, Finish... something :D ]
type = explod
trigger1 = winko && (Var(8)= 0) && numexplod(709) = 0 && stateno != [2000,2100]
postype = back
ID = 709
bindtime = 999
ontop = 1
ignorehitpause = 1
sprpriority = 99
anim = 709

[State -2, Finish... something :D ]
type = explod
trigger1 = winko && (Var(8)= 0) && numexplod(709) = 0 && stateno = [2000,2100]
postype = left
ID = 709
bindtime = 999
ontop = 0
pos = 0,0
ignorehitpause = 1
sprpriority = -99
anim = 717

[State -2, Finish... something :D ]
type = explod
trigger1 = winko && (Var(8)= 0) && numexplod(710) = 0 && stateno = [2000,2100]
postype = left
ID = 710
bindtime = 999
ontop = 1
pos = 0,0
ignorehitpause = 1
sprpriority = 99
anim = 6000

[State -2, Finish VarAdd]
type = varadd
triggerall = winko
trigger1 = Var(8)<= 2 
v = 8
value = 1

[State -2, Let's Debugging!]
type = DisplayToClipboard
trigger1 = 1
text = "Var 10 = %d , Superjump = %d " 
params = Var(10), Var(3)

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

[Statedef -3]

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

