;------------------------------ bocao nivel 3 -------------------------------------------------

[Statedef 3300]
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 <= 60 && Timemod = 3, 2
anim = 3202 
pos = 640,-65
random = 100,100
sprpriority = 10
ownpal = 1
accel = -0.3, 0.0
ignorehitpause = 1
supermove = 1
velocity = -2,0
pausemovetime = 100
supermovetime = 100
removetime = 200

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

[State 1001, Bolhas-P1]
type = Explod
trigger1 = time <= 60 && Timemod = 3, 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 = .8,1
pausemovetime = 100
supermovetime = 100

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0
invertall = 1
time = 50
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) = 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(10) = -40

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

[State 800, 2]
type=ChangeState
triggerall=time>39
trigger1=var(59)<0
trigger1=command!="holdz"
value=3301
ctrl=0
;Jogando o P2 ----------------------------------
[Statedef 3301]
type    = S
movetype= A
physics = N
anim = 3301
ctrl = 0
power=-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 1001, Bolhas-P1]
type = Explod
trigger1 = animElem = 2
anim = 7005 
pos = 10,-70
sprpriority = 10
ownpal = 1
ignorehitpause = 1
supermove = 1

[State 1001, Bolhas-P1]
type = Explod
trigger1 = animElem = 3
anim = 7006 
pos = 10,-70
sprpriority = 10
ownpal = 1
ignorehitpause = 1
supermove = 1

[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
guard.dist = 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)*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 = -2,0
guard.dist = 0
air.velocity = -1,3
recovery = 0
envshake.time = 10
envshake.ampl = 10
p1facing = 1
p2facing = 1  
p1stateno = 3302
p2stateno = 3303
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 3302]
type    = S
movetype= A
physics = N
anim = 3304
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, -120

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 24
pos = 70, -140

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 25
pos = 65, -140

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 26
pos = 60, -140

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 35
pos = 60, -130

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 36
pos = 60, -120

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 37
pos = 70, -160

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

[State 751, env]
type = EnvShake
trigger1 = AnimElem = 37
time = 20
ampl = -5
freq = 30
phase = 30

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

[State 810, Throw]
type = TargetLifeAdd
trigger1 = AnimElem = 12
trigger2 = AnimElem = 19
value = floor(fvar(10)*-100)
kill = 0

[State 810, Throw]
type = TargetLifeAdd
trigger1 = AnimElem = 37
value = floor(fvar(10)*-100)
kill = 1

[State 1001, Bolhas-P1]
type = Explod
trigger1 = AnimElem = 11
trigger2 = AnimElem = 18
trigger3 = AnimElem = 36
pos = 65,-150
facing = -1
anim = 7011 
sprpriority = 11
ownpal = 1
ignorehitpause = 1
supermove = 1
pausemovetime = 100
supermovetime = 100

[State 1000, voz]
type = PlaySnd
trigger1 = animElem = 11
trigger2 = animElem = 18
trigger3 = animElem = 36
value = 1, 3

[State 1000, voz]
type = PlaySnd
trigger1 = AnimElem = 10
value = 10, 18

[State 1000, voz]
type = PlaySnd
trigger1 = AnimElem = 24
value = 20, 1

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 38
value = 3304

[State 810, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;P2 preso na mao -------------------------------
[Statedef 3303]
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 = 3311
;---------------------------- P2 voando pelo ar
[Statedef 3304]
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 = 5050

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

[State 3000, 7]
type = null;ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;========================================= body explosion =============================

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

[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
value = 1300, 3
channel = 2

[State 1000, voz]
type = PlaySnd
trigger1 = time >= 10 && timeMod = 15,5 && time <= 150
value = 1300, 2
channel = 3
[State 1000, voz]
type = PlaySnd
trigger1 = time >= 10 && timeMod = 15,2 && time <= 150
value = 1300, 4
channel = 4


[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 = 1100, 5
channel = 1

[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) = 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(10) = -40

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

[State 800, 2]
type = ChangeState
TriggerAll = Time >= 40
Trigger1 = var(59) < 0
Trigger1 = command != "holdz"
value = 3401
ctrl = 0
;Jogando o P2 ----------------------------------
[Statedef 3401]
type    = A
movetype= A
physics = N
anim = 3210
ctrl = 0
sprpriority = 10

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

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) <= 500 
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -1

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) > 500 && var(10) <= 1000
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -2

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) > 1000 && var(10) <= 1500
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -3

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) > 1500 && var(10) <= 2000
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -4

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) > 2000 && var(10) <= 2500 
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -5

[State 3602, CorTelA]
type = LifeAdd
triggerAll = RoundState = 2
triggerAll = var(10) > 2500 
trigger1 = time >= 0 && timeMod = 2,1 && Time <= 150
value = -6

[State 751, env]
type = EnvShake
trigger1 = time <= 130 && TimeMod = 30,20
time = 10
ampl = -3
freq = 30
phase = 30

[State 1000, voz]
type = PlaySnd
trigger1 = time = 4
value = 10,ifelse(random<500,19,20)
channel = 1

[State 1000, voz]
type = PlaySnd
trigger1 = time = 0
trigger2 = time >= 10 && timeMod = 15,2 && time <= 150
value = 1300, 0
;channel = 2

[State 1000, voz]
type = PlaySnd
trigger1 = time >= 10 && timeMod = 15,5 && time <= 150
value = 1300, 2
channel = 3

[State 1000, voz]
type = PlaySnd
trigger1 = time >= 10 && timeMod = 15,3 && time <= 150
value = 1300, 4
channel = 4

[State 3000, SupeScreen]
type = Explod
trigger1 = time >= 0 && timeMod = 30,2 && time <= 150
anim = 7305
pos = 0, -50
sprpriority = 99
ownpal = 1
bindtime = 99
scale = .6,.6
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
trigger1 = time >= 0 && timeMod = 30,2 && time <= 150
anim = 7305
pos = 0, -50
sprpriority = 9
ownpal = 1
bindtime = 99
scale = 1,1
pausemovetime = 100
supermovetime = 100
[State 3000, SupeScreen]
type = Explod
trigger1 = time >= 0 && timeMod = 30,2 && time <= 150
anim = 7305
pos = 0, -50
sprpriority = -10
ownpal = 1
bindtime = 99
scale = .8,.8
pausemovetime = 100
supermovetime = 100

[state 1000, Chama] ;chama insetos
type = helper
triggerAll = var(10) <= 500 
trigger1 = time >= 170 && TimeMod = 4,1 && time <= 190
ID = 1666
pos = 0,-80
postype = p1
stateno = 1666
helpertype = normal
sprpriority = 10
ownpal = 1
bindtime = 0
size.xscale = 1
size.yscale = 1
pausemovetime = 100
supermovetime = 100
sprpriority = 10
keyctrl = 0

[state 1000, Chama] ;chama insetos
type = helper
triggerAll = var(10) <= 500 
trigger1 = time >= 170 &&  TimeMod = 4,1 && time <= 190
ID = 1667
pos = 0,-80
postype = p1
stateno = 1667
helpertype = normal
sprpriority = 10
ownpal = 1
bindtime = 0
size.xscale = .3
size.yscale = .3
pausemovetime = 100
supermovetime = 100
sprpriority = 10
keyctrl = 0

[state 1000, Chama] ;chama insetos teste
type = helper
triggerAll = var(10) <= 500 
trigger1 = time >= 170 &&  TimeMod = 4,1 && time <= 190
ID = 1668
pos = 0,-50
postype = p1
stateno = 1668
helpertype = normal
sprpriority = 10
ownpal = 1
bindtime = 0
size.xscale = .3
size.yscale = .3
pausemovetime = 100
supermovetime = 100
sprpriority = 10
keyctrl = 0

[State 1010, 1]
type = Posadd
trigger1 = time = 0 && pos y < -10
y = -10

[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 = VelAdd
trigger1 = time = 30
trigger2 = time = 120
y = -.4
[State 1010, 3a]
type = VelAdd
trigger1 = time = 60
trigger2 = time = 140
trigger3 = time = 190
y = .8
[State 1010, 3a]
type = VelAdd
trigger1 = time = 90
trigger2 = time = 160
y = -.6

[State 1010, 3a]
type = VelAdd
trigger1 = time = 200
y = 2

[State 1010, 3a]
type = VelSet
trigger1 = time = 198
y = 6

[State 1001, Bolhas-P1]
type = Explod
trigger1 = animElem = 2
anim = 3201 
pos = 0,0
sprpriority = 11
bindtime = -1
ownpal = 1
ignorehitpause = 1
supermove = 1

[State 3000 , 1] ;quebra a defesa do P2
type = AssertSpecial
trigger1 = animElem = 10
flag  = unguardable

[State 210, 2] ;derruba
type = HitDef
trigger1 = time <= 170 && timemod = 3,1
attr = S, NA
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*10),5
guardflag = MA
pausetime = 0,
sparkno = -1 ;s7011
sparkxy = -40,-70
hitsound   = s1300,1
guardsound = s6,3
ground.type = High
ground.slidetime = 2
ground.hittime  = 50
air.hittime = 80
ground.velocity = 0.5,-2
air.velocity = 0.5,-1
guard.dist=300
recovery = 0
envshake.time = 10
envshake.ampl = 10
palfx.add = -104,-104,7
palfx.mul = 256,256,256
palfx.sinadd = 56,56,0,10
palfx.invertall = 1
palfx.color = 0
palfx.time = 20
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

[State 210, 2] ;derruba
type = HitDef
trigger1 = time >= 160 && timemod = 3,1
attr = S, NA
animtype  = Hard
hitflag = MAFD
damage    = floor(fvar(10)*10),5
guardflag = MA
pausetime = 0,
sparkno = -1 ;s7011
sparkxy = -40,-70
hitsound   = s1300,1
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 50
air.hittime = 80
ground.velocity = 5,-2
air.velocity = -3,-1
guard.dist=300
recovery = 0
envshake.time = 10
envshake.ampl = 10
palfx.add = -104,-104,7
palfx.mul = 256,256,256
palfx.sinadd = 56,56,0,10
palfx.invertall = 1
palfx.color = 0
palfx.time = 20
fall = 1
air.fall = 1
fall.recover = 0
fall.recovertime = 999

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0; 144
invertall = 0
time = 170
add = -50,-200,-200
supermove = 1
sinadd = 80,-20,-150,-150

[State 3602, CorTelA]
type = EnvColor
trigger1 = time = 144
trigger2 = time = 148
trigger3 = time = 170
value = 250,250,250
time = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = time >= 0 && timeMod = 30,2 && time <= 160
time = 10
add = 100,100,180
mul = 256,256,256
sinadd = -80,-80,-80,10
invertall = 1
color = 0

[State 3000, SupeScreen]
type = Explod
triggerAll = p2MoveType = H
trigger1 = time >= 0 && timeMod = 6,2 && time <= 150
anim = 7307
postype = p2
random = 20,80
pos = 0, -50
sprpriority = 20
ownpal = 1
bindtime = 99
scale = .5,.5
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
triggerAll = p2MoveType = H
trigger1 = time >= 0 && timeMod = 6,2 && time <= 150
anim = 7308
postype = p2
random = 20,80
pos = 0, -50
sprpriority = 20
ownpal = 1
bindtime = 99
scale = .3,.3
pausemovetime = 100
supermovetime = 100

[State 3000, SupeScreen]
type = Explod
triggerAll = p2MoveType = H
trigger1 = time >= 0 && timeMod = 6,2 && time <= 150
anim = 7308
postype = p2
random = 20,80
pos = 0, -50
sprpriority = 20
ownpal = 1
bindtime = 99
scale = .8,.8
pausemovetime = 100
supermovetime = 100

[State 810, State End]
type = ChangeState
trigger1 = pos y >= 0
value = 3405
ctrl = 1
; cai vestido --------------------------
[Statedef 3403]
type    = A
physics = A
juggle  = 4
ctrl = 0
anim = 3206
sprpriority = 2

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0; 144
invertall = 0
time = 2
add = -1,-2,-2
supermove = 1
sinadd = 80,-20,-150,-150

[State 1000, voz]
type = StopSnd
trigger1 = time = 10
channel = 3

[State 106, 1]
type = VelSet
trigger1 = Time = 0
y = 1
; cai pelado --------------------------
[Statedef 3405]
type    = S
physics = S
poweradd= 65
ctrl = 0
anim = 3212
sprpriority = 2

[State 3405]
type = nothitby
trigger1 = 1
value = SAC

[State 3602, CorBg]
type = BGPalfx
trigger1 = time = 0; 144
invertall = 0
time = 2
add = -1,-2,-2
supermove = 1
sinadd = 80,-20,-150,-150

[State 1000, voz]
type = StopSnd
trigger1 = time = 10
channel = 3

[State 106, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 3]
type = MakeDust
trigger1 = Time = 2
pos = -5,-2
spacing = 1

[State 106, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;BASEADO NO ORIGINAL "BUTTERFLIES" Made by Baby Bonnie Hood (bbhood21@yahoo.com)

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

[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A ;stateno = 1200
trigger1 = root,animElem = 5
X = 20

[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, NA      
damage = floor(fvar(10)*10), 5    
animtype = Light  
guardflag = MA    
hitflag = MAF     
priority = 3, Hit         
pausetime = 3, 1          
sparkno = s7005
sparkxy = 0,0        
hitsound = s1100, 12           
guardsound = s6,0       
ground.type = High           
ground.slidetime = 10         
ground.hittime  = 10        
ground.velocity = -2,-5         
airguard.velocity = -1.9,-.8 
air.type = High              
air.velocity = -1.4,-3    
air.hittime = 12          

[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) - 5.5)
y = ((random / 333) - 3.5)


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


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


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

[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 3667] ; Bolhas rodando 2 ---------------------
type    = A
movetype= A
sprpriority = 666
anim = 3203

[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A ;stateno = 1200
trigger1 = root,animElem = 5
X = 20

[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, NA      
damage = floor(fvar(10)*10), 5
animtype = Light  
guardflag = MA    
hitflag = MAF     
priority = 3, Hit         
pausetime = 3, 1          
sparkno = s7005
sparkxy = 0,0        
hitsound = s1100, 12           
guardsound = s6,0      
ground.type = High           
ground.slidetime = 5         
ground.hittime  = 5         
ground.velocity = 0,-5         
airguard.velocity = -1.9,-.8 
air.type = High              
air.velocity = .4,-3    
air.hittime = 12          
;palfx.time = 5 ; cor de pegando fogo p2 nova
;palfx.add = 100,0,100
;sinadd = 85,110,55,10
;Palfx.color = 0 ;256 
;Palfx.mul = 120,20,124
;Palfx.invertall = 1

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

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

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


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

[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 3668] ; Bolhas rodando 3 ---------------------
type    = A
movetype= A
sprpriority = 666
anim = 3204

[State 1666, 3]
type = VelSet
triggerAll = root,movetype = A ;stateno = 1200
trigger1 = root,animElem = 5
X = 15

[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, NA      
damage = floor(fvar(10)*10), 5    
animtype = Light  
guardflag = MA    
hitflag = MAF     
priority = 3, Hit         
pausetime = 3, 1          
sparkno = s7005
sparkxy = 0,0        
hitsound = s1100, 12           
guardsound = s6,0         
ground.type = High           
ground.slidetime = 5         
ground.hittime  = 5         
ground.velocity = 0,-5         
airguard.velocity = -1.9,-.8 
air.type = High              
air.velocity = -.4,-3    
air.hittime = 12          
;palfx.time = 5 ; cor de pegando fogo p2 nova
;palfx.add = 100,0,100
;sinadd = 85,110,55,10
;Palfx.color = 0 ;256 
;Palfx.mul = 120,20,124
;Palfx.invertall = 1


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

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

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

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

[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

