;---------------------- Integer variable list ----------------------

; var(0):= 9999, 5900, 7002, 7003, 7004, 7014, 7015, 7016, 7049, 7050, 7051, 7061, 7059, 7160, 7060, 7065, 7066, 7067, 7080
; var(1):= 1150, 9999, 7002, 7003, 7014, 7015, 7016, 7049, 7050, 7061, 7059, 7160, 7060, 7066, 7080
; var(2):= 1000, 1050, 1100, 1150, 1001, 1003, 9999, 7000, 7002, 7003, 7004, 7014, 7015, 7016, 7049, 7050, 7061, 7059, 7160, 7060, 7065, 7066, 7080
; var(3):= 1050, 9999, 7000, 7002, 7003, 7014, 7015, 7016, 7049, 7050, 7051, 7061, 7059, 7160, 7060, 7065, 7066, 7067, 7080
; var(4):= 840, 1001, 9999, 7000, 7002, 7003, 7014, 7015, 7016, 7051, 7061, 7160, 7060, 7066, 7067, 7080
; var(5):= 810, -3, 9999, 7000, 7002, 7160, 7065
; var(6):= -3, 1001, 3001, 3002, 3003, 3004, 3005, 9999, 7000, -2
; var(7):= -3, 9999, 7000
; var(8):= 9999, 7000
; var(9):= 7000, 7049, 7059, 7160, 7065, -2
;var(10):= -3, 9999, 7000, 7065, 7067
;var(11):= -3, 9999, 7000, 7067, -2
;var(12):= 3000, 9999, 7065, 10000
;var(13):= 9999, 7065, 10000
;var(14):= 7065, 7067
;var(15):= 1001, 1003, 9999, 7002, 7003, 7065
;var(19):= 7067
;var(20):= 9999, 7004, 7067
;var(21):= 9999, 7004
;var(22):= 9999
;var(25):= 9999, 7000, -2
;var(26):= 5900
;var(30):= 9999, 7065
;var(31):= 9999
;var(33):= 7000
;var(34):= 7000
;var(35):= 5900, 7000, 7049
;var(36):= 200, 205, 230, 235, 400, 405, 430, 435, 7000
;var(37):= 7000
;var(38):= 7000, 7049
;var(39):= 7000, 7004
;var(40):= 9999, 7000, 7004
;var(41):= 9999, 5900, 7000
;var(43):= 7000
;var(44):= 7000
;var(45):= 7000
;var(47):= 7000
;var(50):= 7000
;var(54):= 7000
;var(55):= 7000
;var(56):= 7000
;var(57):= 7000
;var(58):= 7000
;var(59):= -3, 7000

;---------------------- Float variable list ----------------------

; fvar(0):= 5900
; fvar(1):= 1001, 1003, 7000
; fvar(3):= -2
; fvar(5):= -3
;fvar(10):= 7001
;fvar(15):= 9999
;fvar(36):= 7000, 7059
;fvar(39):= 7000











[Data]
;Amount of life to start with
;体力ゲージの初期値
life = 961
power = 1000
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 15
sparkno =6000
guard.sparkno=6000
KO.echo = 0
volume = 100
IntPersistIndex = 50
FloatPersistIndex = 36

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

[Velocity]
walk.fwd  = 2.75     ;Walk forward
walk.back = -1.95 ;Walk backward
run.fwd  = 4.1, 0   ;Run forward (x, y)
run.back = -4.75,-3.3 ;Hop backward (x, y)
jump.neu = 0,-9.8  ;Neutral jumping velocity (x, y)
jump.back = -2.1   ;Jump back Speed (x, y)
jump.fwd = 1.9     ;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         ;.
air.gethit.groundrecover = -.15,-3.5  ;Velocity for ground recovery state (x, y) **MUGEN 1.0**
air.gethit.airrecover.mul = .5,.2     ;Multiplier for air recovery velocity (x, y) **MUGEN 1.0**
air.gethit.airrecover.add = 0,-4.5    ;Velocity offset for air recovery (x, y) **MUGEN 1.0**
air.gethit.airrecover.back = -1       ;Extra x-velocity for holding back during air recovery **MUGEN 1.0**
air.gethit.airrecover.fwd = 0         ;Extra x-velocity for holding forward during air recovery **MUGEN 1.0**
air.gethit.airrecover.up = -2         ;Extra y-velocity for holding up during air recovery **MUGEN 1.0**
air.gethit.airrecover.down = 1.5      ;Extra y-velocity for holding down during air recovery **MUGEN 1.0**
[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .52       ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .85 ;Friction coefficient when crouching
stand.friction.threshold = 2          ;If player's speed drops below this threshold while standing, stop his movement **MUGEN 1.0**
crouch.friction.threshold = .05       ;If player's speed drops below this threshold while crouching, stop his movement **MUGEN 1.0**
air.gethit.groundlevel = 25           ;Y-position at which a falling player is considered to hit the ground **MUGEN 1.0**
air.gethit.groundrecover.ground.threshold = -20 ;Y-position below which falling player can use the recovery command **MUGEN 1.0**
air.gethit.groundrecover.groundlevel = 10   ;Y-position at which player in the ground recovery state touches the ground **MUGEN 1.0**
air.gethit.airrecover.threshold = -1  ;Y-velocity above which player may use the air recovery command **MUGEN 1.0**
air.gethit.airrecover.yaccel = .35    ;Vertical acceleration for player in the air recovery state **MUGEN 1.0**
air.gethit.trip.groundlevel = 15      ;Y-position at which player in the tripped state touches the ground **MUGEN 1.0**
down.bounce.offset = 0, 20            ;Offset for player bouncing off the ground (x, y) **MUGEN 1.0**
down.bounce.yaccel = .4               ;Vertical acceleration for player bouncing off the ground **MUGEN 1.0**
down.bounce.groundlevel = 12          ;Y-position at which player bouncing off the ground touches the ground again **MUGEN 1.0**
down.friction.threshold = .05  


[Quotes]
; Up to 100 victory quotes can be specified per language (victory0 - victory99)
victory1 = "Your efforts displease the goddess."
victory2 = "Hunting you is beneath me."
victory3 = "Goddess guide my claws!"
;---------------------------------------------------------------------------
; Variable usage:
; This is a record of the variables that KFM uses. Keeping a record of your
; variable usage helps you avoid careless mistakes later.
; var(1)  - Used in kfm.cmd for combo condition (updated every tick)
; var(2)  - Used in Kung Fu Throw (state 800) to remember if fwd was being
;           held (remembered from state 800 through state 810).
;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    =S
physics =N
anim =100
ctrl=0
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 =time=0
x = (const(velocity.run.fwd.x)*const(size.xscale))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=70,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=70,helper(8084),var(1),0),0))/100))
y=0

;ignorehitpause = 
;persistent = 
;
;[State 0, PosAdd]
;type = PosAdd
;trigger1 = animelemtime(1)>=0 && animelemtime(4)<0
;x = const(velocity.run.fwd.x)

;[State 0, PosAdd]
;type = PosAdd
;trigger1 = animelemtime(4)>=0 && animelemtime(6)<0
;x = const(velocity.run.fwd.x)*.5
;ignorehitpause = 
;persistent = 


;[State 0, Explod]
;type = Explod
;trigger1 =time=0
;anim =101
;ID =101
;pos = 0,15
;postype = p1  ;p2,front,back,left,right
;facing = 1
;vfacing = 1
;bindtime = 1
;vel = 0,0
;accel = 0,0
;random = 0,0
;pausemovetime = 0
;scale = .5,.5
;sprpriority = 2
;ontop = 1
;shadow = 0,0,0
;ownpal =1
;removeongethit = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=4 
trigger2 = animelem=6
value = 40,0
channel = 1

[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


;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0 
value =0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 
;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 105]
type    =S
physics =N
anim =105
ctrl=0
sprpriority = 1


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=2
statetype = A      ;S,A,C,L   ;S,A,C,L
[State 100, 1]
type = VelSet
trigger1 = animelem=2
x = (const(velocity.run.back.x)*const(size.xscale))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=70,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=70,helper(8084),var(1),0),0))/100))
y=const(velocity.run.back.y)


;[State 0, Explod]
;type = Explod
;trigger1 =time=0
;anim =101
;ID =101
;pos = 0,15
;postype = p1  ;p2,front,back,left,right
;facing = 1
;vfacing = 1
;bindtime = 1
;vel = 0,0
;accel = 0,0
;random = 0,0
;pausemovetime = 0
;scale = .5,.5
;sprpriority = 2
;ontop = 1
;shadow = 0,0,0
;ownpal =1
;removeongethit = 1

;[State 0, PlaySnd]
;type = PlaySnd
;trigger1 = time=0
;value = S100,0
;channel = 1

[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

;ignorehitpause = 
;persistent = 
[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(2)>0&&animelemtime(3)<0
y = .51
[State 0, VelSet]
type = VelSet
trigger1 = animelem=3
x = 0
y = 0
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=3
y = 0
;ignorehitpause = 
;persistent = 

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3
statetype = S       ;S,A,C,L
movetype = I        ;I,A,H
physics =S
;ignorehitpause = 
;persistent = 
[State 0, ChangeState]
type = ChangeState
trigger1 = animtime=0 
value =0
ctrl = 1

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

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

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

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

;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 181]
type = S
ctrl = 0
anim = 181
velset = 0,0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S180+var(0),0
channel = 0
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = matchover
flag = invisible



;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 281]
type = S
ctrl = 0
anim = 181
velset = 0,0
facep2=1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S180,random%3
channel = 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1
[State 0, ChangeState]
type = ChangeState
trigger1 =time =75  && !matchover
value =288
;---------------------------------------------------------------------------
; Win pose 1 - Bow
; CNS difficulty: basic
; CNS レベル: 基本
[Statedef 288]
type = S
ctrl = 0
velset = 0,0

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

[State 0, ChangeState]
type = ChangeState
trigger1 =matchover 
value =0
persistent=0
ctrl=1

[Statedef 191]
type = A
physics=N
ctrl = 0
anim =190
velset = 0,0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value =0
movecamera = 0,0
[State 0, PosAdd]
type = PosAdd
trigger1 =time=0 && !var(40)
x = 320
[State 0, Turn]
type = Turn
trigger1 = time=0&& !var(40)
trigger2 = animelem=4&& anim!=0
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
trigger1 =teamside=1
trigger1 = enemy,var(59)=5
trigger2 =teamside=2
trigger2 = p2stateno=1907 && enemy,var(59)=5
value =1900
ctrl = 0
[State 0, ChangeState]
type = ChangeState
trigger1 =teamside=1
trigger1 = enemy,var(59)=17
trigger2 =teamside=2
trigger2 = p2stateno=1905 && enemy,var(59)=17
value =1901
ctrl = 0
[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
[State 0, ChangeAnim]
type = ChangeAnim
triggerall = animelem=3&& anim!=0
trigger1 = pos x > helper(7000),pos x+40 && facing=-1&& anim!=0
trigger2 = pos x < helper(7000),pos x-40 && facing=1&& anim!=0
value =anim
elem = 1
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
triggerall = animelemtime(1)>=0&&animelemtime(3)<0 && anim!=0
trigger1 = time%3=0 
anim =1900
ID = 22
pos = -61,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1

[State 0, Explod]
type = Explod
triggerall = animelemtime(1)>=0&&animelemtime(3)<0 && anim!=0
trigger1 = time%5=0 
anim =1901
ID = 22
pos = -61,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 0
ignorehitpause=1


[State 0, PosAdd]
type = PosAdd
trigger1 =animelemtime(3)<0 && roundstate!=0 && anim!=0
x = 8.5
[State 0, PosAdd]
type = PosAdd
trigger1 =animelemtime(3)>=0&&animelemtime(3)<5 && roundstate!=0 && anim!=0
x = 2.5
[State 1000, 1]
type = PlaySnd
trigger1 =animelem=3
value = 190, 0
channel=0
persistent=0
[State 0, PosSet]
type = PosSet
trigger1 = animelem=4 && anim!=0
x = helper(7000),pos x
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animtime=0
value = 0
[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = time = 160
value = 0

;------------------------------------------------------
[Statedef 1900]
type =S
physics=N
ctrl = 0
anim =191
velset = 0,0

;ignorehitpause = 
;persistent = 

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0&& !var(40)
x = -60
;[State 0, Turn]
;type = Turn
;trigger1 = time=0
;ignorehitpause = 
;persistent = 


[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
[State 0, VelSet]
type = VelSet
trigger1 =animelem=1&& anim=191
x = 9
y = -1.25
persistent = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=3 && pos y <0  && anim=191
value = anim
elem = 1
[State 0, PlaySnd]
type = PlaySnd
trigger1 = p2bodydist x <-20 && time <80
value = S100,3
channel = 2
persistent=0
[State 0, VelAdd]
type = velset
trigger1 = p2bodydist x <-20&& time <80
x = .1
y = -.01
[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause =1
;persistent = 
[State 0, VelAdd]
type = velset
trigger1 =time >80 && animelemtime(3)<0 && anim!=0
x = 7.5
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)<0&& anim=191 && vel y !=0&&time >80
y = .67
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=3&& anim=191
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=3&& anim=191
x = 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=3 && anim!=0
value =F40,0
channel = 0

[State 0, Turn]
type = Turn
trigger1 = animelem=5 && anim!=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animtime=0
value = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem=3 || anim=0
x = helper(7000),pos x

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = time = 160
value = 0
;------------------------------------------------------
[Statedef 1901]
type =S
physics=N
ctrl = 0
anim =192
velset = 0,0

;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = roundstate=0 
value = 192

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0&& !var(40)
x = 160

[State 1000, 1]
type = PlaySnd
trigger1 =animelem=2
value = 190, 1
channel=0
persistent=0
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
[State 0, VelSet]
type = VelSet
trigger1 =animelem=5  && anim!=0
x = 9
y = -4.25
persistent = 0
;[State 0, PlaySnd]
;type = PlaySnd
;trigger1 = animelem=2 && anim!=0
;value = S100,1
;channel = 2
;persistent=0
[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=5 && anim!=0
value = F0,4
channel = 2
persistent=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=6&& pos y <0  && anim!=0
value = anim
elem =5


[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause =1
;persistent = 

[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(5)>=0&&animelemtime(6)<0&& anim!=0 
y = .67
;ignorehitpause = 
;persistent = 
[State 0, PosSet]
type = PosSet
trigger1 = animelem=6&& anim!=0
y = 0
[State 0, VelSet]
type = VelSet
trigger1 = animelem=6&& anim!=0
x = 0
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = animelem=6 && anim!=0
value =F40,0
channel = 1

[State 0, Turn]
type = Turn
trigger1 = animelem=8 && anim!=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animtime=0
value = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem=6 || anim=0
x = helper(7000),pos x

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = time = 160
value = 0
;---------------------------------------------------------------------------
; Taunt
; CNS difficulty: easy
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

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

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


;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                     ;Move-type: A-attack, I-idle, H-gethit
physics = S                      ;Physics: S-stand, C-crouch, A-air
juggle  =0;ifelse(var(8)=1,0,15); 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 200                       ;Change animation (Def: no change)
                  ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)

[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

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

[State 200, 1]
type = HitDef
triggerall = anim=200
trigger1 = AnimElem = 3
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage =27, 0                  ;Damage that move inflicts, guard damage
kill=0
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 8, 8          
sparkno =(random%4)
guard.sparkno=6                   
sparkxy = -10, -60               ;X-offset for the "hit spark" rel. to p2,
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
hitsound = F5, 0         
guardsound = F6, 0                
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 7           
ground.hittime  = 10         
guard.ctrltime=ifelse(p2statetype=A,99,8)
ground.velocity = -5,ifelse(var(8)=1,-9,0)             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3.45,-7           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 99                 ;Time before opponent regains control in air
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = F0, 0
channel = 1

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 202]
type    = A
movetype= H
physics = N
ctrl = 0
[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0


[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = time=0
value = 1200

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = time>0
y = .46

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1


[State 0, NotHitBy]
type = NotHitBy
trigger1 = pos y >=0 && time >2 && alive
value = SCA,NT,ST,HT
;value2 = S,NA
time = 8
;ignorehitpause = 
;persistent = 

[State 5030, 3]
type = selfState
trigger1= pos y >=0 && time >2
value = ifelse(!alive,5050,52)
;---------------------------------------------------------------------------
; Standing strong punch

[Statedef 205]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 4
 
ctrl = 0
velset = 0,0
anim = 210;ifelse(fvar(15) <50,210,211)
sprpriority = 1
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0
v = 36    ;fv = 10
value = 0

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0, 1
channel = 1
[State 0, PosAdd]
type = PosAdd
trigger1=animelem=2
x = 3*const(size.xscale)
[State 0, VarSet]
type = VarSet
trigger1 =animelem=2 
v = 36    ;fv = 10
value = 3
[State 0, PosAdd]
type = PosAdd
trigger1=animelem=3
x = 11*const(size.xscale)
[State 0, VarSet]
type = VarSet
trigger1 =animelem=3
v = 36    ;fv = 10
value = 14
[State 0, PosAdd]
type = PosAdd
trigger1=animelem=5
x = -14*const(size.xscale)
[State 0, VarSet]
type = VarSet
trigger1 =animelem=5
v = 36    ;fv = 10
value = 0
[State 210, 2]
type = HitDef
trigger1 = AnimElem =2
attr = S, NA
animtype  = Medium
damage    =61
kill=0
priority = 3, Hit  
guardflag = MA
pausetime = 14,14   
sparkno = 10+(random%4)
guard.sparkno=6  ; 1
sparkxy = -10, -56
hitsound = F5, 1        
guardsound = F6, 1 
getpower = ifelse((life<=lifemax/3),112,42)
givepower=0 
ground.type = High
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,15)
air.hittime=99
ground.velocity = -5.5,ifelse(var(8)=1,-9,0)
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-11

[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  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;=ifelse((life<=lifemax/3),114,28)   
ctrl = 0
velset = 0,0
anim = 230
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,2
channel = 1

[State 230, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 26
guardflag = MA
priority = 2, Hit  
kill=0
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
pausetime = 8,8  
sparkno =(random%4)
guard.sparkno=6  ; 0
sparkxy = -10,-55
hitsound = F5, 2         
guardsound = F6, 0
ground.type = Low
ground.slidetime = 8             ;Time that the opponent slides back
ground.hittime  = 10
guard.ctrltime=ifelse(p2statetype=A,99,8)
ground.velocity = -6,ifelse(var(8)=1,-9,0)             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0

[State 230, 3]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Standing light kick
; CNS difficulty: easy
[Statedef 235]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;=ifelse((life<=lifemax/3),114,28)   
ctrl = 0
velset = 0,0
anim = 240
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,3
channel = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = animelemtime(1)>=0 && animelemtime(2)<0 
x = 4.5
;ignorehitpause = 
;persistent = 


[State 230, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = Medium
damage    =63
guardflag = MA
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
priority = 3, Hit 
kill=0
pausetime = 14,14 
sparkno =10+(random%4)
guard.sparkno=6 ; 0
sparkxy = -10,-55
hitsound = F5, 3         
guardsound = F6, 1 
ground.type = Low
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,15)
air.hittime=99
ground.velocity = -5.5,ifelse(var(8)=1,-9,0)
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-11


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


;---------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  =0;ifelse(var(8)=1,0,15); 5
  
ctrl = 0
anim = 400
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,0
channel = 1


[State 400, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
damage = 26, 0   
kill=0 
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 2, Hit                 ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 8,8        
sparkno =(random%4)
guard.sparkno=6 ; 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -44           ;X-offset for the "hit spark" rel. to p2,
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
hitsound = F5, 0         
guardsound = F6, 0  
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 6             ;Time that the opponent slides back
ground.hittime  =10          ;Time opponent is in hit state
guard.ctrltime=ifelse(p2statetype=A,99,8)
ground.velocity = -5,ifelse(var(8)=1,-9,0)             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)
;Y-velocity at which opponent is pushed
air.hittime = 99                 ;Time before opponent regains control in air
yaccel=.47
id=200
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]

[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0 
value = 11
;---------------------------------------------------------------------------
;Crouching light punch

[Statedef 405]
type    = C
movetype= A
physics = C
juggle  =0;ifelse(var(8)=1,0,15); 5
  
ctrl = 0
anim = 405
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,1
channel = 1
[State 0, PosAdd]
type = PosAdd
trigger1=animelem=2 
x = 7
[State 0, VarSet]
type = VarSet
trigger1 =animelem=2 
v = 36    ;fv = 10
value = 7


[State 0, PosAdd]
type = PosAdd
trigger1=animelem=3
x = -1

[State 0, PosAdd]
type = PosAdd
trigger1=animelem=5
x = 1
[State 0, VarSet]
type = VarSet
trigger1 =animelem=5 
v = 36    ;fv = 10
value = 7
[State 0, PosAdd]
type = PosAdd
trigger1=animelem=6
x = -7
[State 0, VarSet]
type = VarSet
trigger1 =animelem=6 
v = 36    ;fv = 10
value = 0
[State 400, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage = 65, 0 
kill=0   
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 14,14        
sparkno =10+(random%4)
guard.sparkno=6  ; 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -24           ;X-offset for the "hit spark" rel. to p2,
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
hitsound = F5, 1        
guardsound = F6, 1 
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,15)
air.hittime=99
ground.velocity = -5.5,ifelse(var(8)=1,-9,0)
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-11
[State 400, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 11

;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  =0;ifelse(var(8)=1,0,15); 5
  
ctrl = 0
anim = 430
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,2
channel = 1



[State 430, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
animtype  = Medium
damage    =27
kill=0
guardflag = L
pausetime = 8,8  
priority = 2, Hit  
sparkno =(random%4)
guard.sparkno=6  ; 0
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
sparkxy = -5,-0
hitsound = F5, 2         
guardsound = F6, 0
ground.type = Low
ground.slidetime = 10             ;Time that the opponent slides back
ground.hittime  = 10 
guard.ctrltime=ifelse(p2statetype=A,99,8)          ;Time opponent is in hit state
ground.velocity = -5,ifelse(var(8)=1,-9,0)             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)
yaccel=.47
id=200
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-8
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]




[State 430, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1
;---------------------------------------------------------------------------
;Crouching light kick
; CNS difficulty: easy
[Statedef 435]
type    = C
movetype= A
physics = C
juggle  =0;ifelse(var(8)=1,0,15); 5
  
ctrl = 0
anim = 435
sprpriority = 2
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0 && var(36)!=0
x = -var(36)
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
trigger1 =time=0 
v = 36    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,3
channel = 1

;ignorehitpause = 
;persistent = 



[State 440, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 68
kill=0
hitflag = MAF
guardflag = L
pausetime = 14,14 
priority = 3, Hit 
sparkno =10+(random%4)
guard.sparkno=6 ; 1
sparkxy = -5,-45
hitsound = F5, 3         
guardsound = F6, 1 
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
ground.type = low
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,10)
air.hittime=99
ground.velocity = -5.5,-cond(var(8),9,4.4)
air.velocity = -3,-4.4+(enemy,hitfall*1.5)
yaccel=.47
id=440
fall=1
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-6


[State 440, 3]
type = HitDef
triggerall =cond(numhelper(8083),helper(8083),var(0)=68,0) || cond(numhelper(8084),helper(8084),var(0)=68,0) || cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0) 
trigger1 = AnimElem = 2 && (p2statetype=L ||cond(numhelper(8083),helper(8083),var(0)=87,0) || cond(numhelper(8084),helper(8084),var(0)=87,0))
attr = C, NA
kill=0
hitflag = MFD
damage    = 68
guardflag = L
pausetime = 14,14 
priority = 3, Hit 
sparkno =10+(random%4)
guard.sparkno=6 ; 1
sparkxy = -5,-45
hitsound = F5, 3         
guardsound = F6, 1 
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
ground.type = low
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,15)
air.hittime=99
ground.velocity = -5.5,-cond(var(8),9,4.4)
air.velocity = -3,-4.4+(enemy,hitfall*1.5)
yaccel=.47
id=200
fall=1
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-6

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

;---------------------------------------------------------------------------
;Jump Light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  =0;ifelse(var(8)=1,0,15); 2
  
ctrl = 0
anim = 600
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,0
channel = 1
[State 600, 2]
type = HitDef
triggerall = anim=600
trigger1 = !movecontact&&!movereversed
attr = A, NA
damage    = 25
kill=0
guardflag = HA
priority = 2, Hit  
pausetime = 8, 8         
sparkno =(random%4)
guard.sparkno=6  ; 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -46               ;X-offset for the "hit spark" rel. to p2,
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
hitsound = F5, 0         
guardsound = F6, 0  
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime  = 7         ;Time opponent is in hit state
ground.hittime  = 14        ;Time opponent is in hit state
guard.ctrltime=14
ground.velocity = -6             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3.45,-7           ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 99                 ;Time before opponent regains control in air
yaccel=.47
id=200
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]



;---------------------------------------------------------------------------
;Jump Strong Punch
; CNS difficulty: easy
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  =0;ifelse(var(8)=1,0,15); 4
 
ctrl = 0
anim = 620
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,1
channel = 1
[State 610, 3]
type = HitDef
trigger1 = !movecontact&&!movereversed
attr = A, NA
animtype  = Medium
damage    =68
kill=0
guardflag = HA
pausetime = 14,14 
priority = 3, Hit 
sparkno =10+(random%4)
guard.sparkno=6  ; 1
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33  
sparkxy = -10, -46 
hitsound = F5, 1        
guardsound = F6, 1 
ground.type = High
ground.slidetime  = 7         ;Time opponent is in hit state
ground.hittime  = 14         ;Time opponent is in hit state
guard.ctrltime=14
air.hittime=99
ground.velocity = -5.5,ifelse(var(8)=1,-9,0)
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-7



;---------------------------------------------------------------------------
;Jump Light Kick
; CNS difficulty: easy
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  =0;ifelse(var(8)=1,0,15); 3
  
ctrl = 0
anim = 630
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,2
channel = 1
[State 630, 2]
type = HitDef
trigger1 = !movecontact&&!movereversed
attr = A, NA
damage =25
kill=0
guardflag = HA
priority = 2, Hit  
pausetime = 8,8         
sparkno =(random%4)
guard.sparkno=6  ; 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -36               ;X-offset for the "hit spark" rel. to p2,
getpower=ifelse((life<=lifemax/5),114,57)
givepower=18
hitsound = F5, 2         
guardsound = F6, 0
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime  = 7         ;Time opponent is in hit state
ground.hittime  = 14         ;Time opponent is in hit state
guard.ctrltime=14
ground.velocity = -6             ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)         ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 99                 ;Time before opponent regains control in air
yaccel=.47
id=200
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]

;---------------------------------------------------------------------------
;Jump Strong Kick
; CNS difficulty: easy
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  =0;ifelse(var(8)=1,0,15); 4
 
ctrl = 0
anim = 650
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = F0,3
channel = 1
[State 640, 3]
type = HitDef

trigger1 = !movecontact&&!movereversed
attr = A, NA
damage    =68
guardflag = HA
kill=0
pausetime = 14,14 
priority = 3, Hit 
sparkno =10+(random%4)
guard.sparkno=6  ; 1
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33 
sparkxy = -10, -36   
hitsound = F5, 3         
guardsound = F6, 1 
ground.type = High
ground.slidetime  = 7         ;Time opponent is in hit state
ground.hittime  = 14        ;Time opponent is in hit state
guard.ctrltime=14
air.hittime=99
ground.velocity = -5.5,ifelse(var(8)=1,-9,0)
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-7


;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time=0
id = 801
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 = numexplod(801)=0 && (helper(10006), var(0)&258) > 0
anim = 10000
ID = 801
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -1
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
[State 800, 1]
type = HitDef
triggerall = fvar(15) <27
Trigger1 = p2stateno=5901
attr = S, NT         ;Attributes: Standing, Normal Throw
hitflag = MAF         ;Affect only ground people who are not being hit
priority = 2   ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.sparkno=-1         ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),1,-1)
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  
numhits=0
[State 800, 1]
type = HitDef
triggerall = p2movetype!=H || p2stateno=[120,140]
Trigger1 = animelem=2 && p2stateno!=[150,155]
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
guard.sparkno=-1         ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
                      ;p2's sprite priority is set to 0 by default
p1facing = ifelse((command="holdfwd"&&AIlevel=0||enemy,backedgebodydist <70&&AIlevel>0),1,-1)
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
           ;Force p2 into falling down

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = cond(numexplod(801)>0,205,235)

;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent

[Statedef 810]
type    = S
movetype= A
physics = N
anim = 810
poweradd=0; = 60
facep2=1
; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v =5  ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S100,0
channel = 0

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0
[State 810, Width 2-11]
type = Width
trigger1 = time=0
edge = 30,30

[State 0, PosAdd]
type = PosAdd
trigger1 =(frontedgebodydist <30)  &&time=0
x = -35

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value =0
;ignorehitpause = 
;persistent = 


;[State 640, 2]
;type = PlaySnd
;trigger1 = animelem=3
;value =100, 0
;channel = 0


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
pos =40,0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =  animelem=9
value = anim
elem = 3
persistent = 0
[State 0, HitAdd]
type = HitAdd
trigger1 =  animelem=3
trigger2 =  animelem=6
value = 1

;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
trigger1 =  animelem=3
trigger2 =  animelem=6
anim = F10+(random%4)
ID = 810
pos = 30,-10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause=1


[State 640, 2]
type = PlaySnd
trigger1 = animelem=3
trigger2 =  animelem=6
value =F5, 1
channel = 1
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem=3
trigger2 =  animelem=6
value = -ceil(cond(time >39,21*fvar(1),cond(p2life >23,21*fvar(1),0)))
kill = 0
;ignorehitpause = 
;persistent = 

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(3) >= 0 && AnimElemTime(9) < 0
pos = 0,0


;ignorehitpause = 
;persistent =





;[State 640, 2]
;type = PlaySnd
;trigger1 = enemy,anim=821
;value =200, 0
;channel = 1
;persistent=0


[State 0, TargetVelSet]
type = VelSet
trigger1 = AnimElem =9
x =-3.2
y = -5.5
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=14 && pos y <0
value = anim
elem = 13
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(9)>=0 && animelemtime(14)<0
y = .47
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
trigger1 = animelem=14
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem=14
x = 0
y = 0
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 
;[State 0, VarSet]
;type = Varset
;trigger1 =animelem=5 && var(0)=2
;v = 4   ;fv = 10
;value =2
;ignorehitpause=0


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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (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*(cond(var(59)=24,9,1))
[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 =enemy,animelem=3 && p2stateno=810
value = anim
elem = 3

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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = animtime=0
value = cond(p2life=1,5110,5120)

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




[State 5040, 2]
type = ChangeAnim
triggerall =alive
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040
[State 5040, 2]
type = ChangeAnim
triggerall =!alive
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5050
[State 0, PosAdd]
type = PosAdd
trigger1 = time=0
y = -const(size.head.pos.y)
[State 0, ChangeState]
type = ChangeState
trigger1 = time =0 && !alive
value =10613
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

[State 0, NotHitBy]
type = NotHitBy
trigger1 = pos y <0
value = SCA
;value2 = S,NA
time = 1
;ignorehitpause =
;persistent =
[State 0, NotHitBy]
type =HitBy
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = SCA,AA,AP
;value2 = S,NA
time = 3
[State 5040, 5]
type = VelAdd
trigger1 = 1
y = .47

[State 5040, 6]
type = selfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND
;---------------------------------------------------------------------------
;Kung Fu Throw - Attempt
[Statedef 830]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 0
velset = 0,0
ctrl = 0
anim = 829
sprpriority = 2

[State 800, 1]
type = HitDef
triggerall = p2movetype!=H || p2stateno=[120,140]
Trigger1 = animelem=2 && p2stateno!=[150,155]
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = M-          ;Affect only ground people who are not being hit
priority = 2, Miss    ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.sparkno=-1 
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing =1          ;Force p2 to face KFM
p1stateno = 840      ;On success, KFM changes to state 810
p2stateno = 850      ;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 = 0             ;Force p2 into falling down
numhits=0

[State 800, 1]
type = HitDef
Trigger1 = p2stateno=5901 ||cond(numhelper(8083),helper(8083),var(0)=69,0) || cond(numhelper(8084),helper(8084),var(0)=69,0) 
attr = S, NT         ;Attributes: Standing, Normal Throw
hitflag = MAF         ;Affect only ground people who are not being hit
priority = 2   ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.sparkno=-1         ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
p1stateno = 840      ;On success, KFM changes to state 810
p2stateno = 850      ;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 = 0          ;Force p2 into falling down
numhits=0

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value =0
ctrl=!helper(7000),var(34)
;---------------------------------------------------------------------------
;Kung Fu Throw - Throwing the opponent

[Statedef 840]
type    = S
movetype= A
physics = N
anim = 830
poweradd=0; = 60
facep2=1
sprpriority =2
; Here a variable, var(2), is used to remember whether or not the
; player was holding forward at the start of the state. This variable
; is checked later on to turn KFM around if necessary.
[State 0, PosAdd]
type = PosAdd
trigger1 =(backedgebodydist<20) &&animelem=5
x = 45

;ignorehitpause =
;trans = 
;persistent =
;supermove = 0
;pausemove = 0


;[State 0, VarSet]
;type = VarSet
;trigger1 = 1
;v = 11    ;fv = 10
;value = 2


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=0
value = S100,4
channel = 0
[State 810, Width 2-11]
type = Width
trigger1 = AnimElemTime(2) >= 0 && AnimElemTime(12) < 0
edge =20,0


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(3) < 0
pos =40,0


[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 4   ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 





[State 210, 2]
type = HitDef
trigger1 =animelem=3
attr =S, NT
animtype  = Medium
damage    =65
kill=0
guardflag = MA
pausetime = 16,16
sparkno = 10+(random%4)
guard.sparkno=S6001  ; 1
sparkxy = -10,-62
priority=5
getpower = ifelse((life<=lifemax/3),80,26)
givepower=0 
hitsound = F5, 3        
guardsound = S3,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=10
ground.velocity = -3.5
air.velocity = -3.45,-8.2
yaccel=.46
forcenofall=1
fall.recover=0
id=200
;persistent = 
;persistent = 

;[State 0, EnvShake] ;39
;type = EnvShake
;trigger1 =animelem=3 
;time = 20
;freq = 60
;ampl = -4
;phase = 90
;ignorehitpause = 
;persistent = 


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

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (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 850]
type    = S
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 831*(cond(var(59)=24,9,1))
[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 0
movecamera = 0,0
;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = p2stateno!=840
value = 0
ctrl =1
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (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 851]
type    = A
movetype= H
physics = N

[State 0, VelAdd]
type = VelAdd
trigger1 =1 
y = .46
;ignorehitpause = 
;persistent = 


[State 0, ScreenBound]
type = ScreenBound
trigger1 =1 
value = 1
movecamera = 1,0
;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = changeState
trigger1 = pos y >15 && time >10
value = 10612

;---------------------------------------------------------------------------
; Kung Fu Palm
; CNS difficulty: medium
; Description: This is like a standard attack, but with some differences.
;   There are two HitDefs in this attack. One is triggered when the
;   opponent is near (using a p2bodydist trigger), and the other
;   when the opponent is farther away. The main differences between
;   the near and far versions of the HitDefs is that the near version
;   has a "fall" parameter set to 1, causing the opponent to be knocked
;   down. Other minor differences are the damage, and the velocity to
;   give the opponent.
;   The line "attr = S, SA" line means this is a Standing, Special Attack.
;   It is important you have the attr parameter set correctly for all
;   you HitDefs.
[Statedef 1000]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;= 0
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2

[State 0, VarSet]
type = VarSet
triggerall = AILevel=0
trigger1 = time=0
v = 2   ;fv = 10
value =  ifelse((helper(10006), var(0)&129) > 0,0,1)

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((helper(10003),var(20)),0,ifelse((helper(10003),var(21)),1,2))
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0&& var(2)>0
value = 1000+(10*var(2))

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=5 && time <20 && var(2)=2
value = anim
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=4 && time >=20 && var(2)=2 
value = anim
elem = 5
;ignorehitpause = 
;persistent = 

[State 0, Width]
type = Width
trigger1 = animelemtime(4)<0 && var(0)>0
player = 25,0
[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=4 && (var(2)<2 || var(0)=0) 
trigger2 =animelem=5 && var(2)=2 && var(0)>0
x = 20
[State 0, PosAdd]
type = PosAdd
trigger1 =animtime=0 && var(0)!=0
trigger2 =animelem=5 &&var(0)=0
x = -20

[State 0, Helper]
type = Helper
trigger1 =animelem=4 && (var(2)<2 || !var(0))
trigger2 =animelem=5 && var(2)=2 && var(0)>0
helpertype = normal ;player
name = "blade"
ID =  1001
stateno = 1001
pos = ceil(14*const(size.xscale)),0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =const(size.xscale)
size.yscale =const(size.yscale)

;ignorehitpause = 
;persistent = 


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


;---------------------------------------------------------------------------
; Kung Fu Knee

[Statedef 1050]
type    = S
movetype= A
physics = N
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;= 110
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=1 &&p2statetype=A
movetype = I        
[State 0, StateTypeSet]
type = StateTypeSet
triggerall = p2statetype!=A  && var(3)<3
trigger1 = var(4)=0|| p2stateno=5120 || p2stateno=5901 || var(3)<3|| var(2)=2
movetype = A
[State 1000, 1]
type = PlaySnd
trigger1 =time=0
value = 100, 4
channel=0
[State 1000, 1]
type = PlaySnd
trigger1 =time=0
value = 100, 2
channel=1

;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = Varset
trigger1 = time=0
v = 3    ;fv = 10
value = 0
ignorehitpause = 0
[State 0, VarSet]
type = Varadd
trigger1 = movecontact =1
trigger2 = animelem=4 && anim=1050&& !movecontact
trigger3 = animelem=5&& anim=1051&& !movecontact
trigger4 = animelem=7 && anim=1052&& !movecontact
v = 3    ;fv = 10
value = 1
ignorehitpause = 0

;persistent = 


[State 0, VarSet]
type = VarSet
triggerall = AILevel=0&& var(2)!=2
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((helper(10006), var(0)&129) > 0,0,1)

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((fvar(15)=[0,35]),0,1)

[State 0, VarSet]
type = VarSet
triggerall = cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) 
triggerall = AILevel=0 && var(45)
trigger1 = time=0
v = 2   ;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0 && helper(7000),var(2)>0 && fvar(15)<35 && p2stateno!=5040 && (random <299 || AIlevel >6 && var(4)>3)
trigger1 = time=0 && (p2statetype=A||p2movetype=A) && p2stateno!=[800,899]
v = 2   ;fv = 10
value = 2

[State 0, PalFXWiz]
type = PalFX
trigger1 = time <10 && var(2)=2
trigger1 = time%3=0
time = 2
add = 0,-200,-200
mul = 256,256,256
sinadd = 40,80,40,1
invertall = 0
color = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0
value = 1050+var(2)
elem = 1
;ignorehitpause = 
;persistent = 

[State 1000, Helper]
type = Helper
trigger1 = animelem=2 && var(2)=2
helpertype = normal
name = "Fireballstart"
ID = 1052
stateno = 1012
pos =0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)
size.yscale = const(size.yscale)
pausemovetime=99

[State 0, PosAdd]
type = PosAdd
trigger1 =animelem=3 
x =8
y = -10
;ignorehitpause = 
;persistent = 
[State 0, NotHitBy]
type = NotHitBy
trigger1 = time =0 
value = SCA
;value2 = S,NA
time =cond(var(2)=0,3,5)

[State 0, VelSet]
type = velset
trigger1 =animelem=3
x= ifelse(var(2)=0,1.95,ifelse(var(2)=1,2.5,3.75))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -ifelse(var(2)=0,7.5,ifelse(var(2)=1,9.1,8.35))

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=3 
statetype = A

[State 0, PosSet]
type = Posadd
trigger1 = animelem=5
y = 20
[State 0, ScreenBound]
type = ScreenBound
trigger1 = animelemtime(5)<0 && animelemtime(7)>3
value = 1
movecamera = 1,0
;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = velset
trigger1 =animelem=5  ;&&anim=1050
x=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =animelem=9 && pos y <0 
value = anim
elem = 8
;ignorehitpause = 
;persistent = 


[State 0, VelAdd]
type = VelAdd
trigger1 =animelemtime(3)>2 && animelemtime(9)<0 
y = .47

;w 15 s=18 h=22


[State 0, PosSet]
type = PosSet
trigger1 = animelem=9
y = 0
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = animelem=9
y = 0
;ignorehitpause = 
;persistent = 


[State 1000, 1]
type = PlaySnd
trigger1 = animelem=9
value = F40, 0
channel=2
[State 210, 2]
type = HitDef
trigger1 =animelem=2
attr = A, SA
animtype  = Medium
damage    =cond(var(2)=0,55,80)
kill=0
guardflag = MA
pausetime = 14,14
sparkxy = -10,-62
sparkno = 20+(random%4)
priority=4
guard.sparkno=7
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
hitsound = F5,1        
guardsound = F6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=18
ground.velocity = -2.5,-ifelse(var(8),9,cond(var(2)=0,9,7.5))
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0; = -6.5
air.velocity = -1.5,-ifelse(var(8),9,cond(var(2)=0,9,7.35))
yaccel=.49
fall = 1
fall.recover=0
id=200


[State 210, 2]
type = HitDef
trigger1 =animelem=3 && var(2)=2 
attr = A, SA
animtype  = Medium
damage    =40
kill=0
guardflag = MA
pausetime = 14,14
sparkxy = -10,-62
sparkno = 20+(random%4)
priority=5
guard.sparkno=7
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
hitsound = F5,1        
guardsound = F6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=18
ground.velocity = -3.5,-6.5
air.velocity = -2,-8.5
yaccel=.49
fall = 1
fall.recover=0
id=200
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = moveguarded=1
value = -ceil(10*fvar(1))
ID = 200
kill = 0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=5
movetype = I
;[State 200, 1]
;type = PlaySnd
;trigger1 = animelem=7 
;value = 0, 4
;channel = 1

;ignorehitpause = 
;persistent = 


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=9
statetype = S
movetype = I 
physics =S


      ;I,A,H
[State 1050, 5]
type = ChangeState
trigger1 = AnimTime  = 0
value = 0
ctrl=1


;---------------------------------------------------------------------------
; Light Kung Fu Upper
; CNS difficulty: easy
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;= 110
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=1
movetype = I        
[State 0, StateTypeSet]
type = StateTypeSet
triggerall = statetype!=S
trigger1 = var(4)=0|| p2stateno=5120 || p2stateno=5901 || p2statetype!=A|| var(2)=2
movetype = A
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0&& var(2)!=2
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((helper(10006), var(0)&2064) > 0,0,1)

[State 0, VarSet]
type = VarSet
triggerall = AILevel>0
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((fvar(15)=[0,65]),0,1)

[State 0, VarSet]
type = VarSet
triggerall =( AILevel =[6,8])&& enemy,backedgebodydist <40
trigger1 = time=0 && (prevstateno=205 || prevstateno=405 ||prevstateno=235)
v = 2   ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
triggerall = cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) 
triggerall = AILevel=0 && var(46)
trigger1 = time=0
v = 2   ;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0 && helper(7000),var(2)>0 && fvar(15)<55 && p2stateno!=5040&& (random <299 || AIlevel >6 && var(4)>3 || !enemy,hitover&&random<499&&enemy,backedgebodydist<50)
trigger1 = time=0 && (prevstateno=205 || prevstateno=235 || prevstateno=405||p2statetype=A&& enemy,hitfall|| p2stateno=[120,155])
v = 2   ;fv = 10
value = 2

[State 0, PalFXWiz]
type = PalFX
trigger1 = time <14 && var(2)=2
trigger1 = time%3=0
time = 2
add = 0,-200,-200
mul = 256,256,256
sinadd = 40,80,40,1
invertall = 0
color = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0; && var(0)>0
value = 1100+var(2)
    ;S,A,C,L
;ignorehitpause = 
;persistent = 



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)>0 && animelem=2&& anim!=1103 
value = anim
elem = 1
persistent =0 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = var(2)=1 && animelem=1,2 &&time >4&& anim!=1103 
value = anim
elem = 2
persistent =0 
;ignorehitpause = 
;persistent = 

[State 1000, 1]
type = PlaySnd
trigger1 =time=0
value = 100, 1
channel=0

[State 1000, 1]
type = PlaySnd
trigger1 =time=1&& anim!=1103 
value = 100,3
channel=1
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=2
statetype = A       ;S,A,C,L
physics = N
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, VelSet]
type = VelSet
trigger1 = animelem=2 && anim!=1103 
x = cond(var(2)=2,13.5,cond(var(2)=1,9.5,4.5))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -3


;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd 
trigger1 = animelem=2&& anim!=1103 
x =23
[State 0, ChangeAnim]
type = ChangeAnim
triggerall =  anim!=1103 
trigger1 =time<18 && animelem=4 && var(2)=0
trigger2 =time<21 && animelem=4 && var(2)=1
trigger3 =time<20 && animelem=4 && var(2)=2
value = anim
elem=2

[State 0, RemoveExplod]
type = RemoveExplod
trigger1=animelem=4 && var(2)=2
id = 1105
[State 0, VelAdd]
type = Velmul
trigger1 = animelemtime(2)>=0 && animelemtime(4)<0 && anim!=1103 
y =cond(var(2)=2,1.095,cond(var(2)=1,1.09,1.05))
;ignorehitpause = 
;persistent =
[State 0, Explod]
type = Explod
trigger1 =animelem=2&& var(2)=2 ;&& anim=1050
anim = 1105
ID = 1000
pos = -23,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime = 0
removetime=-1
scale = const(size.xscale),const(size.yscale)
sprpriority =1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
persistent=0

[State 0, VelSet]
type = VelSet
trigger1 =animelem=4  && anim!=1103 
x = 3*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -2.5
;ignorehitpause = 
;persistent = 
 [State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1103 && animelem=5&& pos y <0
value = anim
elem = 4
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(3)>=0 && animelemtime(4)<0 && anim!=1103 
y = .43
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(4)>=0 && animelemtime(5)<0 && anim!=1103 
y = .37


;ignorehitpause = 
;persistent = 


[State 1100, 2]
type = HitDef
trigger1 =!movecontact && !movereversed
attr = A, SA
animtype  = Med
damage    =cond(var(2)=2,75,cond(var(2)=0,55,70))
kill=0
priority  = 4
guardflag = M
pausetime = 18,18
getpower = ifelse((life<=lifemax/3),140,56)
sparkxy = 0,-35
sparkno = 20+(random%4)
priority=4
guard.sparkno=7 ; 
hitsound = 5, 1        
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=16
ground.velocity = -6,-5-((var(2)=2)*3)
air.velocity = -5.45,-5-((var(2)=2)*3)
yaccel=.49
fall=1
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-9
airguard.velocity = -4,-4.5
fall.recover=0
id=200
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = moveguarded=1
value = -ceil(10*fvar(1))
ID = 200
kill = 0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim!=1103
value = 1103

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 =anim=1103
trigger2 =animelem=4
id = 1000
;ignorehitpause = 
;persistent = 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1103
movetype=I

;ignorehitpause = 
;persistent = 

[State 0, VelSet]
type = VelSet
trigger1 = animelem=1 && anim=1103 
x = -cond(var(2)=0,3.5,cond(var(2)=1,-.5,-2))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -cond(var(2)=2,4,2)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1103 && animelem=6 && pos y <0
value = anim
elem = 5
;ignorehitpause = 
;persistent = 


[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(2)>=0 && animelemtime(6)<0 && anim=1103 
y = cond(var(2)=2&&movehit,.52,.59)
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Width]
type = Width
trigger1 = animelemtime(4)>=0 && anim!=1103
edge = 25,0
;value = 0,0
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = animelem=6 && anim=1103 
trigger2 = animelem=5 && anim!=1103
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem=6 && anim=1103 
trigger2 = animelem=5 && anim!=1103
x = 0
y = 0

[State 0, PosAdd]
type = PosAdd 
trigger1 = animelem=4 && anim!=1103
trigger2 = animelem=1 && anim =1103
x =-23
persistent=0
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=5&& anim!=1103
trigger2 = animelem=6 && anim =1103
statetype = S       ;S,A,C,L
physics = N
[State 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1


;---------------------------------------------------------------------------
; Light Kung Fu Upper
; CNS difficulty: easy
[Statedef 1150]
type    = S
movetype= A
physics = N
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=0;= 110
velset = 0,0
anim = 1200
ctrl = 0
sprpriority = 2
[State 0, VarSet]
type = VarSet
triggerall = AILevel=0 && var(2)!=2
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((helper(10006), var(0)&129) > 0,0,1)
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=1
movetype = I        
[State 0, StateTypeSet]
type = StateTypeSet
;triggerall = statetype!=S
trigger1 = var(4)=0|| p2stateno=5120 || p2stateno=5901 || p2statetype!=A|| var(2)=2
trigger1 =anim=1210&&animelemtime(6)<0||anim=1205&&animelemtime(5)<0|| anim=[1200,1202]
movetype = A
[State 0, VarSet]
type = VarSet
triggerall = AILevel>0&& var(2)!=2
trigger1 = time=0
v = 2   ;fv = 10
value = ifelse((fvar(15)=[0,120]),0,1)
[State 0, VarSet]
type = VarSet
triggerall = AIlevel>0
triggerall =helper(7000),var(2)>0&& (enemy,backedgebodydist <40 || enemy,numproj>0)&& (random <299 || AIlevel >6 && var(4)>3)
trigger1 = time=0 && (prevstateno=205 || prevstateno=405 ||prevstateno=235||prevstateno=435|| enemy,numproj>0)
v = 2   ;fv = 10
value = 2
[State 0, VarSet]
type = VarSet
triggerall = cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) 
triggerall = AILevel=0 &&var(45)
trigger1 = time=0
v = 2   ;fv = 10
value = 2


[State 0, PalFXWiz]
type = PalFX
trigger1 = time <14 && var(2)=2
trigger1 = time%3=0
time = 2
add = 0,-200,-200
mul = 256,256,256
sinadd = 40,80,40,1
invertall = 0
color = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time=0
value = 1200+var(2)
elem= 1


    ;S,A,C,L
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
trigger1 =animelemtime(2)>=0  && animelemtime(7)<0 && anim=1200
trigger2 =animelemtime(2)>=0  && animelemtime(8)<0 && anim=1201
trigger3 =animelemtime(2)>=0  && animelemtime(11)<0 && anim=1202
x = cond(var(2)=0,5.5,cond(var(2)=1,7.5,11))*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
;ignorehitpause = 
;persistent = 
[State 1000, 1]
type = PlaySnd
trigger1 =animelem=2 && anim=[1200,1202]
value = 100,0
channel=0
[State 0, HitBy]
type = HitBy
trigger1 =    time=0
value = SCA,NA,SA,HA,NT,ST,HT
;value2 = S,NA
time = cond(var(2)=0,7,cond(var(2)=1,13,23))
;ignorehitpause = 
;persistent = 
[State 0, HitBy]
type = HitBy
trigger1 =  anim!=[1200,1202]
value = SCA
;value2 = S,NA
time = 1
persistent=0
[State 0, VarSet]
type = VarSet
trigger1 = time=0
v = 20    ;fv = 10
value = 0
;ignorehitpause = 
;persistent = 

[State 0, VarSet]
type = VarSet
triggerall = AIlevel =0
triggerall =  var(20)=0 &&( anim=[1200,1202])&& ((helper(10006), var(0)) > 127 )
trigger1 = movehit 
trigger2 = animelemtime(3)>0
v = 20   ;fv = 10
value = cond(var(2)=2,3,cond(( (helper(10006), var(0)&129) > 0 ||  (helper(10006), var(0)&258) > 0 ),1,2))
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
triggerall = AIlevel >0
triggerall =  var(20)=0 &&( anim=[1200,1202])
trigger1 = movehit 
trigger2 = animelemtime(3)>0 && fvar(15)< 55 && (p2movetype!=H || moveguarded) && p2statetype!=L
v = 20   ;fv = 10
value = cond(var(2)=2,3,cond((moveguarded||!movecontact)&&p2statetype=C,1,2))

[State 0, Null]
type = Null
triggerall =anim=[1200,1202] 
trigger1 = animelem=3 || var(2) =2 && animelem=7
trigger1 = var(1):=1
trigger2 = animelem=4 || var(2) =2 && animelem=8
trigger2 = var(1):=2
trigger3 = animelem=5|| var(2) =2 && animelem=9
trigger3 = var(1):=3
trigger4 = animelem=6
trigger4 = var(1):=4

[State 1000, Helper]
type = Helper
trigger1 = animelem=2&& var(2)=2
helpertype = normal
name = "Fireballstart"
ID = 1051
stateno = 1012
pos =0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)
size.yscale = const(size.yscale)
pausemovetime=99
persistent=0

[State 1100, 2]
type = HitDef
trigger1 =!movecontact&& !movereversed && anim=[1200,1202]
attr = S, SA
animtype  = Med
damage    =65
kill=0
priority  = 4
guardflag = M
pausetime = 14,14
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
sparkxy = 0,-35
sparkno = 20+(random%4)
priority=5
guard.sparkno=S6001 ; 
hitsound = 5, 1       
guardsound = 6,1
ground.type = Low
ground.slidetime = 10
ground.hittime  = 18
guard.ctrltime=16
ground.velocity = -6
air.velocity = -5.45,-5
yaccel=.47
air.fall=1
forcenofall=p2stateno=5901
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-8
airguard.velocity = -4,-4.5
fall.recover=0
id=200

;--- p followup
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (anim=[1200,1202]) && var(20)=1
value = 1205
[State 1000, 1]
type = PlaySnd
trigger1 =animelem=2 && anim=1205
value = 100,1
channel=0
[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = animelem=1
;ignorehitpause = 
;persistent = 

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim=1205
trigger1 = animelem=1&& anim=1205
movetype = I      ;S,A,C,L
[State 0, VelSet]
type = VelSet
trigger1 = animelem=1 && anim=1205
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem=2 && anim=1205
x = 3.5*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -6.5
[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim=1205
trigger1 = animelem=2&& anim=1205
statetype = A      ;S,A,C,L
physics = N 
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 =  statetype= A && anim=1205
movetype =A

[State 800, 1]
type = HitDef
triggerall = anim=1205&& p2stateno!=40 && p2stateno!=[150,155]
Trigger1 =!movecontact || animelem=3
attr = S, ST         ;Attributes: Standing, Normal Throw
hitflag = M-         
priority = 3   ;Throw has low priority, must be miss or dodge type.
sparkno =-1
guard.sparkno=-1         ;No spark
p1sprpriority = 1     ;Draw p1's sprite in front of p2
p1facing = 1
p2facing = 1          ;Force p2 to face KFM
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 0          ;Force p2 into falling down
numhits=0
id=1150

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=5 && anim=1205 && pos y <0
value = 1205
elem = 4
[State 0, VelAdd]
type = VelAdd
triggerall = anim=1205
trigger1 = animelemtime(2)>=0 && animelemtime(5)< 0
y = .43

;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
triggerall = anim=1205
trigger1 = animelem=5
y = 0

[State 0, VelSet]
type = VelSet
triggerall = anim=1205
trigger1 = animelem=5
x = 0
y = 0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim=1205
trigger1 = animelem=5
statetype = S      ;S,A,C,L
movetype = I        ;I,A,H
physics = S
;ignorehitpause = 
;persistent = 



[State 0, TargetState]
type = TargetState
triggerall = NumTarget(1150) 
trigger1 =movehit
value =1151
ID = 1150
persistent =0 


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim=1205 && var(20)=1 && p2stateno=1151
value = 1206

[State 0, VelSet]
type = VelSet
trigger1 = anim=1206 && animelemtime(7)<0
x = 0
y = 0

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


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0&& anim=1206
pos =40,0


[State 0, BindToTarget]
type = BindToTarget
trigger1 = animelemtime(2)>=0 && animelemtime(7)<0&& anim=1206
pos = 0,enemy,const(size.mid.pos.y);,"Foot";"Mid","Head"

[State 0, BindToTarget]
type = BindToTarget
trigger1 =animelem=7&& anim=1206
pos = 32,-11;,"Foot";"Mid","Head"
[State 640, 2]
type = PlaySnd
trigger1 = animelem=7&& anim=1206
value =100, 1
channel = 0
;ignorehitpause = 
;persistent = 
[State 0, HitAdd]
type = HitAdd
triggerall = anim=1206
trigger1 =  animelem=3
trigger2 =  animelem=5
value = 1
;ignorehitpause = s
;persistent = 

[State 0, Explod]
type = Explod
triggerall = anim=1206
trigger1 =  animelem=3
trigger2 =  animelem=5
anim = F20+(random%4)
ID = 6000
pos = 5,-25
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause=1


[State 640, 2]
type = PlaySnd
triggerall = anim=1206
trigger1 = animelem=3
trigger2 =  animelem=5
value =F5, 2
channel = 1

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1206
movetype = A
;ignorehitpause = 
;persistent = 
[State 1000, 1]
type = PlaySnd
trigger1 =animelem=7 && anim=1206
value = 100,5
channel=0
[State 210, 2]
type = HitDef
triggerall = anim=1206
trigger1 =animelem=7
attr =A, SA
animtype  = Medium
kill=0
damage    =75,10
guardflag = MA
pausetime = 4,4
sparkno = 20+(random%4)
guard.sparkno=S6001  ; 1
sparkxy = -10,-62
priority=4
getpower = ifelse((life<=lifemax/3),132,66)
givepower=0 
hitsound = F5, 1        
guardsound = F6,1
ground.type = High
ground.slidetime = 12
ground.hittime  = 16
guard.ctrltime=10
ground.velocity = -1.5,-8.2
air.velocity = -1.45,-8.2
yaccel=.46
fall = 1
air.fall=1
fall.recover=0
id=200
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
;persistent = 

[State 0, TargetVelSet]
type = VelSet
triggerall = anim=1206
trigger1 = AnimElem =7
x =-2.8*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
y = -7

[State 0, VelAdd]
type = VelAdd
triggerall = anim=1206
trigger1 = animelemtime(7)>=0 && animelemtime(15)<0
y = .47
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
triggerall = anim=1206
trigger1 = animelem=15
y = 0

[State 0, VelSet]
type = VelSet
triggerall = anim=1206
trigger1 = animelem=15
x = 0
y = 0


[State 640, 2]
type = PlaySnd
triggerall = anim=1206
trigger1 = animelem=15
value =F40, 0
channel = 1
;-------- k follow up
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (anim=[1200,1202]) && var(20)=2
value = 1210
[State 1000, 1]
type = PlaySnd
trigger1 =animelem=2 && anim=1210
value = 100,4
channel=0
[State 0, PosAdd]
type = PosAdd
triggerall = anim=1210
trigger1 = animelemtime(1)>=0 &&animelemtime(3)<0
x = 2.5*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))
;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
triggerall = anim=1210
trigger1 = animelemtime(3)>=0 &&animelemtime(6)<0
x =5.5*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))

[State 0, PosAdd]
type = PosAdd
triggerall = anim=1210
trigger1 = animelemtime(6)>=0 &&animelemtime(7)<0
x =1.75*(1+(cond(numhelper(8083),cond(helper(8083),var(0)=71,helper(8083),var(1),0),cond(numhelper(8084),cond(helper(8084),var(0)=71,helper(8084),var(1),0),0))/100.0))

[State 440, 3]
type = HitDef
trigger1 = AnimElem = 5&& anim=1210
attr = C, NA
kill=0
damage    = 40
hitflag = MAF
guardflag = L
pausetime = 14,14 
priority = 4, Hit 
sparkno =20+(random%4)
guard.sparkno=6 ; 1
sparkxy = -5,-5
hitsound = F5, 3         
guardsound = F6, 1 
getpower = ifelse((life<=lifemax/5),143,72)
givepower=33
ground.type = low
ground.slidetime = 15
ground.hittime  = 18
guard.ctrltime=ifelse(p2statetype=A,99,15)
air.hittime=99
ground.velocity = -5.5,-6.5
air.velocity = -3,-7+(enemy,hitfall*1.5)
yaccel=.47
id=200
fall=1
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-7

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1210 && animelem=3
statetype = C       ;S,A,C,L 

;----- omega follow up
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = (anim=[1200,1202]) && var(20)=3
value = 1211
[State 0, PosAdd]
type = PosAdd
triggerall =  anim=1211
trigger1 = animelem=3
x = 12
[State 0, PosAdd]
type = PosAdd
triggerall =  anim=1211
trigger1 = animelem=3
x = 12
;ignorehitpause = 
;persistent = 

[State 0, PosAdd]
type = PosAdd
triggerall =  anim=1211
trigger1 = animelem=4
x = -14

[State 0, PosAdd]
type = PosAdd
triggerall =  anim=1211
trigger1 = animelem=6
x =2

[State 1000, Helper]
type = Helper
triggerall =  anim=1211
trigger1 = AnimElem =3
helpertype = normal
name = "Fireballstart"
ID = 1052
stateno = 1012
pos =0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)
size.yscale = const(size.yscale)
pausemovetime=99
persistent=0

[State 230, 2]
type = HitDef
triggerall =  anim=1211
trigger1 = AnimElem =3
attr = S, HA
animtype  = Medium
damage    = 40
guardflag =M
pausetime = 8, 8  
sparkno = 20+(random%4)
priority=4
guard.sparkno=S6001  ; 0
getpower=0
givepower=0
sparkxy = -10,-25
hitsound = 5, 1       
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = cond(var(2)=2,18,15)
guard.ctrltime=15
ground.velocity = 10
air.velocity =3,-7.5 
yaccel=.47
;snap = 20,0
id=215
forcestand=1
air.fall = p2stateno!=5901
forcenofall=p2stateno=5901
kill=0

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = moveguarded=1
value = -ceil(15*fvar(1))
ID = 215
kill = 0


[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = moveguarded=1
value = -ceil(10*fvar(1))
ID = 200
kill = 0

;---

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = movecontact && anim!=1203 && !var(20)
value = 1203
elem = var(1)

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = anim=1203
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H

;ignorehitpause = 
;persistent = 


[State 0, VelSet]
type = VelSet
trigger1 =  anim=1203 
x = -2
y = -7.25
persistent=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=1203  && animelem=5 && pos y <0 && vel  y <0
value = anim
elem = 1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=1203  && animelemtime(5)<0 && pos y <0 && vel  y >=-1
value = anim
elem = 5
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=1203  && animelem=6 && pos y <0
value = anim
elem = 5
;ignorehitpause = 
;persistent = 


[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(1)>=0 && animelemtime(6)<0 && anim=1203 
y = .40
;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
trigger1 = animelem=6 && anim=1203 
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem=6 && anim=1203 
x = 0
y=0

[State 1100, 5]
type = ChangeState
trigger1 = AnimTime = 0 
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (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 1151]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value =1207*(cond(var(59)=24,9,1))

[State 0, PosSet]
type = PosSet
trigger1 = 1
y = 0
;ignorehitpause = 
;persistent = 


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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = p2stateno!=1150
value = cond(p2life=1,5151,0)
ctrl = p2life>1

;---------------------------------------------------------------------------
; 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 = N
juggle  =0;ifelse(var(8)=1,0,15); 4
poweradd=-1000
velset = 0,0
anim = 3000
ctrl = 0
sprpriority = 2
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=1 ||var(4)=4 && hitcount =0 && var(2)!=2
movetype = I        
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = var(4)=0||var(2)=2 ||movehit
movetype = A
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
triggerall = time =1
triggerall = cond(numhelper(8083),helper(8083),var(0)!=78,1) && cond(numhelper(8084),helper(8084),var(0)!=78,1) 
triggerall = ((helper(7000),var(2)>1 || life=lifemax && helper(7000),var(3)>0))
trigger1 = AIlevel=0&&((helper(10006), var(38)) >0)
trigger2 = AIlevel>0
trigger2= p2life <400 || p2movetype=A|| var(4)=4
v = 2   ;fv = 10
value = 2
[State 0, Helper]
type = Helper
trigger1 =time=1
helpertype = normal ;player
name = "blade"
ID =  30000
stateno = 30000
pos =4, -44
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime=36
pausemovetime=36
size.xscale=2
size.yscale=2
[State 3000, Super A]
type = SuperPause
trigger1 =time=1 ;&& var(0)=2
pos = 4, -44
anim = -1;00
sound = 20, var(2)=2
poweradd = -1000
p2defmul=1
time=35
unhittable=1
[State 1000, 1]
type = PlaySnd
trigger1 =time=0
value = 3000, 0
channel=0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=1
value = 3000+(var(2)=2)
[State 0, PalFXWiz]
type = PalFX
trigger1 = time <12 && var(2)=2
trigger1 = time%3=1
time = 2
add = 0,-200,-200
mul = 256,256,256
sinadd = 40,80,40,1
invertall = 0
color = 0
[State 0, NotHitBy]
type = NotHitBy
trigger1 = time =0
value = SCA
;value2 = S,NA
time =1
[State 0, NotHitBy]
type = NotHitBy
trigger1 = time =1
trigger2= movehit
value = SCA
;value2 = S,NA
time = cond(var(2)=2,10,6)



;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=6,2 && movehit
value = anim
elem = 7
persistent = 0
[State 1000, Helper]
type = Helper
triggerall =  anim=3001
trigger1 = AnimElem =3
helpertype = normal
name = "Fireballstart"
ID = 1052
stateno = 1012
pos =0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale=const(size.xscale)
size.yscale = const(size.yscale)
pausemovetime=99
persistent=0
;ignorehitpause = 
;persistent = 
[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=3
x = 12
;ignorehitpause = 
;persistent = 

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=4
x = -14

[State 0, PosAdd]
type = PosAdd
trigger1 = animelem=6
x =2
[State 230, 2]
type = HitDef
trigger1 = AnimElem =3
attr = S, HA
animtype  = Medium
damage    = 0
guardflag =M
pausetime = 2, 2  
sparkno =20+(random%4)
priority=5
guard.sparkno=6  ; 0
getpower=0
givepower=0
sparkxy = -10,-25
hitsound = 5, 1       
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 24
guard.ctrltime=17
ground.velocity = 10
air.velocity =10,-7 
yaccel=.47
;snap = 20,0
id=215
forcestand=1
forcenofall=1
air.fall=1
kill=0
ground.cornerpush.veloff=0
air.cornerpush.veloff=0
guard.cornerpush.veloff=0
snap=80,0
[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = moveguarded=1
value = -ceil(25*fvar(1))
ID = 215
kill = 0
[State 0, TargetState]
type = TargetState
trigger1 =movehit 
value = 21010
ID = 215
persistent=0
;[State 0, TargetBind]
;type = TargetBind
;trigger1 =  movehit
;id = 215
;pos = 80,0
;persistent=0
;ignorehitpause = 
;persistent = 


[State 200, 1]
type = HitDef
trigger1 = AnimElem = 8
attr = S, HA                     ;Attribute: Standing, Normal Attack
damage =0, 0                  ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 6, 6          
sparkno =20+(random%4)
guard.sparkno=S6001                   
sparkxy = -10, -60               ;X-offset for the "hit spark" rel. to p2,
getpower=0
givepower=0
hitsound = 5, 1       
guardsound = 6,0             
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 10             ;Time that the opponent slides back
ground.hittime  = 12          ;Time opponent is in hit state
guard.ctrltime=ifelse(p2statetype=A,99,6)
ground.velocity = 0           ;Velocity at which opponent is pushed
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)          ;X-velocity at which opponent is pushed,
air.hittime = 99               
yaccel=.47
id=200
forcestand=1
forcenofall=1

[State 200, 1]
type = PlaySnd
trigger1 = animelem=7 && movehit
trigger2 = animelem=10
trigger3 = animelem=15
trigger4 = animelem=18
value = F0, random%3
channel = 1


[State 210, 2]
type = HitDef
trigger1 = AnimElem =11
attr = S, HA
animtype  = Medium
damage    =0
guardflag = MA
pausetime = 6, 6  
sparkno =20+(random%4)
guard.sparkno=S6001   ; 1
sparkxy = -10, -56
hitsound = 5, 1       
guardsound = 6,0
getpower =0
givepower=0 
ground.type = High
ground.slidetime = 10
ground.hittime  = 19
air.hittime=99
guard.ctrltime=ifelse(p2statetype=A,99,6+(3*(var(0)>0)))
ground.velocity = 0
air.velocity = -3,-7+(enemy,hitfall*3)
yaccel=.47
id=200
forcestand=1
forcenofall=1


[State 400, 2]
type = HitDef
trigger1 = AnimElem = 16
attr = C, HA
damage = 0, 0    
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
pausetime = 6,6       
sparkno =20+(random%4)
guard.sparkno=S6001  ; 0                      ;Spark anim no (Def: set above)
sparkxy = -10, -24           ;X-offset for the "hit spark" rel. to p2,
getpower=0
givepower=0
hitsound = 5, 1       
guardsound = 6,0
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 10
ground.hittime  = 19
air.hittime=99
guard.ctrltime=ifelse(p2statetype=A,99,6+(3*(var(0)>0)))
ground.velocity = 0
air.velocity = -3,-7+(enemy,hitfall*3)             ;Time before opponent regains control in air
yaccel=.47
id=200
forcestand=ifelse(var(8)=1,1,0)
forcenofall=(!enemy,hitfall &&  p2stateno!=[1025,1045]) || p2stateno=5901
fall = p2stateno=[1025,1045]


[State 430, 2]
type = HitDef
trigger1 = AnimElem = 20
attr = C, HA
animtype  = Medium
damage    =0
guardflag = L
pausetime = 10,10 
sparkno = 20+(random%4)
guard.sparkno=S6001  ; 0
getpower=0
givepower=0
sparkxy = -10,-35
hitsound = 5,3       
guardsound = 6,0
ground.type = Low
ground.slidetime = 10             ;Time that the opponent slides back
ground.hittime  = 19
guard.ctrltime=ifelse(p2statetype=A,99,6+(2*(var(0)>0)))         ;Time opponent is in hit state
ground.velocity = -6,-8
airguard.velocity = -2,-5     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -3,-7+(enemy,hitfall*3)
air.hittime=99
yaccel=.47
id=200
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-8
fall=1

[State 0, VelSet]
type = VelSet
trigger1 = animelem=24
x = 10.5
y = -3

[State 0, MoveHitReset]
type = MoveHitReset
trigger1 = animelem=24
;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
trigger1 =animelem=24&& var(2)=2 ;&& anim=1050
anim = 1105
ID = 1000
pos = -23,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
pausemovetime = 0
removetime=-1
scale = const(size.xscale),const(size.yscale)
sprpriority =1
ontop = 0
shadow = 0,0,0
ownpal = 1
removeongethit = 1
ignorehitpause=1
persistent=0
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =!movecontact && animelem=26 
value = anim
elem = 24
;ignorehitpause = 
;persistent = 
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animelem=26
id = 1000
;ignorehitpause = 
;persistent = 

[State 0, PlayerPush]
type = PlayerPush
trigger1 = animelemtime(24)>=0
value = 0

;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 1100, 2]
type = HitDef
trigger1 =animelem=24
attr = S, HA
animtype  = Med
damage    =0, 10
priority  = 5
guardflag = M
pausetime = 6,cond(var(2)=2,6,18)
getpower =0
sparkxy = 0,-35
sparkno =20+(random%4)
priority=5
guard.sparkno=S6001 ; 
hitsound = 5, 1       
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=8+((var(0)>0)*8)
ground.velocity = -6,-5
air.velocity = -5.45,-5
yaccel=.47
fall=1
snap = 30,0
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-9
airguard.velocity = -4,-4.5
fall.recover=0
id=2001

[State 0, VelSet]
type = VelSet
trigger1 = animelem=26&& anim=3000
trigger2 = animelem=27&& anim=3000
x = 0
y = 0

[State 0, TargetBind]
type = TargetBind
trigger1 = movecontact 
time = 1
id =2001
pos = 30,0
persistent=0

;ignorehitpause = 
;persistent = 

[State 1000, 1]
type = PlaySnd
trigger1 =animelem=27
value = 3000, 1
channel=0
[State 1100, 2]
type = HitDef
trigger1 =animelem=28 && anim=3000
attr = A, HA
animtype  = Med
kill=0
damage    =270, 10
priority  = 5
guardflag = M
pausetime = 7,7
getpower =0
sparkxy = 0,-65
sparkno = 20+(random%4)
priority=5
guard.sparkno=S6001 ; 
hitsound = 5, 1       
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime  = 18
guard.ctrltime=8+((var(0)>0)*8)
ground.velocity = -6,-5
air.velocity = -3.45,-5
yaccel=.47
fall=1
ground.cornerpush.veloff=0;
air.cornerpush.veloff=0
guard.cornerpush.veloff=0;=-9
airguard.velocity = -4,-4.5
fall.recover=0
id=200




[State 0, VelSet]
type = VelSet
trigger1 = animelem=28 && anim=3000
x = -1.5
y = -5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animelem=33&& pos y <0&& anim=3000
value = anim
elem = 32
;ignorehitpause = 
;persistent = 


[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(28)>=0 && animelemtime(33)<0 && anim=3000
y = .47
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 
[State 0, Width]
type = Width
trigger1 = animelemtime(22)>=0 && anim=3000
edge = 25,0
;value = 0,0
;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 = animelem=33&& anim=3000
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = animelem=33&& anim=3000
x = 0
y = 0

[State 0, PosAdd]
type = PosAdd 
trigger1 = animelem=33&& anim=3000
x =-23
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem=33&& anim=3000
statetype = S       ;S,A,C,L
physics = N

;[State 640, 2]
;type = PlaySnd
;trigger1 = animelem=1
;value =100+var(0), 3
;channel = 0



;[State 1000, 1]
;type = PlaySnd
;trigger1 = animelemtime(12)>=0&&animelemtime(18)<0
;trigger1=time%2=0
;value = 0, 0
;channel=1
;;ignorehitpause = 
;;persistent = 
;[State 1020, 1-1]
;type = PlaySnd
;triggerall = p2stateno=1205
;trigger1 = enemy,time%5=0&& enemy,time <30
;value = S2,random%6
;channel=2

;---omega

[State 0, TargetState]
type = TargetState
triggerall = anim=3001
trigger1 =animelem=27
value =3002
ID = 2001
;ignorehitpause = 
;persistent = 

[State 0, ChangeAnim]
type = ChangeAnim
triggerall =  anim=3001
trigger1 = animelem=29 && pos y <0
value = anim
elem = 28

;persistent = 

;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
triggerall =  anim=3001
trigger1 = animelem=29
y = 0

[State 0, VelSet]
type = VelSet
triggerall =  anim=3001
trigger1 = animelem=29
x = 0
y = 0
[State 0, VelAdd]
type = VelAdd
trigger1 = animelemtime(26)>=0 && animelemtime(29)<0 
y = .68
;ignorehitpause = 
;persistent = 


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(27) >= 0 && AnimElemTime(28) < 0&& anim=3001
pos =37,-42


[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElemTime(28) >= 0 && AnimElemTime(29) < 0&& anim=3001
pos =12,-23
;[State 1000, 1]
;type = PlaySnd
;triggerall =  anim=3001
;trigger1 = animelem=29
;value = 100,1
;channel=0

;ignorehitpause = 
;persistent = 
[State 0, Explod]
type = Explod
triggerall =  anim=3001
trigger1 = animelem=29
trigger2 =  animelem=32
trigger3 = animelem=35
trigger4 =  animelem=38
trigger5 = animelem=41
trigger6 =  animelem=44
anim = F10+(random%4)
ID = 3001
pos = 30,-10
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause=1
[State 0, HitAdd]
type = HitAdd
triggerall =  anim=3001
trigger1 = animelem=29
trigger2 =  animelem=32
trigger3 = animelem=35
trigger4 =  animelem=38
trigger5 = animelem=41
trigger6 =  animelem=44
value = 1

[State 640, 2]
type = PlaySnd
triggerall =  anim=3001
trigger1 = animelem=29
trigger2 =  animelem=32
trigger3 = animelem=35
trigger4 =  animelem=38
trigger5 = animelem=41
trigger6 =  animelem=44
value =F5, 1
channel = 1
[State 0, TargetLifeAdd]
type = TargetLifeAdd
triggerall =  anim=3001
trigger1 = animelem=44
value = -ceil(360*fvar(1))
kill = 0
;ignorehitpause = 
;persistent = 

[State 810, Bind 1]
type = TargetBind
triggerall =  anim=3001
trigger1 = AnimElemTime(28) >= 0 && AnimElemTime(46) < 0
pos = 0,0


;ignorehitpause = 
;persistent =





;[State 640, 2]
;type = PlaySnd
;trigger1 = enemy,anim=821
;value =200, 0
;channel = 1
;persistent=0


[State 0, TargetVelSet]
type = VelSet
triggerall =  anim=3001
trigger1 = AnimElem =47
x =-3.2
y = -5.5
[State 0, ChangeAnim]
type = ChangeAnim
triggerall =  anim=3001
trigger1 = animelem=52 && pos y <0
value = anim
elem = 51
[State 0, VelAdd]
type = VelAdd
triggerall =  anim=3001
trigger1 = animelemtime(47)>=0 && animelemtime(52)<0
y = .47
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


[State 0, PosSet]
type = PosSet
triggerall =  anim=3001
trigger1 = animelem=52
y = 0

[State 0, VelSet]
type = VelSet
triggerall =  anim=3001
trigger1 = animelem=52
x = 0
y = 0
;ignorehitpause = 
;persistent = 






[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
trigger2 = animelemtime(7)>=0 && animelemtime(11)<0&& (!movehit||p2movetype!=H&& enemy,anim!=5300)
value = 0
ctrl = 1
;------------------------------------------------------
[Statedef 1205] ; beginning tag 
type    = S
movetype= H
physics = S
juggle  = 0
anim = 5000
ctrl = 0
sprpriority =-2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time%5=0 && time <30
value = cond(random%2=0,5002,5012)
elem = 1
;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 

[State 0, PosSet]
type = PosSet
trigger1 =time<30
y = 0



;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =30
value = 5050
elem = 1

;ignorehitpause = 
;persistent = 
[State 0, LifeAdd]
type = LifeAdd
trigger1 = time=30
value = -335
kill = 1
[State 0, VelSet]
type = VelSet
trigger1 =time=30
x = -3
y = -7
[State 310,3]
type = changestate
trigger1 = time=30
value = 10613
ctrl =0

;---------------------------------------------------------------------------
;Thrown by Kung Fu Throw
; (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 3002]
type    = A
movetype= H
physics = N
velset = 0,0

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value =3002*(cond(var(59)=24,9,1))

[State 0, ChangeAnim]
type = ChangeAnim2
trigger1 = enemy,animelem=28   && p2stateno=3000
value = anim
elem = 2
;ignorehitpause = 
;persistent = 

;ignorehitpause = 
;persistent = 


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

;In case attacker loses binding on player for any reason, this controller
;guarantees that the player will never get stuck in this thrown state.
[State 820, 2]
type = SelfState
trigger1 = animtime=0
value = cond(life=1,5151,5120)

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


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

[Statedef -3]
[State 0, VarSet]
type = VarSet
trigger1 =stateno!=[200,440]
v = 36    ;fv = 10
value = 0
[State 0, VarSet] ; char id
type = VarSet
trigger1 =1 
v = 59    ;fv = 10
value = 18
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 7   ;fv = 10
value = 595

[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 20    ;fv = 10
value = gametime
ignorehitpause = 1
[State 0, Helper]
type = Helper
trigger1 =numhelper(10001)=0 
helpertype = normal ;player
name = "voice"
ID =  10001
stateno = 1011
pos = 61,-37
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =1*const(size.xscale)
size.yscale =1*const(size.yscale)
[State 0, LifeAdd]
type = LifeAdd
trigger1 = var(58) && (var(56)=-1&& enemy,var(56)=-1||var(56) && enemy,var(56)=-1) && numhelper(7509)=0 && stateno=5151
value = -1000
kill = 1


[State 0, Width]
type = Width
trigger1 = movetype!=H; || stateno=[120,131]
edge = 0,5
;value = 0,0
ignorehitpause = 1




;ignorehitpause = 
;persistent = 


;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 =p2movetype!=H
fv =5    ;fv = 10
value = 0

[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v =5  ;fv = 10
value = 0





[State 0, VarSet]
type = VarSet
trigger1 = (p2stateno=821)
v = 11    ;fv = 10
value = 1
;ignorehitpause = 
;persistent = 
[State 0, VarSet]
type = VarSet
trigger1 = p2movetype!=H
v = 11    ;fv = 10
value = 0
;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
channel=5


;-------------------------stun
[State 0, VarSet]
type = Varadd
triggerall = stateno=200 ||stateno=400 ||stateno=600 
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value =32
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall =stateno=230|| stateno=430|| stateno=630
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 27
ignorehitpause=1

[State 0, VarSet]
type = Varadd
triggerall =  stateno=435|| stateno=205 ||stateno=405 || stateno=610|| stateno=640||stateno=235
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 68
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall = stateno=1050&& var(2)!=2
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 75
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall = stateno=1050&& var(2)=2
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 45
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall =  stateno=1150 && anim=[1200,1202]
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 45
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall =  stateno=1150 && anim=1210
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 35
ignorehitpause=1

[State 0, VarSet]
type = Varadd
triggerall =  stateno=1150 && anim=1206
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 85
ignorehitpause=1
[State 0, VarSet]
type = Varadd
triggerall =  stateno=1150 && anim=1211
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 28
ignorehitpause=1

[State 0, VarSet]
type = Varadd
triggerall = stateno=1100&&var(2)!=2
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 70
ignorehitpause=1

[State 0, VarSet]
type = Varadd
triggerall = stateno=1100&&var(2)=2
trigger1 = enemy,gethitvar(hitshaketime)=2 && movehit
v = 6   ;fv = 10
value = 40
ignorehitpause=1
;[State -3, Hit0]
;type = PlaySnd
;triggerall = Alive
;triggerall = Time = 0
;triggerall = random<499
;trigger1 =stateno = 5000
;trigger2 =stateno = 5010
;trigger3 =stateno = 5020
;value = 5000, 0
;channel=0
