;---------------------------------------------------------------------------
; HYPERS (1 power bar minimum)
;---------------------------------------------------------------------------

;HYPER MYSTIC SMASH
;------------------
[Statedef 6000]
type    = S
movetype= A
physics = N
juggle  = 10
velset = 0,0
anim = 3000
ctrl = 0

[State 6001, voz]
type = PlaySnd
trigger1 = time = 1
value = 0,7

[State 6000, Super A]
type = SuperPause
trigger1 = AnimElem = 5
pos = 5,-56
time = 30
movetime = 30
poweradd = -1000
anim = s2070
sound = s3,8
p2defmul = 1

[State 2000, Super B]
type = Explod
trigger1 = time = 0
anim = 6000
ID = 3000
postype = p1
pos = 50, 0
sprpriority = -2
supermove = 1

[State 3000, 2]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
time = 40
under = 1

[State 6000, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 15

[State 6000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 25
value2 = C, NA
time = 1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  12
value = -1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 6001
ctrl = 0

;---------------------------------------------------------------------------
;HMS - Disparo 
[Statedef 6001]
Type = S
Movetype = A
physics = S
anim = 3001
sprpriority = 3

[State 6001, Super B]
type = AfterImage
trigger1 = AnimElem = 1
time = 40
lenght = 15

[State 6101, 4]
type = AfterImageTime
trigger1 = Time >= 2
time = 2

[State 6001, voz]
type = PlaySnd
trigger1 = time = 1
value = 0,8

[State 6001, Snd]
type = PlaySnd
trigger1 = AnimElem = 2
trigger2 = AnimElem = 5
trigger3 = AnimElem = 8
trigger4 = AnimElem = 11
value = 4,3

;--
;Bolas
[State 193, bola1]
type = Helper
trigger1 = animelem = 1
ID = 6000
name = "bola1"
postype = p1
pos = 70,-10
stateno = 6010
helpertype = normal
ownpal = 1
keyctrl = 0

[State 193, bola2]
type = Helper
trigger1 = animelem = 2
ID = 6000
name = "bola2"
postype = p1
pos = 70,-10
stateno = 6011
helpertype = normal
ownpal = 1
keyctrl = 0
bindtime = -1

[State 193, bola3]
type = Helper
trigger1 = animelem = 4
ID = 6000
name = "bola3"
postype = p1
pos = 70,-10
stateno = 6012
helpertype = normal
ownpal = 1
keyctrl = 0

[State 193, bola4]
type = Helper
trigger1 = animelem = 5
ID = 6000
name = "bola4"
postype = p1
pos = 70,-10
stateno = 6013
helpertype = normal
ownpal = 1
keyctrl = 0

[State 193, bola5]
type = Helper
trigger1 = animelem = 7
ID = 6000
name = "bola5"
postype = p1
pos = 70,-50
stateno = 6014
helpertype = normal
ownpal = 1
keyctrl = 0

[State 193, bola6]
type = Helper
trigger1 = animelem = 8
ID = 6000
name = "bola6"
postype = p1
pos = 70,-10
stateno = 6015
helpertype = normal
ownpal = 1
keyctrl = 0
bindtime = -1

[State 193, bola7]
type = Helper
trigger1 = animelem = 10
ID = 6000
name = "bola7"
postype = p1
pos = 70,-10
stateno = 6016
helpertype = normal
ownpal = 1
keyctrl = 0

[State 193, bola8]
type = Helper
trigger1 = animelem = 11
ID = 6000
name = "bola8"
postype = p1
pos = 70,-10
stateno = 6017
helpertype = normal
ownpal = 1
keyctrl = 0
;----

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;HMS - Bola 1
[Statedef 6010]
type = A
movetype = A
juggle = 15
velset = 6,-6
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6020
ctrl = 0

;------
;HMS - Bola 1 Suelo
[Statedef 6020]
type = S
movetype = A
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 1 Rebote
[Statedef 6030]
type = A
movetype = A
physics = A
anim = 3002
velset = 6,-6

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 2
[Statedef 6011]
type = A
movetype = A
juggle = 15
velset = 5,-7
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6021
ctrl = 0

;------
;HMS - Bola 2 Suelo
[Statedef 6021]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 2 Rebote
[Statedef 6031]
type = A
movetype = A
physics = A
anim = 3002
velset = 5,-7

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 3
[Statedef 6012]
type = A
movetype = A
juggle = 15
velset = 7,-6
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6022
ctrl = 0

;------
;HMS - Bola 3 Suelo
[Statedef 6022]
type = S
movetype = A
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 3 Rebote
[Statedef 6032]
type = A
movetype = A
physics = A
anim = 3002
velset = 7,-6

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20
trigger2 = vel Y > 0 && pos Y >= 0

;------------
;HMS - Bola 4
[Statedef 6013]
type = A
movetype = A
juggle = 15
velset = 9,-7
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6023
ctrl = 0

;------
;HMS - Bola 4 Suelo
[Statedef 6023]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 4 Rebote
[Statedef 6033]
type = A
movetype = A
physics = A
anim = 3002
velset = 9,-7

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 5
[Statedef 6014]
type = A
movetype = A
juggle = 15
velset = 5,-8
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6024
ctrl = 0

;------
;HMS - Bola 5 Suelo
[Statedef 6024]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 5 Rebote
[Statedef 6034]
type = A
movetype = A
physics = A
anim = 3002
velset = 5,-8

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 6
[Statedef 6015]
type = A
movetype = A
juggle = 15
velset = 4,-10
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6025
ctrl = 0

;------
;HMS - Bola 6 Suelo
[Statedef 6025]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 6 Rebote
[Statedef 6035]
type = A
movetype = A
physics = A
anim = 3002
velset = 4,-10

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 7
[Statedef 6016]
type = A
movetype = A
juggle = 15
anim = 3002
velset = 6,-8

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6026
ctrl = 0

;------
;HMS - Bola 7 Suelo
[Statedef 6026]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 7 Rebote
[Statedef 6036]
type = A
movetype = A
physics = A
anim = 3002
velset = 6,-8

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20

;------------
;HMS - Bola 8
[Statedef 6017]
type = A
movetype = A
juggle = 15
velset = 8,-5
anim = 3002
sprpriority = -1

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 220, 1]
type = Gravity
trigger1 = time >= 1

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

[State 821, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 6027
ctrl = 0

;------
;HMS - Bola 8 Suelo
[Statedef 6027]
type = S
movetype = I
velset = 0
anim = 3003

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

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

;------
;HMS - Bola 8 Rebote
[Statedef 6037]
type = A
movetype = A
physics = A
anim = 3002
velset = 5,-8

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, 1]
type = Gravity
trigger1 = time >= 10

[State 810, rebote]
type = PlaySnd
trigger1 = Time = 1
value = 3,13

[State 220, 1]
type = DestroySelf
trigger1 = time = 20
;trigger2 = vel Y = 0 && pos Y >= 0

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;HYPER MYSTIC RAY
;----------------
[Statedef 6100]
type    = S
movetype= A
physics = N
juggle  = 10
velset = 0,0
anim = 3100
ctrl = 0

[State 6001, voz]
type = PlaySnd
trigger1 = time = 1
value = 0,9

[State 6000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = 17,-33
time = 30
movetime = 30
poweradd = -1000
anim = s2070
sound = s3,8
p2defmul = 1

[State 2000, Super B]
type = Explod
trigger1 = time = 0
anim = 6000
ID = 3000
postype = p1
pos = 50, 0
sprpriority = -2
supermove = 1

[State 3000, 2]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
time = 40
under = 1

[State 6000, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 15

[State 6000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 25
value2 = C, NA
time = 1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  12
value = -1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 6101
ctrl = 0

;---------------------------------------------------------------------------
;HMR - Disparo 
[Statedef 6101]
Type = S
Movetype = A
physics = S
anim = 3101
sprpriority = -1

[State 6001, Super B]
type = AfterImage
trigger1 = AnimElem = 1
time = 40
lenght = 15

[State 6101, 4]
type = AfterImageTime
trigger1 = Time >= 1
time = 2

[State 6001, expl]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 9
value = 4,6

[State 1030, voz]
type = PlaySnd
trigger1 = time = 0
value = 0,10

[State 220, 1]
type = NotHitBy
trigger1 = animelemtime(1) >= 0 && animelemtime(15) < 0
value = SCA,AP

[State 193, rayo]
type = Helper
trigger1 = animelemtime(2) = 0
ID = 1200
postype = p1
pos = 0,0
stateno = 6110
helpertype = normal
ownpal = 1
keyctrl = 0
ontop = 1
bindtime = -1

[State 193, rayo]
type = Helper
trigger1 = animelemtime(9) = 0
ID = 1200
postype = p1
pos = 0,0
stateno = 6111
helpertype = normal
ownpal = 1
keyctrl = 0
ontop = 1
bindtime = -1

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

;---------------------------------------------------------------------------
;HMR - Rayo 1
[Statedef 6110]
type = S
movetype = A
juggle = 15
velset = 0,0
anim = 1211
sprpriority = 5

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 6001, rayo]
type = PlaySnd
trigger1 = time = 0
value = 4,9

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HP
damage = 110, 10
animtype = Up
guardflag = MA
pausetime = 1,1
sparkno = s2020
guard.sparkno = s2050
sparkxy = 0, -50
hitsound = s3,3
guardsound = s3,5
ground.type = High
ground.slidetime = 18
ground.hittime  = 17
ground.velocity = 0,-6
air.velocity = 0,-6
fall = 1
air.fall = 1
getpower = 0

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

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

;------
;HMR - Rayo 2
[Statedef 6111]
type = S
movetype = A
juggle = 15
velset = 0,0
anim = 1211
sprpriority = 5

[State 220, 1]
type = NotHitBy
trigger1 = 1
value = SCA

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

[State 6001, rayo]
type = PlaySnd
trigger1 = time = 0
value = 4,9

[State 220, 1]
type = HitDef
trigger1 = time = 0
attr = A, HP
damage = 110, 10
animtype = Up
guardflag = MA
pausetime = 1,1
sparkno = s2020
guard.sparkno = s2050
sparkxy = 0, -50
hitsound = s3,3
guardsound = s3,5
ground.type = High
ground.slidetime = 18
ground.hittime  = 17
ground.velocity = -4,-4
air.velocity = -4,-4
fall = 1
air.fall = 1
fall.recover = 0
air.recover = 0
p2stateno = 1205
air.p2stateno = 1205
getpower = 0

;Super BG
[State -2, Helper]
type = Helper
triggerall = WinKO && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;THE SPAWNING
;------------
[Statedef 6200]
type    = S
movetype= A
physics = N
juggle  = 10
velset = 0,0
anim = 3000
ctrl = 0

[State 6001, voz]
type = PlaySnd
trigger1 = time = 1
value = 0,7

[State 6000, Super A]
type = SuperPause
trigger1 = AnimElem = 5
pos = 5,-56
time = 30
movetime = 30
poweradd = -3000
anim = s2070
sound = s3,8
p2defmul = 1

[State 2000, Super B]
type = Explod
trigger1 = time = 0
anim = 6000
ID = 3000
postype = p1
pos = 50, 0
sprpriority = -2
supermove = 1

[State 3000, 2]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
time = 40
under = 1

[State 6000, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 15

[State 6000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 25
value2 = C, NA
time = 1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  12
value = -1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 6201
ctrl = 0

;---------------------------------------------------------------------------
;TS - Mitosis 
[Statedef 6201]
Type = S
Movetype = A
physics = S
anim = 3200
sprpriority = 3

[State 220, 1]
type = NotHitBy
trigger1 = animelemtime(7) < 0
value = SCA

[State 193, clon]
type = Helper
trigger1 = animelemtime(7) = 0
ID = 6200
name = "Clone"
postype = p1
pos = 60,0
stateno = 6202
helpertype = player
ownpal = 1
keyctrl = 1

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;TS - Clon
[Statedef 6202]
type = S
movetype = I
physics = S
velset = 0,0
anim = 0
facing = enemy,facing;1

[State 3105, start clone timer]
type = VarSet
trigger1 = AnimTime = -1
v = 12
value = 0

[State 3105, playerpush]
type = PlayerPush
trigger1 = 1
value = 1

[State 1101, 1]
type = HitOverride
trigger1 = 1
time = -1    
attr = SCA, AA, AP   
slot = 0   
stateno = 6204
forceair = 1

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

;----
;TS - End
[Statedef 6203]
type = S
movetype = A
velset = 0,0
anim = 3201
sprpriority = -1

[State 220, NHB]
type = NotHitBy
trigger1 = 1
value = SCA

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  12
value = -1

[State 220, DS]
type = DestroySelf
trigger1 = animtime = 0
trigger1 = ishelper

;----
;TS - Hit
[Statedef 6204]
type    = A
movetype= H
physics = N
velset = 0,0
anim = 3202
sprpriority = -1

[State 220, NHB]
type = NotHitBy
trigger1 = 1
value = SCA

[State 220, DS]
type = DestroySelf
trigger1 = animtime = 0
trigger1 = ishelper

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;CHAOS DIMENSION
;---------------
[Statedef 6300]
type    = S
movetype= A
physics = N
juggle  = 10
velset = 0,0
anim = 3300
ctrl = 0

[State 6001, voz]
type = PlaySnd
trigger1 = time = 1
value = 0,11

[State 6000, Super A]
type = SuperPause
trigger1 = AnimElem = 1
pos = -34,-62
time = 30
movetime = 30
poweradd = -3000
anim = s2070
sound = s3,8
p2defmul = 1

[State 2000, Super B]
type = Explod
trigger1 = time = 0
anim = 6000
ID = 3000
postype = p1
pos = 50, 0
sprpriority = -2
supermove = 1

[State 3000, 2]
type = EnvColor
trigger1 = time = 0
value = 0,0,0
time = 40
under = 1

[State 6000, Super D]
type = NotHitBy
trigger1 = AnimElem = 1
value = , NA, SA, AT
time = 15

[State 6000, Super E]
type = NotHitBy
trigger1 = AnimElemTime(2) >= 0 && Time < 25
value2 = C, NA
time = 1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  12
value = -1

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 6301
ctrl = 0

;---------------------------------------------------------------------------
;CD - Start 
[Statedef 6301]
Type = S
Movetype = A
physics = S
anim = 3301
sprpriority = 3

[State 6001, sonido]
type = PlaySnd
trigger1 = time = 1
value = 4,7

[State 220, 1]
type = HitDef
trigger1 = animelem = 2
attr = S, HA
damage = 30, 5
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 7, Hit
pausetime = 10, 12
sparkno = s2010
guard.sparkno = s2050
sparkxy = -10, -50
hitsound = s3,1
guardsound = s3,5
ground.type = Low
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -5
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -2.2,-3
air.hittime = 18

[State 6000, var(13)]
type = VarSet
trigger1 = time = 5
v = 13
value = 300

[State 1151, 4] ;Changestate
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;------
;CD - Agarre Parado
[Statedef 6310]
type = S
movetype = A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3310
poweradd = 0
sprpriority = 2

[State 190, 2]
type = PlaySnd
trigger1 = time = 0
value = 4,4

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, HT 
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 6320
p2stateno = 6340
fall = 1

[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;------
;CD - Agarre Agachado
[Statedef 6311]
type    = C
movetype= A
physics = C
juggle  = 1
velset = 0,0
ctrl = 0
anim = 3311
poweradd = 0
sprpriority = 2

[State 190, 2]
type = PlaySnd
trigger1 = time = 0
value = 4,4

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = C, HT 
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 6321
p2stateno = 6340
fall = 1

[State 430, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

;------
;CD - Agarre Aereo
[Statedef 6312]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 3312
poweradd = 0

[State 190, 2]
type = PlaySnd
trigger1 = time = 0
value = 4,4

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = A, HT 
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 6322
p2stateno = 6340
fall = 1

[State 2075, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
;CD - Agarrado (stand)
[Statedef 6320]
type    = S
movetype= I
physics = S
juggle  = 1
ctrl = 0
anim = 3320
poweradd = 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 810, PS]
type = PlaySnd
trigger1 = Time = 1
value = 0,12

[State 810, agarre]
type = PlaySnd
trigger1 = Time = 1
value = 3,10

[State 810, Width]
type = Width
trigger1 = Time >= 0
edge = 100,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 80, 0

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 52, -20

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6330

;------
;CD - Agarrado (crouch)
[Statedef 6321]
type    = C
movetype= I
physics = C
juggle  = 1
ctrl = 0
anim = 3321
poweradd = 0

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 810, PS]
type = PlaySnd
trigger1 = Time = 1
value = 0,12

[State 810, agarre]
type = PlaySnd
trigger1 = Time = 1
value = 3,10

[State 810, Width]
type = Width
trigger1 = Time >= 0
edge = 100,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 70, 0

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 52, -20

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6330

;------
;CD - Agarrado (air)
[Statedef 6322]
type    = S
movetype= I
physics = S
juggle  = 1
ctrl = 0
anim = 3322
velset = 0,0
poweradd = 0

[State 3110, varset]
type = VarSet
trigger1 = Time = 0
v =  13
value = -1

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 810, PS]
type = PlaySnd
trigger1 = Time = 1
value = 0,12

[State 810, agarre]
type = PlaySnd
trigger1 = Time = 1
value = 3,10

[State 810, Width]
type = Width
trigger1 = Time >= 0
edge = 100,0

[State 810, Bind 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 50, -78

[State 810, Bind 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 60, -50

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6330
ctrl = 0

;---------------------------------------------------------------------------
;CD - Empezando
[Statedef 6330]
type    = S
movetype= A
physics = S
juggle  = 1
ctrl = 0
anim = 3330
poweradd = 0
sprpriority = 2
velset = 0,0

[State 810, CD]
type = PlaySnd
trigger1 = Time = 0
value = 3,14

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 181, 1]
type = PosSet
trigger1 = time = 0
x = (frontedgedist = 160)
y = -120

[State 181, 1]
type = BGPalFX
trigger1 = 1
time = 180
invertall = 1

[State 810, Bind 1]
type = TargetBind
trigger1 = 1
pos = 0, 0

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6331

;------
;CD - Tornado
[Statedef 6331]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 3331
poweradd = 0
sprpriority = 2

[State 810, CD]
type = PlaySnd
trigger1 = Time = 0
value = 3,14

[State 181, 1]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 1000, back]
type = Explod
trigger1 = time = 0
anim = 3332
pos = 0,0
sprpriority = -2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 810, Bind 1]
type = TargetBind
trigger1 = 1
pos = 0, 0

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6332

;------
;CD - Chaos!!
[Statedef 6332]
type    = A
movetype= A
physics = A
juggle  = 1
ctrl = 0
anim = 3336
poweradd = 0
sprpriority = 2

[State 810, voz]
type = PlaySnd
trigger1 = Time = 0
value = 0,13

[State 810, CD]
type = PlaySnd
trigger1 = Time = 0
value = 3,15

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 181, 1]
type = VelSet
trigger1 = 1
x = 0
y = 0

[State 810, Damage]
type = TargetLifeAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
trigger6 = AnimElem = 6
trigger7 = AnimElem = 7
trigger8 = AnimElem = 8
trigger9 = AnimElem = 9
trigger10 = AnimElem = 10
value = -50
kill = 1

[State 810, Damage]
type = HitAdd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 2
trigger3 = AnimElem = 3
trigger4 = AnimElem = 4
trigger5 = AnimElem = 5
trigger6 = AnimElem = 6
trigger7 = AnimElem = 7
trigger8 = AnimElem = 8
trigger9 = AnimElem = 9
trigger10 = AnimElem = 10
value = 1

[State 1000, tornado1a]
type = Explod
trigger1 = time = 0
trigger2 = animelem = 7
anim = 3333
pos = 0,0
sprpriority = 2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 1000, tornado1b]
type = Explod
trigger1 = time = 0
trigger2 = animelem = 7
anim = 3334
pos = 0,0
sprpriority = -2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 1000, tornado2a]
type = Explod
trigger1 = time = 0
anim = 3338
pos = 0,0
sprpriority = 2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 1000, tornado2b]
type = Explod
trigger1 = time = 0
anim = 3339
pos = 0,0
sprpriority = -2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 810, Throw]
type = TargetState
trigger1 = AnimElem = 12
value = 6341

;Super BG
[State -2, Helper]
type = Helper
triggerall = enemy,life<0 && !var(6)
trigger1 = movehit
name = "SuperKO"
ID = 10000
stateno = 10000
supermovetime = 99999
pausetime = 99999
ignorehitpause = 1
ownpal = 1

[State 1400, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 6333

;------
;CD - Terminando
[Statedef 6333]
type    = A
movetype= I
physics = A
ctrl = 0
anim = 3337
poweradd = 0

[State 1000, portal]
type = Explod
trigger1 = animelem = 22
anim = 1910
pos = 0,-25
sprpriority = -2
postype = p1
persistent = 1
ignorehitpause = 1
ID = 3330

[State 181, 1]
type = VelSet
trigger1 = animelemtime(21) < 0
x = 0
y = 0

[State 181, 1]
type = Gravity
trigger1 = animelemtime(21) >= 0

[State 181, 1]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 2075, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52

;---------------------------------------------------------------------------
; Agarrado 1
[Statedef 6340]
type    = A
movetype= H
physics = N
velset = 0,0

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

;------
; Agarrado 2
[Statedef 6341]
type    = A
movetype= H
physics = N
velset = 0, -12
poweradd = 40

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

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

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