;----------------------------------------------------------------
;freeze bitch
[Statedef 6000]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 6000
sprpriority = 2

[State 0, SubID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2100
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = time = 6
helpertype = Normal
ID = 7000
name = "chill out" 
postype = p1
pos = ceil(95*2*const(size.xscale)),ceil(-82*2*const(size.yscale))
stateno = 7000
ownpal = 1
scale = const(size.xscale),const(size.yscale)
;--------------------------------------
[State 0,brillo]
type = Explod
trigger1 = time = 6
anim = 7018
id = 7018
Postype = p1
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1
[State 0,brillo]
type = Explod
trigger1 = time = 6
anim = 7018
id = 7018
Postype = p1
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1
;------------------------------

[State end]
type = changestate
trigger1 = var(2) >= 2
value = 6001

[State end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;..............................
[Statedef 6001]
type    = S
movetype= H
physics = N
velset = 0,0

[State 0, PosAdd]
type = PosAdd
trigger1 = !(time % 6)
trigger1 = time = [0,15]
x = 3

[State 0, PosAdd]
type = PosAdd
trigger1 = time %6 = 1
trigger1 = time = [0,15]
x = -3

[State blackness]
type = palfx
trigger1 = !(time%1)
time = 1
ignorehitpause = 1
add = 70,70, 250

[State amination]
type = ChangeAnim
Trigger1 = 1
value = anim
elem = animelemno(0)

[State wallbanger]
type = ChangeState
Trigger1 = time = 190
ctrl = 1
value = 0
;----------------------------------------------------------------
;sliddedededededed
[Statedef 6002]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 9,0
anim = 6001
sprpriority = 2

[State end]
type = playsnd
trigger1 = !time
value = 1,1

[State end]
type = velset
trigger1 = (time = 26 || anim = 6002)
x = 0

[State ]
type = Hitdef
trigger1 = !movecontact
damage = 78,35
getpower = 200,100
givepower = 0,0
pausetime = 8,8
attr = A,NA
hitflag = MAFD
guardflag = LA
animtype = light
air.animtype = back
priority = 5, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = S0,3
guardsound = S0,7
ground.type = high
air.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -3, -7 
air.velocity = -3, -5
guard.velocity = -5
air.cornerpush.veloff = -7
ground.cornerpush.veloff = -7
yaccel = .5
fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)

[State end]
type = changeanim
trigger1 = movecontact
;ignorehitpause = 1
persistent = 0
value = 6002

[State ]
type = ChangeState
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1


[State end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
-;---------------------------------------------------------------
[Statedef 6099]
type    = S
movetype= H
physics = S
velset = 0,0

[State end] 
type = changeState
trigger1 = 1
value = 6099
;---------------------------------------
;sliddedededededed2
[Statedef 6003]
type    = S
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 6003
sprpriority = 2

[State 0, SubID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2100
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1000, 0.1]
type = Posset
trigger1 = Pos Y != 0
trigger1 = time = 0
Y = 0

[State end]
type = playsnd
trigger1 = !time
value = 1,7

[State ]
type = ChangeState
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1

[State ò_ó]
type = Explod
trigger1 = animelem = 3
anim = 7005
id = 7005
Postype = p1
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
bindtime = -1
removetime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State ò_ó]
type = removeExplod
trigger1 = animelem = 5
id = 7005

[State end]
type = velset
trigger1 = !animelemtime(3) || (!animelemtime(4) || movecontact)
x = ifelse(!animelemtime(3),12,0)

[State ]
type = Hitdef
trigger1 = !movecontact
damage = 130,35
getpower = 200,100
givepower = 0,0
pausetime = 10,10
attr = A,NA
guardflag = MA
animtype = light
air.animtype = back
priority = 5, hit
sparkno = -1;s7014
guard.sparkno = -1
sparkxy = 5, ceil(-71*const(size.yscale))
hitsound = S0,2
guardsound = S0,7
ground.type = high
air.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -7, -5 
air.velocity = -7, -5+fvar(1)
guard.velocity = -10
air.cornerpush.veloff = -7
ground.cornerpush.veloff = -7
yaccel = .5
fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)

[State ]
type = Helper
trigger1 = !time
helpertype = Normal
ID = 7010
name = "slide" 
postype = p1
pos = 0,0
stateno = 7010
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = movehit
helpertype = Normal
persistent = 0
ignorehitpause = 1
ID = 7012
name = "ntjisoerh" 
postype = p1
pos = ceil(70*2*const(size.xscale)),ceil(-71*2*const(size.yscale))
stateno = 7012
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1
;---------------------------------------------------------------
[Statedef 6099]
type    = S
movetype= H
physics = S
velset = 0,0

[State end] 
type = changeState
trigger1 = 1
value = 6099
;---------------------------------------
;air freeze
[Statedef 6004]
type    = A
movetype= A
physics = N
poweradd= 0
ctrl = 0
velset = 0,0
anim = 6004
sprpriority = 2

[State 0, SubID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2100
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = animelem = 4
helpertype = Normal
ID = 7013
name = "chill out" 
postype = p1
pos = ceil(50*2*const(size.xscale)),ceil(-110*2*const(size.yscale))
stateno = 7013
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0,brillo]
type = Explod
trigger1 = animelem = 4
anim = 70181
id = 7018
Postype = p1
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State 0, kitabrillo]
type = RemoveExplod
trigger1 = pos Y > -5
id = 70181
ignorehitpause = 1

[State end]
type = changestate
trigger1 = var(2) >= 2
value = 6005

[State ]
type = velset
trigger1 = animelem = 4
x = -2
[State ]
type = statetypeset
trigger1 = time = 6
physics = A

;---------------------------------------------------------------------------
;..............................
[Statedef 6005]
type    = A
movetype= H
physics = N
velset = 0,0

[State blackness]
type = palfx
trigger1 = !(time%1)
time = 1
ignorehitpause = 1
add = 70,70, 250

[State amination]
type = ChangeAnim
Trigger1 = 1
value = anim
elem = animelemno(0)
[State ]
type = hitfallset
Trigger1 = 1
value = 1

[State wallbanger]
type = ChangeState
Trigger1 = time = 190
value = 5030

;====================================================
;=================MIS Atakes=========================
;====================================================
;Ground Ice - sub zero
[StateDef 6006]
Type = S
Movetype = A
Physics = S
juggle = 4
poweradd = 50
anim = 6100
ctrl = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(12) = 1

[State 0, SubID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2100
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 6006, brillo]
type = Explod
trigger1 = animelem = 3
anim = 70188
id = 7018
Postype = p1
pos = ceil(0*const(size.xscale)),ceil(0*const(size.yscale))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State 700, 2]
type = helper
trigger1 = animelem = 3
triggerall = p2stateno != 7022
stateno = 6007
name = "Floor Ice"
id = 6007
pos = ceil(const(size.xscale)),ceil(const(size.yscale));5, -51
postype = p1
ownpal = 1
;sprpriority = 0
scale = const(size.xscale)*(ifelse(floor(pos Z) = -120,.53,1)),const(size.yscale)*(ifelse(floor(pos Z) = -120,.53,1))

[State 700,3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------
;Hielo en el suelo helper
[Statedef 6007]
type    = A
movetype= A
physics = N
poweradd= 0
anim = 6101
velset = 0,0
ctrl = 0
sprpriority = 2

[State -3, vapordesubpal1y7agachado]
type = Explod
trigger1 = TimeMod = 3,0
trigger1 = time > 17
anim = 70342
name = "Steam"
pos = 100*2*(root,const(size.xscale)*(1+root,fvar(2))),(root,const(size.yscale)*2*(1+root,fvar(2)))*-10
postype = p1
vel = 0, -1.3
random = 70*2*root,const(size.xscale)*(1+root,fvar(2)),30*2*root,const(size.yscale)*(1+root,fvar(2))
removetime = -2
ontop = 1
ownpal = 1
shadow = 0
removeongethit = 0
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))

[State 0, atras]
type = SprPriority
trigger1 = animelem = 6
value = -5
;------------------------- Brillo
[State ò_ó]
type = Explod
trigger1 = time < 25 ;>= 6 && !(time%3)
anim = 7003
id = 7003
Postype = p1
pos = 20*2*root,const(size.xscale)*(1+root,fvar(2)),-50*2*root,const(size.yscale)*(1+root,fvar(2))
random = 30*2*root,const(size.xscale)*(1+root,fvar(2)),0
sprpriority = 2
velocity = 0,2
ownpal = 1
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))

[State ò_ó]
type = Explod
trigger1 = time = [10,25] ;>= 6 && !(time%3)
anim = 7003
id = 7003
Postype = p1
pos = 45*2*root,const(size.xscale)*(1+root,fvar(2)),-37*2*root,const(size.yscale)*(1+root,fvar(2))
random = 30*2*root,const(size.xscale)*(1+root,fvar(2)),0
sprpriority = 2
velocity = 0,2
ownpal = 1
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))

[State ò_ó]
type = Explod
trigger1 = time = [15,25] ;>= 6 && !(time%3)
anim = 7003
id = 7003
Postype = p1
pos = 70*2*root,const(size.xscale)*(1+root,fvar(2)),-25*2*root,const(size.yscale)*(1+root,fvar(2))
random = 30*2*root,const(size.xscale)*(1+root,fvar(2)),0
sprpriority = 2
velocity = 0,2
ownpal = 1
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))
;----------------------------

[State sound]
type = PlaySnd
triggerall = root,var(21) != 1
trigger1 = !time
freqmul = .7
value = 1, 2
[State soundMK2]
type = PlaySnd
triggerall = root,var(21) = 1
trigger1 = !time
;freqmul = .7
value = 1, 34

[State ]
type = ChangeState
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1

[State don't playa hate]
type = playerpush
trigger1 = 1
value = 0

[State ]
type = assertspecial
trigger1 = 1
flag = noshadow
flag2 = unguardable

[State 2020, 4]
Type = Changestate
trigger1 = MoveGuarded = 1
trigger2 = p2stateno = 9010
trigger2 = animelem >= 6
trigger3 = p2stateno = 9999
trigger3 = animelem >= 6
trigger4 = p2stateno = 7022
value = 6011

[State 2020,1]
type = Hitdef
trigger1 = !movecontact
attr = A,SP
guardflag = M
animtype = heavy
air.animtype = back
priority = 5, hit
affectteam = B
sparkno = -1
sparkxy = -10,-60
guardsound = 6,0
guard.ctrltime = 30
p2stateno = 6008
p1stateno = 6012
fall = 0
numhits = 0

[State 0,bye]
type = ChangeAnim
trigger1 = time = 350
trigger2 = numhelper(7021)
value = 6102

[State 2020, 5]
type = Destroyself
trigger1 = anim = 6102 && !animtime
;-------------------------------------
;Someone's Slipping!
[Statedef 6012]
type    = S
movetype= A
physics = N
velset = 0,0
;anim = 2021
ctrl = 0
sprpriority = -10

[State -3, vapordesubpal1y7agachado]
type = Explod
trigger1 = TimeMod = 3,0
anim = 70342
name = "Steam"
pos = 100*2*(root,const(size.xscale)*(1+root,fvar(2))),(root,const(size.yscale)*2*(1+root,fvar(2)))*-10
postype = p1
vel = 0, -1.3
random = 70*2*root,const(size.xscale)*(1+root,fvar(2)),30*2*root,const(size.yscale)*(1+root,fvar(2))
removetime = -2
ontop = 1
ownpal = 1
shadow = 0
removeongethit = 0
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))

[State 2021, 1]
type = Changeanim
trigger1 = time = 0
value = 6103

[State 2021, 3]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 2021, bye]
Type = Changestate
trigger1 = (target,stateno != [6008,6010]) && (parent,stateno != [6008,6010]) && (enemynear,stateno != [6008,6010])
trigger2 = time >= 96
trigger3 = p2stateno = 7022 && numhelper(7021) = 0
value = 6011
;------------------------------ Enemygo resbalandose
[Statedef 6008]
type = S
movetype= H
physics = N
ctrl = 0
velset = 0
sprpriority = 5

[State 1521, resbalNOcompatibles]
type = Changeanim
trigger1 = !time
trigger1 = !SelfAnimExist(9108109)
value = 5000

[State 1521, resbalaSIcompatibles]
type = Changeanim
trigger1 = time = 1
trigger1 = SelfAnimExist(9108109) = 1
value = 9108109

[State 1521, resbalaSubzero]
type = Changeanim
trigger1 = !time
triggerall = name = "Juano`s Sub guy"
trigger1 = SelfAnimExist(29900)
value = 29900

[State 0, resbalandose]
type = PlaySnd
triggerall = name = "Juano`s Sub guy"
trigger1 = !time
value = S2,14
channel = 0

[State 1521, 3]
type = PosSet
trigger1 = time = 0
Y = 0

[State 1521, 4]
type = ChangeState
trigger1 = time = 1
value = ifelse(vel X >= 0,6009,6010)
;----------------------------------------
;P2 Slipping Forward
[Statedef 6009]
type    = S
movetype= H
physics = N
velset = 0.5,0
ctrl = 0
sprpriority = 5

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

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

;-----------------------------------------------
;P2 Slipping BackWard
[Statedef 6010]
type    = U
movetype= H
physics = N
velset = -0.5,0
ctrl = 0
sprpriority = 5

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

[State 1523, 1]
type = SelfState
trigger1 = time > 96
value = 0
ctrl = 1
;-----------------
;Bye Floor Ice
[Statedef 6011]
type    = S
movetype= A
physics = N
velset = 0,0
;anim = 4002
ctrl = 0
sprpriority = -10

[State 2022, 1]
type = Changeanim
trigger1 = time = 0
value = 6102

[State 2022, 2]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 2022, 3]
type = Destroyself
trigger1 = AnimTime = 0

;---------------------------------------------------------
;tira acido - reptile
[StateDef 6013]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 6104
poweradd = 20

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, carareptile]
type = Explod
trigger1 = anim = 6104 && !time
anim = 61042
ID = 61042
sprpriority = 5
shadow = 0
ownpal = 1
removeongethit = 1
bindtime = -2
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))

[State 1200, Acid Spit]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1,15

[State 1200, Start]
type = Explod
trigger1 = AnimElem = 2
anim = 6105
;pos = 0, 0
postype = P1
BindTime = -1
sprpriority = 2
shadow = -1
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = 2*ceil(const(size.xscale)),2*ceil(const(size.yscale))

[State 6013, lanza acido]
type = Projectile
trigger1 = AnimElem = 3
projanim = 6106
projhitanim = 6107
projid = 6107
velocity = 11
attr = S, SP
damage   = 55,35
animtype = heavy
guardflag = MA
hitflag = MAFDP
sparkxy = 500,500
animtype = Hard
air.animtype = Back
air.fall = 1
guardflag = MA
pausetime = 0,3
sparkno = -1
guard.sparkno = -1
hitsound   = 1,16
ground.type = High
ground.slidetime = 14
ground.hittime  = 26
ground.velocity = -7
air.velocity = -2.5,-5
air.juggle = 3
air.recover = 0
kill = var(4)
fall = 0
guard.kill = var(4)
projscale = const(size.xscale),const(size.yscale)
offset = (const(size.xscale))*(-30),-50
afterimage.time = 60
afterimage.length = 10

[State 6013, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;==============================================================
;--------------- Harpon - Scorpion ----------------------------
[Statedef 6014]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 7044
ctrl = 0

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 1000, 0.1]
type = Posset
trigger1 = Pos Y != 0
trigger1 = time = 0
Y = 0

[State 1000, 1]
type = Helper
trigger1 = animelem = 4
stateno = 6015
name = "Harpoon"
id = 6015
postype = p1
pos = 0,-95*2*const(size.yscale)
helpertype = normal
sprpriority = -1
keyctrl = 0
ownpal = 1
under = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))

[State 1000, stand]
type = ChangeState
trigger1 = Time >= 70
;trigger1 = enemy,stateno != 6020 && enemy,stateno != 6021
value = 0
ctrl = 1

[State 1000, Lojala]
type = Changestate
trigger1 = enemy,stateno = 6021
trigger2 = enemy,stateno = 6020 && time > 60
value = 6018
;---------------------------------------------------------------------------
;PULL EM IN
[Statedef 6018]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 7046
ctrl = 0

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1001, 3.2]
type = VarRandom
trigger1 = !time
v = 15
range = 0,1

[State 1001, comehere]
type = Playsnd
triggerall = !var(21)
trigger1 = time = 1
value = 1,ifelse((var(15) = 0),19,20)

[State 1001, cham]
type = Playsnd
triggerall = var(21) = 1
trigger1 = time = 1
value = 1,ifelse((var(15) = 0),36,37)

[State 1001, 7]
type = ChangeState
trigger1 = (enemy,stateno = 6017) &&  time > 12
trigger2 = time > 50
value = 0
ctrl = 1

;------------------------------------------------
;HARPOON ITSELF
[Statedef 6015]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 8,0
anim = 7045
ctrl = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = parent,var(12) = 5
var(12) = 0

[State 0, ParentVarAdd]
type = ParentVarAdd
trigger1 = !time
var(12) = 1

[State 1010, 1]
type = Playsnd
trigger1 = time = 0
value = 1,ifelse(!root,var(21),18,38)
volume = ifelse(!root,var(21),0,255)

[State 1010, 1.55]
type = Helper
trigger1 = timemod = 4,0
trigger1 = time = [0, 60]
stateno = 6016
ID = 6016
name = "Rope"
helpertype = normal
sprpriority = -2
keyctrl = 0
ownpal = 1
under = 1
scale = root,const(size.xscale),root,const(size.yscale)
pos = (ceil(const(size.xscale)))*2*(-10),0

[State 1010, 2]
type = HitDef
trigger1 = parent,var(12) <= 3
numhits = 0
damage    = 25,5
attr = A,SP
guardflag = M
animtype = heavy
air.animtype = back
priority = 5, hit
;sparkxy = const(size.head.pos.x),ceil((const(size.head.pos.y)+(20))*const(size.yscale))
hitsound   = S0,5
guardsound = 0,7
kill = 0
guard.slidetime = 20              ;Values for guarded attack (def: ground.slidetime)
guard.ctrltime = 10               ;Time to regain control after guard (def: guard.slidetime)
p1stateno = 6022
p2stateno = 6020

[State 1010, 4]
type = Changestate
trigger1 = MoveGuarded = 1
value = 6019

[State end]
type = destroyself
trigger1 = frontedgedist <= -250
;---------------------------------------------------------------------------
;The Rope Animating the hidden Rope
[Statedef 6016]
type    = A
movetype= I
physics = N
anim = 7049
ctrl = 0

[State 0, PosAdd]
type = null;PosAdd
trigger1 = root,anim = 7046 && root,animelemtime(1) = 0
x = -8

[State 0, VelSet]
type = null;VelSet
trigger1 = parent,stateno = 6022 && parent,time < 16
x = ifelse(parent,time > 15,parent,vel X,0)

[State 1011, 1]
type = Changestate
trigger1 = parent,stateno = 6022 && rootdist X < 0
trigger2 = root,anim = 7046 && !root,animelemtime(3) && rootdist X >= 0
value = 6017

[State 1011, 2]
type = Destroyself
trigger1 = root, stateno != 6014 && root,stateno != 6018
trigger2 = !numhelper(6015)
;------------------------------------------------------------------------
;The Rope Becomes visible
[Statedef 6017]
type    = A
movetype= I
physics = N
anim = 7047
ctrl = 0

[State 0, PosAdd]
type = null;PosAdd
trigger1 = root,anim = 7046 && root,animelemtime(1) = 0
x = -8

[State 0, VelSet]
type = null;VelSet
trigger1 = parent,stateno = 6022 && parent,time < 16
x = ifelse(parent,time > 15,parent,vel X,0)

[State 1011, 1]
type = Destroyself
trigger1 = enemynear,stateno = 6021 || target,stateno = 6021 || p2stateno = 6021
trigger2 = Parentdist X = [-50, 10]
trigger2 = Parent, Vel X = -8
trigger3 = !numhelper(6015)
;------------------------------------------------------------------------
;MAKING THE HARPOON LESS CHEAP, IF HARPOON BLOCKED
[Statedef 6019]
type    = S
movetype= I
physics = N
anim = 7050
Velset = 0,0
ctrl = 0

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

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

[State 23, trans]
type = Trans
trigger1 = 1;time > 28
trans = addalpha
alpha=ceil(256-(time*8)),ceil(0+(time*8))

[State 1013, 1]
type = Destroyself
trigger1 = time = 30
;---------------------------------------------------------------------------
;PLAYER 2 is HIT BY HARPOON
[Statedef 6020]
type    = A;S
movetype= H
physics = N
ctrl = 0
velset = 0,0

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

[State 1020, .5]
type = Changeanim2
trigger1 = time = 0
value = 7051

;-------------------- jalado
[State 1020, subjalado]
type = Changeanim
triggerall = name = "Juano`s Sub guy" && anim != 29901
trigger1 = time = 45
value = 29901

[State 1020, compatiblejalado]
type = Changeanim
triggerall = name != "Juano`s Sub guy" && anim != 9108103
triggerall = selfanimexist(9108103)
trigger1 = time = 45
value = 9108103
;---------------------------------
[State 1020, 2]
type = null;Changestate
trigger1 = P2dist X = [-60, 60]
trigger1 = alive = 1 ;&& time > 50
value = 6021

[State 1020, 2]
type = selfstate
trigger1 = P2dist X = [-60, 60]
trigger1 = !alive
value = 5050

[State 1020, 3]
type = Selfstate
trigger1 = time = 400
trigger2 = p2movetype = H
trigger2 = p2dist X != [-60, 60]
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
;PLAYER 2 is Stun by harpoon
[Statedef 6021]
type    = S
movetype= H
physics = S
velset = 0,0
ctrl = 0

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

[State 1021, 1]
type = Changeanim
trigger1 = animexist(5300)
trigger1 = anim != 5300
trigger1 = time = 0
value = 5300

[State 1021, 1]
type = Changeanim2
trigger1 = !animexist(5300)
trigger1 = anim != 7052
trigger1 = time = 0
value = 7052

[State 1021, 3]
type = Selfstate
trigger1 = time = 150
value = 0
ctrl = 1
;--------------------------------------------------------------------------
;Harpoon latching onto target
[Statedef 6022]
type    = S
movetype= A
physics = N
juggle  = 1
anim = 7048
velset = 3
ctrl = 0

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

[State 0, TargetBind]
type = targetbind
trigger1 = target,stateno = 6020
time = 1
pos = 0,0

[State 0, TargetState]
type = TargetState
trigger1 = ParentDist X >= -40
value = 6021
persistent = 0

[State ]
type = Helper
trigger1 = time = 1
helpertype = Normal
ID = 7015
name = "bleed?"
postype = p2
ignorehitpause = 1
pos = enemynear,const(size.head.pos.x),ceil(enemynear,const(size.head.pos.y)*enemynear,const(size.yscale))
stateno = 7015
ownpal = 1
scale = const(size.xscale),const(size.yscale)
facing = -1
persistent = 0

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = parent,stateno !=6018
id = 7053
ignorehitpause = 1

[State 1030, 1.01]
type = Velset
trigger1 = time = 50
X = -8

[State 1030, 1.1]
type = Velset
trigger1 = ParentDist X >= -40
X = 0

[State 1030, 1.4]
type = Changeanim
trigger1 = target,stateno = 6021
triggerall = anim != 7049
trigger2 = target,stateno != 6020
value = 7049

[State 1030, 1.5]
type = Destroyself
trigger1 = target,stateno != 6021
trigger1 = anim = 7049
trigger1 = Parent, stateno != 6014 && stateno != 6018
trigger3 = time = 150
trigger2 = parent,movetype = H
;===============================================================
;============ TELEPORT PUNCH - SCORPION ========================
;---------------------------------------------------------------
;The Happy Teleport
[Statedef 6023] ;1040
type    = S
movetype= A
physics = N
juggle  = 1
anim = 7054
Velset = 0, 0
ctrl = 0

[State 0, VarAdd]
type = VarAdd
trigger1 = !time
var(12) = 1

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

;======================================= ermac
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 6,6
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 1,-4
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = -6,-5
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 5,-4
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 5,-3
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 2,5
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = -2,-2
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = -5,-4
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = -7,0
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State ò_ó]
type = Explod
trigger1 = !time && var(20) = 6
anim = 7081
id = 7003
Postype = p1
pos = 0,const(size.mid.pos.y)
random = 0,0
ontop = 1
velocity = 1,-1
ownpal = 1
scale = const(size.xscale),const(size.yscale)
;===============================================

[State 1050, 4.1]
type = HitDef
trigger1 = var(12) <= 3 && !movecontact
attr = A, SA
damage    = 50
animtype  = Heavy
getpower = 0
givepower = 50
guardflag = HA
priority = 7
pausetime = 3, 0
sparkxy = -10,-58
hitsound   = S0,2 ;5,2
guardsound = 6,0
ground.type = High
ground.slidetime = 45
ground.hittime  = 45
ground.velocity = -3
air.velocity = -4.7,-6.3
guard.slidetime = 10              ;Values for guarded attack (def: ground.slidetime)
guard.ctrltime = 5               ;Time to regain control after guard (def: guard.slidetime)
kill = var(4)
p2facing = -1

[State 1050, 6]
type = Changestate
trigger1 = MoveGuarded
value = 6027

[State 1040, 0.5]
type = Playsnd
trigger1 = time = 0
value = 1,21

[State 1040, 55]
type = Helper
trigger1 = !time
stateno = 6025
name = "After Image Clone"
postype = P1
helpertype = normal
sprpriority = 1
keyctrl = 0
ownpal = 0
under = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

[State 1040, 0.6]
type = ScreenBound
trigger1 = time = [1, 1000]
value = 0
movecamera = 0,0

[State 1040, 0.7]
type = Veladd
trigger1 = Pos Y < 0
Y = .29;.63

[State 1040, 1]
type = turn
trigger1 = animelem = 3

[State 1040, 2]
type = Velset
trigger1 = animelem = 3
X = ifelse(var(21) && (var(20) = 2 || var(20) = 5 || var(20) = 6),20,10)

[State 1040, 3]
type = null;Helper
triggerall = time > 9
trigger1 = FrontEdgedist = [0, 9]
trigger2 = BackEdgedist = [0, 9]
stateno = 6024;1045
name = "Clone"
postype = P1
helpertype = normal
sprpriority = -1
keyctrl = 0
ownpal = 0
under = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

[State 1040, 4]
type = Changestate
triggerall = time > 9
trigger1 = Pos X > 150
value = 6026

[State 1040, 5]
type = Changestate
triggerall = time > 9
trigger1 = Pos X < -150
value = 6026

[State 1040, 6.1]
type = Changestate
trigger1 = Pos Y > 0
value = 6027

[State 1040, 7]
type= Changestate
trigger1 = time > 22
trigger1 = Pos Y = 0
value = 0
ctrl = 1
;------------------------------------------------------------------------------------------
;DISAPPEAR
[Statedef 6024]
type    = S
movetype= I
physics = N
anim = 7055
Velset = 0, 0
ctrl = 0

[State 1045, 1]
type = turn
trigger1 = time = 0

[State 1045, 3]
type = Destroyself
trigger1 = animtime = 0
;------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------
;DISAPPEAR STANDING
[Statedef 6025]
type    = A
movetype= I
physics = N
Velset = 0, 0
ctrl = 0

[State ]
type = ChangeAnim
trigger1 = !time
value = ifelse(pos Y < -5,7055,ifelse(parent,var(20) = 5,70560,7056))

[State 1045, 3]
type = Destroyself
trigger1 = !animtime
;------------------------------------------------------------------------------------------
;The Happy Teleport Appear behind opponent
[Statedef 6026]
type    = S
movetype= A
physics = N
juggle  = 1
anim = 7057
ctrl = 0

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1040, 0.6]
type = ScreenBound
trigger1 = 1
value = 0

[State 1050, 2]
type = Posset
triggerall = Time = 1
trigger1 = Pos X > 150
trigger1 = Pos X != 200
X = -200

[State 1050, 2]
type = Posset
triggerall = Time = 1
trigger1 = Pos X < -150
trigger1 = Pos X != -200
X = 200

[State 1050, 2.5]
type = Turn
trigger1 = Time = 2
trigger1 = Pos X = 200
trigger1 = Facing = 1

[State 1050, 2.8]
type = Turn
trigger1 = Time = 2
trigger1 = Pos X = -200
trigger1 = Facing = -1

[State 1050, 3]
type = Changeanim
triggerall = time = 3
trigger1 = Pos X = 200
trigger2 = Pos X = -200
value = 7057

[State 1050, 3]
type = Velset
trigger1 = time = 4
X = 8.4

[State 1040, 0.7]
type = Veladd
trigger1 = Pos Y < 0
Y = .63

[State 1050, 4.1]
type = HitDef
trigger1 = var(12) <= 3 && !movecontact
attr = A, SA
damage    = 50
animtype  = Heavy
getpower = 0
givepower = 50
guardflag = HA
priority = 7
pausetime = 3, 0
sparkxy = -10,-58
hitsound   = S0,2
guardsound = 6,0
ground.type = High
ground.slidetime = 45
ground.hittime  = 45
ground.velocity = -3
air.velocity = -4.7,-6.3
guard.slidetime = 10              ;Values for guarded attack (def: ground.slidetime)
guard.ctrltime = 5               ;Time to regain control after guard (def: guard.slidetime)
kill = var(4)
p2facing = -1

[State 1050, 5]
type = PosSet
trigger1 = MoveGuarded
Y = -5

[State 1050, 6]
type = Changestate
trigger1 = MoveGuarded
value = 6027

[State 1050, 6.7]
type = Helper
trigger1 = movehit
trigger1 = anim = 7057
trigger1 = !numhelper(7015)
stateno = 7015
ID = 7015
facing = -1
name = "DaPunch"
pos = 53, -70
postype = P1
helpertype = normal
sprpriority = 0
keyctrl = 0
ownpal = 0
under = 1
scale = const(size.xscale),const(size.yscale)

[State 1050, 7]
type= Changestate
trigger1 = time > 10
trigger1 = Pos Y = 0
value = 0
ctrl = 1

[State 1050, air]
type= Changestate
trigger1 = time > 9
trigger1 = movehit
trigger2 = Pos Y > 0
value = 52
ctrl = 1
;------------------------------------------------------------------------------------------
;OH, THIS SUCKS!  TELEPORT IS GUARDED
[Statedef 6027]
type    = A
movetype= A
physics = N
;pos = 0,-60
anim = 7058
Velset = -.3, -4
ctrl = 0

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)


[State 1055, 1]
type = Playsnd
trigger1 = time = 0
value = 0,8

[State 1055,2]
type = Veladd
trigger1 = time > 10
Y = .5

[State 1055,3]
type = Velset
trigger1 = POS Y > 40
Y = 0

[State 1055,4]
type = Posset
trigger1 = Pos Y > 39  ;!= 0
trigger1 = Vel Y = 0
Y = 0

[State 1055,5]
type = Changestate
trigger1 = Pos Y = 0
trigger1 = Vel Y = 0
value = 0
ctrl = 1
;===============================================================
;===================== INVICIBLE - Reptile =====================
;---------------------------------------------------------------
;********** INVISIBILITY *********
[Statedef 6028]
type = S
movetype = I
physics = S
anim = 7060
ctrl = 0
velset = 0,0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)
[State 3010, Fire]
type = explod
trigger1 = Time = 10
anim = 7038
pos = -6*2*const(size.xscale)*(1+fvar(2)),6*2*const(size.yscale)*(1+fvar(2))
postype = p1
ontop = 1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))

[State 3010, Boom]
type = PlaySnd
trigger1 = time = 10
value = 1,22
volume = 200

[State 3010, Var]
type = VarSet
trigger1 = AnimTime = 0
var(17) = 1

[State 20001, Super B]
type = AfterImage
triggerall = palno != 7
trigger1 = time = 1
FrameGap = 10
length = 30
PalBright   =   0,  0,  0
PalContrast = 118,118,118
PalAdd      =   0,  0,  0
PalMul      =  1,1,1
Trans = Add1
time = 30

[State 3010, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;********** Reverse INVISIBILITY **********
[Statedef 6029]
type = S
movetype = I
physics = S
anim = 7061
ctrl = 0
velset = 0,0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 3011, Fire]
type = explod
trigger1 = Time = 1
anim = 7038
pos = -6*2*const(size.xscale)*(1+fvar(2)),6*2*const(size.yscale)*(1+fvar(2))
postype = p1
ontop = 1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))

[State 3011, Var]
type = VarSet
trigger1 = animelem = 4 ;AnimTime = 0
var(17) = 0 ;ifelse(var(17) = 0, 1, 0)

[State 3011, Boom]
type = PlaySnd
trigger1 = time = 1
value = 1,22

[State 3011, CS]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;=========================================================
;============= FORCEBALL  SLOW - REPTILE =================
;---------------------------------------------------------
;-----------------------------------------------
;Slow Orb
[StateDef 6030]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 7062
ctrl = 0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, orbemanos]
type = Explod
trigger1 = time = 6
anim = 7063
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

[State 2000, 2]
type = helper
trigger1 = AnimElem = 6
stateno = 6031 ;2001
name = "Powerball"
id = 6031 ;2001
;pos = 17, 0
postype = p1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

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

; Slow Powerball helper
[Statedef 6031] ;2001
type    = S
movetype= A
physics = N
poweradd= 120
juggle = 1
velset = 0,0
anim = 7064;4001
ctrl = 0

[State 2001, vel]
type = velset
trigger1 = time = 0
x = 1.4

[State 2001, ZappySound]
type = PlaySnd
trigger1 = timemod = 80, 1
value = 1,23

[State 2001, 1]
type = HitDef
triggerall = p2stateno != 7022 && !numhelper(7021)
trigger1 = AnimElem = 1
attr = C, NA
damage    = 50
animtype = Light
guardflag = M
hitflag = MAF
priority = 3, Hit
pausetime = 8,1
sparkno = 0
sparkxy = -10,-70
hitsound = 31,36
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -2
air.velocity = -1,-3
fall = 1
p2stateno = 6033;2002
kill = parent,Var(4)

[State 2001, Didn't hit, blocked etc.]
type = Destroyself
trigger1 = time = 280

[State end]
type = destroyself
trigger1 = frontedgedist <= -50

[State 2001 , 5]
type = ChangeState
trigger1 = MoveContact
trigger2 = p2stateno = 7022 && numhelper(7021)
value = 6032 ;2201
ctrl = 1
;------------------------------------------
[Statedef 6032] ;2201
type = A
ctrl = 0
anim = 7065 ;4002
velset = 0,0

[State 2002, DestroySelf]
type = DestroySelf
trigger1 = AnimTime = 0

;-------------------------------------
[Statedef 6033] ;2002
Type = A
MoveType = H
Physics = N
Velset = 3.25, -5
ctrl = 1

[State 2002, CA]
type = Changeanim2
trigger1 = time = 0
value = 7066

[State 2002, gravity]
type = veladd
trigger1 = time > 5
y = .4

[State 2002, CC]
type = Selfstate
trigger1 = Pos Y >= 0
trigger1 = time > 5
value = 5110
;============================================================
;Fast Orb
[StateDef 6034]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
anim = 7062
ctrl = 0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, orbemanos]
type = Explod
trigger1 = time = 6
anim = 7063
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

[State 2000, 2]
type = helper
trigger1 = AnimElem = 6
stateno = 6035 ;2009
name = "Powerball"
id = 6031
pos = 17, 0
postype = p1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

[State 2000 , 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-----------------------------------
; Fast Powerball helper
[Statedef 6035]
type    = S
movetype= A
physics = N
poweradd= 120
juggle = 1
velset = 0,0
anim = 7064 ;4001
ctrl = 0

[State 4001, vel]
type = velset
trigger1 = time = 0
x = 3.4

[State 4001, ZappySound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,23;24, 24

[State 4001, 1]
type = HitDef
triggerall = p2stateno != 7022 && !numhelper(7021)
trigger1 = AnimElem = 1
attr = C, NA
damage    = 50
animtype = Light
guardflag = M
hitflag = MAF
priority = 3, Hit
pausetime = 0,0
sparkno = 0
sparkxy = -10,-70
hitsound = 31,38
guardsound = 6,0
ground.type = Low
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -2
air.velocity = -1,-3
p2stateno = 6033 ;2002
fall = 1
kill = parent,var(4)

[State 4001, Didn't hit, blocked etc.]
type = Destroyself
trigger1 = time = 100

[State 4001 , 3]
type = ChangeState
trigger1 = MoveContact
trigger2 = p2stateno = 7022 && numhelper(7021)
value = 6032;2201
ctrl = 1

[State end]
type = destroyself
trigger1 = frontedgedist <= -50
;=======================================================
;================= AIR Trow - scorpion =================
[Statedef 6036]
type    = A
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 800
sprpriority = 2
velset = 0,0

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 52
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, nosecubre]
type = AssertSpecial
trigger1 = 1
ignorehitpause = 1
flag = unguardable

[State grabby]
type = HitDef
triggerall = p2movetype != H
Trigger1 = !Time
attr = S,NA        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
priority = 1, Miss
sparkno = -1
sprpriority = -1
;hitsound = s2,1
p1facing = 1
p2facing = 1
p1stateno = 801
p2stateno = 802
guard.dist = 0
fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0

[State end]
type = ChangeState
trigger1 = !AnimTime
value = 50
;===========================================================
;=============== GRAB LEG - Scorpion =======================
[Statedef 6037]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 7071
sprpriority = -1

[State 0, scorID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2101
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State sound]
type = PlaySnd
trigger1 = time = 1
value = 0, 9
[State sound]
type = PlaySnd
trigger1 = !time && random >= 450
value = 2, 7+var(0)
channel = 0
[State ]
type = ChangeState
value = 6099
triggerall = name != "Juano`s Sub guy"
trigger1 = 1

[State ]
type = Hitdef
trigger1 = !time
damage = 119,21
getpower = 200,100
givepower = 0,0
pausetime = 4,4
attr = S,NA
guardflag = L
animtype = heavy
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = S0,3
guardsound = S0,7
ground.type = trip
air.type = high
ground.slidetime = 17
ground.hittime = 17
ground.velocity = 0, 0
air.velocity = -3, -5
guard.velocity = -6
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = -16
yaccel = .5
fall = 1
fall.recover = 0
sprpriority = -1
p2stateno = ifelse(p2statetype != A && roundstate = 2,251,-1)
p2getp1state = ifelse(p2statetype != A,1,0)
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)

[State ]
type = SprPriority
trigger1 = AnimElem = 7
value = 5

[State end]
type = changestate
trigger1 = animelemtime(10) = 10
value = 5120
ctrl = 1

;=======================================================
;============== teleportgrab - noobsaibot ==============
[StateDef 6038]
type    = A
movetype= A
physics = S
juggle  = 2
ctrl = 0
anim = 7074
sprpriority = 5

[State 0, AfterImage]
type = AfterImage
trigger1 = !time && palno != 7
time = 30
length = 40

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time <= 23
trigger1 = anim = 70744
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 20
ignorehitpause = 1

[State 1100, aAccell]
type = VelAdd
trigger1 = time <= 35
Y = -2.5

[State 1100, aAcXceDFll]
type = VelAdd
trigger1 = time >= 57
;trigger1 = pOS Y >= 0
Y = 1

[State 1100, aAccellas]
type = VelsET
trigger1 = time >= 19
trigger1 = time <= 24
TRIGGER2 = TIME >= 43
TRIGGER2 = TIME <= 55
Y = 0

[State 1100, aAccellasSD]
type = posset
trigger1 = time = 20
Y = 300

[State 1100, aAccXCellasSDS]
type = turn
trigger1 = time = 20

[State 1000, gibber]
type = PlaySnd
trigger1 = Time = 1
value = 17,0

[State 1000, 10]
type = HitDef
trigger1 = !movecontact
trigger2 = movecontact
attr = S, SA          ;Attributes: Standing, Normal Throw
hitflag = H          ;Affect only ground people who are not being hit
guardflag = CMH          ;Affect only ground people who are not being hit
priority = 1, Miss    ;Throw has low priority, must be miss or dodge type.
damage = 215,107
hitsound = 0,7
guardsound = 5,14
sparkno = -1          ;No spark
sprpriority = -1      ;Draw in front of p2
p2facing = -1       ;Force p2 to face KFM
p1stateno = 6039       ;On success, KFM changes to state 810
p2stateno = 60399       ;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.recover = 0
yaccel = 0.5
kill       = var(4)
fall.kill  = var(4)
guard.kill = var(4)

[state -2, singuardiaennube]
type = AssertSpecial
trigger1 = 1
flag = unguardable

[State 700, 2]
type = PosAdd
trigger1 = TIME = 20
X = (P2Dist X) - 20

[State 1000, BounceOffsd]
type = Changeanim
trigger1 = Time = 18
value = 70744

[State 2020]
type = Changestate
trigger1 = Pos Y >= -6
trigger1 = time >= 45
value = 52
ctrl = 1

;--------------------------------------------
; Torpedo Bounce away
[StateDef 6039]
type    = A
movetype= I
physics = A
ctrl = 0
anim = 70745
sprpriority = 5
velset = 0,vel Y

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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

[State 0, BindToTarget]
type = BindToTarget
trigger1 = !time
time = 15
;ID = -1
pos = ifelse(facing = 1,0,0),0

[State 1000, Accellw]
type = VelSet
trigger1 = time = 5
trigger2 = time = 22
Y = 0

[State 1000, Accw]
type = playsnd
trigger1 = time = 15
value = S0,2
volume = 100
;freqmul = 2

[State 1100, aAcXceDFll]
type = VelAdd
trigger1 = time = 5
Y = 9

[State 0, vuelvecero]
type = PosSet
trigger1 = animtime = 0
trigger1 = pos Y < 0
trigger2 = time > 20
trigger2 = pos Y != 0
y = 0

[State 1001, 10]
type = Changestate
trigger1 = AnimTime = 0
triggerall = pos Y = 0
;trigger2 = pos Y = 0
value = 0
ctrl = 1

;-------------------------
[StateDef 60399]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 4

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

[State 0, PosSet]
type = PosSet
trigger1 = time < 5
x = (enemynear,pos X)
y = enemynear,pos y

[State 1001, 1034]
type = Changeanim2
trigger1 = Time = 0
value = 60183

[State 1100, aAcXceDFll]
type = VelAdd
trigger1 = time <= 5
Y = -8.5

[State 1100, aAcXceDFll]
type = VelAdd
trigger1 = time = 6
Y = 9.5

[State 1100, aAcXc]
type = VelAdd
trigger1 = time = 18
X = 1.5
Y = -4.5

[State 22, round hit]
type = EnvShake
trigger1 = time = 17
freq = 140
time = 10
ampl = -10

[State 1100, aAc]
type = Turn
trigger1 = time = 24

[State 1000, Accellw]
type = VelSet
trigger1 = time = 5
trigger2 = time = 17
Y = 0

[State 1001, 10]
type = Selfstate
trigger1 = Time = 24
value = 5050
;ctrl = 1

;=================================================
;================= nube - noob ===================
[StateDef 6040]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
velset = 0,0
anim = 6000

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1200, ZappySound]
type = PlaySnd
trigger1 = AnimElem = 2
value = 1,24
channel = 3
volume = 200

[State 1200, Za]
type = VelSet
trigger1 = 1
trigger2 = Vel Y != 0
y = 0

[State 342, at]
type = Helper
trigger1 = animelem = 3
ID = 60402
stateno = 60401 ;1990
pos = ceil(50*2*const(size.xscale)),ceil(-85*2*const(size.yscale))
postype = p1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

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

;=================================================
;============== nube - noob  aire ================
;=================================================
[StateDef 60400]
type    = A
movetype= A
physics = S
juggle  = 4
ctrl = 0
;velset = 0,0
anim = 6004

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1200, ZappySound]
type = PlaySnd
trigger1 = AnimElem = 4
value = 1,24
channel = 3
volume = 200

[State 342, at]
type = Helper
trigger1 = animelem = 4
ID = 60402
stateno = 60401 ;1990
pos = ceil(60*2*const(size.xscale)),ceil(-105*2*const(size.yscale))
postype = p1
scale = const(size.xscale),const(size.yscale)

[State ]
type = velset
trigger1 = animelem = 5
x = -2
[State ]
type = statetypeset
trigger1 = time = 5
physics = A

;--------------------------------------
[StateDef 60401] ;1990
type    = S
movetype = A
physics = S
velset = 0,0
anim = 6032
ctrl = 0

[State 1200, Za]
type = VelSet
trigger1 = 1
X = 7.5

[State 1200, BoltFat]
type = HitDef
trigger1 = !movecontact
attr = A,SP
guardflag = M
animtype = heavy
air.animtype = back
priority = 5, hit
damage = 0,50
air.fall = 1
fall.recover = 0
pausetime = 0,2
sparkno = -1
guard.sparkno = -1
hitsound   = S1,25
guardsound = S1,25
ground.type = High
air.velocity = -4,-6
air.fall = 1
fall.recover = 0
air.juggle = 3
yaccel = 0.5
p1stateno = 60402
p2stateno = 60405
kill       = root,Var(4)
fall.kill  = root,Var(4)
guard.kill = root,Var(4)
palfx.time = 170
palfx.mul = 200,200,200
palfx.add = 200,200,200
palfx.sinadd = 200,200,200,10

[State 3011, Firedf]
type = nothitby
trigger1 = 1
value = CSA

[State 0, destruido]
type = ChangeAnim
trigger1 = moveguarded && anim != 60320
value = 60320

[State 3110, chae]
type = Destroyself
trigger1 = time >= 40
trigger2 = frontedgedist <= -150
trigger3 = anim = 7049

[State 3110, chaea]
type = changeanim
trigger1 = movehit
value = 7049

[State 3110, chaesd]
type = VelSet
trigger1 = movehit
X = 0

;---------
[StateDef 60402]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 7049

[State 3011, nube]
type = explod
trigger1 = !time
triggerall = !numExplod(60403)
anim = 60321
id = 60403
pos = 0,-75*root,const(size.yscale)*(1+root,fvar(2))
postype = p2
sprpriority = 5
removetime = 170
bindtime = -1
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))
ownpal = 1

[State -3, kitanube]
type = RemoveExplod
trigger1 = parent,stateno = 60403
id = 60403

[State 3011, finnube]
type = explod
trigger1 = parent,stateno = 60403
trigger2 = time = 170
triggerall = !numExplod(604032)
anim = 60322
id = 604032
pos = 0,-75*root,const(size.yscale)*(1+root,fvar(2))
postype = p2
sprpriority = 5
;removetime = 170
bindtime = -1
scale = root,const(size.xscale)*(1+root,fvar(2)),root,const(size.yscale)*(1+root,fvar(2))
ownpal = 1

[State 3011, Firedf]
type = nothitby
trigger1 = 1
value = CSA

[State 3110, chae]
type = Destroyself
trigger1 = time >= 170
trigger2 = parent,stateno = 60403
;----------- nubefalla
[StateDef 60403]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 0,0
anim = 6000

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 150
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 706, 0]
type = PlaySnd
trigger1 = time = 0
value = 3,3

[State 240, 43]
type = ChangeState
trigger1 = animelem = 4
value = 6021

;--------------------------
[Statedef 60405]
Type = S
MoveType = H
Physics = N
Velset = -2.8,0
anim = 5000

[State 1521, resbalaSIcompatibles]
type = Changeanim
trigger1 = time = 1
trigger1 = SelfAnimExist(9108109) = 1
value = 9108109

[State 1521, resbalaSubzero]
type = Changeanim
trigger1 = time = 0
triggerall = name = "Juano`s Sub guy"
trigger1 = SelfAnimExist(29900)
value = 29900

[State 1001, 1]
type = Selfstate
trigger1 = Pos Y != 0
value = 5050

[State 1001, 1]
type = Selfstate
trigger1 = Pos Y = 0
trigger1 = AnimTime = 0
trigger1 = alive = 0
value = 5050

[State 1001, 1]
type = Selfstate
trigger1 = Pos Y = 0
trigger1 = AnimTime = 0
trigger1 = alive = 1
value = 0
ctrl = 1

;=====================================================
;=================== ERMAC ===========================
;=====================================================
;----------------------------------------------------------------
;Ermac luz verde qeu lanza
[Statedef 6041]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 6000
sprpriority = 2

[State 0, ermacID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2105
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = time = 6
helpertype = Normal
ID = 70181
name = "ErmacSP1"
postype = p1
pos = 40,-70
stateno = 70001
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State ò_ó]
type = Explod
trigger1 = time = 6
anim = 70182
id = 7018
Postype = p1
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State ò_ó]
type = Explod
trigger1 = time = 6
anim = 70184
id = 70182
Postype = p1
pos = 56*2*const(size.xscale)*(1+fvar(2)),-87*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;================================================================
;================= ERMAC  telekinetik atak=======================
;----------------------------------------------------------------
;telehuh
[Statedef 6042]
type    = S
movetype= A
physics = S
poweradd= 0
ctrl = 0
velset = 0,0
anim = 7082
sprpriority = 2

[State 0, ermacID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2105
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State Sound]
type = PlaySnd
trigger1 = !time
value = 1, 28

[State ]
type = Helper
trigger1 = time = 8
helpertype = Normal
ID = 6042
name = "capt. slamtime"
postype = p1
pos = ceil(55*2*const(size.xscale)),ceil(0*const(size.yscale))
stateno = 70004
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State Sound]
type = changeanim
triggerall = numhelper(6042) && anim != 70821
trigger1 = helper(6042),movehit
value = 70821

[State 0,luzmano]
type = Explod
trigger1 = !time
anim = 70822
id = 7082
Postype = p1
bindtime = -2
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*2*(1+fvar(2)),const(size.yscale)*2*(1+fvar(2))
ownpal = 1

[State end]
type = changestate
trigger1 = !animtime
value = 0
ctrl = 1

;=====================================================
;=================== ERMAC ===========================
;=====================================================
;----------------------------------------------------------------
;Ermac luz verde qeu lanza aire
[Statedef 6043]
type    = A
movetype= A
physics = S
poweradd= 0
ctrl = 0
;velset = 0,0
anim = 6004
sprpriority = 2

[State 0, ermacID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2105
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = time = 6
helpertype = Normal
ID = 70181
name = "ErmacSP1"
postype = p1
pos = ceil(50*2*const(size.xscale)),ceil(-95*2*const(size.yscale))
stateno = 70001
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0,brillo]
type = Explod
trigger1 = animelem = 4
anim = 70183
id = 7018
Postype = p1
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State ò_ó]
type = Explod
trigger1 = time = 6
anim = 70184
id = 70182
Postype = p1
pos = 56*2*const(size.xscale)*(1+fvar(2)),-115*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
removeongethit = 1
sprpriority = 3
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
ownpal = 1

[State ]
type = velset
trigger1 = animelem = 5
x = -2

[State ]
type = statetypeset
trigger1 = time = 5
physics = A


;=========================================================
;============= FORCEBALL  SLOW  air - REPTILE =================
;---------------------------------------------------------
;-----------------------------------------------
;Slow Orb air
[StateDef 6044]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
;anim = 7083
ctrl = 0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno = [600,620]
trigger1 = anim != 7083
value = 7083
elem = 5
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno != [600,620]
trigger1 = anim != 7083 && time = 0
value = 7083

[State 0, orbemanosrapido]
type = Explod
trigger1 = prevstateno = [600,620]
trigger1 = animelem = 5
anim = 70832
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = 0,-19*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
Postype = p1

[State 0, orbemanos]
type = Explod
trigger1 = prevstateno != [600,620]
trigger1 = animelem = 4
anim = 7063
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = 0,-19*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
Postype = p1

[State 2000, 2]
type = helper
trigger1 = AnimElem = 7
stateno = 6031 ;2001
name = "Powerballslow"
id = 6031 ;2001
;pos = 17, 0
postype = p1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = (ceil(const(size.xscale)))*2*(-5),(ceil(const(size.yscale)))*2*(-12)

[State ]
type = velset
trigger1 = animelem = 8
x = -2

[State ]
type = statetypeset
trigger1 = time = 18
physics = A

;=========================================================
;============= FORCEBALL  FAST  air - REPTILE =================
;---------------------------------------------------------
;-----------------------------------------------
;fast Orb air
[StateDef 60442]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 120
velset = 0,0
;anim = 7083
ctrl = 0

[State 0, RepID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2102
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno = [600,620]
trigger1 = anim != 7083
value = 7083
elem = 5
ignorehitpause = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = prevstateno != [600,620]
trigger1 = anim != 7083 && time = 0
value = 7083

[State 0, orbemanosrapido]
type = Explod
trigger1 = prevstateno = [600,620]
trigger1 = animelem = 5
anim = 70832
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = 0,-19*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
Postype = p1

[State 0, orbemanos]
type = Explod
trigger1 = prevstateno != [600,620]
trigger1 = animelem = 4
anim = 7063
;pos = 0,0
ownpal = 1
removeongethit = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = 0,-19*2*const(size.yscale)*(1+fvar(2))
bindtime = -1
Postype = p1

[State 2000, 2]
type = helper
trigger1 = AnimElem = 7
stateno = 6035
name = "Powerballfast"
id = 6031
postype = p1
ownpal = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = (ceil(const(size.xscale)))*2*(-5),(ceil(const(size.yscale)))*(-12)

[State ]
type = velset
trigger1 = animelem = 8
x = -2

[State ]
type = statetypeset
trigger1 = time = 18
physics = A

;=======================================================
;================= ball breaker - all =================
;-------------------------------------------------------
;se agacha
[Statedef 6045]
type    = A
movetype= A
physics = S
poweradd= 0
ctrl = 0
anim = 7085
sprpriority = 5

[State sound]
type = PlaySnd
trigger1 = (anim = 7085 && animelem = 4)
value = 1, 0
[State sound]
type = PlaySnd
trigger1 = (anim = 7085 && animelem = 4) && random >= 450
value = 2, 7+var(0)
channel = 0
;---------------------
[State 0, golpecomun]
type = Hitdef
triggerall = enemynear, selfanimexist(9108100) = 0
triggerall = enemynear,name != "Juano`s Sub guy"
trigger1 = !movecontact
damage = 50,14
getpower = 200,100
givepower = 0,0
pausetime = 5,5
attr = C,NA
guardflag = M
animtype = light
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = S0,4
guardsound = S0,6
ground.type = low
air.type = high
ground.slidetime = 10
ground.hittime = 15
ground.velocity = -5-fvar(1), -6+fvar(1)
air.velocity = -3-fvar(1), -5+fvar(1)
guard.velocity = -4
air.cornerpush.veloff = -9
ground.cornerpush.veloff = -9
yaccel = .5
air.fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)

[State 0, golpebolassubzero]
type = Hitdef
triggerall = enemynear, selfanimexist(9108100) = 0
triggerall = enemynear,statetype != A
triggerall = enemynear,name = "Juano`s Sub guy"
trigger1 = !movecontact
damage = 50,14
getpower = 200,100
givepower = 0,0
pausetime = 5,5
attr = C,NA
guardflag = M
animtype = light
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = S0,0
guardsound = S0,6
ground.type = low
air.type = high
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = -3-fvar(1), -5+fvar(1)
guard.velocity = -4
air.cornerpush.veloff = -9
ground.cornerpush.veloff = -9
yaccel = .5
air.fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)
p2stateno = 60450

[State 0, golpebolasCompatible]
type = Hitdef
triggerall = enemynear, selfanimexist(9108100)
triggerall = enemynear,statetype != A
triggerall = enemynear,name != "Juano`s Sub guy"
trigger1 = !movecontact
damage = 50,14
getpower = 200,100
givepower = 0,0
pausetime = 5,5
attr = C,NA
guardflag = M
animtype = light
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = -1
sparkxy = 0, 0
hitsound = S0,0
guardsound = S0,6
ground.type = low
air.type = high
ground.slidetime = 0
ground.hittime = 15
ground.velocity = 0, 0
air.velocity = -3-fvar(1), -5+fvar(1)
guard.velocity = -4
air.cornerpush.veloff = -9
ground.cornerpush.veloff = -9
yaccel = .5
air.fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)
p2stateno = 607216
;---------------------

[State 0, stop]
type = ChangeAnim
triggerall = anim = 7085 && animelem = 3
trigger65 = enemynear,stateno = 7022 && numhelper(7021)
trigger66 = enemynear,stateno = 60450
trigger67 = p2name = "Juano`s Kit girl"
value = 70850
trigger1 = enemynear,name = "leela" ; by warner
trigger2 = enemynear,name = "leela"
trigger3 = enemynear,name = "kula_new"
trigger4 = enemynear,name = "kula_new"
trigger5 = enemynear,name = "Shermie"
trigger6 = enemynear,name = "morrigan"
trigger7 = enemynear,name = "morrigan by ryokucha"
trigger8 = enemynear,name = "felicia"
trigger9 = enemynear,Name = "psylocke by Qkrtkf!"
trigger10 = enemynear,Name = "psylocke"
trigger11 = enemynear,Name = "viuda negra"
trigger12 = enemynear,Name = "chun li"
trigger13 = enemynear,Name = "elastigirl"
trigger14 = enemynear,name = "cammy"
trigger15 = enemynear,name = "Sakura Kasugano"
trigger16 = enemynear,name = "R.mika"
trigger17 = enemynear,name = "Karin Kanzuki"
trigger18 = enemynear,name = "juli"
trigger19 = enemynear,name = "juni"
trigger20 = enemynear,name = "rose"
trigger21 = enemynear,name = "Chunli"
trigger22 = enemynear,name = "Chun-Li"
trigger23 = enemynear,name = "Mika"
trigger24 = enemynear,name = "SF3 Chun Li"
trigger25 = enemynear,name = "SSF2Cammy"
trigger26 = enemynear,name = "cvscammy"
trigger27 = enemynear,name = "J_Rose"
trigger28 = enemynear,name = "sakura"
trigger29 = enemynear,name = "Morrigan Aensland"
trigger30 = enemynear,name = "Lilith"
trigger31 = enemynear,name = "Hinata Wakaba"
trigger32 = enemynear,name = "Mariah"
trigger33 = enemynear,name = "MIDLER"
trigger34 = enemynear,name = "Mai"
trigger35 = enemynear,name = "svcathena"
trigger36 = enemynear,name = "cvsathena"
trigger37 = enemynear,name = "cvsvice"
trigger38 = enemynear,name = "B.Jenet"
trigger39 = enemynear,name = "ARINA"
trigger40 = enemynear,name = "Hikari Reiko"
trigger41 = enemynear,name = "Yuki Morikawa"
trigger42 = enemynear,name = "dizzy"
trigger43 = enemynear,name = "Raiya Mikazuchi"
trigger44 = enemynear,name = "MysP"
trigger45 = enemynear,name = "roomi"
trigger46 = enemynear,name = "Blue Mary"
trigger47 = enemynear,name = "Mai Shiranui"
trigger48 = enemynear,name = "cvsfelicia"
trigger49 = enemynear,name = "Nanashi Kimura"
trigger50 = enemynear,name = "Wonder Woman Reloaded"
trigger51 = enemynear,name = "Felicia MvC2 Style by MGBenz"
trigger52 = enemynear,name = "SHIRANUI MAI"
trigger53 = enemynear,name = "She-ra"
trigger54 = enemynear,name = "Cammy_MVC2"
trigger55 = enemynear,name = "Red Snake"
trigger56 = enemynear,name = "Blair Dame"
trigger57 = enemynear,name = "Blair Dame MvsC"
trigger58 = enemynear,name = "athena-rkn"
trigger59 = enemynear,name = "Kelly Blender(Elektra) by AHRIMANES"
trigger60 = enemynear,name = "B.ORCHID BY AHRIMANES"
trigger61 = enemynear,name = "Tiazinha"
trigger62 = enemynear,name = "Sailor Jupiter"
trigger63 = enemynear,name = "Maxine"
trigger64 = enemynear,name = "cvsyoko"

[State 0, fin]
type = ChangeState
trigger1 = anim = 7085 && animelem = 10
trigger2 = anim = 70850 && animelem = 4
value = 0
ctrl = 1

;---------------- golpe a las bolas de sub
[Statedef 60450]
type    = U
movetype= H
physics = N
sprpriority = 1
velset = 0,0
anim = 70851
ctrl = 0

[State 0, PosAdd]
type = null;PosAdd
trigger1 = !(time % 2)
trigger1 = time = [4,50]
x = 4

[State 0, PosAdd]
type = null;PosAdd
trigger1 = time %2 = 1
trigger1 = time = [4,50]
x = -4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S2,10+var(0)

[State 0, cae]
type = selfstate
triggerall = !animtime
trigger1 = pos Y <= -10
trigger2 = alive = 0
value = 5050
ctrl = 0

[State 0, ChangeState]
type = selfstate
trigger1 = !animtime
triggerall = alive = 1
triggerall = pos Y > -10
value = 0
ctrl = 1


;=======================================================
;================= shadow trow =================
[Statedef 6046]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 110
velset = 0,0
anim = 7086
ctrl = 0

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1000, 0.1]
type = Posset
trigger1 = Pos Y != 0
trigger1 = time = 0
Y = 0

[State 1000, 1]
type = Helper
trigger1 = animelem = 4
stateno = 60461
name = "shadow"
id = 60461
postype = p1
helpertype = normal
sprpriority = -1
keyctrl = 0
ownpal = 0
under = 1
scale = const(size.xscale)*(1+fvar(2)),const(size.yscale)*(1+fvar(2))
pos = ceil(const(size.xscale))*2,ceil(const(size.yscale))*2

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

;------------------------ sombra lanzada ---------------------
[Statedef 60461]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 70861

[State 820, sd435E1]
type = VelSet
Trigger1 = 1
X = 9

[State 820, 4435E1]
type = hitdef
trigger1 = !movecontact
attr = S, SP
damage    = 120, 15
getpower = 130,0
animtype = Hard
air.animtype = Back
air.fall = 1
hitflag = CM
guardflag = CM
sparkno = -1
guard.sparkno = -1
p1stateno = 60462
p2stateno = 60464
hitsound   = 0,7
guardsound = 0,7
p2facing = -1
yaccel = 0.45
kill       = root, Var(4)
fall.kill  = root, Var(4)
guard.kill = root, Var(4)

[State 821, 5d4]
type = Changestate
trigger1 = moveguarded
value = 60463

[State 821, 4]
type = Destroyself
trigger1 = time = 200
trigger2 = frontedgedist <= -150

;--------------------- sombra golpea
[Statedef 60462]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 70862

[State 820, sd435E1]
type = VelSet
Trigger1 = animelem = 12
X = 4

[State 821, 4]
type = Destroyself
trigger1 = animtime = 0

;------------------- sombra bloqueada
[Statedef 60463]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 70863

[State ow]
type = Playsnd
trigger1 = !time
value = 2,parent,var(3)
channel = 0

[State 820, 4435E1]
type = velSET
Trigger1 = !time
X = -10

[State 820, 4435E1]
type = velSET
Trigger1 = animelem = 6
X = 0

[State 821, 4] ;Hit ground
type = Destroyself
trigger1 = animtime = 0

;------------------------- p2 lanzado
[Statedef 60464]
type    = A
movetype= H
physics = N
velset = 0,0

[State 9010, 0.1]
type = Sprpriority
trigger1 = animtime = 0
value  >= 2

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

[State 820, 4351]
type = VelSet
Trigger1 = time = 12
x = -2.5
y = -10

[State 810, nd]
type = TURN
trigger1 = time >=  13

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

;=======================================================
;============== teleportpunch2 - smoke ==============
[StateDef 6047]
type    = A
movetype= A
physics = S
juggle  = 2
ctrl = 0
anim = 181;7087
sprpriority = 5
velset = 0,0

[State 0, smokeID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2104
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time <= 23
trigger1 = (anim = 70871 || anim = 708712)
trigger2 = anim = 181;7087
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 20
ignorehitpause = 1

[State 1000, golpeo aniello]
type = Changeanim
triggerall = anim = 70871 && anim != 181
trigger1 = movecontact
value = 70872

[State 1000, golpeo yo]
type = Changeanim
triggerall = anim = 708712 && anim != 181
trigger1 = movecontact
value = 708722

[State ]
type = Hitdef
;triggerall = (anim = 70871 || anim = 708712)
trigger1 = !movecontact
;triggerall = enemynear,stateno != 5050
damage = 105,25
getpower = 200,100
givepower = 0,0
pausetime = 1,1
attr = C,NA
guardflag = M
animtype = heavy
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = 40
sparkxy = enemynear,const(size.head.pos.x),ceil(enemynear,const(size.head.pos.y)*enemynear,const(size.yscale))
hitsound = S0,2
guardsound = S0,7
ground.type = high
air.type = high
ground.slidetime = 10
guard.slidetime = 15
ground.hittime = 10
guard.hittime = 15
ground.velocity = -2, -15
air.velocity = -2, -15
guard.velocity = -14
air.cornerpush.veloff = -30
ground.cornerpush.veloff = -30
yaccel = .5
fall = 1
fall.recover = 0
envshake.time = 15
envshake.ampl = -4
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)

[State 1100, aAccellas]
type = VelsET
trigger1 = time >= 19
trigger1 = time <= 24
TRIGGER2 = TIME >= 43
TRIGGEr2 = TIME <= 50
trigger3 = Pos Y = -10
Y = 0

[State ]
type = Helper
trigger1 = movehit && !numhelper(7018)
;triggerall = anim = 70871
helpertype = Normal
ID = 7018
name = "what the bleed?"
postype = p2
ignorehitpause = 1
pos = enemynear,const(size.head.pos.x),ceil(enemynear,const(size.head.pos.y)*enemynear,const(size.yscale))
stateno = 7018
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 1100, aAccell]
type = VelAdd
trigger1 = time <= 17;35
Y = 1.5

[State 1100, aAccell]
type = VelAdd
trigger1 = time <= 35 && time > 17
Y = -2.5

[State 1100, aAcXceDFll]
type = VelAdd
trigger1 = time >= 57
Y = 1

[State 1100, aAccellasSD]
type = posset
trigger1 = time = 20
Y = 330

[State 1100, aAccXCellasSDS]
type = null;turn
trigger1 = time = 20

[State 1000, gibber]
type = PlaySnd
trigger1 = Time = 1
value = 17,0

[state -2, singuardiaennube]
type = null;AssertSpecial
trigger1 = 1
flag = unguardable

[State 700, 2]
type = PosAdd
trigger1 = TIME = 20
X = (P2Dist X) - 10

[State 0, cualgolpe]
type = VarRandom
trigger1 = !time
v = 15
range = 2,3

[State 1000, golpebajo aniello]
type = Changeanim
trigger1 = Time = 18 && var(15) = 3
value = 70871

[State 1000, golpebajo yo]
type = Changeanim
trigger1 = Time = 19 && anim != 70871
value = 708712

[State 2020]
type = Changestate
trigger1 = vel Y = 0
;trigger1 = Pos Y < -6
trigger1 = time >= 55
value = 50
ctrl = 1

;=======================================================
;============== telepor kick - noobsaibot ==============
[StateDef 6048]
type    = A
movetype= A
physics = S
ctrl = 0
sprpriority = 5
velset = 0,0

[State 0, AfterImage]
type = AfterImage
trigger1 = !time && palno != 7
time = 30
length = 40

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 0
trigger1 = anim != 0 && anim != 2 && anim != 3
value = 0

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

[State 0, NotHitBy]
type = NotHitBy
trigger1 = time < 20 && !(time%3)
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
value2 = S,NA
time = 1
ignorehitpause = 1

[State 1000, sonido]
type = PlaySnd
trigger1 = Time = 1
value = 17,0

[State 1100, arriba]
type = posset
trigger1 = time = 20
Y = -245

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

[State 700, 2]
type = PosAdd
trigger1 = TIME = 20
X = (P2Dist X) - 30

[State 0, baja]
type = Veladd
trigger1 = time = [0,7]
y = 2

[State 0, aumentovelocidad]
type = null;Veladd
trigger1 = time = 1
y = 10

[State 20, detiene]
type = VelSet
trigger1 = pos Y >= -15
triggerall = time > 20
trigger1 = !movecontact
y = 0

[State 0, detiene]
type = Posset
triggerall = vel Y = 0
triggerall = time > 20
trigger1 = !movecontact
y = 0

[State 1050, fin]
type= Changestate
trigger1 = time > 20 && pos y = 0
value = 52
ctrl = 1

[State ]
type = Hitdef
trigger1 = !movecontact
damage = ifelse(anim = 621,112,154),ifelse(anim = 621,35,42)
getpower = 50,140
givepower = 0,0
pausetime = 8,11
attr = A,NA
guardflag = H
animtype = light
air.animtype = back
priority = 4, hit
sparkno = -1
guard.sparkno = 40
sparkxy = 19, -84
hitsound = S0,2
guardsound = S0,7
ground.type = high
air.type = high
ground.slidetime = 15
ground.hittime = 15
ground.velocity = -3, ifelse(anim = 621,0,-7)
air.velocity = -3-fvar(1), -5+fvar(1)
guard.velocity = -5
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
yaccel = .5
fall = ifelse(anim = 7089,1,0)
air.fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2facing = 1
kill = var(4)
guard.kill = var(4)
;p1stateno = 60480

[State 0, ChangeState]
type = ChangeState
trigger1 = moveguarded
trigger2 = movecontact
trigger3 = movehit
value = 60480


[State ]
type = null;velset
Trigger1 = movecontact
ignorehitpause = 1
persistent = 0
x = 0
y = 0

[State turn]
type = turn
triggerall = p2bodydist x <= -13 && (enemynear,backedgedist != 0)
trigger1 = !time

[State ]
type = null;ChangeAnim
Trigger1 = pos y >= -23 && vel y >= 1
persistent = 0
value = ifelse(!(vel x),41,42)
elem = ifelse(!(vel x),3,1)

;-------------------------------------
[StateDef 60480]
type    = A
movetype= A
physics = A
ctrl = 0
sprpriority = 5
velset = -1,-6

[State 0, noobID]
type = Explod
trigger1 = !(time%1)
anim = 9999
ID = 2103
pos = 320,240
postype = left
bindtime = 1
removetime = 1
ownpal = 1
ignorehitpause = 1
scale = const(size.xscale),const(size.yscale)

[State ]
type = Helper
trigger1 = movehit && !numhelper(7015) && p2statetype != A
trigger1 = anim = 7089 || anim = 620
helpertype = Normal
ID = 7015
name = "bleed?"
postype = p2
ignorehitpause = 1
pos = enemynear,const(size.head.pos.x),ceil(enemynear,const(size.head.pos.y)*enemynear,const(size.yscale))
stateno = 7015
ownpal = 1
scale = const(size.xscale),const(size.yscale)

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 10
value = 620
elem = 4

[State 0, Gravity]
type = Gravity
trigger1 = time > 10


