[Data]
life = 1660          ;
attack = 100         ;
defence = 100        ;100% defensive power (more is stronger)
fall.defence_up = 20 ;Def go
liedown.time = 22    ;Time p
airjuggle = 14       
sparkno = 0        ;
guard.sparkno = -1   
KO.echo = 0        ;
volume = 10
IntPersistIndex = 57
FloatPersistIndex = 5

[Size]
xscale = 1
yscale = 1
ground.back = 29     ;
ground.front = 24   ;
air.back = 20        ;
air.front = 20       ;P
height = 123	      
attack.width = 4,4   ;
attack.dist = 20    ;
proj.attack.dist = 20
proj.doscale = 1    ;
head.pos = -2, -93   
mid.pos = -2, -60    
shadowoffset = 0     

[Velocity]
walk.fwd  = 3
walk.back = -2.25
run.fwd  = 8, 0
run.back = -4.5,-3.8
jump.neu = 0,-9.5
jump.back = -4
jump.fwd = 4

[Movement]
airjump.num = 0      
airjump.height = 0  ;
yaccel = .5
stand.friction = .10  
crouch.friction = .10 

;----------------------------------------------
;----------------------------------------------
[Statedef 601]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
;anim = 601


[State 620, 534]
type = VelSet
trigger1 = time = 0
Y = 3

[State 601, 1]
type = VelSet
trigger1 = Vel X != 0
X = 0

[State -1, 2]
type = Selfstate
value = 2001
anim=2001
triggerall = p2statetype = S && p2movetype = H
trigger1 = command = "x"
trigger2 = var(50) = 1 && random%12 < AILevel

[State -1, 23]
type = Selfstate
value = 2001
anim=2030
triggerall = p2statetype = S && p2movetype = H
trigger1 = command = "y" || command = "b"
trigger2 = var(50) = 1 && random%9 < AILevel && AILevel < 7


;PUNCH HITS (HEY! NO BLOOD)
[Statedef 611]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
;anim = 611

[State 620, 4]
type = VelSet
trigger1 = time < 5
X = -.1

[State 620, 534]
type = VelSet
trigger1 = time = 0
Y = 2

[State -1, 2]
type = Selfstate
value = 2001
anim=2030
triggerall = p2statetype = S && p2movetype = H
trigger1 = command = "y" || command = "b"
trigger2 = var(50) = 1 && random%12 < AILevel

[State -1, 23]
type = Selfstate
value = 2001
anim=2001
triggerall = p2statetype = S && p2movetype = H
trigger1 = command = "x"
trigger2 = var(50) = 1 && random%9 < AILevel && AILevel < 7


[State 611, 4]
type = Changestate
trigger1 = Pos Y = 0
value = 0

;---------------------------------------
;----------------------------------------------
;        Throw
[Statedef 24]         ; захват
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 24
;sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = !movecontact && enemy,numexplod(24) = 0
damage = (p2stateno = 9010)
pausetime = 0,0
attr = S, NT          ;Attributes: Standing, Normal Throw
hitflag = HL          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
hitsound = -1
sparkno = -1          ;No spark
sprpriority = -1      ;Draw in front of p2
p2facing = 1       ;Force p2 to face KFM
p1stateno = 25       ;On success, KFM changes to state 810
p2stateno = 26       ;If hit, p2 changes to state 820 in KFM's cns
numhits = 0
guard.dist = 0        ;This prevents p2 from going into a guard state if close
fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
fall.damage = ifelse((var(9) != 0 && p2life <= 240), (p2life-1), 240)

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

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

[Statedef 25]         ; бросок
type    = A
movetype= A
physics = N
anim = 25
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim =25
trigger1 = animelem = 5, =1
value = 1,0
channel = -1



[State 810, Bind 7]
type = TargetBind
trigger1 = TIME = 0
pos = 0, 0
time = 40


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

[State 0, y]
type = velset
trigger1 = time=7
y = -10

[State 0, y]
type = veladd
trigger1 = time>6
trigger1 = pos Y < var(57)
y = .9

[State 0, x]
type = velset
trigger1 = animelem = 7, =0
x = -.5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = pos Y >  var(57)+12
trigger1 = anim != 25000
value = 25000

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 25000
trigger1 = animelem = 1, =1
value = F5,21
channel = -1


[State 0, pos]
type = posset
trigger1 = anim = 25000
y =  var(57)

[State 0, x]
type = velset
trigger1 = anim = 25000
x = 0
y = 0

[State 0, TargetState]
type = TargetState
trigger1 = anim = 25000
value = 260000
ID = -1
;ignorehitpause =
;persistent =


[State 0, TargetDrop]
type = TargetDrop
trigger1 = anim = 25000
excludeID = -1
keepone = 1
;ignorehitpause =
;persistent =

[State 0, Turn]
type = Turn
trigger1 = animtime=0
;ignorehitpause = 
;persistent = 





[State 810, State End]
type = ChangeState
trigger1 = Animtime =  0
trigger1 = anim = 25000
value = 0
ctrl = 1

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

[Statedef 26]         ; жертва
type    = A
movetype= H
physics = N
velset = 0,0

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


[State 821, 4] ;Hit ground
type = SelfState
trigger1 = time > 50
value = 5110 ;Hit ground
;---------------------------------------------------------------------------

;-------------
[Statedef 260000]         ; жертва    2   удар о землю
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, pos]
type = posadd
trigger1 = time = 0
x = 90
y = 0



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
value = 5110

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
trigger1 = vel y = 0
x = 1
y = -10

[State 0, VelSet]
type = Veladd
trigger1 = time > 0
y = .6

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = pos Y > var(57)-3
trigger1 = time >10
value = 5110 ;Hit ground

;=====================================================

[Statedef -2]


[State 0, dance]
type = ChangeAnim
trigger1 = time= 0 && stateno =180 && anim !=[180,182]
value = ifelse(winperfect=1,182,( ifelse(random>500,180,181)))

[State -2, После удара своздуха]
type = Playsnd
triggerall = time = 0
trigger1 = p2stateno = [600,621]
triggerall = movetype = H
triggerall = stateno != [120,155]
value = 3,8
channel = 3

;---------------------------------в морду
[State -2, плучил в пузо]
type = Playsnd
triggerall = time = 1
trigger1 = Anim = 5000
triggerall = movetype = H
value = 13,random%4
channel = 3
persistent = 1

;-------------------------- получил сидя
[State -2, легуо получил]
type = Playsnd
triggerall = time = 1
trigger1 = Anim = 5020
triggerall = movetype = H
value = 13, ifelse(random>500,10,11)
channel = 3
persistent = 1

;------------------------------ получение в пузо-------------
[State -2, плучил в пузо]
type = Playsnd
triggerall = time = 1
trigger1 = Anim = 5010  ;в пузо
triggerall = movetype = H
value = 13, ifelse(random>500,20,21)
channel = 3
persistent = 1




[State -2, Asser3t]
type = screenbound
trigger1 = numexplod(3333) > 0
value = 0
movecamera = 0,0

[State -2, Asser3t]
type = AssertSpecial
trigger1 = var(26) = 1
triggerall = 1
flag = invisible

[State 0, win];win screen
type = helper
triggerall = win
trigger1 = numhelper(180) = 0 && partner,numhelper(180) = 0
trigger1 = var(4) = 0
trigger1 = selfanimexist(9300)
ID = 180
stateno = 181
facing = facing
pos = 0,-90
ownpal = 1

[State -2, Aser]
type = AssertSpecial
trigger1 = 1
flag = nostandguard
flag2 = nocrouchguard

[State -2, ggg]
type = AssertSpecial
trigger1 = 1
flag = noairguard

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
trigger1 = anim = 20 && animelem = 5
trigger2 = anim = 21 && animelem = 9
value = f20,12
volumescale = 200

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
trigger1 = anim = 21 && animelem = 5
trigger2 = anim = 20 && animelem = 9
value = f20,11
volumescale = 200

[State -2, 34]
type = Playsnd
trigger1 = stateno = 40 && time = 1
value = f5,154

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
trigger1 = animelem = 2 || animelem = 5 || animelem = 9
trigger1 = anim = [42,43]
value = f5,157;0

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
trigger1 = anim = 100
trigger1 = animelem = 4 || animelem = 9
value = f5,320 + random%2
volumescale = 200



[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = random%3 = 0
trigger1 = animelemtime(2) = 1
trigger1 = stateno = 600||stateno = 610||stateno = 620||anim = 400||anim = 420||stateno = 240||anim = 430
trigger2 = stateno = 210 || stateno = 225
trigger2 = animelemtime(4) = 1
value = 2,13
channel = 3

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = animelemtime(2) = 1
triggerall = random%4 = 0
trigger1 = stateno = [200,202]
trigger2 = stateno = [220,222]
trigger3 = stateno = 245
trigger4 = stateno = 220
trigger5 = anim = 410
value = 4,15
channel = 3

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = animelemtime(1) = 3
triggerall = random%3 = 0
trigger1 = stateno = 240 || anim = 430
value = 3,9
channel = 3


[State -2, 34]
type = Playsnd
trigger1 = time = 0
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020 || stateno = 5080
trigger2 = anim = 5070 && animelemtime(1) = 1
triggerall = movetype = H
value = 3,6 +random%3
channel = 3

[State -2, 34]
type = Playsnd
triggerall = time = 0
trigger1 = stateno = 5000 || stateno = 5010 || stateno = 5020 || stateno = 5080
trigger1 = gethitvar(hittime) > 16||gethitvar(yvel) < -1
trigger1 = gethitvar(fall.recover) = 0 || gethitvar(yvel) <= -9
trigger2 = stateno = 21238 || stateno = 21239
trigger2 = gethitvar(fall.recover) = 1
triggerall = movetype = H
triggerall = p2stateno >= 240 || gethitvar(hittime) > 20 || gethitvar(yvel) <= -8
value = 3,0 +random%3
channel = 3


[State -2, 34]
type = Playsnd
triggerall = time = 0
trigger1 = p2stateno = [600,621]
triggerall = movetype = H && stateno = [5000,5020]
value = 3,8 - ifelse(random%3 > 0, 5, random%3)
channel = 3

[State 0, no win count]
type = removeexplod
trigger1 = numexplod(11011) + enemy(0),numexplod(11011) + enemy(1),numexplod(11011) + partner,numexplod(11011) > 0
ID = 11001
ignorehitpause = 1
[State 0, no win count]
type = removeexplod
trigger1 = numexplod(11011) + enemy(0),numexplod(11011) + enemy(1),numexplod(11011) + partner,numexplod(11011) > 0
ID = 11002
ignorehitpause = 1
[State 0, no win count]
type = removeexplod
trigger1 = numexplod(11011) + enemy(0),numexplod(11011) + enemy(1),numexplod(11011) + partner,numexplod(11011) > 0
ID = 11003
ignorehitpause = 1
[State 0, no powerbar]
type = removeexplod
trigger1 = numexplod(11011) + enemy(0),numexplod(11011) + enemy(1),numexplod(11011) + partner,numexplod(11011) > 0
ID = 11004
ignorehitpause = 1
[State 0, no breaker]
type = removeexplod
trigger1 = numexplod(11011) + enemy(0),numexplod(11011) + enemy(1),numexplod(11011) + partner,numexplod(11011) > 0
ID = 11005
ignorehitpause = 1

;=============================
[Statedef 19100]; VS screen
type    = S
movetype= I
physics = S
juggle  = 0
velset = 0,0
anim = 888
ctrl = 0

[State 0, temp]
type = assertspecial
trigger1 = 1
flag = nobardisplay
flag2 = intro

[State 0, clear]
type = assertspecial
trigger1 = 1
flag = nomusic
flag2 = timerfreeze

[State 0, clear]
type = assertspecial
trigger1 = 1
flag = noBG
flag2 = noFG

[State 0, offset]
type = varset
trigger1 = time = 0
v = 11
value = 146

[State 0, shadow]
type = Explod
trigger1 = time = 0 
anim = 9200
ID = 901
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
bindtime = -1
sprpriority = 6
[State 0, shadow]
type = Explod
trigger1 = time = 0 
anim = 9210
ID = 901
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
sprpriority = 6
ownpal = 1
[State 0, shadow]
type = Explod
trigger1 = time = 0 
anim = 9220
ID = 901
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
sprpriority = 6


[State 0, base]
type = Explod
trigger1 = time = 0 
anim = 9200
ID = 900
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
bindtime = -1
scale = 0.75,0.75
ontop = 1
ownpal = 1

[State 0, skin]
type = Explod
trigger1 = time = 0 
anim = 9210+(palno = 12)
ID = 900
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
bindtime = -1
scale = 0.75,0.75
ontop = 1
ownpal = 1

[State 0, color]
type = Explod
trigger1 = time = 0 
anim = 9220+palno-1
ID = 900
pos = ifelse(teamside = 1,-400,720),0
facing = ifelse(teamside = 1,1,-1)
postype = left
bindtime = -1
scale = 0.75,0.75
ontop = 1
ownpal = 1

[State 0, end]
type = selfstate
trigger1 = time = 0
value = 19101