;JUMPING PUNCH
[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 650
VELSET=2,-2

[State 610, Select]
type = VarRandom
trigger1 = Time = 1
v = 11
range = 11, 12

[State 610, Play]
type = PlaySnd
trigger1 = Time = 1
value = F5, 154

[State 620, 145]
type = Playsnd
trigger1 = Animelem = 2
value = 4,15
channel = 3


[State 610, 2]
type = HitDef
trigger1 = !movecontact
attr = A, NA
damage    = 100, 30
air.animtype  = Back
air.hittime  = 55
air.velocity = -3.5, -3
yaccel = 0.5
hitflag = MAF
guardflag = HL
priority = 7
pausetime = 0,0
hitsound   = 5,103
guardsound = 5,14
p2facing = 1
sparkno = -1
sparkxy = -25,-30
guard.sparkno = -1
forcestand = 1
ground.type = High
ground.slidetime = 12
ground.hittime  = 20
ground.velocity = -1
guard.ctrltime = 12
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)



[State 600, 1.5]
type = velset
trigger1 = moveguarded
triggerall = vel x > 0
x = 0
ignorehitpause = 1



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

[State 0, contraGun]
type = ChangeState
trigger1 = fvar(20)=1
value =1010
ctrl = 0





[State 0, ChangeState]
type = ChangeState
trigger1 =helper(1001),stateno = 1003
value =1004
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

;
;[State 0, VarSet]
;type = VarSet
;trigger1 = time = 0
;v = 11    ;fv = 10
;value = ifelse(p2movetype=H,1,0)
;;ignorehitpause = 
;;persistent = 
;
;
;
;[State 0, firecount]
;type = VarSet
;trigger1 = time = 0
;fv = 10    ;fv = 10
;value = 0
;
;[State 0, firecount]
;type = Varadd
;trigger1 = anim = 1002 &&  fvar(10)<7 && animelem= 5,=1
;fv = 10    ;fv = 10
;value = 1

[State 0, firing]
type = ChangeAnim
trigger1 = time = 10
;trigger2 = anim = 1002  && animelem= 5,=1;&& fvar(10)<7
value = 1002



[State 0, end]
type = ChangeAnim
trigger1 = anim = 1002 && animtime = 0;&& fvar(10)>6
value = 1001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim =1001 && animelem= 2,=1
value = F5,152;F=common snd
volumescale = 100



[State 0, smoke]
type = Explod
trigger1 = anim = 1002 && animelem = 5,=2
anim = 1007
ID = 1007
pos = 54,-100
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 1,-1
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0


[State 0, Helper]
type = Helper
trigger1 =animelem=1,=0 && anim = 1002
name = "bullet"
ID = 1001
stateno = 1001
pos =24,ifelse(random>500, -98,-95)
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.head.pos = 0,var(11)




[State 1200, 10]
type = ChangeState
trigger1 = AnimTime = 0 && anim = 1001
trigger2 = time>200
ctrl = 1
value = 0



;1 bullet
[Statedef 1001]     ;===========================
type    = A
movetype= A
physics = N
juggle  = 1
velset = 14,0
anim = 1004
ctrl = 0
sprpriority = 6

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

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

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


;[State 0, gilza]
;type = Projectile
;trigger1 =time =0 && root,var(57)=0
;projanim = 1005
;projhitanim = -1
;projremanim = 1008
;projcancelanim = -1
;projscale = 1,1
;projremove = 1
;velocity = -0.5-0.3*(random%7),-4-0.5*(random%7)
;remvelocity = 0,0
;accel = 0,0.4
;offset = 0,10
;postype = p1
;projsprpriority = 3
;ownpal = 1
;
;[State 0, gilza2]
;type = Projectile
;trigger1 =time =0
;projanim = 1005
;projhitanim = -1
;projremanim = 1008
;projcancelanim = -1
;projscale = 1,1
;projremove = 1
;velocity = -0.5-0.3*(random%7),-4-0.5*(random%7)
;remvelocity = 0,0
;accel = 0,0.5
;offset = 0,10
;postype = p1
;projsprpriority = 3
;ownpal = 1
;
;[State 0, gilza3]
;type = Projectile
;trigger1 =time =0
;projanim = 1005
;projhitanim = -1
;projremanim = 1008
;projcancelanim = -1
;projscale = 1,1
;projremove = 1
;velocity = -0.5-0.3*(random%7),-4-0.5*(random%7)
;remvelocity = 0,0
;accel = 0,0.3
;offset = 0,10
;postype = p1
;projsprpriority = 3
;ownpal = 1


[State 0, fire]
type = PlaySnd
trigger1 = time =0
value = 1000,0;F=common snd
channel=5
volumescale=70



[State 0, soplo]
type = Explod
trigger1 = time = 0
anim = 1003
ID = 1003
pos = -5,5
postype = p1  ;p2,front,back,left,right
facing =1
vfacing =  ifelse(random>500,1,-1)
bindtime = 1
vel = 2,0
scale = ifelse(random>500,1,.6),1
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0




[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
trigger1 = p2statetype != C || (p2stateno = [120,159])
attr = S, NP
damage    = 25,4; ifelse(Const(size.head.pos.y) = 1,11,25), 4; root var(11) регулирует дамаге 
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = HL
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = High
ground.velocity = -4,0
air.fall=1
air.velocity = ifelse(time>8,0,-4),-5
air.juggle = 1
ground.hittime = 22
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (root,Var(9) = 0)
fall.kill  = (root,Var(9) = 0)
guard.kill = (root,Var(9) = 0)
fall=0
getpower=0,0



[State 0, PlaySnd]
type = PlaySnd
trigger1 = random>500
trigger2 = FrontEdgeDist < -2
value = 1000,1
volumescale = 30


[State 0, hit]
type = Explod
trigger1 = movecontact
trigger2 = FrontEdgeDist < -2
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = .7,.7
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3




[State 2, Roundhouseblood]
type = Helper
trigger1 = movehit
trigger1 = root,fvar(10)=1
ID = 29
stateno = 7400 
pos = 30, 0
postype = p1
persistent = 0
ignorehitpause = 1


[State 0, ChangeState]
type = ChangeState
trigger1 =  movehit
value =1003


[State 1000, 0.1]
type = Destroyself
trigger1 = FrontEdgeDist < -2
;trigger2 = movecontact >20
trigger3 = time >100
trigger2 = movecontact

;1 bullet back
[Statedef 1002]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 1004
ctrl = 0
sprpriority = 6


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

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


[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = S, HP
damage    = 100, 2
affectteam = F
animtype = Light
air.animtype = Back
guardflag = HL
pausetime = 0,2
sparkno = -1
guard.sparkno = -1
hitsound   = S4,18
guardsound = S4,19
ground.type = High
ground.slidetime = 20
ground.hittime  = 15
ground.velocity = -5,0
air.velocity = -4,-5
yaccel = 1
guard.dist = 90
air.fall = 1
fall.recover = 0
air.juggle = 3
kill       = (enemy,Var(9) = 0)
fall.kill  = (enemy,Var(9) = 0)
guard.kill = (enemy,Var(9) = 0)


[State 0, hit]
type = Explod
trigger1 = movecontact
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = .7,.7
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3


[State 1000, 0.1]
type = Destroyself
trigger1 = FrontEdgeDist < -100
trigger2 = movecontact
trigger3 = time >100

;1 bullet hit
[Statedef 1003]     ;===========================
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
anim = 1009
ctrl = 0
sprpriority = 6



[State 1000, 0.1]
type = Destroyself
trigger1 = animtime = 0

;gun count
[Statedef 1004];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1002

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 33    ;fv = 10
value = ifelse(p2movetype=H,1,0)


[State 0, firecount]
type = VarSet
trigger1 = time = 0
fv = 3    ;fv = 10
value = 0

[State 0, firecount]
type = Varadd
trigger1 = anim = 1002 &&  fvar(3)<7 && animelem= 5,=1
fv = 3    ;fv = 10
value = 1

[State 0, firing]
type = ChangeAnim
trigger1 = time = 10
trigger2 = anim = 1002  && animelem= 5,=1&& fvar(3)<7
value = 1002

[State 0, Helper]
type = Helper
trigger1 =animelem=1,=0 && anim = 1002
name = "bullet"
ID = 1001
stateno = 1001
pos =24,-90-random%14
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.head.pos = 0,var(33)

[State 0, end]
type = ChangeAnim
trigger1 = anim = 1002 && animtime = 0&& fvar(3)>6
value = 1001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim =1001 && animelem= 2,=1
value = F5,152;F=common snd
volumescale = 100



[State 0, smoke]
type = Explod
trigger1 = anim = 1002 && animelem = 5,=2
anim = 1007
ID = 1007
pos = 54,-100
postype = p1  ;p2,front,back,left,right
bindtime = 1
vel = 1,-1
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0

[State 1200, 10]
type = ChangeState
trigger1 = AnimTime = 0 && anim = 1001
ctrl = 1
value = 0

;contra
[Statedef 1010];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1000

[State 0, firing]
type = ChangeAnim
trigger1 = time = 10
;trigger2 = time = 20
;trigger3 = time = 30
value = 1010

[State 0, Helper]
type = Helper
trigger1 = time = 10
;trigger2 = time = 20
;trigger3 = time = 30
name = "bullet"
ID = 1011
stateno = 1011
pos =38,-95
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, Helper]
type = Helper
trigger1 = time = 10
;trigger2 = time = 20
;trigger3 = time = 30
name = "bullet"
ID = 1012
stateno = 1012
pos =38,-95
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, Helper]
type = Helper
trigger1 = time = 10
;trigger2 = time = 20
;trigger3 = time = 30
name = "bullet"
ID = 1013
stateno = 1013
pos =38,-95
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0


[State 0, soplo]
type = Explod
trigger1 = time = 10
;trigger2 = time = 20
;trigger3 = time = 30
anim = 1003
ID = 1003
pos =38,-95
postype = p1  ;p2,front,back,left,right
facing =1
vfacing =  ifelse(random>500,1,-1)
bindtime = 1
vel = 2,0
scale = ifelse(random>500,1,.6),1
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = anim =1011 && animelem= 2,=1
value = F5,152;F=common snd
volumescale = 100

[State 1200, 10]
type = ChangeState
trigger1 = AnimTime = 0 && anim = 1011
ctrl = 1
value = 0


;bullet >
[Statedef 1011]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 8,0
anim = 1012
ctrl = 0
sprpriority = 6

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



[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = A, NP
damage    =100, 0; root var(11) регулирует дамаге 
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -4,0
air.fall=1
air.velocity = ifelse(time>8,0,-4),-5
air.juggle = 1
ground.hittime = 18
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (root,Var(9) = 0)
fall.kill  = (root,Var(9) = 0)
guard.kill = (root,Var(9) = 0)
fall=0

[State 0, hit]
type = Explod
trigger1 = movecontact
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3

[State 1000, 0.1]
type = Destroyself
trigger1 = time >200
trigger2 = movecontact


;bullet UP
[Statedef 1012]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 7.5,-4
anim = 1012
ctrl = 0
sprpriority = 6

[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = A, NP
damage    =60, 0; root var(11) регулирует дамаге 
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -4,0
air.fall=1
air.velocity = ifelse(time>8,0,-4),-5
air.juggle = 1
ground.hittime = 18
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (root,Var(9) = 0)
fall.kill  = (root,Var(9) = 0)
guard.kill = (root,Var(9) = 0)
fall=0

[State 0, hit]
type = Explod
trigger1 = movecontact
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3

[State 1000, 0.1]
type = Destroyself
trigger1 = time >200
trigger2 = movecontact


;bullet DOWN
[Statedef 1013]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 7.5,4
anim = 1012
ctrl = 0
sprpriority = 6

[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = A, NP
damage    =60, 0; root var(11) регулирует дамаге 
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -4,0
air.fall=1
air.velocity = ifelse(time>8,0,-4),-5
air.juggle = 1
ground.hittime = 18
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (root,Var(9) = 0)
fall.kill  = (root,Var(9) = 0)
guard.kill = (root,Var(9) = 0)
fall=0

[State 0, hit]
type = Explod
trigger1 = movecontact
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3

[State 1000, 0.1]
type = Destroyself
trigger1 = time >200
trigger2 = movecontact


;bullet back
[Statedef 1014]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 1012
ctrl = 0
sprpriority = 6


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

[State 1200, 10]
type = posadd
trigger1 = time = 0
x = 20

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


[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = S, HP
damage    = 130, 2
affectteam = F
animtype = Light
air.animtype = Back
guardflag = HL
pausetime = 0,2
sparkno = -1
guard.sparkno = -1
hitsound   = S4,18
guardsound = S4,19
ground.type = High
ground.slidetime = 20
ground.hittime  = 15
ground.velocity = -5,-5
air.velocity = -4,-5
yaccel = 1
guard.dist = 90
air.fall = 1
fall.recover = 0
air.juggle = 3
kill       = (enemy,Var(9) = 0)
fall.kill  = (enemy,Var(9) = 0)
guard.kill = (enemy,Var(9) = 0)
fall = 1

[State 0, hit]
type = Explod
trigger1 = movecontact
anim = 1006
ID = 1006
pos = 20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
random =40,25
removetime = -2
pausemovetime = 0
scale = .7,.7
sprpriority = 7
ownpal = 1
removeongethit = 0
angle=random/3

[State 1000, 0.1]
type = Destroyself
trigger2 = movecontact
trigger1 = time >150

;gilza
[Statedef 1020]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
anim = 1005
ctrl = 0
sprpriority =  ifelse(random>500,-6,6)

[State 0, VelSet]
type = VelSet
trigger1 =time =0
x = -0.5-0.3*(random%7)
y = -4-0.5*(random%7)

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = 0.4
 
[State 0, ChangeState]
type = ChangeState
trigger1 =pos y > root,var(57)
value =1021

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time > 100


;gilza2
[Statedef 1021]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
anim = 888
velset=0,0
ctrl = 0
sprpriority = 6

[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 1020
ID = 1006
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 0
ontop = 0
ownpal = 0
removeongethit = 0
angle=random/3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = 1


; airthrow
[Statedef 1050]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1050
sprpriority = 1


[State 800, 1]
type = HitDef
Trigger1 = !movecontact
damage = 150
pausetime = 0,0
attr = A, NT          ;Attributes: Standing, Normal Throw
hitflag = AF          ;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
p2facing = 1       ;Force p2 to face KFM
p2stateno = 1060      ;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
hitonce = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)

[State 800, 1]
type = selfstate
trigger1 = movehit
value = 1051

[State 800, 2]
type = selfState
Trigger1 = vel y > 0 && pos y > var(57) && !movecontact
value = 52

[State 800, 2]
type = selfState
Trigger1 = time>10
value = 50
ctrl=0

[Statedef 1051]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,-8
ctrl = 0
anim = 1050
sprpriority =1

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


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

[State 0, ChangeState]
type = ChangeState
trigger1 = pos y < var(57)-140
value =1052
ctrl = 0



[Statedef 1052]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
juggle  = 0
velset = 0,-4
ctrl = 0

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



[State 0, VelAdd]
type = VelAdd
trigger1 = time>0 
y = .4


[State 0, VelAdd]
type = Velset
trigger1 = time=25
y = 15

[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >var(57)-20
value =1053
ctrl = 0



;land
[Statedef 1053]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority =1
anim=1051





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

[State 0, 1 stone]
type = Explod
trigger1 = time = 0
anim = 1056
ID = 1056
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
removetime =100
pausemovetime = 0
scale = 3,1
sprpriority = 7
ontop = 0
ownpal = 1
removeongethit = 0




[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = var(57)

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

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

[State 0, TargetState]
type = TargetState
triggerall = NumTarget;()
trigger1 = time  =3
value =1062
ID = -1
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = time>40
value =1054
ctrl = 0

;end
[Statedef 1054]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority =1
anim=1057

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = F5,21;F=common snd
volumescale = 100
channel = -1

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

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

[State 0, 1 stone]
type = RemoveExplod
trigger1 =1
id = 1056



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


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




; STONE BOOM
[Statedef 1058]; STONE BOOM--------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
sprpriority =6
anim=888

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = 1050,0;F=common snd
volumescale = 100
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = F5,21;F=common snd
volumescale = 50
channel = -1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =5
value = f5,328;F=common snd
volumescale = 100
channel = -1

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

[State 0, smoke]
type = Explod
trigger1 = 1
anim = 20020
ID = 20020
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 7
ontop = 0
ownpal = 1
vel= ifelse(random>500,-2,2),0
removeongethit = 0
angle=random/3
random=100,30
trans = add


[State 0, Explod]
type = Explod
trigger1 =1
anim =  ifelse(random>500,1055,1056)
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = -5+(random/100),-4-0.5*(random%7)
accel =  0,0.6
random = 0,0
removetime = 40
pausemovetime = 0
scale = ifelse(random>500,1,.8),ifelse(random>500,1,.8)
sprpriority = 7
removeongethit = 0
angle=random/3

[State 0, Explod]
type = Explod
trigger1 =1
anim =  ifelse(random>500,1055,1056)
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = -5+(random/100),-10-0.5*(random%7)
accel =  0,0.7
random = 0,0
removetime = 45
pausemovetime = 0
scale = ifelse(random>500,1,.8),ifelse(random>500,1,.8)
sprpriority = 7
removeongethit = 0
angle=random/3



[State 0, DestroySelf]
type = DestroySelf
trigger1 =time = 6



; STONE-
[Statedef 1059]; STONE--------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
sprpriority =5

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = root,var(57)

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

[State 0, part stone]
type = Explod
trigger1 = root,stateno = 1053 && anim != 1054
anim = 1054
ID = 1054
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
bindtime = 1; -1 forever
removetime = 100
pausemovetime = 0
scale = 1,1
sprpriority = 6
ontop = 0
ownpal = 1



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = root,stateno = 1053 && anim != 1054
value = 1054

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = root,stateno = 1054
trigger2=time>100
id = 1054

[State 0, part stone fly]
type = Explod
trigger1 = root,stateno = 1054
trigger2=time>100
anim = 1054
ID = 10541
pos = 0,0
postype = p1  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
bindtime = 1; -1 forever
removetime = 50
pausemovetime = 0
scale = 1,1
sprpriority = 6
ontop = 0
ownpal = 1
vel=20,0

[State 0, part stone fly]
type = Explod
trigger1 = root,stateno = 1054
trigger2=time>100
anim = 1054
ID = 10541
pos = -20,0
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
bindtime = 1; -1 forever
removetime = 50
pausemovetime = 0
scale = 1,1
sprpriority = 6
ontop = 0
ownpal = 1
vel=-20,0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root,stateno = 1054
trigger2=time>100




;en 
[Statedef 1060]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 6

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

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 1052

;en 
[Statedef 1062]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 6



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




;en
[Statedef 1061]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics =A
juggle  = 0
ctrl = 0
sprpriority = 4
velset= -10,-4

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


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 5050

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value =3,0;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0



[State 0, SelfState]
type = SelfState
trigger1 = pos y >var(57)-10
value = 5110


; standart  ME
[Statedef 1070]; --------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1070
sprpriority = 0

[State 0, take]
type = PlaySnd
trigger1 = time =0
value = f5,14;F=common snd
volumescale = 100

[State 0, footstep]
type = PlaySnd
trigger1 = anim =1073 && animelem =2,=1
value = f20,12;F=common snd
volumescale = 100


[State 0, stand]
type = ChangeAnim
triggerall = anim != 1072;drop
trigger1 = animtime = 0 && anim = 1070
trigger2 = time > 5 && (command != "holdfwd" && command != "holdback")
value = 1071

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

[State 0, TargetBind]
type = TargetBind
trigger1 = time > 5
trigger1 = target,stateno = 1075
time = 5
id = -1
pos = 0,-130
persistent=4

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


[State 0, >>>]
type = PosAdd
trigger1 = command = "holdfwd"
trigger1 = time > 5
x = 3

[State 0, <<<<]
type = PosAdd
trigger1 = command = "holdback"
trigger1 = time > 5
x = -2

[State 0, walk]
type = ChangeAnim
triggerall = anim != 1072;drop
triggerall = anim != 1073
triggerall = time > 5
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
value = 1073

[State 0, Turn]
type = Turn
trigger1 = command = "holdback"
triggerall = anim != 1072

[State 0, TargetFacing]
type = TargetFacing
trigger1 = 1
value =-1
ID = -1

[State 0, ChangeState]
type = ChangeState
triggerall = time > 5
trigger1 = command = "a"
trigger2 = command = "b"
trigger3 = command = "y"
trigger4 = command = "x"
trigger5 = time = 100
value =1071
ctrl = 0





; standart  ME drop
[Statedef 1071]; --------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 1072
sprpriority = 0

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




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

[State 0, TargetDrop]
type = TargetDrop
triggerall = NumTarget;()
trigger1 = time=0
excludeID = -1
keepone = 1


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


; standart  EN
[Statedef 1075]; --------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= H
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
sprpriority = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0





[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = prevstateno != 1075
trigger1 = time = 0
value = 1075

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = animtime = 0 && anim = 1075
trigger2 = prevstateno = 1075 && time = 0
value = 1076

[State 0, SelfState]
type = SelfState
trigger1 = time>10
value =0
ctrl =1



; standart  EN
[Statedef 1076]; --------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics = N
juggle  = 0
velset = -7,-7
ctrl = 0
sprpriority = 1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 1077

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

[State 0, SelfState]
type = SelfState
trigger1 = pos y > var(57)-10
value = 5110
;anim =
;ctrl =
;ignorehitpause = 0
;persistent = 1


;--------------------------------------------;-------------------------------------------------------------------
;flip
[StateDef 1100]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 1100

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



[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =4
value = F5,153;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0

[State 0, VelSet]
type = VelSet
trigger1 = time = 2
y =-8

[State 0, VelSet]
type = posadd
trigger1 = !movehit
x = 1+(animelem=13,<0)


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


[State 0, VelSet]
type = Veladd
trigger1 = vel y > 0
y =.4

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = animelem = 12, >1
movetype = I        ;I,A,H




[State 1000, 10]
type = HitDef
trigger1 = !movecontact
attr = A, SA
animtype  = back
damage    = 170, 20
priority =7
guardflag = HL
hitflag = MAF
pausetime = 0,0
guard.pausetime=5,0
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,14 
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3,-10
air.velocity = -1,-10+ifelse(p2movetype=H,6,0)
air.hittime = 12
yaccel = 0.375
fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
ground.cornerpush.veloff =2



[State 0, ChangeState]
type = ChangeState
trigger1 = pos y > var(57)-10 && time > 10
value =1201
anim =1202
ctrl = 0


;nunchaks
[Statedef 1150];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1150

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =2
value = f5,150;F=common snd
volumescale = 100

[State 0, detector]
type = Explod
trigger1 = var(50) = 1
trigger1 = time = 1
ID = 140041
anim = 888
removetime = 80
ignorehitpause = 1


[State 0, stand]
type = HitDef
trigger1 = p2statetype= S && p2stateno!=9010
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = M
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 10,5
pausetime = 0 ,0
sparkno =-1
guard.sparkno = -1
sparkxy = 0,0
hitsound = s1150,0
guardsound = s1150,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 40
ground.hittime = 60
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
fall = 0
air.fall = 1
hitonce = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
numhits = 1
p1stateno =1151
getpower=0,0




[State 0, air]
type = HitDef
trigger1 = p2statetype = A
trigger2 = p2stateno = 9010
attr = S,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MA
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
damage = 10,5
pausetime = 0 ,0
sparkno =-1
guard.sparkno = -1
sparkxy = 0,0
hitsound = s1150,0
guardsound = s1150,0
ground.type = High      ;Low,Trip,None
ground.slidetime = 40
ground.hittime = 60
air.hittime = 20
ground.velocity = 0,0
air.velocity = 0,0
fall = 0
air.fall = 1
hitonce = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
numhits = 1
p1stateno =1152
getpower=0,0

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = moveguarded
movetype = I        ;I,A,H



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


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

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


[State 0, frog]
type = Explod
trigger1 = time = 0
anim =  1155
ID = 1155
pos = 0,0
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 = 6
ownpal = 1
removeongethit = 1


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

;attack
[Statedef 1152];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1152

[State 0, AfterImage]
type = AfterImage
trigger1 =time= 0
time = 100
length = 20
;palcolor = 256
;palinvertall = 0
;palbright = 30,30,30
;palcontrast = 120,120,220
;palpostbright = 0,0,0
paladd = -225,225,-225
;palmul = .65,.65,.75
;timegap = 1
;framegap = 4
trans = "add" ;"none","add1","sub"
;ignorehitpause = 
;persistent =


[State 0, frog]
type = RemoveExplod
trigger1 = numexplod(1155)!=0
id = 1155

[State 0, 1]
type = Explod
trigger1 = time= 0 
anim = 1156
ID = 1156
pos = 0,-60
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = 110
pausemovetime = 0
scale = 1.2,.8
sprpriority = 4
ontop = 0
ownpal =1
removeongethit = 1
angle=-40

[State 0, 1]
type = Explod
trigger1 = time= 0 
anim = 1157
ID = 1156
pos = 0,-60
postype = p1  ;p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = 110
pausemovetime = 0
scale = 1.2,.8
sprpriority = 4
ontop = 0
ownpal =1
removeongethit = 1
angle=-40
trans=sub

[State 0, 2]
type = explod
trigger1 = time= 0 
anim = 1156
ID = 1156
pos = 40,-70
postype = p1  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = 110
pausemovetime = 0
scale = .6,1
sprpriority = 4
ontop = 0
ownpal =1
removeongethit = 1
angle=30

[State 0, 2]
type = explod
trigger1 = time= 0 
anim = 1157
ID = 1156
pos = 40,-70
postype = p1  ;p2,front,back,left,right
facing = -1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = 110
pausemovetime = 0
scale = .6,1
sprpriority = 4
ontop = 0
ownpal =1
removeongethit = 1
angle=30
trans=sub

[State 0, 2]
type = explod
trigger1 = time= 0 
anim = 1160
ID = 1160
pos = 0,-0
postype = p1  ;p2,front,back,left,right
facing =1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = 110
pausemovetime = 0
scale =1,1
sprpriority = 4
ontop = 0
ownpal =1
removeongethit = 1


[State 1200, BoltFat]
type = hitdef
trigger1 = 1
attr = S, NA
damage    = 13, 2
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = s(ifelse(random>500,1161,1162))
sparkxy = -(20+((random/100)*4)),-100+((random/100)*8)
guard.sparkno = -1
hitsound   = s1150,0
guardsound = s1150,0
ground.type = low
ground.velocity = 2,0
air.velocity = 0,-3
air.fall=1
air.juggle = 1
ground.hittime = 13
air.hittime = 12
guard.slidetime = 12
yaccel = .5
p2facing = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
fall=0
numhits = 1
ground.cornerpush.veloff =0
getpower=0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time >0
value =1150,2;F=common snd
volumescale = 100
persistent=15



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




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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = F1,12;F=common snd
volumescale = 50



[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = time=0
time = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = numexplod(1156)>0
id = 1156

[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 1158
ID = 1158
pos = -35,-90
;postype = p1  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = -2;- odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
ownpal = 1
removeongethit = 1

[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 1159
ID = 1159
pos =0,0
;postype = p1  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = -2;- odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 5
ontop = 0
ownpal = 1
removeongethit = 1




[State 1200, BoltFat]
type = hitdef
trigger1 = 1
attr = S, NA
damage    = 25, 4
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,103
guardsound = 5,103
ground.type = low
ground.velocity = -8,-2
air.fall=1
air.juggle = 1
ground.hittime = 10
air.hittime = 12
guard.slidetime = 12
yaccel = 1
p2facing = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
fall=1
numhits = 1
ground.cornerpush.veloff =-20

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

;flip forvard
[Statedef 1200];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
juggle  = 1
velset = 6,-5
ctrl = 0
sprpriority = 0
anim=1200

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .5



[State 0, VelSet]
type = posadd
trigger1 = animelem=3,>0
trigger1 = animelem=8,<0
x = 4




[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = S, SA
damage    = 125, 20
animtype = light
air.animtype = Back
hitflag = HAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -5,-8
air.velocity = -5,-8
air.fall=1
air.juggle = 1
ground.hittime = 10
air.hittime = 12
guard.slidetime = 12
yaccel = .5
p2facing = 1
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
fall=1
numhits = 1
hitonce=1
ground.cornerpush.veloff =-20
priority = 7

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


; !!!  LAND   !!!
[Statedef 1201];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= I
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
sprpriority = 0

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 15
freq = 60;скорость 0 - 180
ampl = 3;смещение экрана вверх-низ
phase = 90

[State 0, boom]
type = Explod
trigger1 = time<2
anim = 20021
ID = 20021
pos = 0,-10
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = 0,1
removetime = -2;"-2" odin raz; "-1" forever
scale = 1.1,.2
sprpriority = -7
ownpal = 1
trans = sub


[State 0, smoke]
type = Explod
trigger1 = time < 8
anim = 20020
ID = 20020
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .4,.4
sprpriority = 7
ontop = 0
ownpal = 1
removeongethit = 0
angle=random/3
random=80,0
trans = add

[State 0, fire]
type = Explod
trigger1 = time=2
anim =  ifelse(random>500,2165,2164)
ID = 2165
pos = 30,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .4,.4
sprpriority =-5
ownpal = 1
angle=random/3
trans=add

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0 && prevstateno =1100
value = 1200,0;F=common snd
volumescale = 60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0 && prevstateno !=1100
value = 1200,1;F=common snd


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
TRIGGERALL = ANIM !=1202; ПРИЗЕМЛЕНИЕ ИЗ ДРУГИХ СТЭЙТОВ	
value = 1201



[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0 && anim = 1201
x = 15



[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = var(57)


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


;jump gun
[Statedef 1250];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 1250

[State 0, PosFreeze]
type = PosFreeze
trigger1 = anim=1250
value = 1

[State 0, Helper]
type = Helper
trigger1 = animelem = 5,=1 && anim =1250
name = "bullet"
ID = 1255
stateno = 1255
pos = 45,-100
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

[State 0, Explod]
type = Explod
trigger1 = anim =1251 && animelem=1,=1
anim = 10004
ID = 10004
pos = 60,-96
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;- odin raz; "-1" forever
pausemovetime = 0
scale = .5,.8
sprpriority = 7
ontop = 0
ownpal = 1
removeongethit = 0
trans=add1

;[State 0, Explod]
;type = Explod
;trigger1 = anim =1251
;anim = 10004
;ID = 10004
;pos = 60,-96
;postype = p1;  p2,front,back,left,right
;facing = 1;1-2*(random%2)
;vfacing = 1
;bindtime = 1; -1 forever
;removetime = -2;- odin raz; "-1" forever
;pausemovetime = 0
;scale =.2,.2
;sprpriority = 7
;ontop = 0
;ownpal = 1
;removeongethit = 0
;angle=random/3
;trans=add1



[State 0, VelSet]
type = VelSet
trigger1 = numhelper(1255)=1 && anim !=1251
x = -6
y = -2

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = numhelper(1255)=1 && anim !=1251
value = 1251


[State 1000, 7]
type = selfState
trigger1 = pos y >= var(57)
value = 52


;bullet
[Statedef 1255]     ;===========================
type    = S
movetype= A
physics = N
juggle  = 1
velset = 10,0
anim = 1255
ctrl = 0
sprpriority = -2

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 10004
ID = 10004
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2;- odin raz; "-1" forever
pausemovetime = 0
scale =.5,.3
sprpriority = 7
ontop = 0
ownpal = 1
removeongethit = 0
trans=add
random=0,5


[State 0, fire]
type = PlaySnd
trigger1 = time =0
value = 1000,0;F=common snd
volumescale = 40




[State 0, soplo]
type = Explod
trigger1 = time = 0
anim = 1003
ID = 1003
pos = -5,0
postype = p1  ;p2,front,back,left,right
facing =1
bindtime = 1
vel = 0,0
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0
scale=2,2



[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = A, NP
damage    =300, 4
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -4,0
air.fall=1
air.velocity = ifelse(time>8,0,-4),-5
air.juggle = 1
ground.hittime = 18
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (root,Var(9) = 0)
fall.kill  = (root,Var(9) = 0)
guard.kill = (root,Var(9) = 0)
fall=0


[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value =1256
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 





[State 1000, 0.1]
type = Destroyself
trigger1 = FrontEdgeDist < -200
trigger2 = time >100


;bullet hit
[Statedef 1256]     ;===========================
type    = S
movetype= I
physics = N
juggle  = 1
velset = 0,0
anim = 10004
ctrl = 0
sprpriority = -2

[State 0, gilza]
type = Projectile
trigger1 =time < 11
projanim = 10005
projhitanim = -1
projremanim = -1
projcancelanim = -1
projscale = .1,.1
projremove = 1
velocity = 0.5+0.3*(random%7),-4-0.5*(random%7)
remvelocity = 0,0
accel = 0,0.4
offset = 0,10
postype = p1
projsprpriority = 3
ownpal = 1



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

;bullet back
[Statedef 1257]     ;===========================
type    = A
movetype= A
physics = N
juggle  = 1
velset = 0,0
anim = 1255
ctrl = 0
sprpriority = -2

[State 0, Turn]
type = Turn
trigger1 = time=0 && numexplod(1257)=0

[State 0, turn detector]
type = Explod
trigger1 = time=0
anim = 888
ID = 1257
pos = 0,0
removetime = 40



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

[State 1200, 10]
type = posadd
trigger1 = time = 0
x = 20


[State 0, Explod]
type = Explod
trigger1 = 1
anim = 10004
ID = 10004
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
removetime = -2;- odin raz; "-1" forever
pausemovetime = 0
scale =.5,.3
sprpriority = 7
ontop = 0
ownpal = 1
removeongethit = 0
trans=add
random=0,5




[State 1200, BoltFat]
type = hitdef
trigger1 = !movecontact
attr = A, NP
affectteam = F
damage    =160, 4
animtype = light
air.animtype = Back
hitflag = MAF
guardflag = M
pausetime = 0,0
sparkno = -1
sparkxy = 0,0;20,-30
guard.sparkno = -1
hitsound   = 5,17
guardsound = 5,14
ground.type = low
ground.velocity = -14,-5
air.fall=1
air.velocity =-14,-5
air.juggle = 1
ground.hittime = 18
air.hittime = 12
guard.slidetime = 12
guard.dist = 160
yaccel = 1
p2facing = 1
kill       = (enemy,Var(9) = 0)
fall.kill  = (enemy,Var(9) = 0)
guard.kill = (enemy,Var(9) = 0)
fall=0


[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value =1256
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 





[State 1000, 0.1]
type = Destroyself
trigger1 = FrontEdgeDist < -200
;trigger2 = movecontact >20
trigger2 = time >100

;--------------------------------------------;-------------------------------------------------------------------
;front middle kick
[StateDef 1300]
type    = A
movetype= A
physics = N
juggle  = 4
ctrl = 0
anim = 1300

;[State 2, Roundhouseblood];deldel
;type = Helper
;trigger1 = numhelper(29) < 1
;ID = 29
;stateno = 29+(p2name = "motaro")
;pos = 0, 0
;postype = p1
;persistent = 0
;ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =10
value = F5,153;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
;lowpriority = -1
;abspan = 
;ignorehitpause = 
;persistent = 


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

[State 0, x]
type = Veladd
trigger1 = animelem =11,<0
y=.3


[State 0, PosSet]
type = PosSet
trigger1 = animelem =11,=0
y = var(57)

[State 0, VelSet]
type = VelSet
trigger1 = animelem =11,=0
x = 0
y = 0


[State 240, 2]
type = HitDef
trigger1 = p2stateno != 9010
trigger1 = !movecontact
attr = S, SA
animtype  = Back
damage    = 250, 20
guardflag = HL
hitflag = HLAF
pausetime = 0,0
sparkno = -1
;sparkxy = -55,-95
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14
ground.type = High
ground.slidetime = 30
p2facing = 1
guard.ctrltime = 12
guard.slidetime = 12
ground.hittime  = 12
ground.velocity = -8,-5            
air.velocity = -8,-5      
air.hittime = 12  
ground.cornerpush.veloff = -15
fall.recover = 0
envshake.time = 15
envshake.freq = 70
envshake.ampl = 7
yaccel = 0.5
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
priority = 1, Miss
p2stateno = 1310
hitonce=1

[State 240, 2]
type = HitDef
trigger1 = p2stateno = 9010
trigger1 = !movecontact
attr = S, SA
animtype  = Back
damage    = 0, 0
guardflag = HL
hitflag = MAF
pausetime = 0,0
sparkno = -1
;sparkxy = -55,-95
guard.sparkno = -1
hitsound = -1
guardsound = -1
ground.type = High
ground.slidetime = 30
p2facing = 1
ground.cornerpush.veloff = -0
fall.recover = 0
envshake.time = 0
envshake.freq = 0
envshake.ampl = 0
yaccel = 0.5
kill       =0
fall.kill  = 0
guard.kill = 0
priority = 1, Miss
p1stateno = 1320
p2stateno = 1330

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = moveguarded
movetype = I        ;I,A,H



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

;en
[Statedef 1310 ];--------------------------------------------------
type = A;CALU
movetype=H;IHU
physics=N;SCAU
velset=-10,0
ctrl=0
sprpriority=0
facep2=1

[State 0, SelfState]
type = SelfState
trigger1 = !alive
value =5030
;anim =
;ctrl =
;ignorehitpause = 0
;persistent = 1

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0



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

[State 0, hero]
type = Explod
trigger1 = time=0
anim = 5050
ID = 5050
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = -1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority = 1
removeongethit = 1

[State 240, 2]
type = HitDef
trigger1 = !movecontact
attr = S, SA
animtype  = Back
damage    = 100, 1
guardflag = MAF
hitflag = MAF
pausetime = 0,0
sparkno = -1
;sparkxy = -55,-95
guard.sparkno = -1
hitsound = 5,21
guardsound = 5,14
ground.type = High
ground.slidetime = 30
p2facing = -1
guard.ctrltime = 12
guard.slidetime = 12
ground.hittime  = 12
ground.velocity = 2,-5            
air.velocity = 2,-5       
air.hittime = 12  
ground.cornerpush.veloff = 0
fall.recover = 0
envshake.time = 15
envshake.freq = 70
envshake.ampl = 7
yaccel = 0.5
kill       =0
fall.kill  = 0
guard.kill = 0
priority = 1, Miss
hitonce=1
affectteam = F          ;B,E,F




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

[State 1026, Hit wall]
type = ChangeState
;trigger1 = Pos y < 15
trigger1 = BackEdgeBodyDist <= 0
;trigger2 = Pos y < 15
trigger2 = FrontEdgeBodyDist <=0
trigger3 = time > 100
triggerall = time > 4
trigger4 = movecontact
value = 1311


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time > 100
id = 5050

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


[Statedef 1311];------------;---------------------------------------------------------------------------------
type    = A
movetype= H
physics = N

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


[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = 1
id = 5050
;
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0 
value = 5050

[State 0, HitFallSet]
type = HitFallSet
trigger1 = 1
value = 0

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0


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

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

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




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

;me f
[Statedef 1320];-------------------------------------------------------------------
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =0
value = f5,21
volumescale = 100


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = animtime= 0 && time<20
value = 0

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

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

[State 0, ChangeState]
type = ChangeState
trigger1 = enemy,stateno =1331
value =1321
ctrl = 0




;me black
[Statedef 1321];-------------------------------------------------------------------
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0
anim=888

[State 0, worldbg]
type = Explod
trigger1 = time=0
anim = 22222
ID = 22222
pos = 320,240
postype = left;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -1;"-2" odin raz; "-1" forever
scale = 20,20
sprpriority = 0
ownpal = 1
removeongethit = 0



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

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



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

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




[State 0, PosSet]
type = PosSet
trigger1 = time = 0
x = 0
y = var(57)

[State 0, wall1]
type = Explod
trigger1 = time=0
anim = 1320
ID = 1320
pos = 0,100
postype = back;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = 0,0
removetime =100;"-2" odin raz; "-1" forever
scale = .9,.9
sprpriority = 7
ownpal = 1

[State 0, wall1]
type = ModifyExplod
trigger1 = time>30
ID =1320
pos = 0-((time-30)*4),100
postype = back; ;p2,front,back,left,right

[State 0, bg1]
type = Explod
trigger1 = time=0
anim = 1330
ID = 1330
pos = 50,230
postype = back;  p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1; -1 forever
vel = 0,0
removetime =1100;"-2" odin raz; "-1" forever
scale = 1.2,1.1
sprpriority =1
ownpal = 1

[State 0, bg1]
type = ModifyExplod
trigger1 = time>30
ID =1330
pos = 50-((time-30)*4.5),230
postype = back; ;p2,front,back,left,right



[State 0, wall2]
type = Explod
trigger1 = time=70
anim = 1320
ID = 13202
pos = 0,100
postype = front;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel =-10*facing,0
removetime =200;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority = 7
ownpal = 1

[State 0, bricks boom]
type = Helper
trigger1 = time=1
trigger2 = time=83
name = "bricks"
ID = 1329
stateno = 1329
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0




[State 0, ChangeState]
type = ChangeState
trigger1 = enemy,stateno=1332
value =1322
ctrl = 0



;me tower
[Statedef 1322];-------------------------------------------------------------------
type    = S
movetype= I
physics = S
ctrl = 0
velset = 0,0
anim=888



[State 0, PosSet]
type = PosSet
trigger1 = time = 0
x = 0
y = var(57)


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



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

[State 0, glass boom]
type = Helper
trigger1 = time=0
name = "glass"
ID = 1328
stateno = 1328
pos = 90,var(57)-100
postype = back    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, wall_outside]
type = Explod
trigger1 = time=0
anim = 1350
ID = 1350
pos = 0,0
postype = back;  p2,front,back,left,right
bindtime = -1; -1 forever
vel =0,0
removetime =-1;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority =3
ownpal = 1


[State 0, world]
type = Explod
trigger1 = time=0
anim = 1331
ID = 1331
pos = 160,100
postype = left;  p2,front,back,left,right
bindtime = -1; -1 forever
vel =0,0
removetime =-1;"-2" odin raz; "-1" forever
scale = 1.2,1.2
sprpriority =1
ownpal = 1


[State 0, invis]
type = VarSet
trigger1 = 1;enemy,stateno=3012	
v =    26
value = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = time=10;enemy,stateno=3012
value =0
ctrl = 1
;anim =
;ignorehitpause = 
;persistent = 



;me helper glass+corps
[Statedef 1328];-------------------------------------------------------------------
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim=888
sprpriority=0

[State 0, glass]
type = PlaySnd
trigger1 = time=0
value = f2,8;F=common snd
volumescale = 50
loop=1

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

[State 0, holesub]
type = Explod
trigger1 = time=0
anim = 1341
ID = 1341
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -1;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 6
ontop = 0
ownpal = 1
removeongethit = 0

[State 0, hole]
type = Explod
trigger1 = time=0
anim = 1340
ID = 1340
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -1;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 1,1
sprpriority = 4
ontop = 0
ownpal = 1
removeongethit = 0

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






[State 7100, blood]
type = Explod
trigger1 = time=0
anim = F7231+100*(root,numexplod(123) > 0)+200*(root,numexplod(321) > 0)
postype = p1
sprpriority = 4
pos=-40,0



[State 7100, bone]
type = Explod
trigger1 = 1
anim = F1054
postype = p1
pos=0,0
vel = -(random/100),-(random/100)/1.5
accel=0, ifelse(random>500,.2,.3)
scale=1,1
random=20,20
angle=random/3
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
removetime=100
sprpriority =  5





[State 7100, glass]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1332,1333)
postype = p1
pos=0,0
vel = -(random/100)/2,-(random/100)/2
accel=0,.2
scale= ifelse(random>500,.6,.3),ifelse(random>500,.6,.3)
random=20,60
angle=random/3
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
removetime=100
sprpriority =  5
trans=add

[State 7100, glass]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1332,1333)
postype = p1
pos=5,5
vel = -(random/100)/2,-(random/100)/2
accel=0,.1
scale=.1,.1
random=40,80
angle=random/3
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
removetime=100
sprpriority =  5
trans=add







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


;me helper bricks
[Statedef 1329];-------------------------------------------------------------------
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim=888

[State 0, stoneGAME]
type = Projectile
trigger1 =1
projanim = ifelse(random>500,1055,1056)
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremove = 1
velocity =  -(random/100),-(random/100)
remvelocity = 0,0
accel = 0,0.4
offset = 0,-60
postype = p1
projsprpriority = 6
projscale = 1,1

[State 0, stoneGAME]
type = Projectile
trigger1 =1
projanim = ifelse(random>500,1055,1056)
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremove = 1
velocity =  -(random/100),-(random/100)
remvelocity = 0,0
accel = 0,0.4
offset = 0,-60
postype = p1
projsprpriority = 6
projscale = 1,1

[State 0, stoneGAME]
type = Projectile
trigger1 =1
projanim = ifelse(random>500,1055,1056)
projhitanim = -1
projremanim = -1
projcancelanim = -1
projremove = 1
velocity =  -(random/100),-(random/100)
remvelocity = 0,0
accel = 0,0.4
offset = 0,-60
postype = p1
projsprpriority = 6
projscale = 1,1

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

[State 0, boom UP]
type = Explod
trigger1 = time=0
anim = 20020
ID = 20020
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -1,-2
accel=.2,0
removetime = -2;"-2" odin raz; "-1" forever
scale = 2,2
sprpriority = 6
ownpal = 1
trans=add
random=20,20
angle=random/3

[State 0, boom >]
type = Explod
trigger1 = time=0
anim = 20020
ID = 20020
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -4,0
accel=.2,0
removetime = -2;"-2" odin raz; "-1" forever
scale = 2,2
sprpriority = 6
ownpal = 1
trans=add
random=20,20
angle=random/3

[State 0, boom V]
type = Explod
trigger1 = time=0
anim = 20020
ID = 20020
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -1,2
removetime = -2;"-2" odin raz; "-1" forever
scale = 2,2
accel=.2,0
sprpriority = 6
ownpal = 1
trans=add
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.1,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority =  6
ownpal = 1
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.1,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority = 6
ownpal = 1
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.1,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority = 6
ownpal = 1
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 = 1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.3,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority = 6
ownpal = 1
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 =1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.2,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority =  6
ownpal = 1
random=20,20
angle=random/3

[State 0, boom brick]
type = Explod
trigger1 =1
anim =  ifelse(random>500,1322,1321)
ID = 1322
pos = -20,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
vel = -(random/100),-(random/100)
accel=.2,.3
removetime = 100;"-2" odin raz; "-1" forever
scale =  ifelse(random>500,-.5,1), ifelse(random>500,-.5,1)
sprpriority = 6
ownpal = 1
random=20,20
angle=random/3


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


;en fly
[Statedef 1330 ];------------------------------------------------;---------------------------------------------------------------------
type = A;CALU
movetype=H;IHU
physics=N;SCAU
velset=-10,0
ctrl=0
sprpriority=5
facep2=1

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

[State 1026, No scroll]
type = ScreenBound
trigger1 = BackEdgeBodyDist < 65
trigger2 = FrontEdgeBodyDist < 65
triggerall=time>20
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
;trigger1 = Pos y < 15
trigger1 = BackEdgeBodyDist <= 0
;trigger2 = Pos y < 15
trigger2 = FrontEdgeBodyDist <=0
trigger3 = time > 100
triggerall = time > 4
trigger4 = movecontact
value = 1331


;en fly black
[Statedef 1331 ];----------------------------------------------;-----------------------------------------------------------------------
type = A;CALU
movetype=H;IHU
physics=N;SCAU
ctrl=0
sprpriority=4
velset=0,0

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

[State 0, PosSet]
type = Posset
trigger1 = time=1
x = 140*facing

[State 0, VelSet]
type = VelSet
trigger1 = time > 10
x = -8

[State 0, VelSet]
type = VelSet
trigger1 = pos x = [-10,10]
x =0

[State 0, hit wall]
type = ChangeAnim
trigger1 = time=1
trigger2 = time=83
value = anim

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time=83
value = 3,0
volumescale = 100


[State 0, AVATAR]
type = Explod
trigger1 = time=160
anim = 9100
ID = 91001
pos = -100,0
postype = back;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = 8,0
accel = 0,0
removetime = -1;"-2" odin raz; "-1" forever
scale = 1,4.3
sprpriority = 3
ontop = 0
ownpal = 1



[State 0, ChangeState]
type = ChangeState
trigger1 = time = 180
value =1332
ctrl = 0



;en tower
[Statedef 1332 ];----------------------------------------------;-----------------------------------------------------------------------
type = S;CALU
movetype=H;IHU
physics=N;SCAU
ctrl=0
sprpriority=4
velset=0,0



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


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

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

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

[State 0, AVATAR]
type = Explod
trigger1 = time=0
anim = 9100
ID = 9100
pos =  ifelse(facing=-1,20,-130),0
postype = front;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = 0,0
accel = 0,0
removetime = -1;"-2" odin raz; "-1" forever
scale = 2.3,4.3
sprpriority = 3
ontop = 0
ownpal = 1

[State 0, head]
type = Explod
trigger1 = time=1
anim = 43051
ID = 43051
pos =  ifelse(facing=-1,70,-80),120
postype = front;  p2,front,back,left,right
bindtime = 1; -1 forever
vel = 4*-facing,-6
accel = 0,.4
removetime = 100;"-2" odin raz; "-1" forever
sprpriority = 4
ownpal = 0
angle=random/3

[State 0, body]
type = Explod
trigger1 = time=1
anim = 43054
ID = 43054
pos = ifelse(facing=-1,70,-80),120
postype = front;  p2,front,back,left,right
bindtime = 1; -1 forever
vel = 2*-facing,-11
accel = 0,.5
removetime = 100;"-2" odin raz; "-1" forever
sprpriority = 4
ownpal = 0
angle=random/3

[State 0, ryk]
type = Explod
trigger1 = time=1
anim = 43052
ID = 43052
pos = ifelse(facing=-1,70,-80),120
postype = front;  p2,front,back,left,right
bindtime = 1; -1 forever
vel = 1*-facing,-5
accel = 0,.5
removetime = 100;"-2" odin raz; "-1" forever
sprpriority = 4
ownpal = 0
angle=random/3

[State 0, nog]
type = Explod
trigger1 = time=1
anim = 43053
ID = 43053
pos = ifelse(facing=-1,70,-80),120
postype = front;  p2,front,back,left,right
bindtime = 1; -1 forever
vel = 3*-facing,-2
accel = 0,.1
removetime = 100;"-2" odin raz; "-1" forever
sprpriority = 4
ownpal = 0
angle=random/3

[State 0, dead]
type = ChangeState
trigger1 = time = 2
value =3012
ctrl = 0


; B O M B !
[Statedef 1400];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1400



[State 0, fatality]
type = ChangeState
trigger1 = p2stateno=9010
value =3900
ctrl = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =1
trigger2 = time =5
trigger3 = time =8
value =1400,3;F=common snd
volumescale = 100



[State 0, Helper]
type = Helper
trigger1 = time = 14
triggerall = fvar(4)>300; TELEPHONE
name = "snariad"
ID = 1401
stateno = 1401
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, VarSet]
type = VarSet
trigger1 = time > 10
trigger1 = numhelper(1401)>0
fv = 4    ;fv = 10
value = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =19
trigger1 = numhelper(1401)=0
value =1400,4;F=common snd
volumescale = 100

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

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




[Statedef 1401];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
velset = 0,15
ctrl = 0
sprpriority = 0
anim=1411

[State 0, contra]
type = ParentVarSet
trigger1 = time =0
fv = 4
value = 0

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


[State 0, PosSet]
type = PosSet
trigger1 = time=0
y = root,var(57)-300

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 20020
ID = 20020
pos = 0,-50
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = 1,1
random = 10,10
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .6,.6
sprpriority = 0
ontop = 0
ownpal = 1
removeongethit = 0
angle=random/3
trans = add



[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >root,var(57)
value =1402
ctrl = 0


[Statedef 1402];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority = 6
anim=1412

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


[State 0, Explod]
type = Explod
trigger1 =time >13
anim = 20020
ID = 20020
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = 0,-1
random = 60,10
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .4,.4
sprpriority =  ifelse(random>500,-2,7)
ontop = 0
ownpal = 1
removeongethit = 0
angle=random/3
trans = add


[State 0, PosSet]
type = PosSet
trigger1 = time=0
y = root,var(57)

[State 0, ChangeState]
type = ChangeState
trigger1 = time > 50
value =1403
ctrl = 0


[Statedef 1403];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority = 6
anim=1413

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

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 10
freq = 60;скорость 0 - 180
ampl = -4;смещение экрана вверх-низ
phase = 90
;ignorehitpause = 
;persistent = 


[State 0, boom]
type = Explod
trigger1 = time=0
anim = 10030
ID = 10030
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1; -1 forever
vel = 0,-.5
removetime = -2;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority = 7
ownpal = 1
trans = add

[State 0, boom]
type = Explod
trigger1 = time=0
anim = 20021
ID = 20021
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
vel = 0,1
removetime = -2;"-2" odin raz; "-1" forever
scale = 1.1,.6
sprpriority = 7
ownpal = 1
trans = sub

[State 0, boom]
type = Explod
trigger1 = time=0
anim = 20021
ID = 20021
pos = 0,-50
postype = p1;  p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
vel = 0,1
removetime = -2;"-2" odin raz; "-1" forever
scale = 1.5,1.5
sprpriority = 7
ownpal = 1
trans = sub

[State 0, boom]
type = Explod
trigger1 = time=0
anim = 10030
ID = 10030
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = -1
bindtime = 1; -1 forever
vel = 0,.5
removetime = -2;"-2" odin raz; "-1" forever
scale = 1.1,.6
sprpriority = 7
ownpal = 1
trans = add


[State 1000, 10]
type = HitDef
trigger1 = time=0
attr = S, SA
animtype  = back
damage    = 300, 10
priority =7
guardflag = F
hitflag = MAF
pausetime = 0,0
guard.pausetime=5,0
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,14 
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -3,-10
air.velocity = -1,-10+ifelse(p2movetype=H,6,0)
air.hittime = 12
yaccel = 0.375
fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
ground.cornerpush.veloff =0

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


;roll
[Statedef 1500];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = C
movetype= A
physics = S
velset = 0,0
ctrl = 0
sprpriority = 0
anim=10

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

[State 0, PosAdd]
type = PosAdd
trigger1 = anim =1500
x = 14
y = 0


[State 1000, 10]
type = HitDef
trigger1 = !movecontact
attr = C, SA
animtype  = back
damage    = 170, 20
priority =7
guardflag = HL
hitflag = MAF
pausetime = 0,0
guard.pausetime=0,0
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,14 
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -1,-18
air.velocity = -1-ifelse(p2movetype=H,10,0),-18+ifelse(p2movetype=H,15,0)
air.hittime = 12
yaccel = 0.5
fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
ground.cornerpush.veloff =2
p1stateno = 1501
guard.slidetime = 10              ;Values for guarded attack (def: ground.slidetime)
guard.ctrltime = 5               ;Time to regain control after guard (def: guard.slidetime)
guard.dist = 240

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 30
value =1501
ctrl = 0
anim=1503

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

[State 0, ChangeState]
type = ChangeState
trigger1 = moveguarded
value =1502
ctrl = 0


;hit
[Statedef 1501];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = C
movetype= I
physics = S
velset = 0,0
ctrl = 0
sprpriority = 0

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




[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time= 0 && anim != 1503
value = 1501

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time= 20 && anim = 1501
value = 1502

[State 0, PosAdd]
type = PosAdd
trigger1 = time< 6
x = 4

[State 0, PlaySnd]
type = PlaySnd
triggerall = animtime = 0 
trigger1= anim  =1502
trigger2= anim  =1503
value = F20,0;F=common snd
volumescale = 100


[State 0, ChangeState]
type = ChangeState
triggerall = animtime = 0 
trigger1= anim  =1502
trigger2= anim  =1503
value =0
ctrl = 1


;block
[Statedef 1502];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics = N
velset = -.5,-10
ctrl = 0
sprpriority = 0
anim = 1504

[State 0, VelAdd]
type = VelAdd
trigger1 = time>0
y = .4


[State 0, VelSet]
type = VelSet
trigger1 = pos y >var(57)-1
trigger1 = time > 4
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >var(57)-1
trigger1 = time > 4
y = var(57)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = pos y >var(57)-1
trigger1 = time > 4
value = F20,0;F=common snd
volumescale = 100

[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >var(57)-1
trigger1 = time > 4
value =12
ctrl = 1


;>> Z
[Statedef 1600];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
juggle  = 1
velset = 5,-.5
ctrl = 0
sprpriority = 0
anim=1600

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

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



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

[State 0, VelAdd]
type = VelAdd
trigger1 = time = 4
x =5


[State 0, VelAdd]
type = VelAdd
trigger1 = time >20
x= -2


[State 0, fire]
type = Explod
trigger1 = time>3
anim =  ifelse(random>500,2165,2164)
ID = 2165
pos = 60,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .4,.4
sprpriority = ifelse(random>500,-2,2)
ownpal = 1
angle=random/3
trans=add
random=30,11
vel=-1,0

[State 0, fire]
type = Explod
trigger1 = time>3
anim =  ifelse(random>500,2165,2164)
ID = 2165
pos = 60,-70
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .2,.2
sprpriority = ifelse(random>500,-2,2)
ownpal = 1
angle=random/3
trans=add
random=30,11
vel=-2,0



[State 1000, 10]
type = HitDef
trigger1 =!movecontact
attr = A, SA
animtype  = back
ground.type = High
damage    = 250, 2
priority =7
guardflag = HL
hitflag = MAF
pausetime = 0,0
guard.pausetime=0,0
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,14 
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -13,-7
air.velocity = -13,-7
air.hittime = 12
yaccel = 0.5
fall = 1
fall.recover = 0
kill       = (Var(9) = 0)
fall.kill  = (Var(9) = 0)
guard.kill = (Var(9) = 0)
ground.cornerpush.veloff =0

[State 0, ChangeState]
type = ChangeState
trigger1 = time > 22
;trigger2 = movehit && TeamMode = single 
value =1601
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = moveguarded
value =1602
ctrl = 0

;hit
[Statedef 1601];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= I
physics = N
juggle  = 1
ctrl = 0
sprpriority = 0
anim=1601
velset=7,0

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .2



[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >var(57)-1
value =1201
ctrl = 0

;block
[Statedef 1602];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= H
physics = N
velset =0,-6
ctrl = 0
sprpriority = 0
anim = 1602

[State 0, VelAdd]
type = VelAdd
trigger1 = time>0
y = .3


[State 0, VelSet]
type = VelSet
trigger1 = pos y >var(57)-1
trigger1 = time > 4
x = 0
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = pos y >var(57)-1
trigger1 = time > 4
y = var(57)

[State 0, PlaySnd]
type = PlaySnd
trigger1 = pos y >var(57)-1
trigger1 = time > 4
value = F20,0;F=common snd
volumescale = 100
channel = -1
freqmul = 1.0
loop = 0
pan = 0
;lowpriority = -1
;abspan = 
;ignorehitpause = 
;persistent = 


[State 0, ChangeState]
type = ChangeState
trigger1 = pos y >var(57)-1
trigger1 = time > 4
value =12
ctrl = 1



; HEALTH+
[Statedef 1700];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1400

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

[State 0, Helper]
type = Helper
trigger1 = time = 20
triggerall = fvar(4)>300; TELEPHONE
name = "Healer"
ID = 1705
stateno = 1705
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =22
trigger1 = numhelper(1705)=0
value =1400,4;F=common snd
volumescale = 100

[State 0, VarSet]
type = VarSet
trigger1 = numhelper(1705)>0
fv = 4    ;fv = 10
value = 0



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

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

; HEALTH generator
[Statedef 1705];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0
anim=888

[State 0, contra]
type = ParentVarSet
trigger1 = time =0
fv = 4
value = 0

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


[State 0, Helper]
type = Helper
trigger1 = time >0
name = "heal"
ID = 1706
stateno = 1706
pos = 0,-230
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
persistent = 6

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



; HEALTH item
[Statedef 1706];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
velset = 0, ifelse(random>500,4,6)
ctrl = 0
sprpriority = 0
anim=1700

[State 0, PosSet]
type = Posadd
trigger1 = time = 0
x = -25+(random/20)



[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
affectteam = B          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
ground.type = High      ;Low,Trip,None
damage = -30,0
pausetime = 0 ,0
;guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S1700,0
guardsound = S1700,0

;air.type = High
ground.slidetime = 0
;guard.slidetime = 0
ground.hittime = 0
;guard.hittime = 0
air.hittime = 20
;guard.ctrltime = 0
;guard.dist = 320
;yaccel = 0.5
ground.velocity = 0,0
;guard.velocity = 0
air.velocity = 0,0
;airguard.velocity = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;down.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;airguard.ctrltime = 0
;air.juggle = 0
;mindist = 0,0
;maxdist = 0,0
;snap = 0,0
sprpriority = 1
;p1facing = 

;p2facing = 
;p1stateno = 
;p2stateno = 
;p2getp1state = 1
;forcestand = 0
fall = 0
;air.fall = 0
;down.velocity = 0,0
;down.hittime = 0
hitonce = 1
kill = 0
guard.kill = 0
fall.kill = 0
numhits = 1
;getpower = 0,0
;givepower = 0,0
palfx.time = 0
;palfx.mul = 
;palfx.add = 
envshake.time = 0
;envshake.freq =
;envshake.ampl = 
;envshake.phase =
fall.envshake.time = 0
;fall.envshake.freq = 
;fall.envshake.ampl = 
;fall.envshake.phase =
;ignorehitpause = 
;persistent = 

[State 0, Explod]
type = Explod
trigger1 = movecontact
anim = 1701
ID = 1701
pos = 0,0
postype = p1;  p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority = 7
ownpal = 1
vel=0,3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = movecontact
trigger2 = pos y > root,var(57)+5
;ignorehitpause = 
;persistent = 

; HEALTH PORTAL
[Statedef 1707];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= i
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0
anim=888

[State 0, PalFX]
type = PalFX
trigger1 = TIME = 0
time = 10000
add = 200,000,200




[State 0, fire]
type = Explod
trigger1 = TIME<42
anim =  ifelse(random>500,2165,2164)
ID = 2165
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .3,.3
sprpriority = ifelse(random>500,-1,4)
ownpal = 0
angle=random/3
trans=add
random=70,4


[State 0, fire]
type = Explod
trigger1 = TIME<40
anim =  ifelse(random>500,2165,2164)
ID = 2165
pos = 0,0
postype = p1;  p2,front,back,left,right
facing = 1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = .2,.2
sprpriority = ifelse(random>500,-1,4)
ownpal = 0
angle=random/3
trans=add
vel=0,1
random=60,20

[State 0, DestroySelf]
type = DestroySelf
trigger1 = TIME > 70
;ignorehitpause = 
;persistent = 

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

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

[State 0, Helper]
type = Helper
trigger1 = time = 20
triggerall = fvar(4)>300; TELEPHONE
name = "sSs"
ID = 1755
stateno = 1755
pos = 0,var(57)-170
postype = front    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time =22
trigger1 = numhelper(1705)=0
value =1400,4;F=common snd
volumescale = 100

[State 0, VarSet]
type = VarSet
trigger1 = numhelper(1755)>0
fv = 4    ;fv = 10
value = 0



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

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


[Statedef 1755];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= A
physics = N
velset = -5,.4
ctrl = 0
sprpriority = 0


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =time= 0  
value = ifelse(facing=-1,1752,1750)




[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A,SA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
affectteam = b          ;B,E,F
animtype = light          ;light,medium,hard,back,up,diagup
ground.type = High      ;Low,Trip,None
damage = -30,0
pausetime = 0 ,0
;guard.pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S1700,0
guardsound = S1700,0
ground.slidetime = 0
air.hittime = 20
ground.velocity = 0,0
fall = 0
hitonce = 1
kill = 0
guard.kill = 0
fall.kill = 0
numhits = 1
palfx.time = 0
envshake.time = 0
fall.envshake.time = 0
p2stateno = 1756


[State 0, Explod]
type = Explod
trigger1 = movecontact
anim =  ifelse(anim=1750,1751,1753)
ID = 1751
pos = 0,0
postype = p1;  p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -2;"-2" odin raz; "-1" forever
scale = 1,1
sprpriority = 7
ownpal = 1
vel=0,-1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = movecontact
trigger2 = pos y > 5
trigger3 = time > 70
;ignorehitpause = 
;persistent = 

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

[State 0, contraGunset]
type = VarSet
trigger1 =1
fv = 20
value =  ifelse(fvar(20)=0,1,0)



[State 0, ChangeState]
type = selfState
trigger1 = 1
value =50
ctrl = 1


; RKO
[Statedef 1900];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0
anim=1900

[State 0, Explod]
type = Explod
trigger1 = time=0
anim = 888
ID = 8881888
pos = 0,0
postype = p1;  p2,front,back,left,right
bindtime = 1; -1 forever
removetime = -1;"-2" odin raz; "-1" forever
pausemovetime = 0

[State 0, whoosh]
type = PlaySnd
trigger1 = time =5
value = F5,15
volumescale = 100




[State 800, 1]
type = HitDef
Trigger1 = !movecontact
damage = 0
pausetime = 0,0
attr = S, NT  
hitflag = HAF 
priority = 1, Miss
hitsound =5,14
sparkno = -1          ;No spark
p2facing = 1 
p1stateno = 1901
p2stateno =  1910
numhits = 0
guard.dist = 0
fall = 1
fall.recover = 0
kill       = 1
fall.kill  = 1
fall.damage = ifelse((var(9) != 0 && p2life <= 150), (p2life-1), 150)
guard.kill = 1

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

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

[State 0, Turn]
type = Turn
trigger1 = pos y > var(57)+30
;ignorehitpause = 
;persistent = 


[State 0, SelfState]
type = SelfState
trigger1 = pos y > var(57)+30
value =5110





[Statedef 1901];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= A
physics = N
velset = -1,-9
ctrl = 0
sprpriority = 0


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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
y = .4

[State 0, hoosh]
type = PlaySnd
trigger1 = time =3
value = F5,153
volumescale = 100




[State 0, ChangeState]
type = ChangeState
trigger1 = pos y>var(57)+40
value =1903
ctrl = 0
;anim =
;ignorehitpause = 
;persistent = 

 
;BIG
[Statedef 1903];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0
anim =888

[State 0, worldbg]
type = Explod
trigger1 = time=0
anim = 22222
ID = 22222
pos = 320,240
postype = left;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
removetime = -1;"-2" odin raz; "-1" forever
scale = 20,20
sprpriority = 0
ownpal = 1
removeongethit = 0

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

[State 0, aaaaa]
type = PlaySnd
trigger1 = time =10
value = 1900,1;F=common snd
volumescale = 200
channel=2

[State 0, bone]
type = PlaySnd
trigger1 = time =15
trigger2 = time =25
trigger3 = time =30
value = f5, ifelse(random>500,18,16)
volumescale = 200

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
x = 0
y = var(57)

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

;[State 0, TargetDrop]
;type = TargetDrop
;trigger1 = time = 0
;excludeID = -1
;keepone = 1

[State 7100, HERO+SKELET]
type = Explod
pos = 0,-0
trigger1 =time = 0
anim = 1902
postype = p1
sprpriority =  1
scale=1.22,1.2
removetime = -2
id=1010101


[State 7100, blood]
type = Explod
pos = 70,-40
trigger1 =time = [10,15]
anim = F7230+100*(numexplod(123) > 0)+200*(numexplod(321) > 0)
postype = p1
sprpriority =  1
scale=1.5,1.5
removetime = -2
trans=add
angle=random


[State 0, bone]
type = Explod
trigger1 =time > 11 && numexplod(1903)<20
anim = 1903
ID = 1903
pos = 70,-40
postype = p1;  p2,front,back,left,right
facing = 1;1-2*(random%2)
vfacing = 1
bindtime = 1; -1 forever
vel = (random-500)/100,  ifelse(random>500,-2,-1)
removetime = -1;"-2" odin raz; "-1" forever
pausemovetime = 0
scale =  ifelse(random>500,.5,1), ifelse(random>500,1,.7)
sprpriority = 5
ownpal = 0
angle=random/3
random=60,20

[State 0, EnvShake]
type = EnvShake
trigger1 =animelem=4,=1
time = 100
freq = 60;скорость 0 - 180
ampl = -2;смещение экрана вверх-низ
phase = 90


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




[Statedef 1904];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = A
movetype= I
physics = N
velset = 0,0
ctrl = 0
sprpriority = 0
anim =1901

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

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


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



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

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


[State 7100, blood]
type = Explod
pos = 40,-10
trigger1 =time=1
anim = F7215+100*(numexplod(123) > 0)+200*(numexplod(321) > 0)
postype = p1
sprpriority =  7
scale=1,1
removetime = -2

[State 7100, blood]
type = Explod
pos = 40,-10
trigger1 =time=1
anim = F7246+100*(numexplod(123) > 0)+200*(numexplod(321) > 0)
postype = p1
sprpriority =  7
scale=.4,1.5
removetime = -2


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



[State 0, ChangeState]
type = ChangeState
trigger1 = time = 20 
value =5120
ctrl = 0




[Statedef 1910];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 1910

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



[Statedef 1911];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= H
physics = N
ctrl = 0
sprpriority = -1
velset=0,0

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


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

[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = var(57)

;





;[State 0, PosAdd]
;type = PosAdd
;trigger1 = time = 0
;x = -40
;
;[State 0, PosAdd]
;type = PosAdd
;trigger1 = animelem=2,=0
;y = -90
;
;[State 0, VelAdd]
;type = Velset
;trigger1 = animelem=2,=0
;x = -2
;y = -4
;
;[State 0, VelAdd]
;type = VelAdd
;trigger1 = animelem=2,>0
;y = .4
;
;
;[State 0, VelSet]
;type = VelSet
;trigger1 = animelem=2,>0
;trigger1 = pos Y >-30
;x = 0
;y = 0
;
;[State 0, PosSet]
;type = PosSet
;trigger1 = animelem=2,>0
;trigger1 = pos Y > -30
;y = 0
;
;[State 0, SelfState]
;type = SelfState
;trigger1 = animelem=2,>0
;trigger1 = pos Y > -30
;value =5110

[Statedef 1912];-------------------------------------------------------------------;-------------------------------------------------------------------
type    = S
movetype= H
physics = N
ctrl = 0
sprpriority = -1
velset=0,0

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



[State 0, PosSet]
type = PosSet
trigger1 = time = 0
y = var(57)

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



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

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


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

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

[StateDef 1999]
type    = U
movetype= H
physics = N
ctrl = 0

[State 1000, BounceOff]
type = selfState
trigger1 = prevstateno != 1999
value = 1999



[State 1000, gun]
type = selfState
trigger1 = anim = 1004
value = 1002

[State 1000, gunair]
type = selfState
trigger1 = anim = 1255
value = 1257


[State 1000, contra]
type = selfState
trigger1 = anim = 1012
value = 1014


[State 1000, BounceOff]
type = destroyself
trigger1 = ishelper && root,stateno >= 0

[State 1000, BounceOff]
type = selfState
trigger1 = time = 30 || animtime = 0
value = 0
ctrl = 1


