;-------------------------------bocao nivel 1
[Statedef 3100]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3300
ctrl = 0
sprpriority = 8
;------------------------- vento puxa e bichos vem
[State 3100, help]
type = helper
trigger1 = time = 20
id = 4000
name = "vem aqui"
postype = p1
pos = 340,0
stateno = 4000
facing = -1
helpertype = player
size.height = 3000
size.ground.front = 1
size.ground.back = 100
keyctrl = 0
ownpal = 1

[State 3100, help2]
type = helper
trigger1 = time = 21
id = 4001
name = "acerta frente"
postype = p1
pos = 100,0
stateno = 4001
helpertype = player
keyctrl = 0
ownpal = 1
size.height = 3000
size.ground.front = 100
size.ground.back = 1


[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3202 
pos = 640,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.1, 0.0
ignorehitpause = 1
supermove = 1
velocity = -1.5,0
pausemovetime = 100
supermovetime = 100
removetime = 200

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3203 
pos = 540,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.2, 0.0
ignorehitpause = 1
scale = .5,.5
supermove = 1
velocity = -1,0
pausemovetime = 100
supermovetime = 100
removetime = 200

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3204 
pos = 740,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.2, 0.0
ignorehitpause = 1
supermove = 1
velocity = -1.5,0
scale = .5,.5
pausemovetime = 100
supermovetime = 100
removetime = 200

;------------------------- fim ventos
[State 3000, FinishScreen]
type = Explod
trigger1 =  P2Life = 0
trigger1 = NumExplod(7010) = 0
ID = 7010
anim = 7006
pos = 160, 120
postype = Left
scale = 2,2
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 1
anim = 7305
pos = -20, -50
sprpriority = 10
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7018
pos = -20, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = 1.2,1.2
pausemovetime = 100
supermovetime = 100

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 30
add = -30,-80,-80
supermove = 1
sinadd = 80,50,50,50

[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 20
value = 250,250,250
time = 1

[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1000, 12
[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 10,17
channel = 3

[State 170, 1]
type = NotHitBy
trigger1 = time <= 40
value = SCA
time = 1


[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 8
ID = 3005
add = -20,-20,40 
sinadd = 50,-20,-20,40
color = 256
pausemovetime = 100
supermovetime = 100
time = 10

[State 3000, PauseComSpark1]
type = SuperPause
trigger1 = AnimElem = 3
anim = -1
time = 20
movetime = 20
pausemovetime = 100
supermovetime = 100

[State 3602, CorTelA]
type = VarSet
trigger1 = time = 0
var(10) = 1000

[State 3602, CorTelA]
type = powerAdd
trigger1 = time >= 0 && timeMod = 2,1
value = -20

[State 3602, CorTelA]
type = VarAdd
trigger1 = time >= 0 && timeMod = 2,1
var(10) = -20

[State 800, 2]
type = ChangeState
Trigger1 = var(10) <= 0
value = 0
ctrl = 1

[State 800, 2]
type = ChangeState
TriggerAll = Time >= 60
Trigger1 = var(59)<0
Trigger1 = command != "holdx"
value = 3101
ctrl = 0

;Jogando o P2 ----------------------------------
[Statedef 3101]
type    = S
movetype= A
physics = N
anim = 3301
ctrl = 0
poweradd=-500
sprpriority = 1

[State 1000, voz]
type = PlaySnd
trigger1 = animelem = 2
value = 10, 2

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 4
value = 1100, 2

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 6
value = 1100, 6

[State 3000 , 1] ;quebra a defesa do P2
type = AssertSpecial
trigger1 = animElem = 5
trigger2 = animElem = 6
trigger3 = animElem = 15
flag  = unguardable

[State 1001, Bolhas-P1]
type = Explod
trigger1 = animElem = 14
anim = 3305 
sprpriority = -1
ownpal = 1
ignorehitpause = 1
supermove = 1
pausemovetime = 100
supermovetime = 100

[State 210, 2] ;derruba
type = HitDef
trigger1 = animElem = 5 || animElem = 6
attr = S, HT
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*20)
guardflag = 
pausetime = 0,0
sparkno = s7006
sparkxy = -20,-70
hitsound   = s1,3
guardsound = s6,3
ground.dist = 0
ground.type = High
ground.slidetime = 30
ground.hittime  = 50
guard.hittime = 30
guard.ctrltime = 30
airguard.ctrltime = 30
ground.velocity = -1,-5
air.velocity = -1,-1.5
recovery = 0
envshake.time = 10
envshake.ampl = 10
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

[State 210, 2] ;derruba
type = HitDef
trigger1 = animElem = 15
attr = S, HT
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*200)
guardflag = 
pausetime = 0,10
sparkno = s7011
sparkxy = -40,-70
hitsound   = s1,3
guardsound = s6,3
ground.dist = 0
ground.type = High
ground.slidetime = 4
ground.hittime  = 50
ground.velocity = -4,-3
air.velocity = -4,-3
recovery = 0
envshake.time = 10
envshake.ampl = 10
palfx.time = 10 ; cor de pegando fogo p2 nova
palfx.add = -50,-200,-200 
sinadd = 50,20,20,50
Palfx.color = 256 
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

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

;------------------------------- bocao nivel 2 -------------------------------------------------

[Statedef 3200]
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3300
ctrl = 0
sprpriority = 8

;------------------------- vento puxa e bichos vem

[State 3100, help]
type = helper
trigger1 = time = 20
id = 4000
name = "vem aqui"
postype = p1
pos = 340,0
stateno = 4000
facing = -1
helpertype = player
size.height = 3000
size.ground.front = 1
size.ground.back = 100
keyctrl = 0
ownpal = 1

[State 3100, help2]
type = helper
trigger1 = time = 21
id = 4001
name = "acerta frente"
postype = p1
pos = 100,0
stateno = 4001
helpertype = player
keyctrl = 0
ownpal = 1
size.height = 3000
size.ground.front = 100
size.ground.back = 1

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3202 
pos = 640,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.1, 0.0
ignorehitpause = 1
supermove = 1
velocity = -1.5,0
pausemovetime = 100
supermovetime = 100
removetime = 200

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3203 
pos = 540,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.2, 0.0
ignorehitpause = 1
scale = .5,.5
supermove = 1
velocity = -1,0
pausemovetime = 100
supermovetime = 100
removetime = 200

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 40 && Timemod = 5, 2
anim = 3204 
pos = 740,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.2, 0.0
ignorehitpause = 1
supermove = 1
velocity = -1.5,0
scale = .5,.5
pausemovetime = 100
supermovetime = 100
removetime = 200

;------------------------- fim ventos


[State 3000, FinishScreen]
type = Explod
trigger1 =  P2Life = 0
trigger1 = NumExplod(7010) = 0
ID = 7010
anim = 7006
pos = 160, 120
postype = Left
scale = 2,2
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100
[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 1
anim = 7305
pos = -20, -50
sprpriority = 10
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7018
pos = -20, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = 1.2,1.2
pausemovetime = 100
supermovetime = 100

;[State 3005, AssertS]
;type = AssertSpecial
;trigger1 = time <= 50
;flag = nobardisplay
;flag2  = noFG
;flag3  = noBG


[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 30
add = -30,-80,-80
supermove = 1
sinadd = 80,50,50,50


[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 20
value = 250,250,250
time = 1


[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1000, 12
[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 10,17
channel = 3

[State 170, 1]
type = NotHitBy
trigger1 = time <= 40
value = SCA
time = 1


[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 8
ID = 3005
add = -20,-20,40 
sinadd = 50,-20,-20,40
color = 256
pausemovetime = 100
supermovetime = 100
time = 10

[State 3000, PauseComSpark1]
type = SuperPause
trigger1 = AnimElem = 3
anim = -1
time = 20
movetime = 20
pausemovetime = 100
supermovetime = 100


[State 3602, CorTelA]
type = VarSet
trigger1 = time = 0
var(10) = 2000


[State 3602, CorTelA]
type = powerAdd
trigger1 = time >= 0 && timeMod = 2,1
value = -30

[State 3602, CorTelA]
type = VarAdd
trigger1 = time >= 0 && timeMod = 2,1
var(10) = -30

[State 800, 2]
type = ChangeState
Trigger1 = var(10) <= 0
value = 0
ctrl = 1

[State 800, 2]
type = ChangeState
TriggerAll = Time >= 50
Trigger1 = var(59)<0
Trigger1 = command != "holdy"
value = 3201
ctrl = 0

;Jogando o P2 ----------------------------------
[Statedef 3201]
type    = S
movetype= A
physics = N
anim = 3301
ctrl = 0
poweradd= -1000
sprpriority = 1

[State 1000, voz]
type = PlaySnd
trigger1 = animelem = 2
value = 800,0

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 4
value = 1100, 2

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 6
value = 1100, 6

[State 3000 , 1] ;quebra a defesa do P2
type = AssertSpecial
trigger1 = animElem = 5
trigger2 = animElem = 6
trigger3 = animElem = 15
flag  = unguardable

[State 210, 2] ;derruba
type = HitDef
trigger1 = animElem = 5 || animElem = 6
attr = S, HT
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*20)
guardflag = 
pausetime = 0,0
sparkno = s7006
sparkxy = -20,-70
hitsound   = s1,3
guardsound = s6,3
ground.dist = 0
guard.hittime = 30
guard.ctrltime = 30
airguard.ctrltime = 30
ground.type = High
ground.slidetime = 30
ground.hittime  = 50
ground.velocity = -7,0
p2stateno = 846
air.velocity = -3,3
recovery = 0
envshake.time = 10
envshake.ampl = 10
kill=0
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

[State 210, 2] ;derruba
type = HitDef
trigger1 = animElem = 15
attr = S, HT
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*100)
guardflag = 
pausetime = 0,10
sparkno = s7011
sparkxy = -40,-70
hitsound   = s1,3
guardsound = s6,3
ground.dist = 0
ground.type = High
ground.slidetime = 4
ground.hittime  = 50
ground.velocity = -2,0
air.velocity = -1,3
recovery = 0
envshake.time = 10
envshake.ampl = 10
p1facing = 1
p2facing = 1  
p1stateno = 3202
p2stateno = 3203
palfx.time = 10 ; cor de pegando fogo p2 nova
palfx.add = -50,-200,-200 
sinadd = 50,20,20,50
Palfx.color = 256 
kill=0
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

[State 1001, Bolhas-P1]
type = Explod
trigger1 = animElem = 14
anim = 3305 
id = 3305
sprpriority = -1
ownpal = 1
ignorehitpause = 1
supermove = 1
pausemovetime = 100
supermovetime = 100

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------- p1 levantando p2
[Statedef 3202]
type    = S
movetype= A
physics = N
anim = 3302
ctrl = 0
sprpriority = 1

[State 1001, some axe]
type = RemoveExplod
trigger1 = time >= 0
id= 3305

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 131, -8

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 108, 0

[State 810, Bind 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 86, -62

[State 810, Bind 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 84, -57

[State 810, Bind 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 82, -55

[State 810, Bind 6]
type = TargetBind
trigger1 = AnimElem = 6
pos = 95, -66

[State 810, Bind 7]
type = TargetBind
trigger1 = AnimElem = 7
pos = 71, -69

[State 810, Bind 8]
type = TargetBind
trigger1 = AnimElem = 8
pos = 63, -117

[State 810, Bind 9]
type = TargetBind
trigger1 = AnimElem = 9
pos = 72, -128

[State 810, Bind 10]
type = TargetBind
trigger1 = AnimElem = 10
pos = 55, -127

[State 810, Bind 11]
type = TargetBind
trigger1 = AnimElem = 11
pos = 60, -128

[State 810, Bind 12]
type = TargetBind
trigger1 = AnimElem = 12
pos = 82, -164

[State 810, Bind 13]
type = TargetBind
trigger1 = AnimElem = 13
pos = 71, -147

[State 810, Bind 14]
type = TargetBind
trigger1 = AnimElem = 14
pos = 72, -142

[State 810, Bind 15]
type = TargetBind
trigger1 = AnimElem = 15
pos = 62, -109

[State 810, Bind 16]
type = TargetBind
trigger1 = AnimElem = 16
pos = 61, -123

[State 810, Bind 17]
type = TargetBind
trigger1 = AnimElem = 17
pos = 54, -136

[State 810, Bind 18]
type = TargetBind
trigger1 = AnimElem = 18
pos = 60, -129

[State 810, Bind 19]
type = TargetBind
trigger1 = AnimElem = 19
pos = 80, -160

[State 810, Bind 19]
type = TargetBind
trigger1 = AnimElem = 20
pos = 75, -150

[State 810, Bind 19]
type = TargetBind
trigger1 = AnimElem = 21
pos = 70, -140

[State 810, Bind 22]
type = TargetBind
trigger1 = AnimElem = 22
pos = 60, -100

[State 810, Bind 23]
type = TargetBind
trigger1 = AnimElem = 23
pos = 73, -60

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 24
pos = 80, -60

[State 751, env]
type = EnvShake
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
time = 10
ampl = -3
freq = 30
phase = 30

[State 810, Throw]
type = TargetLifeAdd
trigger1 = AnimElem = 12
value = floor(fvar(10)*ifelse(fvar(10)<0.3,-200,-100))
kill=0

[State 810, Throw]
type = TargetLifeAdd
trigger1 = AnimElem = 19
value = floor(fvar(10)*ifelse(fvar(10)<0.3,-200,-100))
kill=1

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
anim = 7011
pos = 65, -150
sprpriority = 11
ownpal = 1
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = hitAdd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
value = 1

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 12
trigger2 = animElem = 19
value = 1, 3

[State 1000, voz]
type = PlaySnd
trigger1 = time = 1
value = 10, 11

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 24
value = 3204

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;P2 preso na mao -------------------------------
[Statedef 3203]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 0
ID = 3005
add = -20,20,20 
sinadd = 20,20,-20,20
color = 256
pausemovetime = 100
supermovetime = 100
time = 100

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 1
value = 10

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 5
value = -10

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

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3310
;---------------------------- P2 voando pelo ar
[Statedef 3204]
type    = A
movetype= H
physics = N
velset = -10,-1

[State 821, 1] ;Gravity
type = PosAdd
Trigger1 = time = 0
y = 60

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = time >= 0
y = .6

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground

[State 3000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------- scorpiao POW1 ==========================================

[Statedef 3000] 
type    = S
movetype= A
physics = S
juggle  = 4
velset = 0,0
anim = 3000
powerAdd = -1000
ctrl = 0
sprpriority = 8

[State 3000, FinishScreen]
type = Explod
trigger1 =  P2Life = 0
trigger1 = NumExplod(7010) = 0
ID = 7010
anim = 7006
pos = 160, 120
postype = Left
scale = 2,2
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 1
anim = 7305
pos = -20, -50
sprpriority = 10
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7018
pos = -20, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = 1.2,1.2
pausemovetime = 100
supermovetime = 100

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 30
add = -30,-80,-80
supermove = 1
sinadd = 80,50,50,50

[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 20
value = 250,250,250
time = 1

[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1000, 12
[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 10, ifelse(random<500,14,15)
channel = 3

[State 170, 1]
type = NotHitBy
trigger1 = time <= 40
value = SCA
time = 1

[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 8
ID = 3005
add = -20,-20,40 
sinadd = 50,-20,-20,40
color = 256
pausemovetime = 100
supermovetime = 100
time = 10

[State 3000, PauseComSpark1]
type = pause ;SuperPause
trigger1 = AnimElem = 4
anim = -1
time = 40
pausemovetime = 100
supermovetime = 100

[State 3000]
type = HitDef
Trigger1 = Time = [26,31]
attr = S, HA
hitflag = MAF
guardflag = M
damage    = 0,10
priority = 7, dodge
sparkno = s7006
guard.sparkno = S6003
sparkxy = 0,-20
hitsound = s1100,9
guardsound = s6,3
sprpriority = -2
p2facing = 1 
p1stateno = 3001
p2stateno = 3002
guard.kill = 1
kill=0
fall = 1

[State 3000]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------- Socando  P2
[Statedef 3001]
type    = S
movetype= A
physics = N
anim = 3001
ctrl = 0
sprpriority = 8

[State 1002, spark-fogos]
type = Explod
trigger1 = Time = 4
anim = 7005
pos = 30, -60
random = 10,20
postype = P2
sprpriority = 20
ownpal = 1
pausemovetime = 666
supermovetime = 666

[State 810, Bind 1]
type = TargetBind
trigger1 = time <= 100
pos = 100, 0   ;X Y

[State 3005, Raios P2]
type = Explod
trigger1 = time >= 65 && timeMod = 10,6 && time <= 165
anim = 7005
pos = -30, -60
random = 20,80
facing = -1
postype = P2
sprpriority = 10
ownpal = 1
pausemovetime = 100
supermovetime = 100

[State 3005, Raios P2]
type = Explod
trigger1 = time >= 65 && timeMod = 10,8 && time <= 160
anim = 7006
pos = -40, -60
random = 20,80
facing = -1
postype = P2
sprpriority = -10
ownpal = 1
pausemovetime = 100
supermovetime = 100

[State 3005, treme]
type = EnvShake
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
time = 5
ampl = -3
freq = 80
phase = 60

[State 3, 5];pisca
type = Envcolor
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = 255,248,248
time = 1
under = 1
ignorehitpause = 1

[State 3112, 4]
type = hitadd
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = 1

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = floor(fvar(10)*-5)-5
kill=0

[State 1000, voz]
type = PlaySnd
trigger1 = time > 65 && timeMod = 8,2 && time <= 170 
value = 1100, 9

[State 810, Throw 11] ; passa P2 de 820 para 821 ar
type = TargetState   
trigger1 = AnimElem = 54
value = 845

[State 106, 3]
type = MakeDust
trigger1 = AnimElem = 8 || AnimElem = 9 || AnimElem = 10
pos = -5,-2
spacing = 1

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 8
value = 0, 2

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800,0

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 3003
ctrl = 0
;----------------------- P2 preso na mao 
[Statedef 3002]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 0
ID = 3005
add = -20,20,20 
sinadd = 20,20,-20,20
color = 256
pausemovetime = 100
supermovetime = 100
time = 40

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 1
value = 10

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 5
value = -10

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

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

; Joga p2 longe pow1 ---------------------------------------
[Statedef 3003]
type    = S
movetype= A
physics = S
poweradd= 65
ctrl = 0
velset = 10,0
anim = 3003
sprpriority = 2

[State 3003]
type = PlaySnd
trigger1 = time = 1
value = 10,ifelse(random<500,0,12)

[State 210, 2]
type = HitDef
trigger1 = time = 0
attr = S, NA
animtype  = Hard
damage    = floor(fvar(10)*70)+30
guardflag = MA
pausetime = 12,10
sparkno = s7011
sparkxy = -20,-70
hitsound = s1100, 9
guardsound = 6,0
ground.type = LOW
ground.slidetime = 5
ground.hittime  = 60
p2stateno = 8821
ground.velocity = -20,0
air.velocity = -10,-1
recovery = 0
envshake.time = 10
envshake.ampl = 10
palfx.time = 10 ; cor de pegando fogo p2 nova
palfx.add = -50,-200,-200 
sinadd = 50,20,20,50
Palfx.color = 256 
fall = 1

[State 1026, Gravity]
type = VelAdd
trigger1 = time <= 10
x = -.5 

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

[State 210, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------------------------- scorpiao POW2 ==========================================
[Statedef 3005] 
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3000
powerAdd = -2000
ctrl = 0
sprpriority = 8

[State 3000, FinishScreen]
type = Explod
trigger1 =  P2Life = 0
trigger1 = NumExplod(7010) = 0
ID = 7010
anim = 7006
pos = 160, 120
postype = Left
scale = 2,2
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 1
anim = 7305
pos = -20, -50
sprpriority = 10
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7018
pos = -20, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = 1.2,1.2
pausemovetime = 100
supermovetime = 100

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 30
add = -30,-80,-80
supermove = 1
sinadd = 80,50,50,50

[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 20
value = 250,250,250
time = 1

[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1000, 12
[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 10, ifelse(random<500,14,15)
channel = 3

[State 170, 1]
type = NotHitBy
trigger1 = time <= 40
value = SCA
time = 1

[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 8
ID = 3005
add = -20,-20,40 
sinadd = 50,-20,-20,40
color = 256
pausemovetime = 100
supermovetime = 100
time = 10

[State 3000, PauseComSpark1]
type = pause ;SuperPause
trigger1 = AnimElem = 4
anim = -1
time = 40
pausemovetime = 100
supermovetime = 100

[State 3005]
type = HitDef
Trigger1 = Time = [26,31]
attr = S, HA
hitflag = MAF
guardflag = M
priority = 7, dodge
damage    = 0,12
sparkno = s7006
guard.sparkno = S6003
sparkxy = 0,-20
hitsound = s1100,9
guardsound = s6,3
sprpriority = -2
p2facing = 1
p1stateno = 3006
p2stateno = 3007
guard.dist = 200
guard.kill = 1
kill=0
fall = 1 

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1
;-------------------------------- Socando  P2
[Statedef 3006]
type    = S
movetype= A
physics = N
anim = 3005
ctrl = 0
sprpriority = 8

[State 1002, spark-fogos]
type = Explod
trigger1 = Time = 4
anim = 7005
pos = 30, -60
random = 10,20
postype = P2
sprpriority = 20
ownpal = 1
pausemovetime = 666
supermovetime = 666

[State 810, Bind 1]
type = TargetBind
trigger1 = time <= 100
pos = 100, 0   ;X Y

[State 3005, Raios P2]
type = Explod
trigger1 = time >= 65 && timeMod = 10,6 && time <= 165
anim = 7005
pos = -30, -60
random = 20,80
facing = -1
postype = P2
sprpriority = 10
ownpal = 1
pausemovetime = 100
supermovetime = 100

[State 3005, Raios P2]
type = Explod
trigger1 = time >= 65 && timeMod = 10,8 && time <= 160
anim = 7006
pos = -40, -60
random = 20,80
facing = -1
postype = P2
sprpriority = -10
ownpal = 1
pausemovetime = 100
supermovetime = 100

[State 3005, treme]
type = EnvShake
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
time = 5
ampl = -3
freq = 80
phase = 60

[State 3, 5];pisca
type = Envcolor
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = 255,248,248
time = 1
under = 1
ignorehitpause = 1

[State 3112, 4]
type = hitadd
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = 1

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = time > 65 && timeMod = 8,2 && time <= 190 
value = floor(fvar(10)*-15)-5
kill=0

[State 1000, voz]
type = PlaySnd
trigger1 = time > 65 && timeMod = 8,2 && time <= 170 
value = 1100, 9

[State 810, Throw 11] ; passa P2 de 820 para 821 ar
type = TargetState   
trigger1 = AnimElem = 71
value = 821

[State 106, 3]
type = MakeDust
trigger1 = AnimElem = 8 || AnimElem = 9 || AnimElem = 10
pos = -5,-2
spacing = 1

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 8
value = 0, 2

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 7
value = 800, 0

[State 640, 3]
type = HitDef
trigger1 = animElem = 69 
attr = C, SA
damage    = floor(fvar(10)*150)+50
guardflag = HA
priority = 4
pausetime = 12,10
sparkno = s7011
sparkxy = -15,-70
hitsound   = s1,3
guardsound = 6,0
animtype = Hard
ground.type = High
recovery = 0
ground.slidetime = 20
ground.hittime  = 40
ground.velocity = -5,-10
p2stateno = 3010
air.velocity = -5,-10
envshake.time = 10
envshake.ampl = 20
palfx.time = 20 ; cor de pegando fogo p2 nova
palfx.add = -50,-200,-200 
sinadd = 50,20,20,50
Palfx.color = 256 
fall = 1

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 40
value = 10, 16
channel = 1

[State 666, voz]
type = PlaySnd
trigger1 = AnimElem = 50
value = 20, 0
channel = 2

[State 1001, some axe]
type = Explod
trigger1 = AnimElem = 50
id= 130101
anim = 1311 
sprpriority = 10
ownpal = 0
ignorehitpause = 1
supermove = 1

[State 1001, some axe]
type = RemoveExplod
trigger1 = AnimElem = 65
id= 130101

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;----------------------- P2 preso na mao 
[Statedef 3007]
type    = A
movetype= H
physics = N
velset = 0,0

[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 0
ID = 3005
add = -20,20,20 
sinadd = 20,20,-20,20
color = 256
pausemovetime = 100
supermovetime = 100
time = 40

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 1
value = 10

[State 810, Bind 1]
type = SprPriority
trigger1 = AnimElem = 5
value = -10

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

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




;==================================== super farpas ================================


[Statedef 3500]
type    = A
movetype= A
physics = N
juggle  = 4
velset = 0,0
anim = 3200
ctrl = 0
sprpriority = 8

[State 1010, 1]
type = VelMul
trigger1 = time = 0
x = .15
y = .15

[State 1010, 1a]
type = VelAdd
trigger1 = time = 0
trigger1 = Vel Y = [-.08,.08]
y = ifelse(Vel Y <= 0, .08, -.08)

[State 1010, 3a]
type = VelSet
trigger1 = Pos Y >= 4
y = 0

[State 3000, FinishScreen]
type = Explod
trigger1 =  P2Life = 0
trigger1 = NumExplod(7010) = 0
ID = 7010
anim = 7006
pos = 160, 120
postype = Left
scale = 2,2
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7305
pos = -10, -50
sprpriority = -99
ownpal = 1
bindtime = 99
pausemovetime = 100
supermovetime = 100


[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7018
pos = 0, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = .5,.5
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = AnimElem = 3
anim = 7305
pos = -10, -50
sprpriority = 10
ownpal = 1
scale = .5,.5
bindtime = 99
pausemovetime = 100
supermovetime = 100


[State 3000, SupeScreen]
type = Explod
trigger1 = time >= 20 && timeMod = 20,2 && time <= 110
anim = 7306
pos = 0, -50
sprpriority = 10
ownpal = 1
bindtime = 99
scale = .5,.5
pausemovetime = 100
supermovetime = 100


[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 300
add = -30,-80,-80
supermove = 1
sinadd = 80,50,50,50


[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 20
value = 250,250,250
time = 1


[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1000, 12

[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 800, 0
channel = 3

[State 170, 1]
type = NotHitBy
trigger1 = time <= 40
value = SCA
time = 1


[State 3005, BrilhoAzul] 
type = palFX
trigger1 = time = 8
ID = 3005
add = -20,-20,40 
sinadd = 50,-20,-20,40
color = 256
pausemovetime = 100
supermovetime = 100
time = 10

[State 3000, PauseComSpark1]
type = SuperPause
trigger1 = AnimElem = 3
anim = -1
time = 20
movetime = 20
pausemovetime = 100
supermovetime = 100


[State 3602, CorTelA]
type = VarSet
trigger1 = time = 0
var(16) = 3000


[State 3602, CorTelA]
type = powerAdd
trigger1 = time >= 0 && timeMod = 2,1
value = -40

[State 3602, CorTelA]
type = VarAdd
trigger1 = time >= 0 && timeMod = 2,1
var(16) = -40


[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "farpa-1"
var(10) = 3
[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "farpa-1"
var(11) = 70

[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "farpa-2"
var(10) = 4
[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "farpa-2"
var(11) = 90

[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "supfarpas3"
var(10) = 5
[State 1000]
type = VarSet 
trigger1 = var(59) < 0
trigger1 = command = "supfarpas3"
var(11) = 50

[State 800, 2]
type = ChangeState
Trigger1 = var(16) <= 0
value = 3403
ctrl = 0

[State 800, 2]
type = ChangeState
TriggerAll = Time >= 40
trigger1 = var(59) < 0
Trigger1 = command != "holdz"
value = 3510
ctrl = 0
[Statedef 3510]  ; farpas Ar Diagnoal ---------------------------------------
type    = A
physics = N
movetype= A
ctrl = 0
anim = 3400
sprpriority = 5

[State 1010, 1]
type = VelMul
trigger1 = time = 0
x = .15
y = .15

[State 1010, 1]
type = sprpriority 
trigger1 = AnimElem = 9
value = 11

[State 1010, 1a]
type = VelAdd
trigger1 = time = 0
trigger1 = Vel Y = [-.08,.08]
y = ifelse(Vel Y <= 0, .08, -.08)


[State 1010, 1a]
type = VelAdd
trigger1 = time = 100
y = .5


[State 1010, 3a]
type = VelSet
trigger1 = Pos Y >= 4
y = 0


[state 1000, Chama] ;chama Bola
type = helper
trigger1 = animElem = 7 
ID = 2001
pos = 60,-75
postype = p1
stateno = 1505
helpertype = normal
sprpriority = -20
ownpal = 1
bindtime = 0
pausemovetime = 100
supermovetime = 100
sprpriority = 10
;size.xscale = .8
;size.yscale = .8
keyctrl = 0

[state 1000, Chama] ;chama Bola
type = helper
trigger1 = animElem = 15 
ID = 2001
pos = 50,-80
postype = p1
stateno = 1505
helpertype = normal
sprpriority = -20
ownpal = 1
bindtime = 0
pausemovetime = 100
supermovetime = 100
sprpriority = 10
;size.xscale = .8
;size.yscale = .8
keyctrl = 0


; sons de gritos em golpes
[State -3, 1]
type = VarRandom
trigger1 = Time > 0
v = 7
range = 1,3 ; um a mais para ficar menos gritaria
[State -3, gritos]
type = PlaySnd
trigger1 = animElem = 6 
trigger2 = animElem = 14
value = 10,var(7)
channel = 1

[State -3, 1]
type = VarRandom
trigger1 = Time > 0
v = 10
range = 3,5


[State 800, 2]
type = ChangeState
Trigger1 = time = 200
value = 3403
ctrl = 0

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= -10
value = 52
;---------------------------------------- mistos ----------------------------------------

;---------------------------- P2 voando pelo ar
[Statedef 3010]
type    = A
movetype= H
physics = N
velset = -4,-20

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = time >= 4
y = .6

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

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
; ------------------- esperando atras da tela, antes de ir atras do P2 - para supers
[Statedef 666]
type    = A
physics = S
anim   = 0
sprpriority = 5
ctrl = 0

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

[State 666, 1]
type = PosSet
trigger1 = time = 34
Y = -90

[State 666, 2]
type = Changestate
trigger1 = time = 35
value = 6667
; ------------------------------------ caindo do ar, atras do P2
[Statedef 6667]
type   = A
physics = A
anim   = -1
sprpriority = 5
ctrl = 0

[State 6667, 1]
type = changeAnim
trigger1 = time = 0
value = 42
elem = 4

[State 6667, 1]
type = VelSet
trigger1 = 1
x = 5

[State 6667, 2]
type = ScreenBound
trigger1 = 1
value = 1

[State 6667, 2]
type = Afterimage
trigger1  = time = 0
PalBright = 0,0,90
PalContrast  = 0,28,120
PalMul = .70,.70,.70
time    =  50
length   = 10
TimeGap   = 1
FrameGap = 1
Trans = Add

[Statedef 1666] ; Bolhas rodando
type    = A
movetype= A ;I
sprpriority = 666
anim = 3202

[State 200, 1]
type = HitDef
trigger1 = time = 0
attr = S, NA      
damage = 1, 0    
animtype = Light  
guardflag = MA    
hitflag = MAF     
priority = 3, Hit         
pausetime = 3, 1
sparkno = S6000
guard.sparkno = S6003
sparkxy = 0,0        
hitsound = s1100, 12           
guardsound = s6,0        
ground.type = High           
ground.slidetime = 5         
ground.hittime  = 12
guard.hittime = 12
guard.ctrltime = 12
airguard.ctrltime = 18    
ground.velocity = -2         
airguard.velocity = -1.9,-.8 
air.type = High              
air.velocity = -1.4,-3    
air.hittime = 18          

[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A
trigger1 = root,animElem = 5
X = ifelse(root,facing=1,20,-20)

[State -3, 1]
type = VarRandom
trigger1 = Time > 0
v = 6
range = 15,20

[State 1000, voz2]
type = PlaySnd
trigger1 = time = 9 
value = 1200, var(6)

[State 1666, 1]
type = VelSet
trigger1 = time = 0
x = ((random / 333) - 1.5)
y = ((random / 333) - 1.5)

[State 1666, 2]
type = VelSet
trigger1 = time = 0
trigger1 = (RootDist X + 40) < -20 || RootDist X > 20
x = (RootDist X + 40) / 15

[State 1666, 3]
type = VelSet
trigger1 = time = 0
trigger1 = RootDist Y < 10 || RootDist Y > 100
y = (RootDist Y - 20) / 10 

[State 1666, volta]
type = ChangeState
trigger1 = Time = 10
value = 1666

[State 1666, 4]
type = VarSet
trigger1 = time >= 0
trigger1 = timeMod = 10,1
v = 22
value = var(22) + 10 

[State 1666,4]
type = destroyself
trigger1 = time >= 8 
trigger1 = var(22) >= 700


[Statedef 1667] ; Bolhas rodando 2 ---------------------
type    = A
movetype= A
sprpriority = 666
anim = 3203

[State 1666, 1]
type = VelSet
trigger1 = time = 0
x = ((random / 333) - 1.5)
y = ((random / 333) - 1.5)

[State 1666, 2]
type = VelSet
trigger1 = time = 0
trigger1 = (RootDist X + 40) < -20 || RootDist X > 20
x = (RootDist X + 40) / 15

[State 1666, 3]
type = VelSet
trigger1 = time = 0
trigger1 = RootDist Y < 10 || RootDist Y > 100
y = (RootDist Y - 20) / 10 

[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A ;stateno = 1200
trigger1 = root,animElem = 5
X = ifelse(root,facing=1,15,-15)

[State 1666, volta]
type = ChangeState
trigger1 = Time = 10
value = 1667

[State 1666, 4]
type = VarSet
trigger1 = time >= 0
trigger1 = timeMod = 10,1
v = 22
value = var(22) + 10 

[State 1666,4]
type = destroyself
trigger1 = time >= 8 
trigger1 = var(22) >= 500

[Statedef 1668] ; Bolhas rodando 3 ---------------------
type    = A
movetype= I
sprpriority = 666
anim = 3204


[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A ;stateno = 1200
trigger1 = root,animElem = 5
X = ifelse(root,facing=1,10,-10)

[State 1666, 1]
type = VelSet
trigger1 = time = 0
x = ((random / 333) - 1.5)
y = ((random / 333) - 1.5)

[State 1666, 2]
type = VelSet
trigger1 = time = 0
trigger1 = (RootDist X + 40) < -20 || RootDist X > 20
x = (RootDist X + 40) / 15

[State 1666, 3]
type = VelSet
trigger1 = time = 0
trigger1 = RootDist Y < 10 || RootDist Y > 100
y = (RootDist Y - 20) / 10 


[State 1666, volta]
type = ChangeState
trigger1 = Time = 10
value = 1668

[State 1666, 4]
type = VarSet
trigger1 = time >= 0
trigger1 = timeMod = 10,1
v = 22
value = var(22) + 10 

[State 1666,4]
type = destroyself
trigger1 = time >= 8 
trigger1 = var(22) >= 300
;=============================================================

[Statedef 2666] ; Sons para Hadouken anime
type    = A
movetype= I
sprpriority = -666
anim = 7513

[State 1000, trovao]
type = PlaySnd
trigger1 = time = 0
value = 1000, 4
channel = 5
[State 1000, trovao]
type = StopSnd
trigger1 = time = 25
channel = 5


[State 1000, raio1]
type = PlaySnd
trigger1 = time = 4
value = 1010, 3

[State 1000, raio1]
type = PlaySnd
trigger1 = time = 6
value = 1010, 4


[State 1001, 3]
type = PlaySnd
trigger1 = time = 8
value = 1010,3

[State 1001, 3]
type = PlaySnd
trigger1 = time = 12
value = 1010,2

[State 1001, 3]
type = PlaySnd
trigger1 = time >= 50 && timeMod = 5,2
value = 1010,1

[State 1001, 3]
type = PlaySnd
trigger1 = time >= 60 && timeMod = 8,2
value = 1010,4


[State 1666,4]
type = destroyself
trigger1 = time >= 40 && parent,var(10) = 1


[State 1666,4]
type = destroyself
trigger1 = time >= 100 && parent,var(10) != 1

;=============================================================== joga p2 longe e quica na parede

;------------------
; Hit by Fast Kung Fu Palm - shaking from the hit
; (a custom gethit state)
; See State 1020 for details
[Statedef 8821]
type    = A
movetype= H
physics = N
velset = 0,0

;[State 1025, Anim] ;Custom animation
;type = ChangeAnim2
;trigger1 = 1
;value = 5000

[State 1025, State]
type = ChangeState
trigger1 = HitShakeOver = 1
value = 8822

;------------------
; Hit by Fast Kung Fu Palm - flying through the air
; (a custom gethit state)
[Statedef 8822]
type    = A
movetype= H
physics = N

[State 106, 3]
type = MakeDust
trigger1 = Time >= 0 && time <= 6
pos = -5,-2
spacing = 1

[State 1026, Velocity]
type = VelSet
trigger1 = Time = 0
x = -20
y = 0

[State 1026, Gravity]
type = VelAdd
trigger1 = 1
x = -.60 ;45

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

[State 1026, Hit wall]
type = ChangeState
;triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20
trigger2 = FrontEdgeBodyDist <= 20
value = 8823


;------------------
; Hit by Fast Kung Fu Palm - hit wall
; (a custom gethit state)
[Statedef 8823]
type    = A
movetype= H
physics = N

[State 1027, Turn]
type = Turn
trigger1 = (Time = 0) && (FrontEdgeBodyDist <= 30)

[State 1027, Pos]
type = PosAdd
trigger1 = Time = 0
x = 15 - BackEdgeBodyDist

[State 1027, Stop moving]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

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

[State 1027, Spark]
type = Explod
trigger1 = Time = 0
anim = F72
pos = 0, floor (screenpos y) - 50
postype = back
sprpriority = 3

[State 1027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 5000

[State 1027, Sound]
type = PlaySnd
trigger1 = Time = 0
value = F7,0

[State -2, voz]
type = PlaySnd
trigger1 = Time = 0
value = 1001, 3


[State 810, Hurt 11]
type = LifeAdd
trigger1 = time = 2
value = -100


[State 1027, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 8824

;------------------
; Hit by Fast Kung Fu Palm - bounce off wall
; (a custom gethit state)
[Statedef 8824]
type    = A
movetype= H
physics = N


[State 1028, 1]
type = NotHitBy
trigger1 = 1
value = , NA, NP

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

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

[State 1028, Turn]
type = Turn
trigger1 = (Time = 0) && (BackEdgeDist < 30)

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

[State 1028, Anim 5050] ;Self falling animation
type = ChangeAnim
trigger1 = Time = 0
trigger1 = !SelfAnimExist(5052)
value = 5050

[State 1028, Anim 5052] ;Self falling animation (diagup type)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5052)
value = 5052

[State 1028, Anim 5060] ;Coming down - normal
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5050
trigger1 = SelfAnimExist(5060)
persistent = 0
value = 5060

[State 1028, Anim 5062] ;Coming down - diagup type
type = ChangeAnim
trigger1 = Vel Y > -2
trigger1 = Anim = 5052
trigger1 = SelfAnimExist(5062)
persistent = 0
value = 5062

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



;-------------------------------- insetos e vento puxa p2 pra perto ----------

;-------------------------- parede tras p2
[Statedef 4000]
type    = A
physics = N
movetype= I
ctrl = 0
anim = 4001
velset = 3,0
sprpriority = 1

[State 4000, play]
type = PlayerPush
trigger1 = time != 0
value =1

[State 4000, 1]
type = ScreenBound
trigger1 = time >=20
value = 0

[State 170, 1]
type = NotHitBy
trigger1 = time != 0
value = SCA
time = 1

[State 4000, 1]
type = Posadd
trigger1 != p2bodydist x
x = p2bodydist x

[State 105, 3]
type=DestroySelf
trigger1=time=150
trigger2=root,p2bodydist x < 30
trigger3=p2statetype!=L
trigger3=p2moveType=H
;--------------- parede frente
[Statedef 4001]
type    = S
movetype= I
physics = N
ctrl = 0
velset = 5
anim = 4001

[State 4000, 1]
type = Posadd
trigger1 != p2bodydist x 
x = p2bodydist x + 80

[State 8996, 1]
type = nothitby
trigger1 = 1
value = SCA,AA,AT,AP

[State 8996, 1]
type = playerpush
trigger1 = 1
value = 0

[State 8996, 1]
type = screenbound
trigger1 = 1
value = 0

[State 105, 3]
type=DestroySelf
trigger1=time=150
trigger2=root,p2bodydist x < 30
trigger3=p2statetype!=L
trigger3=p2moveType=H