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

[Size]
xscale = 1
yscale = 1
ground.back = 27     ;
ground.front = 22    ;
air.back = 20        ;
air.front = 20       ;P
z.width = 3          ;P
height = 125	      
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.25
walk.back = -2.25
run.fwd  = 8, 0
run.back = -4.5,-3.8
jump.neu = 0,-9.5
jump.back = -4;-3.4
jump.fwd = 4;3.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, KIK]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H && var(50) = 0
trigger1 = command = "y" || command = "b"
anim=2030

[State -1, PU]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H && var(50) = 0
trigger1 = command = "x"
anim=2001

[State -1, AI]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H
trigger1 = var(50) = 1 && random<(ailevel*100)





;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, KIK]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H && var(50) = 0
trigger1 = command = "y" || command = "b"
anim=2030

[State -1, PU]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H && var(50) = 0
trigger1 = command = "x"
anim=2001

[State -1, AI]
type = Selfstate
value = 2001
triggerall = p2statetype = S && p2movetype = H && var(50) = 0
trigger1 = var(50) = 1 && random<(ailevel*100)
anim=2001

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


;------------------------------------------------
; zahvat
[Statedef 24]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 27
;sprpriority = 2


[State 800, 1]
type = HitDef
Trigger1 = !movecontact && enemy,numexplod(24) = 0
damage = 0;(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
p2stateno = 26
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)
;fall.damage = ifelse((var(9) != 0 && p2life <= 240), (p2life-1), 240)
guard.kill = (Var(9) = 0)


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


;------------------------------------
; zahvat ME
[Statedef 25]
type    = S
movetype= A
physics = N
anim = 25
sprpriority = 2

[State 800, 2]
type = playerpush
Trigger1 = 1
value = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value =33,11
volumescale = 200
channel = 0
freqmul = 1.0
loop = 0
pan = 0
;lowpriority = -1
;abspan = 
;ignorehitpause = 
;persistent = 


;[State -2, 34]
;type = Playsnd
;trigger1 = animelem = 2
;value = f5,141
;persistent = 0
;
;[State -2, 34]
;type = Playsnd
;trigger1 = animelem = 5
;value = f7,0
;volumescale = 200
;persistent = 0
;
;
;
;[State -2, 34]
;type = Playsnd
;trigger1 = animelem = 3
;value = 4,13
;channel = 3
;persistent = 0


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

[State 810, Bind 7]
type = TargetBind
trigger1 = animelem = 2
pos = 30, -20
time = 40

[State 810, Bind 7]
type = TargetBind
trigger1 = animelem = 3
pos = 40, -20
time = 40

[State 810, Bind 7]
type = TargetBind
trigger1 = animelem = 4
pos = 20, -40
time = 40

[State 810, Bind 7]
type = TargetBind
trigger1 = animelem = 5
pos = 0, -40
time = 40

[State 810, Bind 7]
type = TargetBind
trigger1 = animelem = 6
pos = 0, -60
time = 40

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = animelem = 6
value =26
ID = -1


[State 0, TargetDrop]
type = TargetDrop
trigger1 = animelem = 6
excludeID = -1
keepone = 1




[State 0, Turn]
type = Turn
trigger1 = Animtime =  0



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

;------------------------------------
; zahvat EN
[Statedef 26]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
trigger1 = prevstateno = stateno
value = F5,153
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
trigger1 = prevstateno != stateno
value = F5,14
volumescale = 100
channel = -1

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
trigger1 = prevstateno != stateno
value = 26

[State 0, VelSet]
type = VelSet
trigger1 = prevstateno = stateno && time = 0 
y = -2

[State 820, 2]
type = velAdd
trigger1 = prevstateno = stateno && time = 0 
x = 12

[State 820, 2]
type = velAdd
trigger1 = prevstateno = stateno && time > 0 
trigger2 = anim = 5170
y = 0.375

;[State 820, 1]
;type = ChangeAnim
;Trigger1 = anim = 26 && animtime = 0
;value = 5170



[State 821, 4] ;Hit ground
type = changeState
trigger1 = pos y >= var(57)+10 && vel y > 0
value = 32

;------------------------------------
; zahvat EN 2
[Statedef 32]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 0
anim = 5170

[State 821, 4] ;Hit ground
type = lifeadd
trigger1 = time = 0
value = -240
kill = 1
persistent = 0

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

;-------------------------
;==================================================================================

[Statedef -2]

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "fvar(3)x  %d         fvar(3)y  %d 	fvar(11)   : %d	power %d      %f"
params = floor(fvar(4)) , floor(100*(fvar(4)-floor(fvar(4)))),  fvar(11),numexplod(888) ,  p2bodydist x

[State 0, ex]
type = Explod
triggerall = var(50) = 1
triggerall = time = 1
trigger1 = stateno = 1000 || stateno = 1010
trigger2 = stateno = [200,201]
trigger3 = stateno = 430
trigger4 = stateno = [2001,2004]
trigger5 = stateno = 610 && random%2 = 0
ID = 1300
anim = 888
removetime = 49
ignorehitpause = 1

[State 0, rem]
type = removeExplod
triggerall = numexplod(1444) > 0
trigger1 = enemy,ctrl
trigger2 = p2stateno = 5120 && p2statetype != L
trigger3 = p2stateno = [0,180)
ID = 1444
ignorehitpause = 1

[State -2, Asser3t]
type = statetypeset
trigger1 = anim = 1300 && movetype = H 
value = A

[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

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


[State 0, Explod]
type = playsnd
triggerall = var(26) = 0
trigger1 = anim = 180 && animelem = 5
value = 8,1
volumescale = 120

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = random%2 = 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 = 4,10
channel = 3

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = animelemtime(2) = 1
triggerall = random%4 = 0
trigger1 = stateno = [200,201]
trigger2 = stateno = [220,221]
trigger3 = stateno = 245
trigger4 = anim = 410
trigger5 = stateno = 600 || stateno = 610 || stateno = 620
value = 2,12
channel = 3

[State -2, 34]
type = Playsnd
triggerall = stateno != 12001
triggerall = animelemtime(1) = 3
triggerall = random%3 = 0
trigger1 = stateno = 240 || anim = 430
value = 2,12
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 = [7,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%6)
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




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

