;---------------------------------------;
;	-	 Fatality 1	 -	;
;---------------------------------------;
;---------------------------------------;

;F1
[Statedef 3000]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 2

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0



[State 430, 31]
type = changeanim
trigger1 = Time = 50
value = 3000

[State 0, PlaySnd]
type = PlaySnd
trigger1 =anim = 3000&& animelem = 1,=1
value = 4,6;F=common snd
volumescale = 200





[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 1

[State 800, 1]
type = HitDef
Trigger1 = 1
damage =0,0
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 = 5,141
sparkno = -1          ;No spark
p2facing = 1       ;Force p2 to face KFM
p1stateno = 3001       ;On success, KFM changes to state 810
p2stateno = 3010      ;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       = 0
fall.kill  = 0
guard.kill = 0



[State 200, 7]
type = selfstate
trigger1 = time=150
value = 0
ctrl = 1

;drilling
[Statedef 3001];---------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim=3001

[State 0, TargetBind]
type = TargetBind
trigger1 =  time = 0
id = -1
pos = 50,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 4444,44;F=common snd
volumescale = 200
channel = 2
freqmul = 1.0
loop = 1
pan = 0


[State 0, Explod]
type = Explod
trigger1 = time> 12
anim = 3006
ID = 3006
pos = 90,-90
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = -3,0
removetime = -2
pausemovetime = 0
scale = 2,2
sprpriority = 6
ownpal = 1
removeongethit = 0
angle=random/3
;ignorehitpause =
;trans = 
persistent =4
;supermove = 0
;pausemove = 0



[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 100
freq = 60
ampl = -2
phase = 90
;ignorehitpause = 
;persistent = 


[State 0, raror]
type = Explod
trigger1 = time= 10
anim = 1051
ID = 1051
pos = 53,-87
postype = p1  ;p2,front,back,left,right
bindtime = -1; -1 forever
removetime = -1
pausemovetime = 0
sprpriority = -1
removeongethit = 1
facing=-1

[State 0, raror]
type = Explod
trigger1 = time= 10
anim = 1051
ID = 1051
pos = 53,-100
postype = p1  ;p2,front,back,left,right
bindtime = -1; -1 forever
removetime = -1
pausemovetime = 0
sprpriority = -1
removeongethit = 1
angle=180

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = time= 100
value =3011
ID = -1


[State 0, ChangeState]
type = ChangeState
trigger1 = time= 100
value =3002
ctrl = 0



;eating
[Statedef 3002];---------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3002

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 20
channel = 2
;ignorehitpause = 
;persistent = 

[State ]
type = Helper
trigger1 =time = 0
ID = 7150
stateno = 30 
pos =0, -90
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1

[State 0, razorr]
type = RemoveExplod
trigger1 = time= 0
id = 1051

[State 0, skelet]
type = Explod
trigger1 = time= 0
anim = 3010
ID = 3010
pos = 90,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
removetime = -1
sprpriority = -7
shadow = 0,0,0
ownpal = 1



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim = 3002 && animtime= 0
value = 3003




[State ]
type = Helper
trigger1 = anim = 3003   && random> 500&& animelem =1,<80
ID = 7150
stateno = 7430 
pos = -44, -129
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1


[State ]
type = Helper
trigger1 = anim = 3003  && random>500 && animelem =1,<80
ID = 7150
stateno = 7430 
pos = 44, -124
postype = p1
ignorehitpause = 1
ownpal = 1

[State ]
type = Helper
trigger1 = anim = 3003   && random> 100&& animelem =1,>80
ID = 7150
stateno = 7202
pos = -44, -100
postype = p1
ignorehitpause = 1
ownpal = 1
facing=1
persistent=17

[State ]
type = Helper
trigger1 = anim = 3003   && random> 150&& animelem =1,>80
ID = 7150
stateno = 7202
pos = 44, -100
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1
persistent=20


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim = 3003 && animelem =1,>140
value = 3004

[State ]
type = Helper
trigger1 = anim = 3004   && animelem = 1
ID = 7150
stateno = 7150
pos = 34, -80
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1

[State ]
type = Helper
trigger1 = anim = 3004   && animelem = 1
ID = 7150
stateno = 7150
pos = -34, -70
postype = p1
ignorehitpause = 1
ownpal = 1
facing=1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3004   && animelem = 1
value = F5,15;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
;lowpriority = -1
;abspan = 
;ignorehitpause = 
;persistent = 


[State 0, win stand]
type = Explod
trigger1 = anim = 3004   && animelem = 6
anim = 3005
ID = 3005
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
sprpriority = 4
ownpal = 0

[State 0, TargetState]
type = TargetState
trigger1 = anim = 3004   && animelem = 6
value =3012
ID = -1
;ignorehitpause = 
;persistent = 


[State 9125, 0.3]
type = varset
trigger1 = numexplod(3005)=1
v = 26
value = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = numexplod(3005)=1
value =0
ctrl = 1







;------------------------------------------------------------------------------------------------
[Statedef 3010]; p2 caught
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 21238
sprpriority=-4

[State 9125, 2.6]
type = playsnd
trigger1 = time = 3
value = 3,12
channel = 3

[State 9125, 2.6]
type = playsnd
trigger1 = time = 20
trigger2 = time = 50
trigger3 = time = 70
trigger4 = time = 95
value = f5,16


[State 0, PosAdd]
type = PosAdd
trigger1 = time= 50
y = -20
;ignorehitpause = 
;persistent = 


; p2 eated
[Statedef 3011];------------------------------------------------------------------------------------------------
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority=-4
anim = 5730

[State 9125, 2.6]
type = playsnd
trigger1 = time = 0
value = 4,1

[State 9125, 2.6]
type = playsnd
trigger1 = time = 0
value = f5,18
volumescale=200

 [State 0, PosSet]
type = Posadd
trigger1 = anim = 5730 && animelem =1,0
x =-40

[State 0, PosSet]
type = PosSet
trigger1 = anim = 5730 && animelem =2,0
y =-90

 [State 0, PosSet]
type = Posadd
trigger1 = anim = 5730 && animelem =2,0
x =25

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=5730 && animtime = 0
value = 888

[State 0, PosSet]
type = PosSet
trigger1 = anim=888
y = 0




;p2 dies
[Statedef 3012];-------------------------------------------------------------------------------
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0
anim=888

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


[State 9125, 0.3]
type = varset
trigger1 = time = 0
v = 26
value = 1

[State 9125, 2.6]
type = lifeadd
trigger1 = time = 0
value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time =0
value = 5150
;---------------------------------------;
;	-	 Fatality 2	 -	;
;---------------------------------------;
;---------- - kiss of death - ----------;
;---------------------------------------;

;F2
[Statedef 3100]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 0
ctrl = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 30
value =3101
ctrl = 0



[State 9130, SetFatal]
type = Varset
trigger1 = 1
V = 4
value = 1


[Statedef 3101];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
anim = 3100
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 20,19;F=common snd
volumescale = 100


[State 0, EnvShake]
type = EnvShake
trigger1 =  time= 0
time =5
freq = 60
ampl = -4
phase = 90

[State 0, VelSet]
type = posadd
trigger1 =1
x = 10



[State 800, 1]
type = HitDef
Trigger1 = 1
damage =0,0
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 = 5,141
sparkno = -1          ;No spark
p2facing = 1       ;Force p2 to face KFM
p1stateno = 3102       ;On success, KFM changes to state 810
p2stateno = 3110      ;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       = 0
fall.kill  = 0
guard.kill = 0

;holding
[Statedef 3102];-------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 3101
ctrl = 0

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 1
id = -1
pos = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = 20,17;F=common snd
volumescale = 200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =60
value = 20,16;F=common snd
volumescale = 200

[State 0, smoke]
type = Explod
trigger1 = anim=3101 && animelem=1,>10
anim = 1512
pos = 0,-85
postype = p1
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
scale = .8,.8
bindtime = 1
vel = 2,-5+(random/100)
random = 40,10
removetime = -2
scale = 1,1
sprpriority = -1
ownpal = 1
removeongethit = 0
ignorehitpause = 1
trans=add
angle=random/3

[State 0, snowman]
type = Explod
trigger1 = time = 40
anim = 3102
ID = 3102
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0



[State 0, prejump]
type = ChangeAnim
trigger1 = time = 100
value = 3107

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3107 && animelem = 3,=0
value = 4444,33;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
;lowpriority = -1
;abspan = 
;ignorehitpause = 
;persistent = 



[State 0, snowman]
type = RemoveExplod
trigger1 = anim = 3107 && animelem = 3,=10
id = 3102

[State 0, snowman2]
type = Explod
trigger1 = anim = 3107 && animelem = 3,=10
anim = 3106
ID = 3106
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = -1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0

[State 0, snowman2legs]
type = Explod
trigger1 = numexplod(123) = 0 && numexplod(321) = 0
trigger1 = anim = 3107 && animelem = 3,=10
anim = 3103
ID = 3103
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 0, snowman2legs2]
type = Explod
trigger1 = numexplod(123) > 0
trigger1 = anim = 3107 && animelem = 3,=10
anim = 3104
ID = 3103
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -1
ownpal = 1
removeongethit = 0

[State 0, snowman2legs3]
type = Explod
trigger1 = numexplod(321) > 0
trigger1 = anim = 3107 && animelem = 3,=10
anim = 3105
ID = 3103
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -1
ownpal = 1
removeongethit = 0



[State blood1]
type = Helper
trigger1 = anim = 3107 && animelem = 3,=10
ID = 7150
stateno = 7400 
pos = 0, -30
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3107 && animelem = 3,=10
value =4444,34;F=common snd




[State 0, smoke-legs]
type = Explod
trigger1 = anim = 3107 && animelem = 3,=10
anim = 1512
pos = 0,-20
postype = p1
scale = 2,1
bindtime = 1
vel = 0,0
removetime = -2
sprpriority = -1
ownpal = 1
ignorehitpause = 1
trans=add

[State 0, lines legs]
type = Explod
trigger1 = anim = 3107 && animelem = 3,=10
anim = 3111
pos = 0,40
postype = p1
scale = 1,1
bindtime = 1
vel = 0,-4
removetime = -2
sprpriority = -1
ownpal = 1
ignorehitpause = 1


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

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = anim = 3107 
flag = noshadow



[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 3107 && animelem = 1
time = 20
freq = 160
ampl = -2
phase = 90

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 3107 && animelem = 3,>1
y = -.5

[State 0, PosAdd]
type = PosAdd
trigger1 = anim = 3107 && animelem = 3,>15
y = -20

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 3107 && pos y < -700
value =3103
ctrl = 0


; fly
[Statedef 3103]; fly -------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 3108
ctrl = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time= 0
id = 3106

[State 0, snowman2]
type = Explod
trigger1 = time= 0
anim = 3106
ID = 3106
pos = 0,-150
facing=-1
vfacing=-1
postype = p1  ;p2,front,back,left,right
bindtime = -1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0

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

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

[State 0, PosSet]
type = PosSet
trigger1 = time= 0 
y = -500

[State 0, PosAdd]
type = PosAdd
trigger1 = time= 0 
x = -80

[State 0, PosAdd]
type = PosAdd
trigger1 = time> 0 
y = 20

[State 0, ChangeState]
type = ChangeState
trigger1 = pos y > -40
value =3104
ctrl = 0


;boom ground
[Statedef 3104];boom ground-------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
anim = 3110
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 4444,34;F=common snd
volumescale = 200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = F5,17;F=common snd
volumescale = 100




[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 1

[State 0, TargetState]
type = TargetState
trigger1 = time = 0
value = 3111
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, smoke]
type = Explod
trigger1 = time<15
anim = 1512
pos = 80,0
postype = p1
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1
vel = 0,-1
random = 100,10
removetime = -2
scale = 1.8,1.8
sprpriority = 5
ownpal = 1
removeongethit = 0
ignorehitpause = 1
trans=add
angle=random/3

[State 0, stones]
type = Explod
trigger1 = time=[2,8]
anim = 3112
pos = 80,10
postype = p1
bindtime = 1
vel = 2*(-5+random/100),ifelse(random>500,-12,-16)
accel=0,1
random = 10,10
removetime = 35
scale = .6,.6
sprpriority = 4
ownpal = 1
removeongethit = 0
ignorehitpause = 1
angle=random/3

[State blood1]
type = Helper
trigger1 = time=0
ID = 31
stateno = 31 
pos = 50, 120
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1
sprpriority=3

[State blood1]
type = Helper
trigger1 = time=1
ID = 7444
stateno = 7444 
pos = -50,0
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1
sprpriority=-7

[State blood1]
type = Helper
trigger1 = time=1
ID = 7444
stateno = 7444 
pos = 60,0
postype = p1
ignorehitpause = 1
ownpal = 1
facing=-1
sprpriority=-7

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
freq = 160
ampl = -2
phase = 90

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

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time= 0
id = 3106

[State 0, snowman2]
type = Explod
trigger1 = time= 0
trigger1 = numexplod(123) = 0 && numexplod(321) = 0
anim = 3109
ID = 3109
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0

[State 0, snowman22]
type = Explod
trigger1 = time= 0
trigger1 = numexplod(123) > 0 
anim = 3113
ID = 3109
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0

[State 0, snowman22]
type = Explod
trigger1 = time= 0
trigger1 = numexplod(321) > 0 
anim = 3114
ID = 3109
pos = 0,0
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = -2
ownpal = 1
removeongethit = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = time= 1
x = -70

[State 0, PosAdd]
type = PosAdd
trigger1 = time= [1,4]
x = -2

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value =0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 




[Statedef 3110];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
sprpriority = -2
ctrl = 0
facep2 = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =60
value = 3,12;F=common snd
volumescale = 100



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time < 50
value = 5000

[State 9125, 0.3]
type = varset
trigger1 = time = 50
v = 26
value = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 50
value = 888

[Statedef 3111];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
sprpriority = -2
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =2
value = 4,1
volumescale = 100


[State 9125, 2.6]
type = lifeadd
trigger1 = time = 16
value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time = 16
value = 5150

;---------------------------------------;
;	-	 Fatality 3	 -	;
;---------------------------------------;

;F3
[Statedef 3200]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 0
ctrl = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 1

[State 430, 31]
type = changeanim
trigger1 = Time = 30
value = 3200

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 1,=1
value = 4,6;F=common snd
volumescale = 200

[State 0, radiation]
type = PlaySnd
trigger1 = anim = 3200 && animelem = 1,=1
value = 20,2;F=common snd
volumescale = 70
channel=6
loop=1

[State 0, EnvShake]
type = EnvShake
trigger1 =Time = 30
time =15
freq = 60
ampl = -4
phase = 90

[State 0, big sub]
type = Explod
trigger1 = Time >45
anim =1512
ID = 1512
pos = 0,-100
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1, 1
sprpriority = 7
ownpal = 1
removeongethit = 0
random=20,20
persistent= 6




[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,140
p1stateno = 3201
p2stateno = 3210
p2facing = 1

[State 3000, 3]
type = selfState
trigger1 = time = 300
value = 0
ctrl = 1

;opened
[Statedef 3201];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
anim = 3201
ctrl = 0

[State 2, Roundhouseblood]
type = Helper
trigger1 = time = 160
ID = 29
stateno = 29
pos = 0, 0
postype = p2
persistent = 0
ignorehitpause = 1

[State 0, radiation]
type = PlaySnd
trigger1 = time=0
trigger2 = time=50
value = 4444,77;F=common snd
volumescale = 100

[State 0, radiation]
type = PlaySnd
trigger1 = time=100
trigger2 = time=150
trigger3 = time=200
value = 4444,77;F=common snd
volumescale = 200

[State 0, Helper]
type = Helper
trigger1 = time = 0
name = "greener"
ID = 3209
stateno = 3209
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

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





[State 0, ChangeState]
type = ChangeState
trigger1 = time =210
value =3202
ctrl = 0


;close
[Statedef 3202];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
anim = 3211
ctrl = 0

[State 0, big sub]
type = Explod
trigger1 = Time =[17,25]
anim =1511
ID = 1511
pos = 0,-80
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = .3, .3
sprpriority = 7
ownpal = 1
random=20,20
vel=0,-2

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 4,6;F=common snd
volumescale = 200


[State 0, TargetState]
type = TargetState
trigger1 = time= 0
value =3211
ID = -1



[State 0, Helper]
type = Helper
trigger1 =numexplod(3206)=1 && numhelper(3213)<10
name = "kapli"
ID = 3213
stateno = 3208
pos = 2*(2-random/100),(5-random/100)
postype = p2    ;p2,front,back,left,right
facing = 1-2*(random%2)
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent=10


[State 0, fallsound]
type = PlaySnd
trigger1 = time =90
trigger2 = time =120
value = F5,17;F=common snd
volumescale = 100

[State 0, zomb]
type = PlaySnd
trigger1 = time =140
value = 4444,888;F=common snd
volumescale = 200



[State 0, greenboy]
type = Explod
trigger1 = time= 0
anim = 3206
ID = 3206
pos = 140,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
removetime = -1
pausemovetime = 0
sprpriority = 0
ontop = 0
ownpal = 1

[State 0, greenboy]
type = RemoveExplod
trigger1 = time= 90
id = 3206

[State 0, greenboy2]
type = Explod
trigger1 = time= 90
anim = 3207
ID = 3207
pos = 140,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
sprpriority =2
ontop = 0
ownpal = 1

[State 0, greenboy3]
type = Explod
trigger1 = time> 90 && numexplod(3208)=0 && numexplod(3209)=0&& numexplod(3207)=0
anim = 3208
ID = 3208
pos = 140,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
removetime = -1
pausemovetime = 0
sprpriority =2
ontop = 0
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 150
value = 3210



[State 0, leg]
type = RemoveExplod
trigger1 = anim = 3210 && animelem = 4,=1
id = 3208

[State 0, head no]
type = PlaySnd
trigger1 = anim = 3210 && animelem = 4,=1
value = F5,18;F=common snd
volumescale = 100



[State 0, greenboy4]
type = Explod
trigger1 = anim = 3210 && animelem = 4,=1 && numexplod(3208)=0
anim = 3209
ID = 3209
pos = 140,0
postype = p1  ;p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
removetime = -1
pausemovetime = 0
sprpriority =2
ontop = 0
ownpal = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = anim = 3210 && animelem = 4,=1
trigger2 = time= 90
time =5
freq = 60
ampl = -4
phase = 90

[State 0, brain]
type = Explod
trigger1 = anim = 3210 && animelem = 4,=1
anim = 3212
ID = 3212
pos = 0,2
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
sprpriority = -7
ownpal = 1

[State 0, brain fly]
type = Explod
trigger1 = anim = 3210 && animelem = 4,=1
anim =3214
facing = 1-2*(random%2)
ID = 3214
pos = 40,2
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = 26
pausemovetime = 0
sprpriority = 7
ownpal = 1
vel=-2,-7
accel = 0 , .5

[State 0, brain fly2]
type = Explod
trigger1 = anim = 3210 && animelem = 4,=1
anim =3214
facing = 1-2*(random%2)
ID = 3214
pos = 50,2
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
removetime = 30
pausemovetime = 0
sprpriority = 7
ownpal = 1
vel=1,-8
accel = 0 , .5
scale=.5,.5

[State 0, green1]
type = Explod
trigger1 =numexplod(3206)=1
anim = ifelse(random>500,3203,3204)
ID = 1003
pos = 140,-80
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, ifelse(random>500,-1.7,-2.2)
accel = 0,0
random = 10,80
removetime = -2
pausemovetime = 0
scale = .6,.6
sprpriority = ifelse(random>500,4,-5)
ownpal = 0
removeongethit = 0
persistent=3
angle=random/3

[State 0, green3]
type = Explod
trigger1 =numexplod(3208)=1
trigger2 =numexplod(3209)=1
anim = ifelse(random>500,3203,3204)
ID = 1003
pos = 100,-10
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0,ifelse(random>500,-.5,-1)
accel = 0,0
random = 110,0
removetime = -2
pausemovetime = 0
scale = .3,.3
sprpriority =-2
ownpal = 0
removeongethit = 0
persistent=3
angle=random/3

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = anim = 3210 && animelem = 4,=1
value =3212
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 && anim =3210
value =0
ctrl = 1


;kapli
[Statedef 3208];-------------------------------
type    = S
movetype= I
physics = N
juggle  = 1
anim = 3213
ctrl = 0
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 =animelem = 2,=1
value = F5,191;F=common snd
volumescale = 40

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



;greener
[Statedef 3209];-------------------------------
type    = S
movetype= I
physics = N
juggle  = 1
anim = 888
ctrl = 0
sprpriority=4


[State 0, sub mal]
type = Explod
trigger1 = time < 150
anim = ifelse(random>500,3203,3204)
ID = 1003
pos = 0,-100
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0,-.3
accel = 0,0
random = 20,20
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 5
ownpal = 0
removeongethit = 0
angle=random/3
persistent=4
trans=sub

[State 0, green mal]
type = Explod
trigger1 = time < 200
anim = ifelse(random>500,3203,3204)
ID = 1003
pos = 0,-110
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, ifelse(random>500,-1.7,-2.2)
accel = 0,0
random = 10,20
removetime = -2
pausemovetime = 0
scale = ifelse(time>20,.4,.2), ifelse(time>20,.4,.2)
sprpriority = 6
ownpal = 0
removeongethit = 0
persistent=3
angle=random/3

[State 0, green ma p2l]
type = Explod
trigger1 = time = [150,200]
anim = ifelse(random>500,3203,3204)
ID = 1003
pos = 0,-70
facing= ifelse(random>500,1,-1)
postype = p2  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, ifelse(random>500,-1.7,-2.2)
accel = 0,0
random = 10,70
removetime = -2
pausemovetime = 0
scale = ifelse(time>20,.4,.2), ifelse(time>20,.4,.2)
sprpriority = 6
ownpal = 0
removeongethit = 0
persistent=5
angle=random/3

[State 0, kapli p2l]
type = Explod
trigger1 = time = [150,200]
anim =3213
ID = 1003
pos = 0,0
postype = p2  ;p2,front,back,left,right
bindtime = 1; -1 forever
random = 30,2
removetime = -2
pausemovetime = 0
sprpriority = -7
ownpal = 1
removeongethit = 0
persistent=10


[State 0, big green1]
type = Explod
trigger1 =time> 10&&time < 200
anim =3205
ID = 1003
pos = 0,-110
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, 0
accel = 0,0
random = 10,20
removetime = -2
pausemovetime = 0
scale =  1.5, 1.5
sprpriority = 6
ownpal = 0
removeongethit = 0
persistent=28
angle=random/3

[State 0, big green]
type = Explod
trigger1 =time> 50 && time < 200
anim =3205
ID = 1003
pos = 0,-110
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, 0
accel = 0,0
random = 10,20
removetime = -2
pausemovetime = 0
scale =  ifelse(time>45,3,2), ifelse(time>45,3,2)
sprpriority = 6
ownpal = 0
removeongethit = 0
persistent=8
angle=random/3

[State 0, big sub]
type = Explod
trigger1 =time> 60 && time < 150
anim =3205
ID = 1003
pos = 0,-110
facing= ifelse(random>500,1,-1)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 0, 0
accel = 0,0
random = 10,20
removetime = -2
pausemovetime = 0
scale = 1.5, 1.5
sprpriority = 3
ownpal = 0
removeongethit = 0
persistent=28
angle=random/3
trans=sub





[State 0, AllPalFX]
type = AllPalFX
trigger1 =time= [100,200] 
time = 1
add = 0,(time-100)*2,0



[State 0, AllPalFX]
type = AllPalFX
trigger1 = time= 200
time = 15
add = -256,256,-256
invertall = 1

[State 0, AllPalFX]
type = AllPalFX
trigger1 = time= 215
time = 10
add = -156,156,-156

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time= 225
value = 20,0;F=common snd
volumescale = 200


[State 0, AllPalFX]
type = AllPalFX
trigger1 = time= 225
time = 10
add = -56,56,-56

[State 0, EnvShake]
type = EnvShake
trigger1 = time= 215
time =15
freq = 60
ampl = -4
phase = 90

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time= 225
;ignorehitpause = 
;persistent = 



[Statedef 3210];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
sprpriority = -2
ctrl = 0
facep2 = 1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time =0
trigger2 = anim =5010 && animtime=0
value = 5000

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim =5000 && animtime=0
value = 5010

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 150
value = 21238

[State 0, dead]
type = PlaySnd
trigger1 = time =100
value = 3,7;F=common snd
volumescale = 100

[State 0, dead]
type = PlaySnd
trigger1 = time =170
value = 4,1;F=common snd
volumescale = 100



[State 0, PosAdd]
type = PosAdd
trigger1 = time > 140
trigger1 = p2dist x > 150
x = .7

[State 0, PosAdd]
type = PosAdd
trigger1 = time > 150
trigger1 = p2dist x <= 140
x = -.7

;green
[Statedef 3211];p2--------------------------------------------
type    = S
movetype= H
physics = N
velset = 0,0
sprpriority = -2
ctrl = 0

[State 9125, 0.3]
type = varset
trigger1 = time = 0
v = 26
value = 1

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

;die
[Statedef 3212];p2--------------------------------------------
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

[State 9125, 2.6]
type = lifeadd
trigger1 = time = 16
value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time = 16
value = 5150

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

;No mercy
[Statedef 3401]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
anim = 0
ctrl = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 1
channel = -1



[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 10

[State 0, mercy]
type = PlaySnd
trigger1 = time =1
value = F200,101;F=common snd
volumescale = 200


[State 181, mercy]
type = Explod
trigger1 = time = 10
ID = 200
anim = F200
pos = 156,0
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
removetime = -2

[State 181, mercy]
type = removeExplod
trigger1 = time = 58
ID = 200

[State 181, mercy out]
type = Explod
trigger1 = time = 58
ID = 3408
anim = 3408
pos = 156,60
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
removetime = 70
vel=4*facing,-5
accel = 0,.4
scale=.8,.8

[State 0, boom]
type = PlaySnd
trigger1 = time = 58
value =4,16
volumescale = 200

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 58
time = 20
freq = 60
ampl = -4
phase = 90

[State 181, boom]
type = Explod
trigger1 = time = 58
ID = 1005
anim = 1005
pos = 156,60
postype = left
bindtime = -1
facing = 1
sprpriority = 3
ontop = 1
ownpal = 1
removetime = -2




[State 430, 31]
type = changeanim
trigger1 = Time =  58
value = 3400

[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,140
p1stateno = 3402
p2stateno = 3410
p2facing = 1
hitsound = -1
guardsound = -1


[Statedef 3402];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
sprpriority =0
anim=3401



[State 0, Helper]
type = Helper
trigger1 = time= 20
name = "robokiller"
ID = 3405
stateno = 3405
pos = -400,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0
size.xscale = .8
size.yscale = .8

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 400
value =0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 


;robot killer enter
[Statedef 3405];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim=3405
sprpriority =5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 4444,1000;F=common snd
volumescale = 30
channel = 2
freqmul = 1.0
loop=1


[State 0, Helper]
type = Helper
trigger1 = time = 0
name = "smoke"
ID = 3409
stateno = 3409
pos = -12,-90
postype = p1    ;p2,front,back,left,right
facing = 1
ownpal = 1
supermovetime = 0
pausemovetime = 0





[State 0, VelSet]
type = VelSet
trigger1 = time= 0 && RootDist x > 20
x = 4

[State 0, VelSet]
type = VelSet
trigger1 = RootDist x < 30
x = 0

[State 0, termin]
type = PlaySnd
trigger1 = RootDist x < 160
value = 555,555;F=common snd
volumescale = 100
persistent=0

[State 0, ChangeState]
type = ChangeState
trigger1 = RootDist x < 30
value =3406
ctrl = 0

;robot killer fire1
[Statedef 3406];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim=3406
sprpriority =5



[State 0, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = 2
;ignorehitpause = 
;persistent = 



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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 50
value = 3407

[State 0, shot]
type = PlaySnd
trigger1 = time = 50
value = 4,16;F=common snd
volumescale = 100



[State 181, boom]
type = Explod
trigger1 = time = 50
anim = 3409
pos = 55,-42
postype = p1
bindtime = 1
facing = 1
sprpriority = 6
ontop = 0
ownpal = 1
removetime = -2
scale=.5,1
vel=0,0

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 50
time = 10
freq = 90
ampl = -8



[State 2, Roundhouseblood]
type = Helper
trigger1 = time = 50
ID = 29
stateno = 7442
pos = -20, -50
postype = p2
persistent = 0
ignorehitpause = 1

[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,18
p2stateno = 3411
p2facing = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3407
x = -3
y = 0



[State 0, ChangeState]
type = ChangeState
trigger1 = time = 56
value =3407
ctrl = 0



;robot killer fire2
[Statedef 3407];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim=3406
sprpriority =5

[State 0, termin]
type = PlaySnd
trigger1 = time = 0
value = 555,556;F=common snd
volumescale = 80
loop=1

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 30
value = 3407

[State 0, shot]
type = PlaySnd
trigger1 = time = 30
value = 4,16;F=common snd
volumescale = 100



[State 181, boom]
type = Explod
trigger1 = time = 30
anim = 3409
pos = 55,-42
postype = p1
bindtime = 1
facing = 1
sprpriority = 6
ontop = 0
ownpal = 1
removetime = -2
scale=.5,1
vel=0,0

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 30
time = 10
freq = 90
ampl = -8

[State 2, Roundhouseblood]
type = Helper
trigger1 = time = 30
ID = 29
stateno = 7442
pos = -20, -50
postype = p2
persistent = 0
ignorehitpause = 1

[State 2, Roundhouseblood]
type = Helper
trigger1 = time = 30
ID = 29
stateno = 6900
pos = -20, -50
postype = p2
persistent = 0
ignorehitpause = 1

[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = 5,18
p2stateno = 3412
p2facing = 1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 3407
x = -3
y = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 36
value =3408
ctrl = 0

;robot killer walk away
[Statedef 3408];-------------------------------
type    = S
movetype= A
physics = N
juggle  = 1
ctrl = 0
anim=3406
sprpriority =5
velset=0,0




[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=20
value = 3410

[State 0, foot]
type = PlaySnd
trigger1 = anim = 3410 && animelem = 4,=1
value = 4444,1001;F=common snd



[State 0, smoke]
type = Explod
trigger1 = anim = 3410 && animelem = 4,>5&&animelem = 4,<30
anim = ifelse(random>500,1510,1511)
pos = 20,-90
facing=1-2*(random%2)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = 3,0
random = 4,4
removetime = -2
scale = .6,.2
sprpriority = 7
ownpal = 1
persistent=2

[State 0, Explod]
type = Explod
trigger1 = anim = 3410 && animelem = 4,>15&&animelem = 4,<30
anim = 1511
pos = 70,-90
facing=1-2*(random%2)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = .5,ifelse(random>500,1,-1)
random = 14,11
removetime = -2
scale = 1,1
sprpriority = 7
ownpal = 1
persistent=4


[State 0, Turn]
type = Turn
trigger1 =anim = 3410 && animtime = 0

[State 0, VelSet]
type = VelSet
trigger1 =anim = 3410 && animtime = 0
x = 3
y = 0

[State 0, foot]
type = PlaySnd
trigger1 =anim = 3410 && animtime = 0
value = 4444,1000;F=common snd
volumescale = 30
channel = 2
freqmul = 1.0
loop=1


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim = 3410 && animtime = 0
value=3405


[State 0, StopSnd]
type = StopSnd
trigger1 =time=300
channel = 2





;sigare
[Statedef 3409];-------------------------------
type    = S
movetype= I
physics = N
juggle  = 1
ctrl = 0
anim=888
sprpriority =7
velset=0,0

[State 0, PosSet]
type = PosSet
trigger1 = parent,anim!=3410
x = parent,pos x-10*parent,facing
y = -90

[State 0, PosSet]
type = PosSet
triggerall = parent,anim=3410
trigger1= parent,animelem = 1,>0 && parent,animelem =4<0
trigger2= parent,animelem = 1,>0 && parent,animelem =5>0
x = parent,pos x-10*parent,facing
y = -90

[State 0, PosSet]
type = PosSet
triggerall = parent,anim=3410
trigger1= parent,animelem = 4
x = parent,pos x+45*parent,facing
y = -70

[State 0, sigare]
type = Explod
trigger1 = 1
anim = ifelse(random>500,1510,1511)
pos = 0,0
facing=1-2*(random%2)
postype = p1  ;p2,front,back,left,right
bindtime = 1; -1 forever
vel = ifelse(random>500,-.5,0),ifelse(random>500,-1,-1.5)
random = 4,4
removetime = -2
scale = .3,.3
sprpriority = 7
ownpal = 1
angle=random/3
persistent=3

;p2
[Statedef 3410];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
sprpriority = -2
ctrl = 0
facep2 = 1

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

;p2 hited1
[Statedef 3411];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = -3,0
sprpriority = -2
ctrl = 0
facep2 = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 5
x = 0
y = 0
;ignorehitpause = 
;persistent = 


[State 0, hited]
type = ChangeAnim
trigger1 = time = 0
value = 5000



;p2 hited2
[Statedef 3412];p2--------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 1
velset = 0,0
sprpriority = -2
ctrl = 0
facep2 = 1

[State 9125, 0.3]
type = varset
trigger1 = time = 0
v = 26
value = 1


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 1
value = 888

[State 9125, 2.6]
type = lifeadd
trigger1 = time = 1
value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time = 1
value = 5150

;-------------------------------------
;Babality
[Statedef 3600]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 430, 31]
type = changeanim
trigger1 = Time = 60
value = 9000


[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 2



[State 0, Explod]
type = Explod
trigger1 = time = 60
anim = 180
bindtime = -1
scale = const(size.xscale),const(size.yscale)
sprpriority = 0
ownpal = 0
ignorehitpause = 1
removetime = -1
shadow = -1,-1,-1


[State 9130, SetFatal]
type = Varset
trigger1 = time = 60
V = 26
value = 1

[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = -1
p2stateno = 3601
p2facing = 1
envshake.freq = 70
envshake.ampl = 8
envshake.time = 30

[State 200, 7]
type = selfstate
trigger1 = time = 150
value = 0
ctrl = 1






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

;-------------------------------------
;Friendship
[Statedef 3700]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 430, 31]
type = changeanim
trigger1 = Time = 60
value = 3700

[State 0, takeit]
type = PlaySnd
trigger1 = Time = 60
value = F5,15;F=common snd
volumescale = 200
channel = -1
freqmul = 1.0
loop = 0
pan = 0



[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 3

[State 3010, 1]
type = HitDef
trigger1 = !movecontact
attr = S, HA
hitflag = MAF
priority = 7
sparkno = -1
hitsound = -1
p2stateno = 3710
p1stateno=3701

[State 200, 7]
type = selfstate
trigger1 = time = 240
value = 0
ctrl = 1



[Statedef 3701];-------------------------------------------------------------------
type    = S
movetype= A
physics = S
ctrl = 0
velset = 0,0
anim = 3701
sprpriority = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 0
channel = -1



[State 0, frend]
type = PlaySnd
trigger1 = time = 20
value = F5,50;F=common snd
volumescale = 200
channel = 2

[State 181, frends]
type = Explod
trigger1 = time = 50
anim = F203
id = 7000
pos = 168,100
postype = left
facing = 1
sprpriority = 2
ownpal = 1
ontop = 1
vel=0,0


[State 0, error]
type = PlaySnd
trigger1 = time =95
value = 4444,999;F=common snd
volumescale = 100



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 100
value =  3702

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  animelem = 2,=10
value = 4,16;F=common snd
volumescale = 200



[State 9327, boom] 
type = Explod
triggerall = anim=3702
trigger1 =  animelem = 2,=10
trigger2 =  animelem = 2,=11
anim = 1005
scale = 1.3,1.3
sprpriority = 4
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
ownpal = 1
angle=random/3
pos=0,ifelse(animelem = 2,=11,-70,-40)

[State 9327, boom] 
type = Explod
trigger1 = anim=3702 && animelem = 2,=10
id=88888888
anim = 1005
scale = 4,1.5
sprpriority = 4
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
ownpal = 1
pos=0,-80

[State 0, frend]
type = RemoveExplod
trigger1 = numexplod(88888888)=1
id = 7000



[State 0, fire]
type = Explod
triggerall = anim=3702
trigger1 =  animelem = 2,>17
trigger1 =  animelem = 2,<23
anim = 1061
pos = 50,-70
postype = p1  ;p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = 0,-5
removetime = -2
pausemovetime = 0
sprpriority = 7
ownpal = 1
angle=random/3
trans= add
random=160,60

[State 2, Roundhouseblood]
type = Helper
trigger1 = anim=3702 && animelem = 2,=10
ID = 6900
stateno = 6900
pos = 20, -50
postype = p1
persistent = 0
ignorehitpause = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = anim=3702 && animelem = 2,=10
time = 16
freq = 60
ampl = -9
phase = 90

[State 0, nogi]
type = Explod
trigger1 = anim=3702 && animelem = 2,=16
anim = 3703
ID = 3703
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
sprpriority = 0

[State 9125, 0.3]
type = varset
trigger1 = anim=3702 && animelem = 2,=16
v = 26
value = 1


[State 0, TargetState]
type = TargetState
trigger1 = anim=3702 && animelem = 2,=10
value =3711
ID = -1

[State 0, F]
type = Helper
trigger1 = anim=3702 && animelem = 2,=27
ID = 3702
stateno = 3702
pos = -90,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, I]
type = Helper
trigger1 = anim=3702 && animelem = 2,=27
ID = 3703
stateno = 3703
pos = -0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, D]
type = Helper
trigger1 = anim=3702 && animelem = 2,=27
ID = 3704
stateno = 3704
pos =80,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = anim=3702 && animelem = 2,>100
value =0
ctrl = 1

;F
[Statedef 3702];-------------------------------------------------------------------
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,20
anim = 3704
sprpriority = 7

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

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = -2000

[State 0, VelSet]
type = VelSet
trigger1 = pos y >-20
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >-20
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =pos y = 0
value = F5,107;F=common snd
volumescale = 100
persistent = 0


;I
[Statedef 3703];-------------------------------------------------------------------
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,27
anim = 3705
sprpriority = 7

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

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = -3000

[State 0, VelSet]
type = VelSet
trigger1 = pos y >-20
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >-20
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =pos y = 0
value = F5,107;F=common snd
volumescale = 100
persistent = 0

;D
[Statedef 3704];-------------------------------------------------------------------
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,17
anim = 3706
sprpriority = 7

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

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = -2700

[State 0, VelSet]
type = VelSet
trigger1 = pos y >-20
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >-20
y = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 =pos y = 0
value = F5,107;F=common snd
volumescale = 100
persistent = 0
;p2
[Statedef 3710];----;-------------------------------------------------------------------
type    = S
movetype= H
physics = S
ctrl = 0
velset = 0,0
facep2 = 1

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


;p2
[Statedef 3711];----;-------------------------------------------------------------------
type    = S
movetype= H
physics = S
ctrl = 0
velset = 0,0

[State 9125, 0.3]
type = varset
trigger1 = time = 0
v = 26
value = 1

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

[State 9125, 2.6]
type = lifeadd
trigger1 = time = 0
value = -9999

[State 9125, 2]
type = Selfstate
trigger1 = Time = 1
value = 5150


;-------------------------------------
;Animality
[Statedef 3800]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
velset = 0,0
anim = 0
sprpriority = 0

[State 0, vidimka]
type = VarSet
trigger1 = Time = 0
v = 17    ;fv = 10
value = 0

[State 430, 31]
type = changeanim
trigger1 = Time = 60
value = 3800

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =60
value =4444,9;F=common snd
volumescale = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =140
value =0,8;F=common snd
volumescale = 100

[State 9130, SetFatal]
type = Varset
trigger1 = time = 0
V = 4
value = 4



[State 800, 1]
type = HitDef
Trigger1 = 1
damage =0,0
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 = 5,141
sparkno = -1          ;No spark
p2facing = 1       ;Force p2 to face KFM
p1stateno = 3801       ;On success, KFM changes to state 810
p2stateno = 3810     ;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 = 0
fall.recover = 0
kill       = 0
fall.kill  = 0
guard.kill = 0

[Statedef 3801];------------------------------------------------firing1
type    = A
movetype= A
physics = N
juggle  = 2
ctrl = 0
velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = time = 0
name = "fire"
ID = 3805
stateno = 3805
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1

[State 0, p2]
type = Explod
trigger1 =numexplod(3805)<3&& time >5
anim = 3802
ID = 3805
pos =0 ,-60
postype =p2
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = .8,.8
sprpriority = 3
ontop = 0
ownpal = 1
random=30,80
angle=random/3


[State 2, Roundhouseblood]
type = Helper
trigger1 = time >35
ID = 7150  
stateno = ifelse(random>500,7420,7460)   
pos = (random/100)*2, -80+((random/100)*5)
postype = p2
persistent = 15
ignorehitpause = 1

[State 2, Roundhouseblood]
type = Helper
trigger1 = time >197
ID = 7442   
stateno = 7442 
pos =  (random/100)*2, -80
postype = p2
ignorehitpause = 1



[State 0, ChangeState]
type = ChangeState
trigger1 = time=200
value =3802
ctrl = 0



[Statedef 3802];------------------------------------------------
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,0

[State 0, weeeee]
type = PlaySnd
trigger1 = time =0
value = 4444,1;F=common snd
volumescale = 100

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=40
value = 3803

[State 0, weeeee]
type = PlaySnd
trigger1 = time =70
value = 3800,0;F=common snd
volumescale = 100




[State 2, Roundhouseblood]
type = Helper
trigger1 = 1
ID = 7202    
stateno = 7202  
pos = -10+(random/100)*2, -60
postype = p2
ignorehitpause = 1
persistent = 16

[State 0, redbody]
type = Explod
trigger1 = numexplod(123) = 0 && numexplod(321) = 0
trigger1 = time=0
anim = 3810
ID = 3810
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1

[State 0, greenbody]
type = Explod
trigger1 = numexplod(123) > 0
trigger1 = time=0
anim = 3812
ID = 3810
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1

[State 0, blackbody]
type = Explod
trigger1 = numexplod(321) > 0
trigger1 = time=0
anim = 3814
ID = 3810
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1

[State 0, TargetState]
type = TargetState
trigger1 = time=0
value =3811
ID = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =180
value =0,8;F=common snd
volumescale = 100

[State 0, ChangeState]
type = ChangeState
trigger1 = time=200
value =3803
ctrl = 0

[Statedef 3803];------------------------------------------------fire2
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim=3804

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 0
id = 3810

[State 0, Helper]
type = Helper
trigger1 = time = 0
name = "fire"
ID = 3805
stateno = 3805
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1


[State 0, redbody2]
type = Explod
trigger1 = numexplod(123) = 0 && numexplod(321) = 0
trigger1 = time=0
anim = 3811
ID = 3811
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1
vel=0,-.1
removetime = -1

[State 0, greenbody2]
type = Explod
trigger1 = numexplod(123) > 0
trigger1 = time=0
anim = 3813
ID = 3811
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1
vel=0,-.1
removetime = -1

[State 0, balcknbody2]
type = Explod
trigger1 = numexplod(321) > 0
trigger1 = time=0
anim = 3815
ID = 3811
pos = 0,0
postype = p2  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
pausemovetime = 0
scale = 1,1
sprpriority = 1
ownpal = 1
vel=0,-.1
removetime = -1


[State 0, p2]
type = Explod
trigger1 =numexplod(3805)<3&& time >5 && time < 280
anim = 3802
ID = 3805
pos =0 ,-60
postype =p2
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = .8,.8
sprpriority = 3
ontop = 0
ownpal = 1
random=30,80
angle=random/3

[State 2, Roundhouseblood]
type = Helper
trigger1 = time >35 && time < 280
ID = 7150  
stateno = ifelse(random>500,7420,7460)   
pos = (random/100)*2, -80+((random/100)*5)
postype = p2
persistent = 25
ignorehitpause = 1


[State 2, Roundhouseblood]
type = Helper
trigger1 = time =279
ID = 6900    
stateno = 6900  
pos =  0, -70
postype = p2
ignorehitpause = 1

[State 2, Roundhouseblood]
type = Helper
trigger1 = time =279
ID = 7442    
stateno = 7442  
pos =  0, -50
postype = p2
ignorehitpause = 1

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

[State 0, groundBLOODred]
type = Explod
trigger1 =time> 280
trigger1 = numexplod(123) = 0 && numexplod(321) = 0
anim = F7215
ID = 7215
pos = 20,0
postype = p2  ;p2,front,back,left,right
facing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale =1,2
sprpriority = 3
ontop = 0
ownpal = 1
random=160,5
persistent=10

[State 0, groundBLOODgreen]
type = Explod
trigger1 =time> 280
trigger1 = numexplod(123) > 0 
anim = F7315
ID = 7215
pos = 20,0
postype = p2  ;p2,front,back,left,right
facing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale =1,2
sprpriority = 3
ontop = 0
ownpal = 1
random=160,5
persistent=10

[State 0, groundBLOODblak]
type = Explod
trigger1 =time> 280
trigger1 = numexplod(321) > 0 
anim = F7415
ID = 7215
pos = 20,0
postype = p2  ;p2,front,back,left,right
facing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale =1,2
sprpriority = 3
ontop = 0
ownpal = 1
random=160,5
persistent=10

[State 0, ChangeState]
type = ChangeState
trigger1 = time= 500
value =3804
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 


[Statedef 3804];------------------------------------------------
type    = A
movetype= A
physics = N
ctrl = 0
velset = 0,0



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=20
value = 3803

[State 0, weeeee]
type = PlaySnd
trigger1 = time =50
value = 3800,1;F=common snd
volumescale = 100

[State 0, gilza]
type = Explod
trigger1 =time=150
anim = 3806
ID = 3806
pos = -10,-60
postype = p1  ;p2,front,back,left,right
bindtime =1; -1 forever
removetime = 32
pausemovetime = 0
scale = .5,.5
sprpriority = 3
ownpal = 1
vel=5,-4
accel=0,.3

[State 0, gilza]
type = PlaySnd
trigger1 = time =150
value = 333,11;F=common snd
volumescale = 100

[State 0, TargetState]
type = TargetState
trigger1 = time=0
value =3812
ID = -1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time=210
value = 3805

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =210
value =4444,9;F=common snd
volumescale = 100

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0 && anim = 3805
value =0
ctrl = 1

;firing helper
[Statedef 3805];------------------------------------------------
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim=888

[State 0, EnvShake]
type = EnvShake
trigger1 = time%10=0
time = 10
freq = 60
ampl = -3
phase = 90
;ignorehitpause = 
;persistent = 


[State 0, fire]
type = PlaySnd
trigger1 = time%7 = 0
value = 3800,2;F=common snd
volumescale = 60
channel=2

[State 0, gilza]
type = Explod
trigger1 =1
anim = 3806
ID = 3806
pos = -10,-60
postype = p1  ;p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime =1; -1 forever
removetime = 30
pausemovetime = 0
scale = .5,.5
sprpriority = 3
ontop = 0
ownpal = 1
vel=ifelse(random>500,-2,-3),-8
accel=0,.7
persistent= 10
random=4,4
angle=random/3

[State 0, firing]
type = Explod
trigger1 =numexplod(3801)=0 
anim = 3801
ID = 3801
pos = 18,-60
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
angle=10
random=5,5

[State 0, firing]
type = Explod
trigger1 =numexplod(3802)=0&& time>5
anim = 3801
ID = 3802
pos = 8,-55
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = -1
bindtime = -1; -1 forever
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 3
ontop = 0
ownpal = 1
random=5,15



[State 0, ground]
type = Explod
trigger1 =numexplod(3803)=0
anim = 3802
ID = 3803
pos = 20,0
postype = p2  ;p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2
pausemovetime = 0
scale = ifelse(random>500,.7,.5),ifelse(random>500,.7,.9)
sprpriority = 3
ontop = 0
ownpal = 1
random=80,5
angle=ifelse(random>500,-90,-105)



[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno = 3804
trigger2 = parent,stateno = 3802



[Statedef 3810];------------------------------------------------------------
type    = A
movetype= H
physics = N
juggle  = 2
ctrl = 0
velset = 0,0

[State 430, 31]
type = changeanim
trigger1 = animtime=0
trigger2 = time=0
value = 5000

[State 0, VelSet]
type = posadd
trigger1 =random%2=0
x = -.5
y = 0

[Statedef 3811];------------------------------------------------------------
type    = A
movetype= H
physics = N
juggle  = 2
ctrl = 0
velset = 0,0
anim=888

[State 9125, 0.3]
type = varset
trigger1 = time = 0
v = 26
value = 1


[Statedef 3812];-----------------------------------------------------------------
type    = S
movetype= H
physics = S
juggle  = 2
ctrl = 0
velset = 0,0

[State 3010, 1]
type = lifeadd
trigger1 = time = 180
value = -9999

[State 200, 7]
type = selfstate
trigger1 = time = 180
value = 5150


;-------------------------------------------------------------------
;-------------------------------------------------------------------нужно чтобы говорили хиниш хер
;-------------------------------------------------------------------
;-------------------------------------------------------------------
;-------------------------------------------------------------------;-------------------------------------------------------------------

;Fatality time
[Statedef 900100]
type    = S
movetype= I
physics = S
anim = 5300
velset = 0,0
ctrl = 0

;back
[State -2, 1]
type = selfstate
trigger1 = time = 0 && p2stateno = 9010
value = 0
ctrl = 1

;reset
[State -2, 1]
type = varset
trigger1 = time = 0
v = 11
value = 1

;FINISH SOUND SAMPLE
[State -2, 5.999]
type = Playsnd
trigger1 = enemy,var(19) = 0
value = F5, 7 + 18*(var(11) = 1)
Channel = 4
persistent = 0
volume = 110

[State 181, FinishHim]
type = Explod
trigger1 = enemy,var(19) = 0
anim = F5 + 3*(var(11) = 1)
pos = 156,80
postype = left
bindtime = -1
facing = 1
sprpriority = 2
ontop = 1
ownpal = 1
persistent = 0
;
[State 987123, 1]
type = SelfState
trigger1 = time = 1
value = 9010

