;---------------------------------------------------------------------------
;				  Supers
;---------------------------------------------------------------------------
;Lightning Strike
[Statedef 3000]
type    = A
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3000

[State 3000, Width]
type = Width
trigger1 = 1
value = 33,33

;------------Hyper Effects-----------
;---------------------[NEW Version]---------------------
[State 3000, assertspecial]
type = assertspecial
trigger1 = AnimElemTime(13) = 0
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = AnimElemTime(13) = 0
Time = 60
;anim =-1;s3012
pos = -15,-80
sound = S8889,0
poweradd = -1000


[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1



[State 3000, strikes]
type = helper
trigger1 = time = 38
stateno = 3005
pos = 0,0
postype = p2
bindtime = 1
name = "Lightning Strikes Helper"
id = 3005
persistent = 0

[State 3000, superbg]
type = Explod
trigger1 = AnimElemTime(15) = 0
anim = 3301
ID = 3301
pos = 0,0
postype = p1
bindtime = 999
removetime = 200
supermove = 200
pausemovetime = 200
sprpriority = 3
ownpal = 1


[State 3000, end]
type = changestate
trigger1 = time = 250
value = 50

;---------------------------
;Lightning Strike start
[Statedef 3005]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
ctrl = 0
anim = 9999;nothing

[State 3005, 1]
type = posset
trigger1 = pos y != 0
y = 0

[State 3005, 1]
type = varrandom
trigger1 = (GameTime%1)=0
v = 17
range = 3001, 3004

[State 3005, strikes]
type = helper
trigger1 = time = 0;animelem = 14;time = 116
trigger2 = time = 25
trigger3 = time = 33
trigger4 = time = 50
trigger5 = time = 60
trigger6 = time = 69
trigger7 = time = 88
trigger8 = time = 93
trigger9 = time = 100
trigger10 = time = 110
trigger11 = time = 120
trigger12 = time = 130
trigger13 = time = 140
trigger14 = time = 150
trigger15 = time = 160
trigger16 = time = 165
trigger17 = time = 170
trigger18 = time = 175
trigger19 = time = 180
trigger20 = time = 183
trigger21 = time = 185
trigger22 = time = 187
trigger23 = time = 189
trigger24 = time = 191
trigger25 = time = 193
trigger26 = time = 195
trigger27 = time = 197
stateno = var(17)
bindtime = -1
name = "Lightning Strikes"
id = var(17)
persistent = 1

[State 3005, thunder sounds]
type = playsnd
trigger1 = time = 0;animelem = 14;time = 116
trigger2 = time = 60
trigger3 = time = 100
trigger4 = time = 110
trigger5 = time = 130
trigger6 = time = 140
trigger7 = time = 160
trigger8 = time = 180
trigger9 = time = 195
value = S4000,0
channel = 3

[State 3005, strikes]
type = helper
trigger1 = time = 199;animelem = 14;time = 116
stateno = 3006
bindtime = -1
name = "Lightning Strikes"
id = 3006
persistent = 1

;---hitsounds
[State 3005,1]
type = playsnd
trigger1 = var(18) = 1
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 2
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 3
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 4
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 5
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 6
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 7
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 8
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 9
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 10
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 11
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 12
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 13
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 14
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 15
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 16
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 17
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 18
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 19
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 20
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 21
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 22
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 23
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 24
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 25
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 26
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 27
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 28
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 29
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(18) = 30
value = 2000,6
channel = 2
persistent = 0
ignorehitpause = 1

;-----guardsounds

[State 3005,1]
type = playsnd
trigger1 = var(19) = 1
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 2
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 3
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 4
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 5
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 6
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 7
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 8
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 9
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 10
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 11
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 12
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 13
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 14
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 15
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 16
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 17
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 18
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 19
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 20
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 21
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 22
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 23
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 24
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 25
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 26
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 27
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 28
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 29
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = var(19) = 30
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3005, end]
type = destroyself
trigger1 = time = 250
trigger2 = parent, movetype = H



;Lightning Strike1
[Statedef 3001]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
anim = 6001
ctrl = 0

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 3001, 2]
type = parentvaradd
trigger1 = movehit
v = 18
value = 1
persistent = 0
ignorehitpause = 1

[State 3001, 2]
type = parentvaradd
trigger1 = moveguarded
v = 19
value = 1
persistent = 0
ignorehitpause = 1

[State 3001, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NP
animtype  = hard
damage    = 6,1
guardflag = MA
pausetime = 11,11
sparkno = s3355
sparkxy = -10,-80
;guard.sparkno = s3356
ground.type = high
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = 0;11.3, -7.3
air.velocity = 0;11.3,-4
ground.cornerpush.veloff = 0;-27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
getpower = 0

[State 3001, 1]
type = destroyself
trigger1 = animtime = 0



;Lightning Strike2
[Statedef 3002]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
anim = 6002
ctrl = 0

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 3002, 2]
type = parentvaradd
trigger1 = movehit
v = 18
value = 1
persistent = 0
ignorehitpause = 1

[State 3002, 2]
type = parentvaradd
trigger1 = moveguarded
v = 19
value = 1
persistent = 0
ignorehitpause = 1

[State 3002, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NP
animtype  = hard
damage    = 6,1
guardflag = MA
pausetime = 11,11
sparkno = S3355
sparkxy = -10,-80
;guard.sparkno = s10003; s20020
;hitsound   = s2000,2
;guardsound = s0,3
ground.type = low
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = 0;11.3, -7.3
air.velocity = 0;11.3,-4
ground.cornerpush.veloff = 0;-27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
getpower= 0

[State 3002, 1]
type = destroyself
trigger1 = animtime = 0


;Lightning Strike3
[Statedef 3003]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
anim = 6003
ctrl = 0

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 3003, 2]
type = parentvaradd
trigger1 = movehit
v = 18
value = 1
persistent = 0
ignorehitpause = 1

[State 3003, 2]
type = parentvaradd
trigger1 = moveguarded
v = 19
value = 1
persistent = 0
ignorehitpause = 1

[State 3003, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NP
animtype  = hard
damage    = 6,1
guardflag = MA
pausetime = 11,11
sparkno = S3355
sparkxy = -10,-80
;guard.sparkno = s10003; s20020
;hitsound   = s2000,2
;guardsound = s0,3
ground.type = high
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = 0;11.3, -7.3
air.velocity = 0;11.3,-4
ground.cornerpush.veloff = 0;-27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
getpower = 0

[State 3003, 1]
type = destroyself
trigger1 = animtime = 0



;Lightning Strike4
[Statedef 3004]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
anim = 6004
ctrl = 0

[State 3004, 2]
type = parentvaradd
trigger1 = movehit
v = 18
value = 1
persistent = 0
ignorehitpause = 1

[State 3004, 2]
type = parentvaradd
trigger1 = moveguarded
v = 19
value = 1
persistent = 0
ignorehitpause = 1

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

;[State 2000, Again!]
;type = MoveHitReset
;trigger1 = MoveHit
;IgnoreHitPause = 1

[State 3004, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NP
animtype  = hard
damage    = 6,1
guardflag = MA
pausetime = 11,11
sparkno = S3355
sparkxy = -10,-80
;guard.sparkno = s10003; s20020
;hitsound   = s2000,2
;guardsound = s0,3
ground.type = low
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = 0;11.3, -7.3
air.velocity = 0;11.3,-4
ground.cornerpush.veloff = 0;-27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
getpower = 0

[State 3004, 1]
type = destroyself
trigger1 = animtime = 0




;Lightning Strike5 (end)
[Statedef 3006]
type = S
movetype = A
physics = N
velset = 0,0
sprpriority = 5
anim = 6004
ctrl = 0

[State 3005, 2]
type = parentvaradd
trigger1 = movehit
v = 18
value = 1
persistent = 0
ignorehitpause = 1

[State 3005, 2]
type = parentvaradd
trigger1 = moveguarded
v = 19
value = 1
persistent = 0
ignorehitpause = 1

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 3005, 2]
type = HitDef
trigger1 = AnimElem = 4
attr = S, NP
animtype  = hard
damage    = 4,1
guardflag = MA
pausetime = 11,11
sparkno = S3355
sparkxy = -10,-80
;guard.sparkno = s10003; s20020
;hitsound   = s2000,2
;guardsound = s0,3
ground.type = low
ground.slidetime = 12
ground.hittime  = 24
ground.velocity = 21.3, -15;11.3
air.velocity = 21.3,-15;11
ground.cornerpush.veloff = 0;-27
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
getpower = 0

[State 3005, 1]
type = destroyself
trigger1 = animtime = 0


;--------------------------------------------------------------------------------------
;Hailstorm
;--------------------------------------------------------------------------------------
[Statedef 3100]
type    = A
movetype= A
physics = N
juggle  = 0
poweradd= 0
velset = -2.8,-2.2
ctrl = 0
anim = 3100

[State 3100, position]
type = posadd
trigger1 = time = 1
y = -5

[State 3100, move]
type = velset
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
trigger11 = animelem = 11
trigger12 = animelem = 12
trigger13 = animelem = 13
trigger14 = animelem = 14
trigger15 = animelem = 15
trigger16 = animelem = 16
trigger17 = animelem = 17
trigger18 = animelem = 18
trigger19 = animelem = 19
trigger20 = animelem = 20
trigger21 = animelem = 21
trigger22 = animelem = 22
trigger23 = animelem = 23
trigger24 = animelem = 24
x = -2.8
y = -2.2

[State 3100, move]
type = velset
trigger1 = time >= 37
x = 0
y = 0

[State 3000, Width]
type = Width
trigger1 = 1
value = 33,33

;------------Hyper Effects-----------
;---------------------[NEW Version]---------------------
[State 3000, assertspecial]
type = assertspecial
trigger1 = time = 40
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 40
Time = 60
;anim =-1;s3012
pos = 55,-85
sound = S8889,0
poweradd = -1000


[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1



[State 3100, Helper]
type = Helper
trigger1 = Time = 37
stateno = 3200
postype = p2
pos = 120,-260
name = "Hail hitsound helper"
id = 3200
ownpal = 1

[State 3000, end]
type = changestate
trigger1 = time = 132
value = 50


;--------------------------------------------------------------------------------------
; Hail Help
;--------------------------------------------------------------------------------------
[Statedef 3200]
type = S
movetype = A
physics = N
anim = 9999
sprpriority = 2
ctrl = 0

[State 3200, 1];anim
type = VarRandom
trigger1 = 1
v = 23
range = 4000,4009

[State 3200, 1]
type = Helper
trigger1 = (gameTime%1) =0
trigger1 = time < 85
stateno = 4000
postype = p2
pos = 120,-260
name = "Hail"
id = var(23)
ownpal = 1



;---hitsounds
[State 3200,1]
type = playsnd
trigger1 = var(26) = 1
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 2
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 3
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 4
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 5
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 6
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 7
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 8
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 9
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 10
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 11
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 12
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 13
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 14
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 15
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 16
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 17
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 18
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 19
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 20
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 21
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 22
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 23
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 24
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 25
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 26
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 27
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 28
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 29
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 30
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 31
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 32
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 33
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 34
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 35
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 36
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 37
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 38
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 39
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 40
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 41
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 42
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 43
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 44
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 45
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 46
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 47
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 48
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 49
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 50
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 51
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 52
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 53
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 54
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 55
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 56
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 57
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 58
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 59
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(26) = 60
value = 2000, 0
channel = 2
persistent = 0
ignorehitpause = 1

;-----guardsounds

[State 3200,1]
type = playsnd
trigger1 = var(27) = 1
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 2
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 3
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 4
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 5
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 6
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 7
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 8
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 9
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 10
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 11
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 12
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 13
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 14
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 15
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 16
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 17
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 18
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 19
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 20
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 21
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 22
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 23
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 24
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 25
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 26
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 27
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 28
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 29
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 30
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 31
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 32
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 33
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 34
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 35
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 36
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 37
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 38
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 39
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 40
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 41
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 42
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 43
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 44
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 45
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 46
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 47
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 48
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 49
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 50
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200,1]
type = playsnd
trigger1 = var(27) = 51
value = 0,3
channel = 2
persistent = 0
ignorehitpause = 1

[State 3200, 1]
type = parentvaradd
trigger1 = parent, movetype = H
v = 28
value = 1
persistent = 1

[State 3200, 1]
type = DestroySelf
trigger1 = parent, var(28) > 25
trigger2 = time >= 100


;---------------------------------------------------------------------------
;Lighting Storm
[Statedef 3400]
type    = A
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3400

[State 3000, Width]
type = Width
trigger1 = 1
value = 33,33

;------------Hyper Effects-----------
;---------------------[NEW Version]---------------------
[State 3000, assertspecial]
type = assertspecial
trigger1 = AnimElemTime(16) = 0
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 5;AnimElemTime(16) = 0
Time = 60
;anim =-1;s3012
pos = 0,-90
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1



[State 3000, lighting]
type = Explod
trigger1 = Time = 37
anim = 3401
ID = 3401
pos = 0,0
postype = p1
bindtime = 999
removetime = 21
supermove = 21
pausemovetime = 21
sprpriority = 4

[State 3000, lighting]
type = Explod
trigger1 = Time = 90
anim = 3413
ID = 3413
pos = 0,0
postype = p1
bindtime = 999
removetime = 55
supermove = 55
pausemovetime = 55
sprpriority = 4

[State 3000, Lbolt1]
type = helper
trigger1 = time = 83
stateno = 3401
pos = -16,-120
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt2]
type = helper
trigger1 = time = 83
stateno = 3402
pos = 12,-100
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt3]
type = helper
trigger1 = time = 83
stateno = 3403
pos = 40,-110
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt4]
type = helper
trigger1 = time = 83
stateno = 3404
pos = 1,-80
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt5]
type = helper
trigger1 = time = 83
stateno = 3405
pos = -15,-30
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt6]
type = helper
trigger1 = time = 83
stateno = 3406
pos = -40,-75
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt7]
type = helper
trigger1 = time = 83
stateno = 3407
pos = -40,-95
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 3000, Lbolt8]
type = helper
trigger1 = time = 83
stateno = 3408
pos = -40,-100
postype = p1
bindtime = 1
name = "Lightning Strikes Helper"
id = 3405
persistent = 0

[State 1005, hitsnd]
type = playsnd
trigger1 = time = 88
value = 3000,1
persistent = 0
ignorehitpause = 1

[State 405, 6]
type = PlaySnd
trigger1 = time >= 70
trigger1 = TimeMod = 16, 0
trigger1 = time <= 190
value = 4000,1
channel = 2

[State 200, 4]
type = ChangeState
triggerall = pos y >= -5
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 200, 4]
type = ChangeState
triggerall = pos y < -5
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;-------------------------------------------------------------------------------------------------------
;LB 1
[Statedef 3401]
type = A
physics = N
movetype = A
anim = 3405
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = 0
y = -3

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
p2stateno = 623

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 2
[Statedef 3402]
type = A
physics = N
movetype = A
anim = 3406
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = 2.5
y = -2.5

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower = 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 3
[Statedef 3403]
type = A
physics = N
movetype = A
anim = 3407
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

;[State 1101, a1]
;type = BindToRoot
;trigger1 = 1
;pos = 15, 0
;time = -1
;ignorehitpause = 1

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = 5
y = 0

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower = 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 4
[Statedef 3404]
type = A
physics = N
movetype = A
anim = 3408
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = 2.5
y = 2.5

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower = 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 5
[Statedef 3405]
type = A
physics = N
movetype = A
anim = 3409
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = 0
y = 3

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower =0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 6
[Statedef 3406]
type = A
physics = N
movetype = A
anim = 3410
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = -2.5
y = 5

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower = 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 7
[Statedef 3407]
type = A
physics = N
movetype = A
anim = 3411
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = -5
y = 0

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower= 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120

;-------------------------------------------------------------------------------------------------------
;LB 8
[Statedef 3408]
type = A
physics = N
movetype = A
anim = 3412
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 1016
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, vel]
type = velset
trigger1 = 1
x = -2.5
y = -2.5

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1005, hitsnd]
type = playsnd
trigger1 = movehit && numtarget
trigger1 = target,time = 0 &&target,movetype = H
value = 2,7
persistent = 0
ignorehitpause = 1

[State 1101, ff]
type = HitDef
triggerall = p2stateno != 17696
trigger1 = Time % 8 = 3
attr = S, SP
hitflag = MAFP
guardflag = MA
animtype = medium
priority = 6, Hit
sprpriority = 7
damage = 15,2
pausetime = 0,4
sparkno = S3355
guard.sparkno = S8550
sparkxy = 0,-70  
hitsound = S1000,8
guardsound = S0,3
ground.type = high              
ground.slidetime = 10; 40
ground.hittime  = 20             
ground.velocity = -3 
guard.dist = 320
air.velocity = -3,-2
airguard.velocity = -5     
guard.velocity = -5 
air.type = Low                  
air.hittime = 20
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 7
envshake.freq = 40
envshake.ampl = -5
getpower = 0

[State 1006, end]
type = destroyself
trigger1 = frontedgedist<-105||backedgedist<-120


;---------------------------------------------------------------------------
; Ice Storm Projectile
[Statedef 3700]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 3500
sprpriority = 0

;------------Hyper Effects-----------
;---------------------[NEW Version]---------------------
[State 3000, assertspecial]
type = assertspecial
trigger1 = time = 6
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = time = 6
Time = 60
;anim =-1;s3012
pos = -14,-75
sound = S8889,0
poweradd = -1000


[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1



[State 3600 , Turn Off BGM]
type = AssertSpecial
trigger1 = AnimElem = 8
flag = NoMusic

[State 3600, Stoptime]
type = Pause
trigger1 = AnimElem = 8
darken = 1
time = 600
movetime = 600



[State that starts the inverted effect]
type           = BGPalFX
trigger1       = Time >= 35
Add = 150,150,170
IgnoreHitPause = 1
time = 750
color = 0

[State 181, Some moments of invincibility]
type = NotHitBy
trigger1 = AnimElemNo(0) >= 18
value = SCA
time = 2
ignorehitpause = 1

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

;-----------------------------------------
;Yoga Purification continue
[Statedef 3401]
type    = S
movetype= A
physics = S
velset = 0,0
anim = 3401
ctrl = 0

[State 1150, 3]
type = PlaySnd
trigger1 = time = 1
value = 190, 0

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

;------------------------------RAIN HYPER------------------------------

[Statedef 3300]
type    = S                      
movetype= A                      
physics = S                      
juggle  = 2                      
velset = 0,0                     
ctrl = 0                                                                  
sprpriority = 2
hitcountpersist =1

;------------Hyper Effects-----------
;---------------------[NEW Version]---------------------
[State 3000, assertspecial]
type = assertspecial
trigger1 = animelem = 4
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
trigger1 = animelem =4
Time = 60
;anim =-1;s3012
pos = 0,-90
sound = S8889,0
poweradd = -1000


[State -2, Helper]
type = Helper
triggerall = !numhelper(40001)
trigger1 = time = 5
helpertype = normal
name = "HSDM"
ID = 40001
stateno = 40001
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40003)
trigger1 = time = 5
helpertype = normal
name = "H.Port"
ID = 40003
stateno = 40003
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1

[State -2, Helper]
type = Helper
triggerall = !numhelper(40004)
trigger1 = time = 5
helpertype = normal
name = "Player 1"
ID = 40004
stateno = 40004
pos = 160,120
postype = left    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 999999999999
pausemovetime = 999999999999
ignorehitpause = 1



[State 777, ch]
type = ChangeAnim
;trigger1 = prevstateno != 9000
trigger1 = time = 0
value = 3300
ctrl = 1

[State 7777, voice]
type = PlaySnd
trigger1 = time = 0
value = 3300,0
volume = 50
channel = 1
IgnoreHitPause = 1

[State 3300, thunderout]
type = Stopsnd
trigger1 = time = 0
channel = 7

[State 3100, a1]
type = Stopsnd
trigger1 = time = 0
channel = 0

[State 3100, a1]
type = Stopsnd
trigger1 = time = 0
channel = 6

[State 3300, b2]
type = PlaySnd
trigger1 = AnimElem = 12 
trigger2 = AnimElem = 13 
trigger3 = AnimElem = 14 
value = 20, 12
channel = 10
loop = 1

[State 3300, A1]
type = PlaySnd
trigger1 = AnimElem = 8 || AnimElem = 10 || AnimElem = 12
value = 7,0
channel = 0
volume = 200

[State 3300, A5]
type = EnvShake
trigger1 = AnimElem = 8 || AnimElem = 10 || AnimElem = 12
time = 10
ampl = -4

[State 3300, BGPalfx]
Type = BGPalfx
Trigger1 = AnimElem = 11
Add = -90,-90,-100
IgnoreHitPause = 1
time = 30
color = 0

[State 3300, BGPalfx]
Type = BGPalfx
Trigger1 = AnimElem = 12
Add = -95,-95,-110
IgnoreHitPause = 1
time = 30
color = 0

[State 3300, BGPalfx]
Type = BGPalfx
triggerall = animelem = 13
trigger1 = 1
time = 900
add = -70,-70,-90
mul = 150,150,150
sinadd = 20,20,30,60
color = 0

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



[State 3300, rainfall] 
type = Explod
trigger1 = AnimElem = 12 
trigger2 = AnimElem = 13 
trigger3 = AnimElem = 14 
id = 3310
anim = 3310
ownpal = 1
pos = 0,0
postype = back
 bindtime = -1
supermovetime = -1
sprpriority = 6
removetime = 900
scale = 1,1
persistent = 0

[State 3300, b2]
type = PlaySnd
trigger1 = time = 12
value = 198,0
channel = 7
volume = 250

[State 3300, rainfall] 
type = Explod
trigger1 = AnimElem = 12 
trigger2 = AnimElem = 13 
trigger3 = AnimElem = 14 
id = 3311
anim = 3311
ownpal = 1
pos = 0,0
postype = back
 bindtime = -1
supermovetime = -1
sprpriority = 7
removetime = 900
scale = 1,1
persistent = 0

[State 3300, elec]
type = Explod
trigger1 = time = 10
anim = 3301
postype = p1
pos = 0,0
ownpal = 1
ignorehitpause = 1
sprpriority = 3
supermovetime = -1
pausemovetime = -1
removeongethit = 1
bindtime = -1

[State 3300, c4]
type = ChangeState
trigger1 = animtime = 0
value = 3310


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

[State 3300, b2]
type = PlaySnd
trigger1 = AnimElem = 1 
trigger2 = AnimElem = 2 
trigger3 = AnimElem = 3 
value = 20, 12
channel = 10
loop = 1

[State 3300, rainfall]
type = Explod
triggerall = !NumExplod(3310)
trigger1 = AnimElem = 1 
trigger2 = AnimElem = 2 
trigger3 = AnimElem = 3 
id = 3310
anim = 3310
ownpal = 1
pos = 0,0
postype = back
bindtime = -1
supermovetime = -1
sprpriority = 6
removetime = 900
scale = 1,1
persistent = 0

[State 3300, rainfall]
type = Explod
triggerall = !NumExplod(3311)
trigger1 = AnimElem = 1 
trigger2 = AnimElem = 2 
trigger3 = AnimElem = 3 
id = 3311
anim = 3311
ownpal = 1
pos = 0,0
postype = back
bindtime = -1
supermovetime = -1
sprpriority = 6
removetime = 900
scale = 1,1
persistent = 0

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

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

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

[State 777, ch]
type = ChangeAnim
trigger1 = prevstateno != 9000
trigger1 = time = 0
value = 3350
ctrl = 1

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

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

[State 3350, aa]            
type = VarRandom         
trigger1 = Time = 0
v = 10
range = 200

[State 3350, a1]
type = posset
trigger1 = Time = 0
trigger1 = var(10) = [0,50]
x = -150

[State 3350, a1]
type = posset
trigger1 = Time = 0
trigger1 = var(10) = [50,100]
x = -40

[State 3350, a1]
type = posset
trigger1 = Time = 0
trigger1 = var(10) = [100,150]
x = 40


[State 3350, a1]
type = posset
trigger1 = Time = 0
trigger1 = var(10) = [150,200]
x = 150

[State 3350, Width]
type = Width
trigger1 = 1
value = -25,-25

[State 3350, A1]
type = PlaySnd
trigger1 = time = 0
value = 20,5
channel = 0

[State 3350, A2]
type = HitDef
trigger1 = Time = 0
attr = A, SP
damage    = 30,5
hitflag = MAFD
guardflag = L
pausetime = 0,4
sparkno = S3356
guard.sparkno = S8550
sparkxy = -10,-25
hitsound   = S5,4
guardsound = S7,1
ground.type = Trip
ground.slidetime = 10
ground.hittime  = 15
ground.velocity = -2,-4
air.velocity = -2,-3
guard.velocity = -5
fall = 1
palfx.time = 33
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
p2stateno = 3353
kill = 0


[State 3350, A3]
type = Explod 
triggerall = movehit
trigger1 = AnimElem = 1 || AnimElem = 6 || AnimElem = 9 || AnimElem = 14 || AnimElem = 18 
sprpriority = 7
anim = 3355
postype = P2
pos = 0, -70
random = 40,40
removeongethit = 1

[State 3350, A4]
type = PlaySnd
triggerall = movehit
trigger1 = AnimElem = 1 || AnimElem = 6 || AnimElem = 9 || AnimElem = 14 || AnimElem = 18 
value = 20,1

[State 3350, A5]
type = EnvShake
trigger1 = animelem = 7
time = 15
ampl = -4

[State 3350, A6]
type = DestroySelf
trigger1 = animtime = 0 


[Statedef 3353];------shock
type    = A
physics = N
movetype = H
anim = 5002
velset = -1,-2

[State 3353, a2]
type = ChangeAnim
trigger1 = AnimExist(7696)
value = 7696
persistent = 0

[State 3353, a3]
type = SelfState
trigger1 = time >= 20
value = 5100


;---------------------------------------------------------------------------
; Ice Storm Projectile
[Statedef 4000]
type = S
movetype = A
physics = N
anim = parent, var(23)
sprpriority = 2
ctrl = 0

[State 4000, snd]
type = playsnd
trigger1 = Random <= 40
trigger1 = movehit
value = 4200, 0
channel = 2


[State 4000, VarRandom]
type = VarRandom
trigger1 = !Time
v = 25
range = -200,110

[State 4000, PosAdd]
type = PosAdd
trigger1 = !Time
x = var(25)

[State 4000, VarRandom]
type = VarRandom
trigger1 = !Time
v = 24
range = 9,27

[State 4000, VelSet]
type = VelSet
trigger1 = !Time
x = -7
y = var(24)

[State 4000, HitDef]
type = HitDef
trigger1 = enemyNear, Anim != 5070
trigger1 = !MoveContact
attr = A, HA
animtype = Hard
damage = 5,1
getpower = 0
sprpriority = 2
hitflag = MAF
guardflag = MA
pausetime = 0,9
sparkno = 2;S10007
;guard.sparkno = S10002
sparkxy = 0,0
ground.type = High
ground.velocity = 0,15
guard.slidetime = 12
guard.hittime = 12
guard.velocity = -6
air.velocity = 0,5
airguard.velocity = -6
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
fall.xvelocity = 0
fall.yvelocity = 0
p2stateno = 1050
getpower = 0

[State 4000, HitDef]
type = HitDef
trigger1 = p2statetype = L
trigger1 = !MoveContact
attr = A, HA
animtype = Hard
damage = 5,1
getpower = 0
sprpriority = 2
hitflag = FD
guardflag = MA
pausetime = 0,9
sparkno = 2;S10007
;guard.sparkno = S10002
sparkxy = 0,0
ground.type = High
down.velocity = 0,0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 1
fall.recover = 0
p2stateno = 1050
getpower = 0;4001

[State 188, elect]
type = Explod
trigger1 = Movehit = 1
anim = 2105
random = 50, 90
pos = -10,-75
postype = p2
sprpriority = 5
bindtime = 1

;[State 188, elect2]
;type = Explod
;trigger1 = Movehit = 1
;anim = 2106
;random = 125, 10
;pos = -10,0
;postype = p2
;sprpriority = 5
;bindtime = 1

[State 188, elect]
type = Explod
trigger1 = Movehit = 1
anim = 2105
random = 50, 90
pos = 5,-80
postype = p2
sprpriority = -2
bindtime = 1

[State 188, elect2]
type = Explod
trigger1 = Movehit = 1
anim = 2106
random = 125, 5
pos = -10,0
postype = p2
sprpriority = -2
bindtime = 1


[State 4000, 2]
type = parentvaradd
trigger1 = movehit
v = 26
value = 1
persistent = 0
ignorehitpause = 1

[State 4000, 2]
type = parentvaradd
trigger1 = moveguarded
v = 27
value = 1
persistent = 0
ignorehitpause = 1

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
trigger1 = random < 700
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 4000, DestroySelf]
type = DestroySelf
trigger1 = Pos Y > 60
trigger2 = MoveContact

; Hail Hitstate for P2
[Statedef 4001]
type = A
movetype = H
physics = N
anim = IfElse(SelfAnimExist(5002),5002,(IfElse(SelfAnimExist(5001),5001,5000)))
velset = 0,0
facep2 = 1
ctrl = 0

[State 1511, velset]
type = velset
trigger1 = time = 10
x = -.5
y = -1

[State 1511, Gravity]
type = Gravity
trigger1 = Time > 10


[State 1511, SelfState]
type = SelfState
trigger1 = Vel Y > 0
value = 5040
ctrl = 1

;------------------------------------------------------------------------------------
;Hyper Tornado
;------------------------------------------------------------------------------------
[Statedef 3500]
type    = A
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 13500

[State 3000, Width]
type = Width
trigger1 = 1
value = 33,33

[State 3000, superpause]
type = SuperPause
trigger1 = AnimElemTime(5) = 0
time = 40
sound = S3000,0
poweradd = -2000
pos = -19,-77
darken = 1
poweradd = -1000
flag = NoBarDisplay
flag2 = NoFG

[State 3000, superportrait]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 10000
ID = 10000
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -1

[State 3000, superbg]
type = Explod
trigger1 = AnimElemTime(5) = 0
anim = 10013
ID = 10013
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 4000, snd]
type = playsnd
trigger1 = time = 0
value = 3500, 5

[State 3000, hyperBg]
type = Helper
trigger1 = time = 30
name = "Super BG"
ID = 8005
stateno = 8005
postype = back
facing = 1
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ownpal = 1

[State 2000, 0]
type = VelSet
trigger1 = time = 30
y = -1
x = 0
persistent=0

[State 3000, end]
type = changestate
trigger1 = time = 70
value = 3501

;------------------------------------------------------------------------------------
[Statedef 3501]
type    = A
movetype= A
physics = S
juggle  = 0
poweradd= 0
ctrl = 0
velset = 0,0
anim = 3501

[State 3000, Width]
type = Width
trigger1 = 1
value = 33,33

[State 4000, whirlwind]
type = playsnd
trigger1 = time = 0
value = 3500, 6

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

[State 210, hypertornado]
type = Helper
trigger1 = time = 0
ID = 3502
name = "fase1"
stateNo = 3502
postype = p1
pos = 120, 35
ownpal = 1

[State 3005,1]
type = playsnd
trigger1 = time = 0
value = 3500,0
volume = 200
channel = 4
loop = 1
id = 35011
ignorehitpause = 1

[State 3200, atrahelper]
type = helper
trigger1 = time >= 25 && (anim=3501)&&!numhelper(3505)
helpertype = normal
stateno = 3505
ID = 3505
name = "atraer"
postype = p2
pos = enemynear,const(size.ground.back)-25,-ceil(enemy,pos y)
persistent = 0
size.ground.back = 5
size.ground.front = 5
size.height = 240

[State 3000, end]
type = changestate
trigger1 = time = 500
value = 3506

;-------------------------------------------------------------------------------------------------------
;tornado fase1
[Statedef 3502]
type = A
movetype = I
physics = N
anim = 3504
ctrl = 0
sprpriority = 4
juggle = 5

[State 3502, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3502, destroyself]
type = changestate
trigger1 = time = 40
value = 3503

;-------------------------------------------------------------------------------------------------------
;tornado fase2
[Statedef 3503]
type = A
physics = N
movetype = A
anim = 3505
ctrl = 0
velset = 0,0
sprpriority = 5
juggle = 5

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

[State 1005, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA,NP,SP,HP
stateno = 3503
ignorehitpause = 1

[State 1005, hitby]
type = hitby
trigger1 = 1
time=-1
value = SCA,NP,SP,HP
ignorehitpause = 1

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3005,1]
type = playsnd
trigger1 = time = 0
value = 3500,11
volume = 200
channel = 3
loop = 1
id = 35012
ignorehitpause = 1

[State 3005,voice]
type = playsnd
trigger1 = time = 5
value = 3503,0
channel = 1

[State 3000, bg]
type = Explod
trigger1 = time = 0
anim = 3404
ID = 3404
pos = 0,5
postype = p2
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 1005, hit]
type = hitdef
trigger1 = 1
priority = 6,Hit
attr = S,SP
damage = 100,5
persistent = 0
animtype = Hard
hitflag = MAF
pausetime = 4/((root,var(20)>0)+1),4/((root,var(20)>0)+1)
sparkno = S10007
getpower= 20
hitsound   = s1000,8
guardsound = S0,3
ground.type = High
ground.slidetime = 24/((root,var(20)>0)+1)
ground.hittime = 24/((root,var(20)>0)+1)
ground.velocity = -vel x*ifelse(var(1)<160,.75,1),ifelse(var(1)<160,-2.5,0)
ground.cornerpush.veloff = 0
air.velocity = -vel x,-2
air.fall = 1
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
p2stateno = 3550

[State 8010, 0]
type = Explod
triggerall = movehit
trigger1 = time = 50
trigger2 = time = 80
trigger3 = time = 110
trigger4 = time = 140
trigger5 = time = 180
trigger6 = time = 220
trigger7 = time = 260
trigger8 = time = 300
trigger9 = time = 340
trigger10 = time = 380
trigger11 = time = 420
postype = p2
ontop = 1
pos = 0,-70
sprpriority = 5
ignorehitpause = 1
anim = 10007
id = 10007

[State 1028,p2hit]
type = PlaySnd
triggerall = movehit
trigger1 = time = 50
trigger2 = time = 80
trigger3 = time = 110
trigger4 = time = 140
trigger5 = time = 180
trigger6 = time = 220
trigger7 = time = 260
trigger8 = time = 300
trigger9 = time = 340
trigger10 = time = 380
trigger11 = time = 420
value = 2000,1
channel = 4

[State 3000, end]
type = changestate
trigger1 = time = 490
value = 3504

;-------------------------------------------------------------------------------------------------------
;tornado fase3
[Statedef 3504]
type = A
movetype = I
physics = N
anim = 3506
ctrl = 0
velset = 0,0
sprpriority = 4
juggle = 5

[State 8006, wind]
type = stopsnd
trigger1 = time = 0
id = 35012
channel = 3

[State 1005, assert]
type = assertspecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3205, end]
type = destroyself
trigger1 = animtime = 0
trigger2 = stateno != 3501


;---------------------------------------------------------------------------
;Tornado Helper
;---------------------------------------------------------------------------
[Statedef 3505]
physics = N
velset = 0,0
anim = 3503

[State 3205, nhb]
type = nothitby
trigger1 = 1
time = -1
value = SCA

[State 3205, hitoverride]
type = hitoverride
trigger1 = 1
time = -1
attr = SCA
stateno = 3301
ignorehitpause = 1

[State 3205, bound]
type = screenbound
trigger1 = 1
value = 0

[State 3205, turn]
type = turn
trigger1 = (facing=root,facing)

[State 3205, push]
type = playerpush
trigger1 = p2bodydist x=[-5,5]
value = 1

[State 3205, pos]
type = posset
trigger1 = 1
y = 0

[State 3205, vel]
type = velset
trigger1 = rootdist x >= 0 && root,var(1)=1
x = ifelse((rootdist x=[0,100]),2,ifelse((rootdist x=[100,200]),1.5,1))

[State 3205, vel]
type = velset
trigger1 = rootdist x >= 0 && root,var(1)!=1
x = ifelse((rootdist x=[0,100]),4,ifelse((rootdist x=[100,200]),3,2))

[State 3205, pos]
type = posadd
trigger1 = p2bodydist x!=[-5,5]
x = ceil(p2dist x)-enemynear,const(size.ground.back)-5

[State 3205, end]
type = destroyself
trigger1 = root,stateno!=3501||(root,anim!=3501)||root,movecontact
trigger2 = p2stateno = 3550

;---------------------------------------------------------------------------
; end
;---------------------------------------------------------------------------
[Statedef 3506]
type    = A
physics = A

[State 50, 1]
type = veladd
trigger1 = command = "holdfwd"
trigger1 = vel X < 1.5
X = .25

[State 8006, wind]
type = stopsnd
trigger1 = time = 0
id = 35011
channel = 4

[State 50, 1]
type = veladd
trigger1 = command = "holdback"
trigger1 = vel X > -1.5
X = -.1

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 4]
type = changeanim
triggerall = anim != 1199
trigger1 = prevstateno = 111
trigger2 = prevstateno = 113
trigger3 = prevstateno = 114
trigger4 = prevstateno = 116
trigger5 = prevstateno = 117
trigger6 = prevstateno = 119
trigger7 = prevstateno = 2000
trigger8 = prevstateno = 2003
trigger9 = prevstateno = 2004
value = 1199


[State 50, 5]
type = velset
triggerall = time = 0
trigger1 = prevstateno = 111
trigger2 = prevstateno = 113
trigger3 = prevstateno = 117
trigger4 = prevstateno = 119
trigger5 = prevstateno = 114
trigger6 = prevstateno = 116
x = 0
y = 0

[State 52, 4]
type = turn
trigger1 = p2dist X <= -3
trigger1 = time = 0

;---------------------------------------------------------------------------
;P2 stateno
;---------------------------------------------------------------------------
[Statedef 3550]
type    = A
movetype= H
physics = S
velset = 0,0
sprpriority = -2

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

[State 3405,a6]
type = EnvShake
trigger1 = animelem = 1 || AnimElem = 3 || AnimElem = 5|| AnimElem = 7
trigger2 = animelem = 9 || AnimElem = 11 || AnimElem = 13
time = 15
ampl = 7
freq = 60

[State 3405, a7]
type = HitAdd
trigger1 = animelem = 1 || AnimElem = 3 || AnimElem = 5|| AnimElem = 7
trigger2 = animelem = 9 || AnimElem = 11 || AnimElem = 13
value = 1

[State 3405, a7]
type = lifeAdd
trigger1 = animelem = 1 || AnimElem = 3 || AnimElem = 5|| AnimElem = 7
value = -3

[State 3405, a7]
type = lifeAdd
trigger1 = animelem = 9 || AnimElem = 11 || AnimElem = 13
value = -4

[State 3821, a3] 
type = velset
trigger1 = screenpos X = 5 
x = 0

[State 3850, a1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3555

;[State 3850, a1]
;type = posset
;trigger1 = time = 0
;y = -60

;lo abliga
[State 100, 1]
type = PosSet
trigger1 = time = 0
x = ((p2dist y)+140)
y = -15

[State 3850, a1]
type = posadd
trigger1 = time = 0
x = 80 
y = -50

[State 3850, a1]
type = posadd
trigger1 = time = 80
x = 10
y = -10

[State 3850, a1]
type = Veladd
trigger1 = time = 80
y = -.5

[State 3850, a4]
type = SprPriority
trigger1 = Time = 100
value = -2

[State 3850, a6]
type = EnvShake
trigger1 = time = 100 
trigger2 = time = 125
trigger3 = time = 150
trigger4 = time = 175
trigger5 = time = 200
trigger6 = time = 225
trigger7 = time = 450
trigger8 = time = 475
trigger9 = time = 500
trigger10 = time = 515
trigger11 = time = 525
trigger12 = time = 535
trigger13 = time = 545
trigger14 = time = 565
time = 10
ampl = -6
freq = 40

[State 3821, a2]
type = Turn
trigger1 = time = 400

[State 3850, a1]
type = ChangeAnim
Trigger1 = Time = 400
value = 5030

[State 3850, a3]
type = SelfState
trigger1 = time = 450 
value = 5050

[Statedef 3821]
type    = A
movetype= H
physics = S
velset = 1,3

[State 3821, a2]
type = Turn
trigger1 = Anim = 3820
trigger1 = AnimElem = 8

[State 3821, a3] 
type = velset
trigger1 = screenpos X = 50 
x = 0

[State 3821, a4] 
type = velset
trigger1 = Pos Y = 0
y = 0

[State 3821, a5] ;Hit ground
type = changestate
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3830

[Statedef 3830]
type    = S
movetype= I
physics = S
velset = 0,0
sprpriority = 3

[State 3830, a1]
type = ScreenBound
trigger1 = 1
movecamera = 0, 0
value = 1

[State 3830, a2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 3830, a3]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3830

[State 3850, a3]
type = SelfState
trigger1 = time = 450
value = 5050

; __________________
;/ X- Men Gold Team \_________________________________________________
;_____________________________________________________________________|
[Statedef 3800]
type    = A
movetype= H
physics = S
juggle  = 0
velset = 0,0
anim = 3800
ctrl = 0

[State 800, HitDef]
type = HitDef
trigger1 = 1
attr = S, NT
damage = 0
hitsound = S800,0
hitflag = M
guardflag = 
pausetime = 0, 0
sparkno = -1
fall = 1
fall.recover = 0
p1stateno = 3601
p2stateno = 3650

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

;-----------------------------------------------------------------------------------------------------------------
;Continue X- Men Gold Team
;-----------------------------------------------------------------------------------------------------------------
[Statedef 3601]
type = S
ctrl = 0
anim = 3801
velset = 0,0

[State 1000, 4]
type = PlaySnd
trigger1 = TimeMod = 30,0
trigger1 = time > 0
value = 1, 0  ; electrity loop
id = 36011
channel = 5

[State 610, snd]
type = playsnd
trigger1 = time = 10
trigger2 = time = 25
trigger3 = time = 40
trigger4 = time = 65
trigger5 = time = 80
value = 1000, 10
channel = 1

[State 610, sndhit]
type = playsnd
trigger1 = time = 10
trigger2 = time = 25
trigger3 = time = 40
trigger4 = time = 65
trigger5 = time = 80
value = 2000,2
channel = 3

[State 181, elect]
type = Explod
trigger1 = time = 10
anim = 3401
removetime = 100
postype = p1
pos = 0,0
sprpriority = 5

[State 181, elect]
type = Explod
trigger1 = time = 10
anim = 3301
removetime = 100
postype = p2
pos = 0,0
sprpriority = 5

[State 3200, helperthunder]
type = helper
trigger1 = time = 10
trigger2 = time = 25
trigger3 = time = 40
trigger4 = time = 65
trigger5 = time = 80
stateno = 1605
ID = 1605
name = "thunder"
postype = p2
pos = 0,0

[State 3300, BGPalfx]
Type = BGPalfx
trigger1 = time = 10
trigger1 = 1
time = 80
add = -70,-70,-90
mul = 150,150,150
sinadd = 20,20,30,60
color = 0

[State 193, 4]
type = EnvShake
trigger1 = time = 10
time = 12
ampl = -6
freq = 190
phase = 90

[State 193, 6] 
type = ChangeState
trigger1 = time = 80
value = 3605

;-----------------------------------------------------------------------
;Continue X
;-----------------------------------------------------------------------
[Statedef 3605]
type = S
physics = S
ctrl = 0
velset = 0,0
anim = 3805
sprpriority = 2

[State 3605, snd]
type = PlaySnd
trigger1 = TimeMod = 15,0
trigger1 = time > 0
value = 1, 0  ; electrity loop
id = 36011
channel = 5

[State 3605, elect]
type = stopsnd
trigger1 = time = 150
id = 36011
channel = 5

[State 3605, Camera] ;camara fija
type = Screenbound
trigger1 = 1
movecamera = 0,0

[State 3605, superpause]
type = SuperPause
trigger1 = time = 10
time = 40
sound = s555,1
pos = 10, -55
darken = 1
poweradd = -2500
flag = NoBarDisplay
flag2 = NoFG

[State 3605, superportrait]
type = Explod
trigger1 = time = 11
anim = 10000
ID = 10000
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -1

[State 3605, superbg]
type = Explod
trigger1 = time = 11
anim = 10013
ID = 10013
pos = 0,0
postype = back
bindtime = 999
removetime = 40
supermove = 40
pausemovetime = 40
sprpriority = -2
ownpal = 1

[State 3605, no lifebars]
type = AssertSpecial
trigger1 = time = [75,160]
flag = nobardisplay
flag2 = NoBG
flag3 = GlobalNoShadow

[State 3605, superbgX]
type = Explod
trigger1 = time = 95
anim = 16001
ID = 16001
pos = -10,0
postype = back
bindtime = 999
removetime = 42
supermove = 42
pausemovetime = 42
sprpriority = 7
ownpal = 1

[State 3605, superbgX2]
type = Explod
trigger1 = time = 79
anim = 16000
ID = 16000
pos = 0,0
postype = back
bindtime = 999
removetime = 24
supermove = 24
pausemovetime = 24
sprpriority = 8
ownpal = 1

[State 3605, Shine]
type = helper
trigger1 = time = 115
ID = 13519
pos = 0,0
postype = p1
stateno = 13519
supermovetime = 9999
helpertype = normal
name = ""
ownpal = 0
keyctrl = 0

[State 3605,1]
type = playsnd
trigger1 = time = 115
value = 3000,0
volume = 100
channel = 3
persistent = 0
ignorehitpause = 1

[State 3605,X]
type = PlaySnd
trigger1 = time = 95
value = 3800,6
channel = 2

[State 3605,voice]
type = PlaySnd
trigger1 = time = 13
value = 3605,0

[State 3605,1]
type = playsnd
trigger1 = time = 11
value = 184,2
volume = 100
channel = 2
persistent = 0
ignorehitpause = 1

[State 3605, 2]
type = Posset
trigger1 = time >= 11
y = 0

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

[State 3605, Vel]
type = velset
trigger1 = time >= 11
x = -4.5

[State 3605, 6] 
type = ChangeState
trigger1 = time = 151
value = 3610

;-----------------------------------------------------------------------
;Continue Hit
;-----------------------------------------------------------------------
[Statedef 3610]
type    = S     
movetype= A     
physics = S     
juggle  = 1     
velset = 0,0
ctrl = 0  
anim = 3810
poweradd= -3000

;[State 1130, flash(W)];(white flash)
;type = Envcolor
;trigger1 = Time = 28
;value = 250,250,250
;time = 1
;under = 0

[State 3000, hyperBg]
type = Helper
trigger1 = time = 0
name = "Super BG"
ID = 8005
stateno = 8005
postype = back
facing = 1
ownpal = 1
supermovetime = 999999
pausemovetime = 999999
ownpal = 1

; don't move the camera to follow
[State 3600, screenbound] 
type = ScreenBound
trigger1 = Alive
value = 0
movecamera = 0,0

[State 193, 4]
type = EnvShake
trigger1 = time = 18 && anim = 3810
time = 320
ampl = -6
freq = 190
phase = 90

[State 3600, no lifebars]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay

[State 3005,voice]
type = playsnd
trigger1 = time = 20
value = 184,3
volume = 100
channel = 2
persistent = 0
ignorehitpause = 1

[State 1020,begin]
type = PlaySnd
trigger1 = time = 50
value = 3800,5
channel = 4

[State 1020,xmen]
type = PlaySnd
trigger1 = time = 65
value = 3810,0
volume = 200
channel = 5

[State 180, 2]
type = Posset
trigger1 = time >= 0
x = 0
y = 0

[State 1080, Bishop]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Bishop"
id = 3611
pos = -20,0
postype = p1
stateno = 3611
ownpal = 0

[State 1080, Colossus]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Colossus"
id = 3611
pos = -92,0
postype = p1
stateno = 3612
ownpal = 0

[State 1080, Iceman]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Iceman"
id = 3611
pos = 0,-20
ontop = 1
postype = p1
stateno = 3613
ownpal = 0

[State 1080, Jean Grey]
type = helper
trigger1 = time = 0
helpertype = normal
name = "JeanGrey"
id = 3611
pos = 5,0
postype = back
stateno = 3614
ownpal = 0

[State 1080, Angel]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Angel"
id = 3611
pos = 5,-15
postype = p1
stateno = 3615
ownpal = 0

[State 3020, Shine]
type = helper
trigger1 = time = 0
trigger2 = time = 280
ID = 13519
pos = 0,0
postype = p1
stateno = 13519
supermovetime = 9999
helpertype = normal
name = ""
ownpal = 0
keyctrl = 0

[State 3605,1]
type = playsnd
trigger1 = time = 0
value = 3000,0
volume = 100
channel = 3
ignorehitpause = 1

[State 3605,1]
type = playsnd
trigger1 = time = 275
value = 3000,0
volume = 100
channel = 3

[State 193, 4]
type = EnvShake
trigger1 = time = 0
time = 12
ampl = -6
freq = 190
phase = 90

[State 3200, 7]
type = ChangeState
trigger1 = Time = 300
value = 3640

;----------------------------------------------------------------------
;X - Men Bishop Intro
;----------------------------------------------------------------------
[StateDef 3611]
type = S
anim = 3612
sprpriority = 4
velset = 0, 0

[State 3200, energy]
type = explod
trigger1 = time = 0
anim = 3645
postype = p1
pos = 100,0
sprpriority = -1
ignorehitpause = 1
removetime = 300
ownpal = 1
supermove = 1

[State 3200, energy]
type = explod
trigger1 = time = 0
anim = 3646
postype = p1
pos = 100,0
sprpriority = 2
ignorehitpause = 1
removetime = 300
ownpal = 1
supermove = 1

[State 1006, end]
type = destroyself
trigger1 = time = 300

;----------------------------------------------------------------------
;X - Men Colossus Intro
;----------------------------------------------------------------------
[StateDef 3612]
type = S
anim = 3615
sprpriority = -1
velset = 0, 0

[State 1006, end]
type = destroyself
trigger1 = time = 300

;----------------------------------------------------------------------
;X - Men Iceman Intro
;----------------------------------------------------------------------
[StateDef 3613]
type = S
anim = 3613
sprpriority = -1
velset = 0, 0

[State 1080, icecr]
type = Explod
trigger1 = time = 0 && anim = 3613
helpertype = normal
id = 36131
pos = -30,-100
postype = p1
anim = 14032
ontop = 1
scale = .7,.7
removetime = 300
sprpriority = 1
ownpal = 0

[State 198, a5]
type = Explod
trigger1 = time = 0 && anim = 3613
id = 14023
anim = 14023
postype = p1
removetime = 300
bindtime =-1
sprpriority = -3
ownpal = 1
pos = -8,-80

[State 1006, end]
type = destroyself
trigger1 = time = 300

;----------------------------------------------------------------------
;X - Men Jean Grey Intro
;----------------------------------------------------------------------
[StateDef 3614]
type = S
anim = 3611
sprpriority = 3
velset = 0, 0

[State 1080, barrier]
type = Explod
trigger1 = time = 0 && anim = 3611
id = 36131
pos = 0,0
postype = p1
anim = 3616
ontop = 1
removetime = 210
sprpriority = -1
ownpal = 0

[State 1006, end]
type = destroyself
trigger1 = time = 300

;----------------------------------------------------------------------
;X - Men Angel Intro
;----------------------------------------------------------------------
[StateDef 3615]
type = S
anim = 3614
sprpriority = -2
velset = 0, 0

[State 1006, end]
type = destroyself
trigger1 = time = 300

;----------------------------------------------------------------------
;X - Men Action
;----------------------------------------------------------------------
[StateDef 3640]
type = S
anim = 3660
sprpriority = -1
velset = 0, 0

; don't move the camera to follow
[State 3600, screenbound] 
type = ScreenBound
trigger1 = Alive
value = 0
movecamera = 0,0

[State 1080, barrier]
type = Explod
trigger1 = time = 48
id = 3661
pos = -10,0
postype = p2
anim = 3661
ontop = 1
removetime = 700
sprpriority = 6
ownpal = 0

[State 1020,voice]
type = PlaySnd
trigger1 = time = 0
value = 3640,1
channel = 1

[State 1020,xmen]
type = PlaySnd
trigger1 = time = 0 && stateno  = 3640
loop = 1
volume = 255
value = 3810,1
channel = 7

[State 1080, Jean Grey]
type = helper
trigger1 = time = 10
helpertype = normal
name = "JeanGrey"
id = 650
pos = 95,0
postype = back
stateno = 11040
ownpal = 0

[State 1080, Colossus]
type = helper
trigger1 = time = 155
helpertype = normal
name = "Colossus"
id = 650
pos = -70,0
postype = p2
stateno = 11027
ownpal = 0

[State 1080, Iceman]
type = helper
trigger1 = time = 230 ;242
helpertype = normal
name = "Iceman"
id = 650
pos = 0,-10
ontop = 1
postype = back
stateno = 11031
ownpal = 0

[State 1080, Angel]
type = helper
trigger1 = time = 360 ;360
helpertype = normal
name = "Angel"
id = 650
pos = 55,5
postype = p2
stateno = 11051
ownpal = 0

[State 1080, Bishop]
type = helper
trigger1 = time = 420 ;460
helpertype = normal
name = "Bishop"
id = 650
pos = 0,0
postype = back
stateno = 11021
ownpal = 0

[State 3000, hyperBg]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "Super BG"
ID = 8008
stateno = 8008
postype = back
facing = 1
ownpal = 0

[State 211, 7]
type = TargetLifeAdd
trigger1 = time = 81 ;jean
trigger2 = time = 213 ;colossus
trigger3 =time = 316 ;iceman
trigger4 =time = 392 ;Angel
trigger5 =time = 501 ;Bishop
trigger6 =time = 517
trigger7 =time = 535
value = -80
kill = 0

[State 3405,a6]
type = EnvShake
type = TargetLifeAdd
trigger1 = time = 81 ;jean
trigger2 = time = 213 ;colossus
trigger3 =time = 316 ;iceman
trigger4 =time = 392 ;Angel
trigger5 =time = 501 ;Bishop
trigger6 =time = 517
trigger7 =time = 535
time = 15
ampl = 7
freq = 60

[State 3405, a7]
type = HitAdd
type = TargetLifeAdd
trigger1 = time = 81 ;jean
trigger2 = time = 213 ;colossus
trigger3 =time = 316 ;iceman
trigger4 =time = 392 ;Angel
trigger5 =time = 501 ;Bishop
trigger6 =time = 517
trigger7 =time = 522
trigger8 =time = 535
trigger9 =time = 541
value = 1

;[State 3600, no lifebars]
;type = AssertSpecial
;trigger1 = 1
;flag = nobardisplay

[State 3200, 7]
type = ChangeState
trigger1 = Time = 670
value = 3641

;----------------------------------------------------------------------
;Storm Finish
;----------------------------------------------------------------------
[Statedef 3641]
type    = A
movetype= A
physics = S
juggle  = 5
anim = 3670
velset = 0,0
ctrl = 0
sprpriority = 1

; don't move the camera to follow
[State 3600, screenbound] 
type = ScreenBound
trigger1 = Alive
value = 0
movecamera = 0,0

[State 3300, xmen]
type = Stopsnd
trigger1 = time = 0
channel = 7

[State 1889, th]
type = Explod 
trigger1 = time = 13
sprpriority = 3
id = 13505
anim = 13505
postype = p1
pos = -70, -120
scale = 1.2,1.2
bindtime = -1
removetime = 20

[State 1020,voice]
type = PlaySnd
trigger1 = time = 6
value = 3000,5
channel = 2

[State 3200, helperthunder]
type = helper
trigger1 = time = 13 && (anim = 3670) &&!numhelper(3642)
helpertype = normal
stateno = 3642
ID = 3642
name = "thunder"
postype = p2
pos = 0,0
persistent = 0

[State 610, snd]
type = playsnd
trigger1 = animelem = 1
value = 1000, 10
channel = 1

[State 1400, ChangeState]
type = ChangeState
trigger1 = time = 80
value = 50
;ctrl = 1

;---------------------------------------------------------------------------
; Helper thunder
;---------------------------------------------------------------------------
[Statedef 3642]
type = S
movetype = A
physics = S
velset = 0,0
sprpriority = 7
anim = 1601
ctrl = 0

[State 2000, Epileptastic]
type = EnvColor
trigger1 = MoveHit
value = 240,240,240
IgnoreHitPause = 1
time = 1
persistent = 0

[State 204 , 1]
type = HitDef
trigger1 = 1
attr = S, SA
damage = 120,10
animtype = Heavy
hitflag = MAFD
priority = 6, Hit
pausetime = 9,9
sparkno = S3305
sparkxy = -10,-80
guard.sparkno = s3355
hitsound   = s2000,2
guardsound = s0,3
ground.type = Low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 2,-45
air.type = Low
air.velocity = 1,-24
down.bounce = 1
down.velocity = -4,-4
yaccel = 0.55
palfx.time = 40
palfx.add  = -90,0,140
palfx.sinadd = 100,100,100,10
Palfx.color = 0 
fall =0
fall.recover = 0
fall.recovertime = 30
fall.envshake.time = 7
fall.envshake.ampl = -4
envshake.time = 6
envshake.freq = 50
envshake.ampl = -6
p2stateno = 623    

[State 3005, 1]
type = destroyself
trigger1 = animtime = 0

;-------------------------------------------------------------------------------------
;p2 state
;-------------------------------------------------------------------------------------
[Statedef 3650]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0

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

[State 200, 7]
type = screenbound
trigger1 = time < 130
value = 1

[State 0, 2]
type = ChangeAnim2
trigger1 = time = [0,80]
value = 3650

[State 0, 2]
type = ChangeAnim2
trigger1 = time = [81,99]
value = 3651

[State 4402, 5]
type = AssertSpecial
trigger1 = time = [155,528]
flag = noshadow
flag2 = invisible

;lo obliga a
;[State 100, 1]
;type = PosSet
;trigger1 = time = 0
;x = 100*-facing
;y = 0

[State 100, 1]
type = PosAdd
trigger1 = time < 101
x = -12*ifelse(time%2=1,1,-1)

[State 901, State End]
type = ChangeState
trigger1 = Time = 539
value = 3651

;---------------------------------------------------------------------------
;P2 state 2 for Jean
[Statedef 3651]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3655

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 901, State End]
type = ChangeState
trigger1 = Time = 100
value = 3652

;---------------------------------------------------------------------------
;P2 state 2 for Colossus
[Statedef 3652]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3656

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 901, State End]
type = ChangeState
trigger1 = Time = 115
value = 3653

;---------------------------------------------------------------------------
;P2 state 2 for iceman
[Statedef 3653]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3657

[State 1050, PalFXWiz] ;frezze
type = PalFX
trigger1 = animelem = 24
time = 60
add = 49,173,231
mul = 13,179,199

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 901, State End]
type = ChangeState
trigger1 = Time = 130
value = 3658

;---------------------------------------------------------------------------
;P2 state 2 for angel
[Statedef 3658]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3658

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 901, State End]
type = ChangeState
trigger1 = animtime = 0
value = 3659

;---------------------------------------------------------------------------
;P2 state 2 for bishop
[Statedef 3659]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = time = 0
value = 3659

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 901, State End]
type = ChangeState
trigger1 = Time = 140
value = 3660

;---------------------------------------------------------------------------
;P2 state 2 for Storm
[Statedef 3660]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -1

[State 912, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 3665

[State 912, 2]
type = HitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 100, 1]
type = PosSet
trigger1 = time = 0
x = 100*-facing
y = 0

[State 901, State End]
type = ChangeState
trigger1 = Time = 80
value = 3661

;---------------------------------------------------------------------------
;P2 state 2 finish
[Statedef 3661]
type    = U
MoveType = H
physics = U
ctrl = 0
VelSet = 0,0

[State 1050, ground electrocutted, has anim]
type = ChangeAnim
triggerall = AnimExist(5300)
trigger1 = (time = 0) && (pos y >= 0)
value = 5300

[State 1050, ground electrocutted, no anim]
type = ChangeAnim2
triggerall = !AnimExist(5300)
trigger1 = (time = 0) && (pos y >= 0)
ctrl = 0
value = 1050

[State 1050, back to normal]
type = ChangeState
trigger1 = time = 60
value = 1060
ctrl = 1

; P2 custom state: coming "unfrozen"
[StateDef 1060]
type    = U
MoveType = H
physics = U
ctrl = 0
VelSet = 0,0
sprpriority = 0

[State 1060, PosSet]
type = PosSet
trigger1 = time = 0
y = 0

[State 1060, flat on yer back]
type = SelfState
trigger1 = (time = 10) && (PrevStateNo = 1055)
value = 5100

[State 1060, back to standing]
type = SelfState
trigger1 = (time = 10) && (PrevStateNo != 1055)
value = 0
ctrl = 1


;-------------------------------------------------------------------------------------------------------
;Super BG
;-------------------------------------------------------------------------------------------------------
[Statedef 8005]
type = A
physics  = N
sprpriority = 5

[State 8018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 8018, muteki]
type = NotHitBy
trigger1 = 1
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 8018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1

[State 3000, hyperBG2]
type = Explod
trigger1 = Time = 0
anim = 1515
ID = 1515
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999995
bindtime = -1
ownpal = 1

[State 8018,floorfx]
type = Explod
trigger1 = time= 1
anim = 1516
ID = 1516
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = p1
pos = 0, 0
sprpriority = -999998
bindtime = -1
ownpal = 0
scale = 2,1

[State 8018,bgtransition]
type = Explod
trigger1 = time= 1
anim = 1517
ID = 1516
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999999
bindtime = -1
ownpal = 0
scale = 1.0,1.0

[State 8018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 8018, 6]
type = ChangeState
Trigger1 = Time = 20
value = 8006
ctrl = 0

;-------------------------------------------------------------------------------------------------------
[Statedef 8006]
type = A
physics  = N
sprpriority = 5

[State 80180]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noBG
flag3 = noFG

[State 8006, xmen]
type = Stopsnd
trigger1 = time = 0
channel = 6

[State 80180, 3]
type = posset
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1

[State 8018,1]
type = Explod
trigger1 = timemod = 4,1 && numexplod(11111) <= 20
anim = 11111
ID = 11111
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = 60
vel = -10-ceil(random/20), 0
postype = p1
pos = 320, 0
random = 20,500
ontop = 1
bindtime = 1
ownpal = 1

[State 8018,1]
type = Explod
trigger1 = timemod = 4,1 && numexplod(11112) <= 20
anim = 11112
ID = 11112
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = 60
vel = -10-ceil(random/20), 0
postype = p1
pos = 320, 0
random = 20,500
ontop = 1
bindtime = 1
ownpal = 1

[State 80180, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 80180, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 80180, 6]
type = ChangeState
trigger1 = (parent,movetype != A) && (parent,sysvar(3) = 0)
trigger2 = RoundState > 2
value = 8007
ctrl = 0


[Statedef 8007]
type = A
physics  = N
sprpriority = 5

[State 80181]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 8007, 1]
type = VarSet
trigger1 = Time = 0
sysvar(3) = 0

[State 80181, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 80181, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 80181, muteki]
type = NotHitBy
trigger1 = Time = 0
value = SAC, NT, ST, HT ,NA, SA, HA ,NP, SP, HP
time = -1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 1516
ignorehitpause = 1

[State 0, ]
type = RemoveExplod
trigger1 = time >= 10
ID = 1515
ignorehitpause = 1

[State 80181, 7]
type = DestroySelf
Trigger1 = Time = 20

;-------------------------------------------------------------------------------------------------------
;Super BG 2
;-------------------------------------------------------------------------------------------------------
[Statedef 8008]
type = A
physics  = N
sprpriority = 5

[State 8018]
type = AssertSpecial
trigger1 = 1
flag = invisible
flag2 = noFG

[State 1020,wind]
type = PlaySnd
trigger1 = time = 1
value = 3640,2
loop = 1
channel = 6

[State 8018, 3]
type = PosSet
trigger1 = 1
y = 0
x = -160

[State 0, ]
type = EnvColor
trigger1 = timemod = 10,1
value = ceil (random/1),0,ceil (random/1)
time = 10
under = 1
ignorehitpause = 1

[State 8018,floorfx]
type = Explod
trigger1 = time= 1
anim = 1516
ID = 1516
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = p1
pos = 0, 0
sprpriority = -999998
bindtime = -1
ownpal = 0
scale = 2,1

[State 8018,bgtransition]
type = Explod
trigger1 = time= 1
anim = 1517
ID = 1516
supermovetime = 999999
pausemovetime = 999999
removeongethit = 1
removetime = -1
vel = 0, 0
postype = back
pos = 0, 0
sprpriority = -999999
bindtime = -1
ownpal = 0
scale = 1.0,1.0

[State 8018, Assert]
type = assertspecial
trigger1 = Animtime != 0
flag = noshadow

[State 8018, 6]
type = ChangeState
Trigger1 = Time = 800
value = 8006
ctrl = 0

;--------------------------------------------------------------------------------------------------------------------------
; Finish Hit Explod
[Statedef 8900]
type = S
movetype = I
physics = N
anim = 8930

[State 8900, 1]
type = EnvShake
trigger1 = (!Time)
time = 12
freq = 120;10
ampl = -3;2
phase = 90

[State 8900, 2]
type = Explod
triggerall = (NumExplod(8900) < 1)
trigger1 = Time = 0
persistent = 0
anim = 8900
ID = 8900
postype = left
pos = 0, 0
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = -4
bindtime = -1
ontop = 1
ownpal = 1
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1

[State 8900, 3]
type = PlaySnd
trigger1 = (NumExplod(8900) != 0)
value = 30, 0
persistent = 0
supermovetime = 1000
pausemovetime = 1000
ignorehitpause = 1

[State 8900, done]
type = DestroySelf
trigger1 = AnimTime = 0


