;hitspark = s7700, s7702, s7703
;wall hit = 6777
;launch = 4444 (C, HP) (C,HK)
;hyper background = 32710
;guard push = 7020
;recovery roll = checked
;normal throw = checked (F, HP)
;5300, 5500, 7990

;===========================================================================
;Super Marvel vs. Capcom - Eternity of Heroes - Constants Template
;===========================================================================
[Data]
power = 3000
life = 1000
attack = 130
defence = 100
fall.defence_up = 50
liedown.time = 50
airjuggle = 15
sparkno = 2
guard.sparkno = 40
KO.echo = 0
volume = 555
IntPersistIndex = 60
FloatPersistIndex = 40

[Size]
xscale = .98
yscale = .98
ground.back = 20
ground.front = 20
air.back = 18
air.front = 22
height = 60
attack.dist = 160
attack.width = 4,4   
proj.dist = 90
proj.attack.dist = 90 
proj.doscale = 0
head.pos = 1, -83
mid.pos = 1, -53
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd = 2.4
walk.back = -2.2
run.fwd = 6.5, 0
run.back = -2.8,-4.3
jump.neu = 0,-10
jump.back =  -2.5,-7
jump.fwd = 4,-10
runjump.fwd = 5,-9
runjump.back = -3.5,-10
airjump.neu = 0, -8.3
airjump.fwd = 2.9
airjump.back = -2.9

[Movement]
airjump.num = 0
airjump.height = 35
yaccel = .41
stand.friction = .80
crouch.friction = .80
air.friction = .80

[Quotes]
victory1 = "I am The Sorcerer Supreme"
victory2 = "Onward, into the unknown"
victory3 = "Mystic Power will always triumph"
victory4 = "Begone with you!"
victory5 = "The Ancient One will be most pleased"

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = N
anim = 100
sprpriority = 1
velset = 10, 0

[State 100, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 30
length = 40
palcolor = 136
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
Paladd = 0,0,25
FrameGap = 8
timegap = 1
Trans = add1

[State 100, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 100, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 100, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 100, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.3

[State 100, 9]
type = Explod
trigger1 = time = [16,35]
trigger1 = (time % 4) = 0
ID = 43
anim = 6000
postype = p1
pos = 10, 0
bindtime = 1
removetime = -2
vel = -.2, 0
ownpal = 1
sprpriority = 2 

[State 100, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, AfterImage]
type = AfterImage
trigger1 = AnimElem = 1
time = 30
length = 40
palcolor = 136
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
Paladd = 0,0,25
FrameGap = 8
timegap = 1
Trans = add1

[State 105, VelSet]
type = VelSet
trigger1 = Time = 2
x = -10
y = const(velocity.run.back.y)

[State 105, ChangeState]
type = ChangeState
trigger1 = Time > 15
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106


;---------------------------------------------------------------------------------------------
;RUN_BACK
[Statedef 106]
type    = S
physics = S
ctrl = 0
anim = 106
sprpriority = 1

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

[State 106, posset]
type = posset
trigger1 = time = 0
y = 0

[State 106, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 8100,0


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

;---------------------------------------------------------------------------------------------
;Win Poses

[Statedef 180]
type = S

[state 180, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 180, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,300

[State 180, 2]
type = ChangeState
trigger1 = Var(1) = [0,50]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = Var(1) = [51,100]
value = 182

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 183

[State 180, 4]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 184

;---------------------------------------------------------------------------------------------
;Win Pose 1

[Statedef 181]
type = S
movetype = I
physics = S
ctrl = 0
anim = 180
velset = 0,-0.45

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 3
range = 0,2

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 0
trigger1 = time = 20
value = S180,0
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 1
trigger1 = time = 20
value = S180,1
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 2
trigger1 = time = 20
value = S180,2
channel = 5
volume = 255

[state 181, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 181, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

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

[State 181]
type = AssertSpecial
trigger1 = Time < 190
flag = roundnotover

;---------------------------------------------------------------------------------------------
;Win Pose 2

[Statedef 182]
type = S
movetype = I
physics = S
ctrl = 0
anim = 180
velset = 0,0

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 3
range = 0,2

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 0
trigger1 =  time = 20
value = S180,3
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 1
trigger1 =  time = 20
value = S180,4
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 2
trigger1 =  time = 20
value = S180,5
channel = 5
volume = 255

[state 181, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

[State 182]
type = AssertSpecial
trigger1 = Time < 280
flag = roundnotover

;---------------------------------------------------------------------------------------------
;Win Pose 3

[Statedef 183]
type = S
movetype = I
physics = S
ctrl = 0
anim = 192
velset = 0,-.15


[State 183, Explod]
type = Explod
trigger1 = time = 1
anim = 182
ID = 183
pos = 190,5
postype = p1  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 90
ontop = 1

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 3
range = 0,1

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 0
trigger1 =  time = 20
value = S180,6
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 1
trigger1 =   time = 20
value = S180,7
channel = 5
volume = 255

[state 181, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

[State 183]
type = AssertSpecial
trigger1 = Time < 250
flag = roundnotover
;---------------------------------------------------------------------------------------------
;Win Pose 4

[Statedef 184]
type = S
movetype = I
physics = S
ctrl = 0
anim = 181
velset = 0,0

[State 180, VarRandom]
type = VarRandom
trigger1 = 1
v = 3
range = 0,2

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 0
trigger1 =  time = 20
value = S180,8
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 1
trigger1 =  time = 20
value = S180,9
channel = 5
volume = 255

[State 180, PlaySnd]
type = PlaySnd
trigger1 = Var(3) = 2
trigger1 =   time = 20
value = S180,10
channel = 5
volume = 255

[State 1500, Explod]
type = Explod
trigger1 = Animelem = 24
anim = 4025
ID = 184
pos = 0,-98
postype = p1
facing = 1
vfacing = 1
bindtime = 22
removetime = 22
scale = 0.5,0.5
sprpriority = 0
ontop = 1

[state 184, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

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

[State 184]
type = AssertSpecial
trigger1 = Time < 280
flag = roundnotover

;---------------------------------------------------------------------------------------------

;---------------------------------------------------------------------------------------------
;Introductions

[Statedef 190]
type = S

[State 190, 1]
type = VarRandom
trigger1 = Time = 0
v = 1
range = 0,400

[State 190, 2]
type = ChangeState
trigger1 = Var(1) = [0,100]
value = 191

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [101,200]
value = 192

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [201,300]
value = 193

[State 190, 3]
type = ChangeState
trigger1 = Var(1) = [301,400]
value = 194

;---------------------------------------------------------------------------------------------
;Intro1
[Statedef 191]
type = S
movetype = I
physics = N
ctrl = 0
anim = 190
velset = 0,0
spriority = 0

[State 190, VarSet]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,2

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 0
trigger1 = time = 1
value = 190,0
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 1
trigger1 = time = 1
value = 190,1
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 2
trigger1 = time = 1
value = 190,2
channel = 5
volume = 255

[State 191, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;Intro2
[Statedef 192]
type = S
movetype = I
physics = N
ctrl = 0
anim = 190
velset = 0, 1
spriority = 0

[State 190, VarSet]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,2

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 0
trigger1 = time = 40
value = 190,3
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 1
trigger1 = time = 40
value = 190,4
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 2
trigger1 = time = 40
value = 190,5
channel = 5
volume = 255

[State 192, PosSet]
type = PosSet
trigger1 = time = 0
y = -240

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

[State 192, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 192, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 192, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;Intro3
[Statedef 193]
type = S
movetype = I
physics = N
ctrl = 0
anim = 193
velset = 15.1,0
spriority = 0

[State 190, FX]
type = AfterImage
trigger1 = time = 1
time = 100
length = 40
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
PalAdd = 0, 0, 0
FrameGap = 8
timegap = 1
Trans = add1

[State 190, VarSet]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,1

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 0
trigger1 = time = 1
value = 190,6
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 1
trigger1 = time = 1
value = 190,7
channel = 5
volume = 255

[State 193, PosSet]
type = PosSet
trigger1 = time = 0
triggerall = facing = 1
x = -326

[State 193, PosSet]
type = PosSet
trigger1 = time = 0
triggerall = facing = -1
x = 326

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

[State 193, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 193, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;Intro4
[Statedef 194]
type = S
movetype = I
physics = N
ctrl = 0
anim = 191
velset = 0,0
spriority = 0

[State 190, VarSet]
type = VarRandom
trigger1 = time = 0
v = 1
range = 0,3

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 0
trigger1 = time = 10
value = 190,8
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 1
trigger1 = time = 10
value = 190,9
channel = 5
volume = 255

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(1) = 2
trigger1 = time = 10
value = 190,10
channel = 5
volume = 255

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

[State 194, Explod]
type = Explod
trigger1 = Animelem = 5
anim = 4025
ID = 184
pos = 0,-98
postype = p1
facing = 1
vfacing = 1
bindtime = 22
removetime = 22
scale = 0.5,0.5
sprpriority = 0
ontop = 1

[State 194, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 194, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

;---------------------------------------------------------------------------------------------
;Taunt

[Statedef 195]
type = A
movetype = I
physics = N
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 0

[State 195, Set Random]
type = VarRandom
trigger1 = Time = 0
v = 5
range = 0,5

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 0
trigger1 = time = 1
value = 195,0

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 1
trigger1 = time = 1
value = 195,1

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 2
trigger1 = time = 1
value = 195,2

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 3
trigger1 = time = 1
value = 195,3

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 4
trigger1 = time = 1
value = 195,4

[State 190, PlaySnd]
type = PlaySnd
trigger1 = var(5) = 5
trigger1 = time = 1
value = 195,5


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


;-----------------------------------------------
[Statedef 196]; Move around before match
type = S
physics =S
sprpriority = 0

[State 196, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 196]
type = varset
trigger1 = time = 1
var(50) = 0

[State 196]
type = posset
trigger1 = 1
y = 0

[State 196]
type = VelSet
trigger1 = Time = 0
y = 0

[State 196, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = 2.4

[State 196, 2]
type = VelSet
trigger1 = command = "holdback"
x = -2.0

[State 2]
type = ChangeAnim
trigger1 = command = "holdfwd"
trigger1 = Anim != 20
trigger1 = Anim != 10020
value = ifelse (facing = -1, 10020, 20)

[State 2]
type = ChangeAnim
trigger1 = command = "holdback"
trigger1 = Anim != 21
trigger1 = Anim != 10021
value = ifelse (facing = -1, 10021, 21)

[State 2]
type = ChangeAnim
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
trigger1 = Anim != 0
trigger1 = Anim != 10000
value = ifelse (facing = -1, 10000, 0)

[State 196, 2]
type = VelSet
trigger1 = command != "holdback"
trigger1 = command != "holdfwd"
x = 0

[State var]
type = VarSet
trigger1 = roundstate != 2
var(9) = floor(pos x)

[State F]
type = posset
trigger1 = roundstate = 2
trigger1 = var(9) != 0
x = var(9)

[State F]
type = varset
trigger1 = roundstate = 2
var(9) = 0

[State F]
type = changestate
trigger1 = ctrl
value = ifelse((command = "holdfwd") || (command ="holdback"),20,0)


;---------------------------------------------------------------------------
;Basic Attacks
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Standing Light Punch

[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 200
poweradd = 15
sprpriority = 2

[State 0, VarSet]
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 200, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 200, HitDef]
type = HitDef
trigger1 = time=0
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -63
;guard.sparkno; = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -2
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

;---------------------------------------------------------------------------
; Standing Medium Punch

[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 220
poweradd = 35
sprpriority = 2

[State 210, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 210, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 210, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = S,NA
damage = 25,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-75
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = -2
air.type = Low
air.hittime = 15
air.velocity = -6,-5
envshake.time = 1
envshake.ampl = 1

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

;---------------------------------------------------------------------------
; Standing Heavy Punch

[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 210
poweradd = 55
sprpriority = 2

[State 220, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 220, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 220, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 55,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,0
sparkno = s7700;s7772
sparkxy = -10, -100
;guard.sparkno; = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -6,-3
air.type = Low
air.hittime = 5
air.velocity = -6,-3
fall = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = movehit =1
time = 50
freq = 30
ampl = -4
phase = 90

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

;---------------------------------------------------------------------------------------------
;Standing light kick

[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 230
poweradd = 15
sprpriority = 2

[State 230, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 230, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 230, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 230, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = S,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -55
;guard.sparkno; = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Standing medium kick

[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 240
poweradd = 35
sprpriority = 2

[State 240, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 240, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 240, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-98
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Standing strong Kick

[Statedef 250]
type    = S
movetype= A
physics = S
juggle  = 4
ctrl = 0
anim = 250
poweradd = 55
sprpriority = 2

[State 250, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 250, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 250, HitDef]
type = HitDef
trigger1 = time = 0
attr = S,NA
damage = 55,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700;s7772
sparkxy = -10, -75
;guard.sparkno; = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 13
ground.hittime = 13
ground.velocity = -8,0
air.type = Low
air.hittime = 5
air.velocity = -7,0

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

;---------------------------------------------------------------------------------------------
;Crouching light punch

[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 400
poweradd = 15
sprpriority = 2

[State 400, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 400, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -47
;guard.sparkno; = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium punch

[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 410
poweradd = 35
sprpriority = 2

[State 410, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 410, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 410, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-53
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong punch

[Statedef 420]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 420
poweradd = 55
sprpriority = 2

[State 200, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 420, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 420, HitDef]
type = HitDef
trigger1 = AnimElem = 3
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700;s7772
sparkxy = -10, -93
;guard.sparkno; = s6767
hitsound = 5,4
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = 0, -18
air.velocity = 0,-18
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)
fall.recover = 0

;Launch circle
[State 420, 4]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4444
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64

[State 420, 5]
type = Explod
trigger1 = MoveHit
removetime = -2
id = 6003
anim = 4445
persistent = 0
pos = 30,-60
postype = p1
sprpriority = 2
;facing = -1
ownpal = 1
bindtime = 1
;supermove = 1
supermovetime = 0
ontop = 1
ignorehitpause = 1
scale = 2.20, 0.64


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

;---------------------------------------------------------------------------------------------
;Crouching light kick

[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 430
poweradd = 15
sprpriority = 2

[State 430, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 430, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 430, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 15,1
animtype = Light
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -10
;guard.sparkno; = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3,0
air.type = Low
air.hittime = 3
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching medium kick

[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 440
poweradd = 35
sprpriority = 2

[State 440, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 440, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 440, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = C,NA
damage = 35,1
animtype = Medium
hitflag = MA
guardflag = L
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-20
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -5,0
air.type = Low
air.hittime = 5
air.velocity = -5,0

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

;---------------------------------------------------------------------------------------------
;Crouching strong kick

[Statedef 450]
type    = C
movetype= A
physics = C
juggle  = 4
ctrl = 0
anim = 450
poweradd = 55
sprpriority = 2

[State 450, VelMul, corrida]
type = VelMul
trigger1 = Time = 0
trigger1 = PrevStateNo = 100
x = .8

[State 450, Velset]
type = Velset
trigger1 = animelem = 2
x = 15

[State 450, Velset]
type = Velset
trigger1 = animelem = 12
x = 0

[State 450, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
trigger2 =  AnimElem = 6
value = 8400,2

[State 450, HitDef]
type = HitDef
trigger1 = time = 0
attr = C,NA
damage = 45,1
animtype = up
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700;s7772
sparkxy = -10, -23
;guard.sparkno; = s6767
hitsound = 5,4
ground.type = High
ground.slidetime = 30
ground.hittime  = 40
ground.velocity = -3, -8
air.velocity = -3,-8
airguard.velocity = -6,0
yaccel = 0.39+(enemynear,const(movement.yaccel)/2)
fall.recover = 0
Fall = 1
trip = 1

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

;---------------------------------------------------------------------------------------------
;Jumping light punch

[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 600
poweradd = 15
sprpriority = 2

[State 600, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 600, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -93
;guard.sparkno; = s6767
hitsound = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 25
ground.velocity = -6
air.fall = 0
air.velocity = 0,((vel y)-.2)

[State 600, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------------------------
;Jumping medium punch

[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 620
poweradd = 35
sprpriority = 2

[State 610, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 610, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 35,1
animtype = medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-98
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = 0,((vel y)-.2)

[State 610, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------------------------
;Jumping strong punch

[Statedef 620]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 610
poweradd = 55
sprpriority = 2

[State 620, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 620, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700;s7772
sparkxy = -10, -83
;guard.sparkno; = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.hittime = 25
air.fall = 1

[State 620, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------------------------
;Jumping light kick

[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 630
poweradd = 15
sprpriority = 2

[State 630, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,0

[State 630, HitDef]
type = HitDef
trigger1 = time = 0
attr = A,NA
damage = 15,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = s7700;s7770
sparkxy = -10, -43
;guard.sparkno; = s6767
hitsound = 5,3
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -6
air.fall = 0
air.velocity = 0,((vel y)-.2)
air.hittime = 25

[State 630, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50


;---------------------------------------------------------------------------------------------
;Jumping medium kick

[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 640
poweradd = 35
sprpriority = 2

[State 640, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,1

[State 640, HitDef]
type = HitDef
trigger1 = AnimElem = 2
attr = A,NA
damage = 35,1
animtype = Medium
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 9,9
sparkno = s7700;s7771
sparkxy = -10,-58
;guard.sparkno; = s6767
hitsound = 5,1
guardsound = 6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 20
ground.velocity = -8
air.fall = 0
air.velocity = 0,((vel y)-.2)
air.hittime = 25

[State 640, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------------------------
;Jumping strong kick

[Statedef 650]
type    = A
movetype= A
physics = A
juggle  = 4
ctrl = 0
anim = 650
poweradd = 55
sprpriority = 2

[State 650, PlaySnd]
type = PlaySnd
trigger1 =  AnimElem = 1
value = 8400,2

[State 650, HitDef]
type = HitDef
trigger1 = time = 0
;trigger1 = AnimElem = 4
;trigger2 = AnimElem = 5
attr = A,NA
damage = 45,1
animtype = High
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 10,10
sparkno = s7700;s7772
sparkxy = -10, -43
;guard.sparkno; = s6767
hitsound = 5,4
guardsound = 6,0
ground.type = High
ground.slidetime = 18
ground.hittime  = 25
ground.velocity = -10
air.velocity = -12,10
air.fall = 1
air.hittime = 25

[State 650, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;---------------------------------------------------------------------------------------------
;Throw = Flight
;-------------------------------------------------------------------

[Statedef 800]
type    = S
movetype= I
physics = S
juggle = 0
ctrl = 0
anim = 1400
sprpriority = -1

[State 800, Turn]
type = changeanim
trigger1 = p2bodydist x < -5
trigger1 = time > 13
value = 1401

[State 800, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

[State 800, PlayerPush]
type = PlayerPush
trigger1 != time
value = 0

[State 801, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1400,0
volume = 0
channel = -1

[State 800, FX]
type = AfterImage
trigger1 = AnimElem = 6
time = 30
length = 40
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
PalAdd = 0, 0, 0
FrameGap = 8
timegap = 1
Trans = add1

[State 800, 1]
type = VelSet
trigger1 = Time = [3,12]
x = .3
y = 0

[State 800, 1]
type = VelSet
trigger1 = Time >= 8
x = 2
y = 0

[State 800, 2]
type = turn
trigger1 = time  = 45

[State 800, 3]
type = ChangeState
trigger1 = time  = 50
trigger2 = backedgebodydist <= 0
value = 802
ctrl = 1



[Statedef 802]
type    = U
movetype= A
physics = N
juggle  = 1
velset = 0, 0
poweradd = 0
anim = 800
ctrl = 0
sprpriority = 2

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

[State 802, VelSet]
type = VelSet
trigger1 = time = 2
x = 4
y = 0

[State 802, Ground Flash]
type = Explod
trigger1 = time = 15
anim = 6666
ID = 8400
postype = P1
pos = -40,0
sprpriority = 3
ownpal = 1
supermovetime = 80

[State 802, HitDef]
type = HitDef
trigger1 = animelem = 1
damage = 15,1
animtype = light
guardflag = MA
attr = SA, NT
hitflag = MA
priority = 1, Miss
pausetime = 0,0
sparkno = s7700
sparkxy = -10,-60
hitsound = 5,1
guardsound = 6,0
ground.type = Low
ground.slidetime = 15
ground.hittime  = 15
ground.velocity = 2,0
air.type = Low
air.hittime = 15
air.velocity = 2,-5
envshake.time = 1
envshake.ampl = 1
p1stateno = 810
p2stateno = 815
id = 815

[State 802, 1] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 802, 2] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 802, 4]
type = PlaySnd
trigger1 = time = 19
value = 8100,0

[State 802, 5]
type = PlaySnd
trigger1 = AnimElem = 7
value = 2, 4

[State 802, 6]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 1
ID = 41
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -1, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 802, 7]
type = Explod
trigger1 = time < 15
trigger1 = (time % 4) = 0
ID = 42
anim = 2222
postype = p1
pos = -20, -40
bindtime = 1
removetime = -2
vel = -.8, 0
ownpal = 1
random = 20, 60
sprpriority = 2

[State 802, 8]
type = VelAdd
triggerall = Vel X > 0
trigger1 = time > 15
x = -.1

[State 802, 10]
type = ChangeState
trigger1 = time = 45
ctrl = 1
value = 0

;---------------------------
[Statedef 810]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0, 0
poweradd = 0
anim = 810
ctrl = 0
sprpriority = 7

[State 810, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S54,18

[State 802, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S800,0
volume = 255
channel = 5

[State 810, VelSet]
type = VelSet
trigger1 = time = 2
x = 0
y = -4

[State 810, VelSet]
type = VelSet
trigger1 = time = 40
x = 0
y = 0

[State 810, Explod]
type = Explod
trigger1 = time = 15
anim = 817
ID = 810
pos = 70,0
postype = p1
color = 210
PalBright = 10, 30, 200
PalContrast = 10, 90, 250
Paladd = 10,30,215
bindtime = -1
removetime = -2
scale = 1,3
sprpriority = 0
ontop = 1

[State 810, PalFX]
type = PalFX
trigger1 = time = 15; animelem = 1
time = 66
add = 100,50,256
mul = 196,106,256
invertall = 0
color = 210
PalBright = 100, 0, 250
PalContrast = 190, 90, 250
Paladd = 100,0,255
sinadd = 150,150,215,10

[State 810, PlaySnd]
type = PlaySnd
trigger1 = timemod = 2,1
value = S8000,3
volume = 20
channel = 3

[State 810, PlaySnd]
type = PlaySnd
trigger1 = timemod = 2,1
value = S1000,8
volume = 255
channel = 3

[State 810, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 200,-100

[State 810, TargetBind]
type = TargetBind
trigger1 = 1
id = 815
pos = 70,-77

[State 810, ChangeAnim]
type = Changestate
trigger1 = time = 70
value = 820

;---------------------------------------------------------------------------
;Spin opponent

[Statedef 815]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = -1

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

[State 815]
type = ChangeAnim2
trigger1 = Time = 0
value = 815

[State 815]
type = Turn
trigger1 = enemynear,facing = facing

[State 815]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

[State 815, PalFX]
type = PalFX
trigger1 = animelem = 1
time = 66
add = 0,100,200
mul = 56,206,256
invertall = 0
color = 140
PalBright = 0, 100, 200
PalContrast = 90, 190, 250
Paladd = 0,010,215

[State 815, LifeAdd]
type = LifeAdd
trigger1 = timemod = 2,1
value = -3

[State 815, SelfState]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

;---------------------------
[Statedef 820]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0, 0
poweradd = 0
anim = 820
ctrl = 0
sprpriority = 7

[State 820, VarSet]
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 820, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S54,17

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

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

[State 820, End]
type = ChangeState
trigger1 = time = 10
value = 821
ctrl = 0

;---------------------------
[Statedef 821]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0, 3
poweradd = 0
anim = 821
ctrl = 0
sprpriority = 7

[State 821, VarSet]
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

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

[State 821, End]
type = ChangeState
trigger1 = Pos Y >= 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Super Moves
;---------------------------------------------------------------------------

;===========================================================================
;Special Moves
;===========================================================================

;-------------------------------------------------------------------------------
; Green Beam
;-------------------------------------------------------------------------------

[StateDef 1000]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
juggle = 9
velset = 0,0
poweradd = 50

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = time = 20
value = S1000,0
volume = 255
channel = 5

[State 1000, PlaySnd]
type = PlaySnd
triggerall = time > 6
trigger1 = timemod =4,1
value = 15,5

[State 1000, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1002
ID =  1000
pos = 30,-81
postype = p1
facing = 1
vfacing = 1
bindtime = 27
removetime = 27
scale = 1,0.75
sprpriority = 99
ontop = 1

[State 1000, HitDef]
type = HitDef
trigger1 = time= 0;mod =15,1
attr = S,SA
damage = 14,2
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 12,12
sparkno = s7700
sparkxy = -10, -80
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -11.5
air.type = Low
air.hittime = 4
air.velocity = -13,-2
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1000, changestate]
type = ChangeState
trigger1 = time > 25
value = 1001
ctrl = 0

[StateDef 1001]
type = S
movetype = I
physics = S
anim = 1001
ctrl = 0
velset = 0,0

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

;---------------------------------------------------------------------------
; Aerial Blast
;---------------------------------------------------------------------------
[Statedef 1040]
type    = S
movetype= A
physics = A
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1000
sprpriority = 0

[State 1040, PlaySnd]
type = PlaySnd
trigger1 = time = 20
value = S1000,0
volume = 255
channel = 5

[State 1040, PlaySnd]
type = PlaySnd
triggerall = time > 6
trigger1 = timemod =4,1
value = 15,5

[State 1040, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1002
ID =  1000
pos = 40,-81
postype = p1
facing = 1
vfacing = 1
bindtime = 27
removetime = 27
scale = 1,0.75
sprpriority = 99
ontop = 1

[State 1040, HitDef]
type = HitDef
trigger1 = time = 0 ;mod =15,1
attr = S,SA
damage = 14,2
animtype = heavy
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 12,12
sparkno = s7700
sparkxy = -10, -80
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -11.5
air.type = Low
air.hittime = 4
air.velocity = -13,-2
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1040, changestate]
type = ChangeState
trigger1 = time > 25
value = 50
ctrl = 0

;-------------------------------------------------------------------------------
; Mystic Sword A (Short)
;-------------------------------------------------------------------------------

[StateDef 1100]
type = S
movetype = A
physics = S
anim = 1100
ctrl = 0
juggle = 9
velset = 0,0
poweradd = 50

[State 1100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1100,0
volume = 255
channel = 5

[State 1100, PlaySnd]
type = PlaySnd
triggerall = time > 6
trigger1 = timemod =4,1
value = 15,5

[State 1100, Explod]
type = Explod
trigger1 = animelem = 1
anim = 40021
ID =  1100
pos = 20,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 60
removetime = 60
scale = 1,1
sprpriority = 99
ontop = 1

[State 1120, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1102
ID =  1100
pos = 0,-100
postype = p1
facing = -1
vfacing = 1
bindtime = 40
removetime = 40
scale = 0.66,0.44
sprpriority = 9
ontop = 0

[State 1100, HitDef]
type = HitDef
trigger1 = timemod =15,1
attr = S,SA
damage = 4,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 1,2
sparkno = s7700
sparkxy = -10, -90 + floor(random/30)
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -1.5
air.type = Low
air.hittime = 4
air.velocity = -3,-1
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1100, changestate]
type = ChangeState
trigger1 = time > 50
value = 1101
ctrl = 0

[StateDef 1101]
type = S
movetype = I
physics = S
anim = 1101
ctrl = 0
velset = 0,0

[State 1100, changestate]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
; Mystic Sword B
;-------------------------------------------------------------------------------

[StateDef 1110]
type = S
movetype = A
physics = S
anim = 1110
ctrl = 0
juggle = 9
velset = 0,0
poweradd = 50

[State 1110, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1100,0
volume = 255
channel = 5

[State 1110, PlaySnd]
type = PlaySnd
triggerall = time > 6
trigger1 = timemod =4,1
value = 15,5

[State 1110, Explod]
type = Explod
trigger1 = animelem = 1
anim = 40022
ID =  1100
pos = 20,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 70
removetime = 70
scale = 1,1
sprpriority = 99
ontop = 1

[State 1120, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1102
ID =  1100
pos = 0,-100
postype = p1
facing = -1
vfacing = 1
bindtime = 50
removetime = 50
scale = 0.66,0.44
sprpriority = 9
ontop = 0

[State 1110, HitDef]
type = HitDef
trigger1 = timemod =15,1
attr = S,SA
damage = 4,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 1,2
sparkno = s7700
sparkxy = -10, -90 + floor(random/30)
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -1.5
air.type = Low
air.hittime = 4
air.velocity = -3,-1
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1110, HitDef]
type = HitDef
trigger1 = time = 36
attr = S,SA
damage = 14,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 1,2
sparkno = s7700
sparkxy = -10, -90 + floor(random/30)
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -11.5
air.type = Low
air.hittime = 4
air.velocity = -3,-1
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1110, changestate]
type = ChangeState
trigger1 = time > 60
value = 1111
ctrl = 0

[StateDef 1111]
type = S
movetype = I
physics = S
anim = 1101
ctrl = 0
velset = 0,0

[State 1100, changestate]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
; Mystic Sword C (Long)
;-------------------------------------------------------------------------------

[StateDef 1120]
type = S
movetype = A
physics = S
anim = 1120
ctrl = 0
juggle = 9
velset = 0,0
poweradd = 50

[State 1120, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1100,0
volume = 255
channel = 5

[State 1120, PlaySnd]
type = PlaySnd
triggerall = time > 6
trigger1 = timemod =4,1
value = 15,5

[State 1120, Explod]
type = Explod
trigger1 = animelem = 1
anim = 40023
ID =  1100
pos = 20,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 90
removetime = 90
scale = 1,1
sprpriority = 99
ontop = 1

[State 1120, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1102
ID =  1100
pos = 0,-100
postype = p1
facing = -1
vfacing = 1
bindtime = 70
removetime = 70
scale = 0.66,0.44
sprpriority = 9
ontop = 0

[State 1120, HitDef]
type = HitDef
trigger1 = timemod =15,1
attr = S,SA
damage = 4,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 1,2
sparkno = s7700
sparkxy = -10, -90 + floor(random/30)
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 2
ground.hittime  = 2
ground.velocity = -1.5
air.type = Low
air.hittime = 4
air.velocity = -3,-1
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1110, HitDef]
type = HitDef
trigger1 = time = 56
attr = S,SA
damage = 24,1
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 1,2
sparkno = s7700
sparkxy = -10, -90 + floor(random/30)
hitsound = S16,4
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime  = 12
ground.velocity = -11.5
air.type = Low
air.hittime = 4
air.velocity = -3,-1
guard.velocity = -5
airguard.velocity = -5
ground.cornerpush.veloff = -2.5
air.cornerpush.veloff = -2.5
down.cornerpush.veloff = -3.5
guard.cornerpush.veloff = -2.5
airguard.cornerpush.veloff = -2.5
getpower = 0

[State 1120, changestate]
type = ChangeState
trigger1 = time > 80
value = 1121
ctrl = 0

[StateDef 1121]
type = S
movetype = I
physics = S
anim = 1101
ctrl = 0
velset = 0,0

[State 1120, changestate]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Eye of Agamoto (Close)
;---------------------------------------------------------------------------
[Statedef 1200]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = -5,-120
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = 50,-60
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,6

[State 1200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,0
volume = 255
channel = 5

[State 1200, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Blast Effect"
ID = 1201
stateno = 1201
pos = 40,-98
postype = p1
bindtime = -1

[State 1200, HitDef]
type = HitDef
trigger1 = time= 0
attr = S, SA
damage = 10,2
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s1000,1
guardsound = 6,0
sparkxy = -30, 0; (enemynear,pos y)
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-2
guard.velocity = -2
air.velocity = -4,2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

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

[Statedef 1201]
type = A
movetype = A
physics = N
anim = 1008
velset = 0,0
sprpriority = 99

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

[State 1201, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S1000,8
volume = 255
channel = 5

[State 1211, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4015
ID = 0
pos = 0,0
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.55,0.55
sprpriority = 0
ontop = 1

[State 1201, HitDef]
type = HitDef
trigger1 = timemod= 4,1
attr = S, SA
damage = 10,2
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s1000,1
guardsound = 6,0
sparkxy = -30, 0; (enemynear,pos y)
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -5,-2
guard.velocity = -2
air.velocity = -4,2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0

[State 1201, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1202
time = 9999
forceair = 0

[State 1201, HitBy]
type = HitBy
trigger1 = 1
value = ,NP,SP,HP
time = 9999

[State 1201, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1201, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 1201, DestroySelf]
type = DestroySelf
trigger1 =  movehit
trigger2 = time > 46

[Statedef 1202]
type = A
movetype = A
physics = N
juggle = 9
anim = 1202
velset = 0,0
sprpriority = 99

[State 1202, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0

;---------------------------------------------------------------------------
; Eye of Agamoto (High)
;---------------------------------------------------------------------------
[Statedef 1210]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,6

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = -5,-120
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = 50,-60
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1210, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,0
volume = 255
channel = 5

[State 1210, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Blast Effect"
ID = 1211
stateno = 1211
pos = 110,-140
postype = p1
bindtime = -1

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

[Statedef 1211]
type = A
movetype = A
physics = N
anim = 1008
velset = 0,0
sprpriority = 99

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

[State 1211, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4015
ID = 0
pos = 0,0
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.55,0.55
sprpriority = 0
ontop = 1

[State 1211, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S1000,8
volume = 255
channel = 5

[State 1211, HitDef]
type = HitDef
trigger1 = timemod= 2,1
attr = S, SA
damage = 5,1
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s1000,1
guardsound = 6,0
sparkxy = -30,floor(-(enemynear, pos y) + ifelse(enemynear,pos y < pos y,-20,0))
animtype = Heavy
ground.type = low
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -11
guard.velocity = -3
air.velocity = -10,5
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
;air.fall= 1
fall = 1

[State 1211, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1202
time = 9999
forceair = 0

[State 1211, HitBy]
type = HitBy
trigger1 = 1
value = ,NP,SP,HP
time = 9999

[State 1211, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1211, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 1211, DestroySelf]
type = DestroySelf
trigger1 =  movehit
trigger2 = time > 46

;---------------------------------------------------------------------------
;  Eye of Agamoto (Far)
;---------------------------------------------------------------------------
[Statedef 1220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 50
ctrl = 0
velset = 0,0
anim = 1200
sprpriority = 0

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = 1000,6
volume = 255
channel = 4

[State 1220, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S1200,0
volume = 255
channel = 5

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = -5,-120
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1210, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4018
ID = 0
pos = 50,-60
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1020, Helper]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "Blast Effect"
ID = 1221
stateno = 1221
pos = 170,-60
postype = p1
bindtime = -1

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

[Statedef 1221]
type = A
movetype = A
physics = N
anim = 1008
velset = 0,0
sprpriority = 99
scale = 1,1.25

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

[State 1211, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4015
ID = 0
pos = 0,0
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 46
scale = 0.55,0.55
sprpriority = 0
ontop = 1


[State 1221, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S1000,8
volume = 255
channel = 5

[State 1221, HitDef]
type = HitDef
trigger1 = time = 0
attr = S, SA
damage = 29,6
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s1000,1
guardsound = 6,0
sparkxy = -30,floor((enemynear, pos y) - 10)
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = -18,-10
guard.velocity = -5
air.velocity = -14,-6
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
air.fall= 1
fall = 1

[State 1221, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1202
time = 9999
forceair = 0

[State 1221, HitBy]
type = HitBy
trigger1 = 1
value = ,NP,SP,HP
time = 9999

[State 1221, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 1221, SprPriority]
type = SprPriority
trigger1 = 1
value = 10

[State 1221, DestroySelf]
type = DestroySelf
trigger1 =  movehit
trigger2 = time > 46

;---------------------------------------------------------------------------
; Flames of the Faultine
;---------------------------------------------------------------------------

[StateDef 1300]
type = S
movetype = A
physics = S
anim = 1300
ctrl = 0
velset = 0,0

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1300,0
channel = 5

[State 1300, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 15,7
channel = 4
volume = 255

[State 1300, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4019
ID = 1300
pos = 86,-88
postype = p1
facing = -1
vfacing = 1
;bindtime = 0
velset = 0.75,0
removetime = 36
scale = 0.55,0.33
sprpriority = 0
ontop = 1

[State 1300, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4020
ID = 1300
pos = 66,-88
postype = p1
facing = -1
vfacing = 1
;bindtime = 0
velset = 0.75,0
removetime = 20
scale = 0.25,0.25
sprpriority = 0
ontop = 1

[State 1300, 2]
type = Projectile
trigger1 = AnimElem = 6
ProjID = 1301
projanim = 1301
projhitanim = 4019
projremanim = 1317
projcancelanim = 4019
projscale = 0.85,0.75
velocity = 2,0
offset = 46,-88
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 65,10
pausetime = 18,8
sparkno = -1
guard.sparkno = -1
hitsound = S15,7
guardsound = S15,7
ground.type = Low
ground.slidetime = 18
ground.hittime  = 8
ground.velocity = -18,7
air.velocity = -8,4
palfx.time = 40
palfx.add = 172,-19,-204
palfx.mul = 338,389,156
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 35
;fall = 1
;air.fall = 1
p2stateno = 17697

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

;--------------------------------------------------------------------

[Statedef 17697]
type = S
movetype= U
physics = N
velset = -2,0

[State 7697, color]
type = palFX
trigger1 = time != 0
add = 210,215,15
mul = 190, 188, 10
color = 46
time = 1

[State 7697, VelSet]
type = VelSet
trigger1 = Time = 20
x = 0
y = 0

[State 7697, superportrait]
type = Explod
trigger1 = Time = 15
anim = 1315
ID = 1315
pos = -26,-38
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7697, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1314
ID = 1314
pos = 16,-88
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7697, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1314
ID = 1314
pos = 3,-30
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7697, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1314
ID = 1314
pos = -2,-118
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7697, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1314
ID = 1314
pos = 6,-68
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7697, SelfState]
type = SelfState
trigger1 = time = 5
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 7697, End]
type = ChangeState
trigger1 = time = 5
trigger1 = Pos Y < 0
value = 76971

;-------------------------------------------------------------

[Statedef 76971]
type    = S
movetype= H
physics = N
velset = 0,1
ctrl = 0
anim = 7697

[State 76971, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 76971, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 76971, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 76971, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

;---------------------------------------------------------------------------
; Daggers of Denak
;---------------------------------------------------------------------------

[StateDef 1310]
type = S
movetype = A
physics = S
anim = 1310
ctrl = 0
velset = 0,0

[State 1310, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1310,0
channel = 5

[State 1310, superportrait]
type = Explod
trigger1 = Time = 3
anim = 4013
ID = 1318
pos = 25,-105
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 1
anim = 1318
ID = 1318
pos = -25,-188
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 2
anim = 1318
ID = 1318
pos = 0,-218
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 3
anim = 1318
ID = 1318
pos = 25,-148
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 1
anim = 1318
ID = 1318
pos = -25,-148
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 2
anim = 1318
ID = 1318
pos = 0,-128
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, superportrait]
type = Explod
trigger1 = Time = 3
anim = 1318
ID = 1318
pos = 25,-198
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 1310, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,3

[State 1310, 2]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1311
projanim = 1311
projhitanim = 1317
;projremanim = 1316
projcancelanim = 1316
projscale = 1,1
velocity = 6,3
offset = 0,-178
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 65,10
pausetime = 50,4
sparkno = 1317
guard.sparkno = -1
hitsound = S1000,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
fall = 0
air.fall = 1
p2stateno = 7990

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

;--------------------------------------------------------------------
; Freeze
[Statedef 97990]
type = S
movetype= U
physics = N
velset = 0,0

[State 7990, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (AnimExist(7990))
value = 7990

[State 7990, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0) && (!AnimExist(7990))
value = 5000

[State 7990, color]
type = palFX
trigger1 = time != 0
add = 50,175,255
mul = 60, 180, 200
time = 7

[State 7990, SelfState]
type = SelfState
trigger1 = time = 100
trigger1 = Pos Y > -1
value = 0
ctrl = 1

[State 7990, End]
type = ChangeState
trigger1 = time = 100
trigger1 = Pos Y < 0
value = 7991

;-------------------------------------------------------------

[Statedef 97991]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 5070

[State 7991, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 7991, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 7991, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 7991, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

;-------------------------------------------------------------------------------
[Statedef 7990]
type = S
movetype= U
physics = N
velset = -2,0
;anim = 7990

[State 7990, ChangeAnim]
type = ChangeAnim
trigger1 = (Time = [0,10]) && (AnimExist(7990))
value = 7990

[State 7990, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0) && (!AnimExist(7990))
value = 5000

[State 7990, VelSet]
type = VelSet
trigger1 = Time = 20
x = 0
y = 0

[State 7990, color]
type = palFX
trigger1 = time != 0
triggerall = anim!= 7990
add = 150,225,255
mul = 100,188,255
color = 146
time = 1

[State 7990, Explod]
type = Explod
trigger1 = time =0
anim = 5302
ID = 17698
pos = 0,-110
postype = p1
facing = 1
vfacing = 1
bindtime = 12
vel = 0,1.5
accel = 0,0
removetime = -2
scale = 1,3
sprpriority = 99
ontop = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = 3,-40
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = 12,-28
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = -18,-58
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = 2,-8
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = 8,-38
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, superportrait]
type = Explod
trigger1 = Time = 0
anim = 1316
ID = 1316
pos = 0,-78
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7990, SelfState]
type = SelfState
trigger1 = time = 30
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 7990, End]
type = ChangeState
trigger1 = time = 30
trigger1 = Pos Y < -4
value = 76981

;-------------------------------------------------------------

[Statedef 76981]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 5000

[State 76981, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 76981, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 76981, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 76981, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5070
ctrl = 1

;---------------------------------------------------------------------------
; Bolts of Balthakk
;---------------------------------------------------------------------------

[StateDef 1320]
type = S
movetype = A
physics = S
anim = 1320
ctrl = 0
velset = 0,0

[State 1320, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 1320,0
channel = 5

[State 1320, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = 1000,3

[State 1320, Explod]
type = Explod
trigger1 =  animelem = 7
anim = 1321
ID =  1320
pos = 46,-88
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 0.85,0.75
sprpriority = 0
ontop = 1

[State 1320, 2]
type = Projectile
trigger1 = AnimElem = 7
ProjID = 1320
projanim = 1322
projhitanim = 4021
;projremanim = 1315
projcancelanim = 1314
projscale = 0.85,0.75
velocity = 1,0
offset = 46,-88
attr = S,SP
hitflag = MAF
guardflag = MA
animtype = low
priority = 4,Hit
damage = 65,10
pausetime = 14,4
sparkno = -1
guard.sparkno = -1
hitsound = S1000,3
guardsound = 6,0
ground.type = Low
ground.slidetime = 8
ground.hittime  = 8
ground.velocity = -8,4
air.velocity = -8,4
fall = 1
air.fall = 1
p2stateno = 7696

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

;--------------------------------------------------------------------

[Statedef 7696]
type = S
movetype= U
physics = N
velset = -2,0
anim = 7696

[State 7696, VelSet]
type = VelSet
trigger1 = Time = 20
x = 0
y = 0

[State 7699, color]
type = palFX
trigger1 = time != 0
add = 240,115,185
mul = 208 ,55, 170
color = 226
time = 1

[State 7699, superportrait]
type = Explod
trigger1 = Time = 10
anim = 1323
ID = 1323
pos = 16,-98
postype = p1
bindtime = 999
removetime = -2
sprpriority = 5
ownpal = 1
removeongethit = 1

[State 7699, SelfState]
type = SelfState
trigger1 = time = 15
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 7699, End]
type = ChangeState
trigger1 = time = 15
trigger1 = Pos Y < 0
value = 76991

;-------------------------------------------------------------

[Statedef 76991]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 7696

[State 76991, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 76991, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 76991, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 76991, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1


;-------------------------------------------------------------------------------
;Illusion
[Statedef 1400]
type    = S
movetype= I
physics = S
juggle = 0
ctrl = 0
anim = 1400
sprpriority = -1

[State 1400, Turn]
type = changeanim
trigger1 = p2bodydist x < -5
trigger1 = time > 13
value = 1401

[State 1400, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

[State 1400, PlayerPush]
type = PlayerPush
trigger1 != time
value = 0

[State 1400, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1400,1
volume = 0
channel = -1

[State 1401, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1400,0
volume = 0
channel = -1

[State 1400, FX]
type = AfterImage
trigger1 = AnimElem = 6
time = 30
length = 40
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
PalAdd = 0, 0, 0
FrameGap = 8
timegap = 1
Trans = add1

[State 1400, 1]
type = VelSet
trigger1 = Time = [3,12]
x = 1.9
y = 0

[State 1400, 1]
type = VelSet
trigger1 = Time >= 8
x = 9
y = 0

[State 1400, 2]
type = turn
trigger1 = time  = 45

[State 1400, 3]
type = ChangeState
trigger1 = time  = 50
trigger2 = backedgebodydist <= 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
;Illusion
[Statedef 1403]
type    = S
movetype= I
physics = S
juggle = 0
ctrl = 0
anim = 1400
sprpriority = -1

[State 1403, Turn]
type = changeanim
trigger1 = p2bodydist x < -5
trigger1 = time > 13
value = 1401

[State 1403, 1]
type = NotHitBy
trigger1 = Time
value = CSA,HT,NA,SA,HA,NP,SP,HP

[State 1403, PlayerPush]
type = PlayerPush
trigger1 != time
value = 0

[State 1403, PlaySnd]
type = PlaySnd
trigger1 = time = 1
value = S1400,1
volume = 0
channel = -1

[State 1403, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S1400,0
volume = 0
channel = -1

[State 1403, FX]
type = AfterImage
trigger1 = AnimElem = 6
time = 30
length = 40
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
PalAdd = 0, 0, 0
FrameGap = 8
timegap = 1
Trans = add1

[State 1403, 1]
type = VelSet
trigger1 = Time = [3,12]
x = -0.9
y = 0

[State 1403, 1]
type = VelSet
trigger1 = Time >= 8
x = -9
y = 0

[State 1403, 3]
type = ChangeState
trigger1 = time  = 50
trigger2 = backedgebodydist <= 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; Teleport
;---------------------------------------------------------------------------

[Statedef 1500]
type = S
movetype = A
physics = S
velset = 0,0
anim = 1500
ctrl = 0

[State 1500, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1500, PlaySnd]
type = PlaySnd
trigger1 = time = 5
value = S1500,0
volume = 255
channel = -1

[State 1500, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4025;4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 22
removetime = 22
scale = 0.5,0.5
sprpriority = 0
ontop = 1

[State 1500,1]
type=ChangeState
trigger1 = AnimTime = 0
value = 1501

[StateDef 1501]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1502
poweradd = 20
sprpriority = 2

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 1501
ID = 1501
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1,1
sprpriority = 0
ontop = 1

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 10
scale = 0.5,0.5
sprpriority = 0
ontop = 0
shadow = 100,100,100

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 3
scale = 0.75,0.75
sprpriority = 0
ontop = 0

[State 1501, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 22
scale = 1,1
sprpriority = 0
ontop = 0

[State 1501, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1511, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)-325,(enemy(0),Pos x)+325)
y = 0

[State 1501, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

[State 1501, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Teleport
[Statedef 1510]
type = S
movetype = A
physics = S
velset = 0,0
anim = 1500
ctrl = 0

[State 1510, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1510, PlaySnd]
type = PlaySnd
trigger1 = time = 5
value = S1500,0
volume = 255
channel = -1

[State 1500, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4025; 4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 22
removetime = 22
scale = 0.5,0.5
sprpriority = 0
ontop = 1

[State 1510,1]
type=ChangeState
trigger1 = AnimTime = 0
value = 1511

[StateDef 1511]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1502
poweradd = 20
sprpriority = 2

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 1501
ID = 1511
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1,1
sprpriority = 0
ontop = 1

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4006
ID = 1511
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 10
scale = 0.5,0.5
sprpriority = 0
ontop = 0
shadow = 100,100,100

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 4006
ID = 1511
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 3
scale = 0.75,0.75
sprpriority = 0
ontop = 0

[State 1511, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4006
ID = 1511
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 22
scale = 1,1
sprpriority = 0
ontop = 0

[State 1501, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1501, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)-50,(enemy(0),Pos x)+50)
y = -50

[State 1511, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

[State 1511, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 50
ctrl = 1


;-------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Teleport
[Statedef 1520]
type = S
movetype = A
physics = S
velset = 0,0
anim = 1500
ctrl = 0

[State 1520, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1520, PlaySnd]
type = PlaySnd
trigger1 = time = 5
value = S1500,0
volume = 255
channel = -1

[State 1520, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4025; 4006
ID = 1501
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
bindtime = 22
removetime = 22
scale = 0.5,0.5
sprpriority = 0
ontop = 1

[State 1520,1]
type=ChangeState
trigger1 = AnimTime = 0
value = 1521

[StateDef 1521]
type = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 1502
poweradd = 20
sprpriority = 2

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 1501
ID = 1521
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 7
removetime = 7
scale = 1,1
sprpriority = 0
ontop = 1

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 1
anim = 4006
ID = 1521
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 10
scale = 0.5,0.5
sprpriority = 0
ontop = 0
shadow = 100,100,100

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 4006
ID = 1521
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 3
scale = 0.75,0.75
sprpriority = 0
ontop = 0

[State 1521, Explod]
type = Explod
trigger1 = Animelem = 3
anim = 4006
ID = 1521
pos = 0,-90
postype = p1
facing = 1
vfacing = 1
;bindtime = 0
removetime = 22
scale = 1,1
sprpriority = 0
ontop = 0

[State 1521, No scroll]
type = ScreenBound
trigger1 = 1
value = 1

[State 1521, Turn]
type = Turn
trigger1 = time = 0

[State 1521, PosSet]
type = PosSet
triggerall = numenemy >0
trigger1 = time = 0
x = ifelse((enemy(0),facing = -1),(enemy(0),Pos x)+250,(enemy(0),Pos x)-250)
y = 0

[State 1521, CtrlSet]
type = CtrlSet
triggerall = ctrl = 0
trigger1 = animelem >= 10
value = 1

[State 1521, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 50
ctrl = 1


;-------------------------------------------------------------------


;---------------------------------------------------------------------------
;Hypers
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------------------------
;Hyper1
;---------------------------------------------------------------------------
;Hyper 1 - Mystic Maelstrom

[Statedef 3000]
type    = S
movetype= A
physics = N
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3000
ctrl = 0
sprpriority = 1

[State 0, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

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

[State 3000]
type = AfterImage
trigger1 = animelem = 1
time = 117
ignorehitpause = 1
PalBright = 0, 115, 75
PalContrast =  0, 155, 75
PalAdd = 0, 0, 0
PalMul = 1,1,1
trans = add1
Length = 25
FrameGap = 5
ontop=1

;------------------------------Start of Hyper Effects

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 3
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 3
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
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 = !Var(29)
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 = !Var(29)
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

;------------End of Hyper Effects

[State 3000, SprPriority]
type = SprPriority
trigger1 = animelem =7
value = -1

[State 3000, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "Blast"
ID = 3001
stateno = 3001
pos = -5,-130
postype = p1
bindtime = -1
sprpriority = 99
size.shadowoffset =0

[State 3000, Explod]
type = Explod
trigger1 = animelem = 6
anim = 4031
ID = 3003
pos = 5,-103
postype = p1
facing = 1
vfacing = 1
bindtime = 40
scale = 0.65,0.35
velset = 12,0
accel = 2,0
random = 0,0
removetime = 60
sprpriority = 99
ontop = 0

[State 3000, Explod]
type = Explod
trigger1 = animelem = 4
anim = 3003
ID = 3003
pos = -2,-106
postype = p1
facing = 1
vfacing = 1
bindtime = 40
scale = 2,1.25
vel = 0,0
accel = 0,0
random = 0,0
removetime = 60
sprpriority = 99
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0

[State 3000, PlaySnd]
type = PlaySnd
trigger1 = animelem = 1
value = S3000,1
volume = 255
channel = 5

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

[Statedef 3001]
type = A
movetype = A
physics = N
anim = 3001
velset = 0,0
sprpriority = 99

[State 3001, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3000,0
volume = 0
channel = -1

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

[State 3001, HitDef]
type = HitDef
trigger1 = timemod= 2,1
attr = S, NA
damage = 8,1
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s1000,2
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 5
ground.velocity = -5,-5
guard.velocity = -5
air.velocity = -7,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 30
envshake.freq = 60
envshake.ampl = 15
fall = 1
fall.recover = 0
sprpriority = -1

[State 3001, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3000


;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
; Hyper2
;---------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Spell of Vishanti
[StateDef 3099]
type = S
movetype = I
physics = S
anim = 3099
ctrl = 0
velset = 0,0

;------------------------------Start of Hyper Effects

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = time = 35;AnimElem = 3
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = time = 35;AnimElem = 3
Time = 30
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
;movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
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 = !Var(29)
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 = !Var(29)
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

;------------End of Hyper Effects

[State 3099, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,0

[State 3099, VarSet]
type = VarSet
trigger1 = animelem = 1
v = 15
value = 3

[State 3099, sense bar]
type = Explod
trigger1 = time = 1
anim = 3301
id = 3099
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1
ontop = 1

[State 3099, sense bar]
type = Explod
trigger1 = time = 1
anim = 3309
id = 3099
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1
ontop = 1

[State 3099, Explod]
type = Explod
trigger1 = time = 12
anim = 4035
ID = 4035
pos = -40,-65
postype = p1
facing = -1
bindtime = 276
removetime = 276
scale = 0.66,0.55
sprpriority = 10
ownpal = 1

[State 3099, Explod]
type = Explod
trigger1 = time = 25
anim = 4035
ID = 4035
pos = 40,-65
postype = p1
facing = 1
bindtime = 266
removetime = 266
scale = 0.66,0.55
sprpriority = 10
ownpal = 1

[State 3099, HitOverride]
type = HitOverride
trigger1 = time = 0
triggerall = stateno !=(3100)=1
attr = SCA,NA,SA,HA,NT,ST,HT
stateno = 3100
time = 276
ignorehitpause = 0

[State 3099, ChangeState]
type = ChangeState
trigger1 = time >=276 || matchover || win || lose
value = 0
ctrl = 1

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

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

[State 3100, ModifyExplod]
type = ModifyExplod
trigger1 = time = 1
ID = 4035
postype = p1
removetime = 1

[State 3100, VelSet]
type = VelSet
trigger1 = animelem = 3
x = 0
y = -1

[State 3100, VelSet]
type = VelSet
trigger1 = time = 126
x = 0
y = 0

[State 3100, VelSet]
type = VelSet
trigger1 = animelem = 5
x = 0
y = 1

;effects

;Button Bash
;[State 3100, Explod]
;type = Explod
;trigger1 = animelem = 1
;anim = 4030
;ID = 4030
;pos = ifelse(TeamSide = 1,103, 216), 240
;postype = left
;facing = 1
;bindtime = 80
;scale = 0.75,0.75
;removetime = 1
;sprpriority = 66
;ontop = 1
;shadow = 0,0,0

;Large book
;[State 3100, Explod]
;type = Explod
;trigger1 = animelem = 1
;anim = 4068
;ID = 4068
;pos = 160,130
;postype = back
;removetime = 47
;scale = 1,0.35
;sprpriority = 44
;ontop = 1
;shadow = 100,100,100

;Sparkles
[State 3100, Explod]
type = Explod
trigger1 = time = 1
anim = 4017
ID = 4017
pos = 160,130
postype = back
vel = 0,0
accel = 0,0
removetime = 140
scale = 0.75,0.75
sprpriority = 55
ontop = 1
shadow = 100,100,100

;Little Book
[State 3100, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4000
ID = 4000
pos = 14,-76
postype = p1
bindtime = 260
scale = 1,1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 260
sprpriority = 99
ontop = 1
shadow = 0,0,0

;P1 Magic Ground
[State 3100, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 4007
ID = 4007
pos = 0,20
postype = p1
removetime = 185
scale = 1,1;0.5,0.5
sprpriority = 0
ontop = 0
shadow = 100,100,100

;P2 Magic Ground
[State 3100, Explod]
type = Explod
trigger1 = Animelem = 2
anim = 4038
ID = 4038
pos = 0,0
postype = p2
removetime = 200
scale = 0.75,0.75

[State 3100, Helper]
type = Helper
trigger1 = Animelem = 1
helpertype = player
name = "Magic Ground"
ID = 31001
stateno = 31001
pos = 0,20
postype = p2
bindtime = 200
sprpriority = -1

;-----------------------------
;SPELLS
;-----------------------------

[State 3100, VarSet]
type = VarRandom
trigger1 = time = 1
v = 11
range = 0,6

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1;&& command = "Watoomb"
trigger1 = Var(11) = 0
helpertype = player
name = "Winds Of Watoomb"
ID = 3101
stateno = 3101
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1 ;&& command = "Morpheus"
trigger1 = Var(11) = 1
helpertype = player
name = "Mists of Morpheus"
ID = 3102
stateno = 3102
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1
size.shadowoffset =0

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1;&& command = "Cinnibus"
trigger1 = Var(11) = 2
helpertype = player
name = "Seven Suns of Cinnibus"
ID = 3104
stateno = 3104
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1 ;&& command = "Satannish"
trigger1 = Var(11) = 3
helpertype = player
name = "Swirlng Storms of Satannish"
ID = 3106
stateno = 3106
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1 ;&& command = "Ikthalon"
trigger1 = Var(11) = 4
helpertype = player
name = "Icy Tendrils of Ikthalon"
ID = 3108
stateno = 3108
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1
size.shadowoffset =0

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1 ;&& command = "Cyndriarr"
trigger1 = Var(11) = 5
helpertype = player
name = "Crytals Of Cyndriarr"
ID = 3109
stateno = 3109
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

[State 3100, Helper]
type = Helper
trigger1 = animelem = 2
triggerall = numexplod (4000) = 1 ;&& command = "Sheol"
trigger1 = Var(11) = 6
helpertype = player
name = "Shackles of Sheol"
ID = 3110
stateno = 3110
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

;-------------------------------------------------------------------------------
[State 3100, LifeAdd]
type = LifeAdd
trigger1 = timemod = 13,1
triggerall = numexplod (4000) = 1 && Var(11) = 6
value = 20

;-------------------------------------------------------------------------------

[State 3100, End]
type = ChangeState
Trigger1 = AnimTime = 0
value = 52
ctrl = 1
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

[Statedef 31001]
type = A
movetype = A
physics = N
anim = 4038
velset = 0,0
sprpriority = 0

[State 31001, hit]
type = HitDef
trigger1 = time = 1
attr = S, NA
damage = 7,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-1
guard.velocity = 1
air.velocity =0,-1
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100
P2stateno = 5300

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

[State 31001, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;WHITE BEAM = Winds of Watoomb
[Statedef 3101]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,1
volume = 255
channel = 5

[State 3103, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4065
ID = 3101
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 41
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 2,1

[State 3103, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4058
ID = 3101
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 71
vel = 0,-1
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 180
scale = 1,1

[State 3103, Explod]
type = Explod
trigger1 = animelem = 2
anim = 40650
ID = 3101
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 2,1

[State 3101, hit]
type = HitDef
trigger1 = timemod= 6,1
attr = S, NA
damage = 7,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = -1,-3
guard.velocity = 1
air.velocity =ifelse(random/10, 0.25, -0.25),-3
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 20
envshake.freq = 60
envshake.ampl = 15
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100

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

[State 3101, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;PURPLE BEAM = Mysts of Morpheus
[Statedef 3102]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,2
volume = 255
channel = 5

[State 3102, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4063
ID = 3102
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,1

[State 3102, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4057
ID = 3102
pos = 0,50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,2

[State 3102, hit]
type = HitDef
trigger1 = timemod= 7,1
attr = S, NA
damage = 1,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 2
ground.hittime  = 5
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100
p2stateno = 7695

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

[State 3102, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;------------------------------------------
; DePowered state
[Statedef 7695]
type = S
movetype= U
physics = N
anim = 7695
velset = 0,-0.5

[State 7695, PowerAdd]
type = PowerAdd
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
value = -120

[State 7695, color]
type = palFX
trigger1 = time != 0
add = 175,105,210
mul = 160, 20, 148
sinadd = 1,10,5,10
invertall = 1
color = 196
time = 1

[State 7695, SelfState]
type = SelfState
trigger1 = time = 30
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 7695, End]
type = ChangeState
trigger1 = time = 50
trigger1 = Pos Y < 0
value = 76951

;-------------------------------------------------------------

[Statedef 76951]
type    = S
movetype= H
physics = N
velset = 0,2
ctrl = 0
anim = 7695

[State 7695, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 7695, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 7695, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 7695, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

;-------------------------------------------------------------------------------

;ORANGE BEAM = Seven Suns of Cyndriarr
[Statedef 3104]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,3
volume = 255
channel = 5

[State 3104, Explod]
type = Explod
trigger1 = animelem = 2
anim =4004
ID = 3104
pos = 0,50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 175
scale = 0.75,1

[State 3104, hit]
type = HitDef
trigger1 = timemod= 3,1
attr = S, NA
damage = 6,1
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100
p2stateno = 17697

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

[State 3104, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;------------------------------------------
; Burn state
[Statedef 17697]
type = S
movetype= U
physics = N
anim = 7695
velset = -0.5,-2

[State 17697, color]
type = palFX
trigger1 = time != 0
add = 210, 175,105
mul = 160, 148, 21
sinadd = 1,10,5,10
invertall = 1
color = 16
time = 211

[State 17697, SelfState]
type = SelfState
trigger1 = time = 230
trigger1 = Pos Y > -4
value = 5070
ctrl = 1

[State 17697, End]
type = ChangeState
trigger1 = time = 230
trigger1 = Pos Y < 0
value = 27697

;-------------------------------------------------------------

[Statedef 27697]
type    = S
movetype= H
physics = N
velset = -4,2
ctrl = 0
anim = 7695

[State 27697, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 27697, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 17697, color]
type = palFX
trigger1 = time != 0
add = 210, 175,105
mul = 160, 148, 21
sinadd = 1,10,5,10
invertall = 1
color = 16
time = 211

[State 27697, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 27697, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1


;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Teal BEAM =  Swirlng Storms of Satannish
[Statedef 3106]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,4
volume = 255
channel = 5

[State 3106, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4069
ID = 3101
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 0.55,0.75

[State 3106, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4014
ID = 3101
pos = 0,-190
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,1.25

[State 3106, Explod]
type = Explod
trigger1 = animelem = 2
anim = 40460
ID = 3101
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 0.75,1

[State 3106, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4046
ID = 3101
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 0.5,0.5

[State 3106, hit]
type = HitDef
trigger1 = timemod= 6,1
attr = S, NA
damage = 7,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = -1,-3
guard.velocity = 1
air.velocity =ifelse(random/10, 0.25, -0.25),-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100
P2stateno = 17696

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

[State 3106, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;------------------------------------------
; Electrocution
[Statedef 17696]
type = S
movetype= U
physics = N
anim = 7696
velset = 0,0

[State 7696, color]
type = palFX
trigger1 = time != 0
add = 10,75,105
mul = 100, 218, 255
sinadd = 1,10,5,10
invertall = 1
color = 156
time = 1

[State 7696, SelfState]
type = SelfState
trigger1 = time = 50
trigger1 = Pos Y > -1
value = 5070
ctrl = 1

[State 7696, End]
type = ChangeState
trigger1 = time = 50
trigger1 = Pos Y < 0
value = 76961

;-------------------------------------------------------------

[Statedef 76961]
type    = S
movetype= H
physics = N
velset = 0,-2
ctrl = 0
anim = 7696

[State 7696, 0]
type = Veladd
trigger1 = Pos Y < 0
Y = .75

[State 7696, 1]
type = Velset
trigger1 = Pos Y > 0
Y = 0

[State 7696, 2]
type = Posset
trigger1 = Pos Y > 0
trigger1 = Vel Y = 0
Y = 0

[State 7696, 3]
type = SelfState
trigger1 = vel Y = 0
trigger1 = Pos Y = 0
value = 5100
ctrl = 1

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;BLUE BEAM = Icy Tendrils of Ikthalon
[Statedef 3108]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,5
volume = 255
channel = 5

[State 3108, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4022
ID = 3104
pos = 0,50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,1

[State 3108, hit]
type = HitDef
trigger1 = timemod= 3,1
attr = S, NA
damage = 3,1
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100
p2stateno = 7990

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

[State 3108, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;------------------------------------------
;------------------------------------------
;-------------------------------------------------------------
;-------------------------------------------------------------------------------
;--------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Yellow BEAM = Crystals of Cyndriarr
[Statedef 3109]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,6
volume = 255
channel = 5

[State 3109, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4071
ID = 3109
pos = 0,50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
add = 190,150,25
mul = 196,160,25
invertall = 0
color = 40
PalBright = 190, 180, 25
PalContrast = 190, 190, 25
Paladd = 200,190,25
sinadd = 150,150,215,10
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,1.5

[State 3109, Explod]
type = Explod
trigger1 = animelem = 2
anim =4010
ID = 3109
pos = 0,70
postype = p2
facing = 1
vfacing = 1
bindtime = 175
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 175
scale = 0.75,1

[State 3100, PlaySnd]
type = PlaySnd
trigger1 = time = 100
value = s16,4
channel = 5

[State 3109, hit]
type = HitDef
trigger1 = timemod= 7,1
attr = S, NA
damage = 9,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s16,4
guardsound = 6,0
sparkxy = 0,-50
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-3
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
palfx.time = 40
palfx.add = 172,-19,-204
palfx.mul = 338,389,156
palfx.sinadd = 61,20,10,15
palfx.invertall = 1
palfx.color = 35
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100

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

[State 3109, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100

;Magneta BEAM = Shackes of Sheol
[Statedef 3110]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 3110, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3100,7
volume = 255
channel = 5

[State 3110, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4067
ID = 3110
pos = 0,20
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,1.75

[State 3110, PlaySnd]
type = PlaySnd
trigger1 = time = 100
value = s16,4
channel = 4

[State 3110, hit]
type = HitDef
trigger1 = timemod= 7,1
attr = S, NA
damage = 1,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = s8888,0
guardsound = 6,0
sparkxy = 0,-50
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-3
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3100

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

[State 3110, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0
trigger2 = parent, anim != 3100


;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;A Conjurers Cone

[StateDef 3200]
type = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3200
poweradd=0

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

;------------------------------Start of Hyper Effects

[State 3300, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 3
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 3
Time = 60
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
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 = !Var(29)
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 = !Var(29)
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

;------------End of Hyper Effects

[State 3200, PosAdd]
type = PosAdd
trigger1 = time = 0
x = 5

[State 3200, SuperPause]
type = SuperPause
trigger1 = animelem = 1
time = 50
movetime = 50
sound = s3000,10
darken = 0
pos = 9999999,99999999
p2defmul = 1

[State 3200, NotHitBy]
type = NotHitBy
trigger1 = time <= 51
value = SCA
time = 1

[State 3200, hit]
type = hitdef
trigger1 = time
trigger1 = p2movetype!=H&&p2stateno!=40
attr = S, HT
hitflag = M
priority = 7, Miss
numhits = 0
sparkno = s7700
hitsound = 5,4
p1facing = 1
p2facing = 1
p1stateno = 3201
p2stateno = 3205
fall = 1
fall.recover = 0
envshake.time = 10
envshake.freq = 40
envshake.ampl = 5
ID = 3200

[State 3200, AfterImage]
type = AfterImage
trigger1 = time = 50
time = 40
length = 50
PalBright = 0, 0, 0
PalContrast = 150, 190, 250
PalAdd = 0, 0, 0
FrameGap = 8
timegap = 1
Trans = add1

[State 3200, VelSet]
type = VelSet
trigger1 = time >= 50
x = 7.8
y = 0

[State 3200, VelSet]
type = VelSet
trigger1 = Time >= 90
x = 0
y = 0

[State 3200, end]
type = ChangeState
trigger1 = Time >= 90
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;p1state

[Statedef 3201]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 32010				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -2			;Set layering priority to 2 (in front)


[State 3200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3200,99
volume = 255
channel = 5

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
x = 70
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 2
x = -70
y = -70

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 3
x = 70
y = -70

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 4
x = 0
y = 0

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

;Nexus
[State 3201, 9]
type = Explod
trigger1 = animelem = 4
anim = 32036
postype = left
ID = 3203
sprpriority = -100
removetime = 90
pos = 160,120
scale = 0.53,0.53
bindtime = 90
removeongethit = 1
ownpal = 1

 ;Man-Thing
[State 3201, 9]
type = Explod
trigger1 = animelem = 4
anim = 3202
postype = left
ID = 3203
sprpriority = -45
removetime = 90
scale = 0.78,0.78
pos = 50,190
bindtime = 90
removeongethit = 1
ownpal = 1

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S3200,0
volume = 255
channel = 4

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 8
anim = 4012
ID = 3201
pos = 0,20
postype = P2
facing = 1
bindtime = 30
random = 5,5
removetime = 30
sprpriority = 100
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem =12
anim = 4025;32000
postype = left
ID = 3203
sprpriority = -100
removetime = 30
pos = 160,120
scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3201, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 3201, TargetBind]
type = TargetBind
trigger1 = time = 0
triggerall = facing = 1
time = 1
id = -1
pos = 100,0

[State 3201, TargetBind]
type = TargetBind
trigger1 = time = 0
triggerall = facing = -1
time = 1
id = -1
pos = 100,0

[State 3201:Assertspecial]
type = assertspecial
trigger1 = time >=30
flag = nobardisplay

[State 3201, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
trigger2 = animelem = 5
trigger3 = animelem = 7
trigger4 = animelem = 9
trigger5 = animelem = 11
value = S1000,10
volume = 255
channel = -1

[State 3201, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
trigger2 = animelem = 4
trigger3 = animelem = 6
trigger4 = animelem = 8
trigger5 = animelem = 10
trigger6 = animelem = 12
value = S1400,2
volume = 255
channel = -1

[State 3201, EnvShake]
type = EnvShake
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 8
trigger4 = animelem = 11
time = 5
freq = 40
ampl = -2

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32020 ;Heimdall
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32021 ;Wong
ctrl = 1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Heimdall

[Statedef 32020]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32020				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S3200,1
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
value = S3200,11
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 12
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = -100
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = 200
y = 0

[State 32020, VelSet]
type = VelSet
trigger1 = animelem = 13
x = 23
y = 0

[State 32020, VelSet]
type = VelSet
trigger1 = animelem = 14
x = 43
y = 0

;Asgard
[State 32020, 9]
type = Explod
trigger1 = time=0
anim = 32030
postype = left
ID = 3203
sprpriority = -100
supermovetime = 150
removetime = 150
pos = 160,120
scale = 0.53,0.53
bindtime = 150
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 13
value = -150
ID = -1
absolute = 0

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 190,140
postype = left
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 90,140
postype = left
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 14
anim = 4025;32000
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32022 ;Mephistopheles
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32025 ;Dormammu
ctrl = 1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Wong

[Statedef 32021]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32021				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3200,111
volume = 255
channel = 3

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S3200,2
volume = 255
channel = 3

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 6
value = S3200,22
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S3200,11
volume = 255
channel = 5

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = -100
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = 200
y = 0

[State 32020, VelSet]
type = VelSet
trigger1 = animelem = 3
trigger2 = animelem = 5
trigger3 = animelem = 7
trigger4 = animelem = 9
trigger5 = animelem = 11
x = 14
y = 0

[State 3200, Explod]
type = Explod
trigger1 = animelem = 9
anim = 7700
ID = 3200
pos = 0,-40
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

;Kun Lun
[State 32020, 9]
type = Explod
trigger1 = time=0
anim = 32038
postype = left
ID = 3203
sprpriority = -100
supermovetime = 150
removetime = 150
pos = 160,120
scale = 0.53,0.53
bindtime = 150
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 9
value = -150
ID = -1
absolute = 0

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 190,140
postype = left
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 90,140
postype = left
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 11
anim = 4025;32000
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32022 ; Mephistopheles
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32025 ;Dormammu
ctrl = 1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
;Mephistopheles

[Statedef 32022]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32022				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3200,3
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 13
value = S3200,33
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 13
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = -100
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = -100
y = 0

[State 0, Turn]
type = Turn
trigger1 = animelem = 1
triggerall = facing = -1

;Throne
[State 32022, 9]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 32028
postype = back
ID = 32022
sprpriority = -44
scale = 0.65,0.65
removetime = 100
pos = 20,170
bindtime = 100
ownpal = 1

;Throne
[State 32022, 9]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 32028
postype = back
ID = 32022
sprpriority = -44
scale = 0.65,0.65
removetime = 100
pos = 220,170
bindtime = 100
ownpal = 1

;Fire Pillar
[State 32022, 9]
type = Explod
trigger1 = animelem = 13
anim = 4005
postype = P2
ID = 32025
sprpriority = 44
removetime = 40
pos = 0,20
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 13
value = -75
ID = 3202
absolute = 0

;Purgatory
[State 32022, 9]
type = Explod
trigger1 = time=0
anim = 32032
postype = left
ID = 3203
sprpriority = -130
removetime = 130
pos = 160,120
scale = 0.53,0.53
bindtime = 100
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 190,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 130,140
postype = left
facing = -1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 15
anim = 4025;32000
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32023 ;Satannish
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32024 ;ShumaGorath
ctrl = 1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Dormammu
[Statedef 32025]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32025				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S3200,4
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 12
value = S3200,44
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 12
anim = 7700
ID = 3200
pos = 0,-90
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = 100
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = 100
y = 0

[State 0, Turn]
type = Turn
trigger1 = animelem = 1
triggerall = facing = -1

;Dimensional Rift
[State 32020, 9]
type = Explod
trigger1 = animelem = 13
anim = 4006
postype = P2
ID = 32025
sprpriority = -44
removetime = 44
pos = 0,-70
bindtime = 44
removeongethit = 1
ownpal = 1
scale = 0.66,0.76

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 13
value = -75
ID = 3202
absolute = 0

;Dark Dimension
[State 32020, 9]
type = Explod
trigger1 = time=0
anim = 32035
postype = left
ID = 3203
sprpriority = -130
removetime = 130
pos = 160,120
scale = 0.53,0.53
bindtime = 100
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 90,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 230,140
postype = left
facing = -1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 20
anim = 4025
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32023 ;Satannish
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32024 ;ShumaGorath
ctrl = 1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Satannish
[Statedef 32023]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32023				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 5
value = S3200,5
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 10
value = S3200,50
volume = 255
channel = 5

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 9
value = S3200,51
volume = 255
channel = 5

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 15
value = S3200,52
volume = 255
channel = 5

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 21
value = S3200,53
volume = 255
channel = 5

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 26
value = S3200,54
volume = 255
channel = 5

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 32
value = S3200,55
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 5
trigger2 = animelem = 9
trigger3 = animelem = 10
trigger4 = animelem = 15
trigger5 = animelem = 21
trigger6 = animelem = 26
trigger7 = animelem = 32
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = -50
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = 100
y = 0

;Denak
[State 32020, 9]
type = Explod
trigger1 = time=0
anim = 32033
postype = left
ID = 3203
sprpriority = -100
supermovetime = 150
removetime = 150
pos = 160,120
scale = 0.53,0.53
bindtime = 150
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 10
trigger2 = animelem = 15
trigger3 = animelem = 21
trigger4 = animelem = 26
trigger5 = animelem = 32
value = -15
ID = -1
absolute = 0

[State 3201, EnvShake]
type = EnvShake
trigger1 = animelem = 10
trigger2 = animelem = 15
trigger3 = animelem = 21
trigger4 = animelem = 26
trigger5 = animelem = 32
time = 5
freq = 40
ampl = -2

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 260,140
postype = left
facing = -1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 60,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 33
anim = 4025;32000
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32026 ;Clea
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32027 ;Blackheart
ctrl = 1


;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Shuma Gorath
[Statedef 32024]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32024				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 22	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 3
value = S3200,6
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 17
value = S3200,66
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 17
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = 1
x = -100
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = animelem = 1
triggerall = facing = -1
x = 100
y = 0

[State 0, Turn]
type = Turn
trigger1 = animelem = 1
triggerall = facing = -1

;Valtorr
[State 32020, 9]
type = Explod
trigger1 = time=0
anim = 32034
postype = left
ID = 3203
sprpriority = -100
supermovetime = 150
removetime = 150
pos = 160,120
scale = 0.53,0.53
bindtime = 150
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 20
value = -75
ID = -1
absolute = 0

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 240,140
postype = left
facing = -1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 40,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 26
anim = 4025;32000
postype = left
ID = 3202
sprpriority = -90
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, 1]
type = VarRandom
trigger1 = Time = 0
v = 13
range = 0,100

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [0,50]
trigger1 = AnimTime = 0
value = 32026 ;Clea
ctrl = 1

[State 3201, 5]
type = ChangeState
trigger1 = Var(13) = [51,100]
trigger1 = AnimTime = 0
value = 32027 ;Blackheart
ctrl = 1

;-------------------------------------------------------------------------------

;-------------------------------------------------------------------------------
; Clea

[Statedef 32026]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 32026				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -12	;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 4
value = S3200,7
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 11
value = S3200,77
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 11
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

;Dark Magic
[State 3201, Explod]
type = Explod
trigger1 = animelem = 11
anim = 4015
ID = 32026
pos = 10,-120
postype = P1
facing = 1
bindtime = 49
scale = 1,1
removetime = 49
sprpriority = 100
ontop = 1

;Dark Magic
[State 3201, Explod]
type = Explod
trigger1 = animelem = 13
anim = 4015
ID = 32026
pos = 20,-60
postype = P2
facing = 1
bindtime = 1
scale = 1,1
removetime = 49
sprpriority = 100
ontop = 1

;Vishanti
[State 3201, 9]
type = Explod
trigger1 = time = 1
anim = 32039
postype = left
ID = 32026
sprpriority = -91
removetime = 100
pos = 160,120
scale = 0.53,0.53
bindtime = 100
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32026
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32026
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = animelem = 10
trigger2 = animelem = 15
trigger3 = animelem = 21
trigger4 = animelem = 26
value = -15
ID = -1
absolute = 0

[State 3201, EnvShake]
type = EnvShake
trigger1 = animelem = 10
trigger2 = animelem = 15
trigger3 = animelem = 21
trigger4 = animelem = 26
time = 5
freq = 40
ampl = -2

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 15
freq = 60
ampl = -4

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 260,140
postype = left
facing = -1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 60,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 26
anim = 4025;32000
postype = left
ID = 3203
sprpriority = -10
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3202, end]
type=selfstate
trigger1 = animtime = 0
value=3202;END
ctrl=1

;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; BlackHeart

[Statedef 32027]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
anim = 32027				;Change animation (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -2                 ;Set layering priority to 2 (in front)

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3200,8
volume = 255
channel = 4

[State 3200, PlaySnd]
type = PlaySnd
trigger1 = animelem = 2
value = S3200,88
volume = 255
channel = 5

[State 3200, Explod]
type = Explod
trigger1 = animelem = 2
anim = 7700
ID = 3200
pos = 0,-70
postype = p2
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

;Blood Magic
[State 3201, Explod]
type = Explod
trigger1 = animelem = 3
anim = 4061
ID = 3201
pos = 120,218
postype = left ;P2
facing = 1
bindtime = 88
scale = 1,1.5
removetime = 88
sprpriority = 100
ontop = 1

;limbo
[State 3201, 9]
type = Explod
trigger1 = time = 1
anim = 32031
postype = left
ID = 32031
sprpriority = -91
removetime = 100
pos = 160,120
scale = 0.53,0.53
bindtime = 100
removeongethit = 1
ownpal = 1

;Teleported effect
[State 32020, 7]
type = Explod
trigger1 = animelem = 1
anim = 4014
postype = P2
ID = 32025
sprpriority = 4
removetime = 40
pos = 0,-10
vel = 0,-2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1
ontop =1

[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-10
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = 1
anim = 3201
ID = 3201
pos = 40,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

[State 3201, Explod]
type = Explod
trigger1 = animelem = 1
triggerall = facing = -1
anim = 3201
ID = 3201
pos = 40,140
postype = left
facing = 1
bindtime = 150
random = 5,5
removetime = -2
sprpriority = 1
ontop = 1

;Realms
[State 3201, 9]
type = Explod
trigger1 = animelem = 8
anim = 4025;32000
postype = left
ID = 3203
sprpriority = -100
removetime = 30
pos = 160,120
;scale = 0.53,0.53
bindtime = 30
removeongethit = 1
ownpal = 1

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3201, TargetBind]
type = TargetBind
trigger1 = time = 0
time = 1
id = -1
pos = 45,0

[State 3201, EnvShake]
type = EnvShake
trigger1 = animelem = 2
trigger2 = animelem = 5
trigger3 = animelem = 8
trigger4 = animelem = 11
time = 5
freq = 40
ampl = -2

[State 3202, end]
type=selfstate
trigger1 = animtime = 0
value=3202;END
ctrl=1


;---------------------------------------------------------------------------


;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Return
[Statedef 3202]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= I				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0
anim = 191; 3202				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = -1	;Set layering priority to 2 (in front)

[State 3200, Assert]
type = assertspecial
trigger1 = Time >= 0
flag = NoBarDisplay

[State 3202, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time = 0
value = -25
ID = -1
absolute = 0

[State 3202, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
trigger1 = time = 0
time = 35
freq = 160
ampl = -14

[State 3202, Landing Anim]
type = Explod
trigger1 = enemynear,life >0
trigger1 = time = 0
anim = 4038
ID = 3202
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
scale = 2,.7
sprpriority = 1
ontop = 1
shadow = 0,0,0
ownpal = 1
ignorehitpause =1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life >0
trigger1 = time = 0
value = S3000,11
volume = 0
channel = -1

[State 3202, PlaySnd]
type = PlaySnd
trigger1 = enemynear,life <=0
trigger1 = time = 0
value = S3000,14
volume = 0
channel = -1

[State 3202, end]
type=selfstate
trigger1 = animtime =0
value=0
ctrl=1

;---------------------------------------------------------------------------
;p2state
[Statedef 3205]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= H				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 1		;Set layering priority to 2 (in front)


[State 3205, ChangeState]
type = ChangeState
trigger1 = (time =[10,30]) && (enemynear,stateno != 3201 ) && (anim = 3205) && (anim = 7696)
value = 0
ctrl = 1

[State 0, Turn]
type = Turn
trigger1 = animelem = 21
triggerall = facing = 1

[State 3200, Explod]
type = Explod
trigger1 = animelem = 35
trigger2 = animelem = 36
trigger3 = animelem = 37
trigger4 = animelem = 38
trigger5 = animelem = 39
trigger6 = animelem = 40
trigger7 = animelem = 41
trigger8 = animelem = 42
trigger9 = animelem = 54
anim = 7700
ID = 3200
pos = 0,-70 + (random/500)
postype = p1
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 2,2
sprpriority = 20
ontop = 1

[State 3200, Explod]
type = Explod
trigger1 = animelem = 55
anim = 7700
ID = 3200
pos = 0,10 + (random/500)
postype = p1
facing = 1
vfacing = 1
bindtime = 15
removetime = 15
scale = 5,1
sprpriority = 20
ontop = 1


[State 32020, 9]
type = Explod
trigger1 = animelem = 50
anim = 4014
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-170
vel = 0,2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1

[State 32020, 9]
type = Explod
trigger1 = animelem = 50
anim = 4046
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,-200
bindtime = 40
removeongethit = 1
ownpal = 1

[State 3206, EnvShake]
type = EnvShake
trigger1 = enemynear,life >0
triggerall = animelem = 54
time = 35
freq = 160
ampl = -14

[State 3205, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 7696

[State 3205, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 70
value = 3205

[State 3205, end]
type=changestate
trigger1 = time >=662
value=3206
;---------------------------------------------------------------------------
;p2state
[Statedef 3206]
type    = S				;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= H				;Move-type: A-attack, I-idle, H-gethit
physics = S				;Physics: S-stand, C-crouch, A-air
juggle  = 0				;Number of air juggle points move takes
velset = 0,0			;Set velocity (x,y) (Def: no change)
ctrl = 0				;Set ctrl (Def: no change)
poweradd = 0			;Power to add (Def: 0)
sprpriority = 2		;Set layering priority to 2 (in front)



[State 32020, 9]
type = Explod
trigger1 = animelem = 1
anim = 4012
postype = P2
ID = 32025
sprpriority = -4
removetime = 40
pos = 0,0
vel = 0,2
accel = 0,0
bindtime = 4
removeongethit = 1
ownpal = 1

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

[State 3206, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 3206

[State 3206, end]
type=selfstate
triggerall = time >=70
trigger1=!alive
value=5150

[State 3206, end]
type=selfstate
triggerall = time >=70
trigger1= alive
value=5120

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Hyper4 Attributes

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

;------------------------------Start of Hyper Effects

[State 3000, assertspecial]
type = assertspecial
triggerall = !Var(29)
trigger1 = AnimElem = 5
flag = noBG
flag2 = noFG
ignorehitpause = 1

[State 3000, SuperPause]
type = SuperPause
triggerall = !Var(29)
trigger1 = AnimElem = 5
Time = 30
;anim =-1;s3012
pos = 25,-65
sound = S8889,0
poweradd = -1000
;movetime = 60


[State -2, Helper]
type = Helper
triggerall = !Var(29)
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 = !Var(29)
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 = !Var(29)
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

;------------End of Hyper Effects

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

[State 3300, End]
type = ChangeState
trigger1 = AnimTime = 0
value = 3305+random%7
ctrl = 1

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Shield of Seraphim
[Statedef 3305]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3300
ctrl = 0
sprpriority = 2

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,1
volume = 255
channel = 5

[State 3305, Explod]
type = Explod
trigger1 = time =1;command = "Seraphim"
anim = 4008
ID = 3101
pos = 0,50
postype = p1
facing = 1
vfacing = 1
bindtime = 700
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 700
scale = 1,2

[State 3305, sense bar]
type = Explod
trigger1 = time =1;command = "Seraphim"
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3305, sense bar]
type = Explod
trigger1 = time =1; command = "Seraphim"
anim = 3305
id = 3305
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3305, VarSet]
type = VarSet
trigger1 = time =1;command = "Seraphim"
v = 19
value = 3

[State 3305, HitOverride]
type = HitOverride
trigger1 =  var(19) = 3
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700
stateno = 120


[State 3305, PalFX]
type = PalFX
trigger1 = var(19) = 3
time = 700
add = 0, 115, 75
mul = 0, 155, 75
sinadd = -155,0,155,75
trans = 1
ignorehitpause = 1

;[State 3305, Helper]
;type = Helper
;trigger1 = Animelem = 1
;helpertype = player
;name = "Shield of Seraphim"
;ID = 33051
;stateno = 33051
;pos = 0,0
;postype = p2
;bindtime = 215
;sprpriority = -1


[State 3305, End]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;GREEN BEAM = Shield of Seraphim
[Statedef 33051]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 33051, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4044
ID = 3102
pos = 0,-50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 0.75,0.75

[State 33051, hit]
type = HitDef
trigger1 = timemod= 9,1
attr = S, NA
damage = 2,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 20
envshake.freq = 60
envshake.ampl = 15
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3300

[State 33051, Explod]
type = Explod
trigger1 = animelem = 1
anim = 4008
ID = 3101
pos = 0,70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 200
scale = 1,2

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

[State 33051, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Crimson Bands Of Cyttorak
[Statedef 3306]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3300
ctrl = 0
sprpriority = 2

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,2
volume = 255
channel = 5

[State 3303, PalFX]
type = PalFX
trigger1 = var(20) = 3
time = 700
add = 50, 5, 0
mul = 155 ,4, 0
sinadd = -155,0,155,75
trans = 1
ignorehitpause = 1

[State 3306, Explod]
type = Explod
trigger1 = time =1; command = "Cyttorak"
anim = 4009
ID = 3103
pos = 0,50
postype = p1
facing = 1
vfacing = 1
bindtime = 700
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 700
scale = 1,2

[State 3306, sense bar]
type = Explod
trigger1 = time =1; command = "Cyttorak"
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3303, sense bar]
type = Explod
trigger1 =  time =1;command = "Cyttorak"
anim = 3303
id = 3306
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3306, VarSet]
type = VarSet
trigger1 =  time =1;command = "Cyttorak"
v = 20
value = 3

;[State 3306, Helper]
;type = Helper
;trigger1 = animelem =1
;helpertype = player
;name = "Crimson Bands Of Cyttorak"
;ID = 33061
;stateno = 33061
;pos = 0,0
;postype = p2
;bindtime = 215
;sprpriority = -1

[State 3306, End]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


;--------------------------------------------------------------------

;RED BEAM = Crimson Band of Cyttorak
[Statedef 33061]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 33061, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4061
ID = 3103
pos = 0,50
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 175
scale = 1,2

[State 33061, hit]
type = HitDef
trigger1 = timemod= 6,1
attr = S, NA
damage = 3,1
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 20
envshake.freq = 60
envshake.ampl = 15
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3300

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

[State 33061, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; Vapours of Valtorr
[Statedef 3307]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 0
anim = 3300
ctrl = 0
sprpriority = 2

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,3
volume = 255
channel = 5

[State 3307, Explod]
type = Explod
trigger1 = animelem = 1
anim = 4064
ID = 3101
pos = 100, 150
postype =back
facing = 1
vfacing = 1
bindtime = 700
vel = 0,0
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 770
scale = 3,2

[State 3307, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3307, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3306
id = 3306
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3307, PalFX]
type = PalFX
trigger1 = var(18) = 3
time = 730
add = 50,50,50
mul = 156,156,156
sinadd = 100,120,100,210
invertall = 0
color = 116

[State 3307, Helper]
type = Helper
trigger1 = animelem =1
helpertype = player
name = "Vapours of Valtorr"
ID = 33071
stateno = 33071
pos = 0,0
postype = p2
bindtime = 215
sprpriority = -1

[State 3307, VarSet]
type = VarSet
trigger1 = animelem = 1
v = 18
value = 3

[State 3307, End]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

;-------------------------------------------------------------------------------
;--------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Vapours of Valtorr

[Statedef 33071]
type = A
movetype = A
physics = N
anim = 3102
velset = 0,0
sprpriority = 0

[State 31071, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4070
ID = 3107
pos = 0,0
postype = p2
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
accel = 0,0
sprpriority = 99
random = 0,0
removetime = 175
scale = 1,1

[State 31071, hit]
type = HitDef
trigger1 = timemod= 6,1
attr = S, NA
damage = 2,0
guardflag = MA
pausetime = 0,0
sparkno = s7700
hitsound = 5,4
guardsound = 6,0
sparkxy = 0,floor((-60+ random/10))
animtype = Heavy
ground.type = High
ground.slidetime = 20
ground.hittime  = 55
ground.velocity = 0,-5
guard.velocity = 1
air.velocity = 0,-2
airguard.velocity = 0
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = 0
envshake.time = 2
envshake.freq = 6
envshake.ampl = 5
fall = 1
fall.recover = 0
sprpriority = -1
ID = 3300

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

[State 31071, DestroySelf]
type = DestroySelf
trigger1 =  animtime = 0

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Grace of Hoggoth
[StateDef 3308]
type = S
movetype = I
physics = S
anim = 3300
ctrl = 0
velset = 0,0

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,4
volume = 255
channel = 5

[State 3308, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,8

[State 3308, VarSet]
type = VarSet
trigger1 = animelem = 1
v = 16
value = 3

[State 3308, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3308, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3308
id = 3308
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3308, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4032
ID = 3308
pos = -40,-65
postype = p1
facing = -1
bindtime = 790
removetime = 790
scale = 1,0.75
sprpriority = 10
ownpal = 1

[State 3308, Explod]
type = Explod
trigger1 = animelem = 2
anim = 4032
ID = 3308
pos = 40,-65
postype = p1
facing = 1
bindtime = 790
removetime = 790
scale = 1,0.75
sprpriority = 10
ownpal = 1

[State 3308, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,NA,SA,HA,NT,ST,HT
stateno = 33081
time = 790
ignorehitpause = 1

[State 3308, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[StateDef 33081]
type = S
movetype = A
physics = S
anim = 33081
ctrl = 0
velset = 0,0

[State 33081, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = 1
p2facing = 1
p1stateno = 33082
p2stateno = 33083
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 0
fall.recover = 0
fall.damage = 40

[State 33081, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[Statedef 33082]
type    = S
movetype= A
physics = N
anim = 33082
sprpriority = 2

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

[State 33082, TargetState]
type = TargetState
trigger1 = time = 30
value = 33084

[State 33082, TargetBind]
type = TargetBind
trigger1 = time = 1
pos = -200,-200

[State 33082, Explod]
type = Explod
trigger1 = time = 0
anim = 4033
ID = 33082
pos = 40,-65
postype = p1
bindtime = 1
removetime = 18
scale = 1,0.75
sprpriority = 20
ownpal = 1

[State 33082, Explod]
type = Explod
trigger1 = time = 35
anim = 4034
ID = 33082
pos = 0,20
postype = p2
bindtime = 1
removetime = 35
scale = 2.15,2.15
sprpriority = 30
ownpal = 1

[State 33082, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -40

[State 33082, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[Statedef 33083]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 0

[State 33083, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 33083

[State 33083, ScreenBound]
type = ScreenBound
trigger1 = time < 16
value = 0
movecamera = 0,0

[State 33083, Explod]
type = Explod
trigger1 = time = 0
anim = 5000
ID = 330831
pos = 0,0
postype = p1
bindtime = 1
vel = 2,0
removetime = 14
scale = 1,1
sprpriority = 13
ownpal = 1
removeongethit = 1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 330831
scale = .95,1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 330831
scale = .75,1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 330831
scale = .66,1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 10
ID = 330831
scale = .33,1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 12
ID = 330831
scale = .15,1

[State 33083, ModifyExplod]
type = ModifyExplod
trigger1 = time = 14
ID = 330831
scale = .05,0.33

;-------------------------------------------------------------------------------

[Statedef 33084]
type    = A
movetype= H
physics = N
velset = 0,6

[State 33084, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0)
value = 33084

[State 33084, Turn]
type = Turn
trigger1 = time = 0

[State 33084, Explod]
type = Explod
trigger1 = time = 0
anim = 40341
ID = 33084
pos = 0,-40
postype = p1
bindtime = 1
removetime = 40
scale = 1.25,1.25
sprpriority = 40
ownpal = 1

[State 33084, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

[State 33084, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Astral Projection

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

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,5
volume = 255
channel = 5

[State 3309, Helper]
type = Helper
trigger1 = AnimElem = 3
helpertype = normal
name = "Intangebility"
ID = 3303
stateno = 3303
pos = 0,0
sprpriority = 16
supermove

;--------------------------------------------
[State 3309, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3304
id = 3309
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3309, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3302
id = 3309
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1;ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1
;--------------------------------------------
;Intangebility

[State 3309, NotHitBy]
type = NotHitBy
trigger1 = var(26) =1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 790
stateno = 2001

[State 3309, 6]
type = VarSet
trigger1 = animelem = 1
v = 26
value = 1

[State 3309, PalFX]
type = PalFX
trigger1 = var(25) = 1
time = 790
add = 0, 135, 175
mul = 100, 240, 255
sinadd = 15,35,55,85
length = 35
palcolor = 136
palinvertall = 1
palbright = 30,130,230
palcontrast = 120,190,220
palpostbright = 50,150,200
paladd = 10,10,25
palmul = .65,.65,1.75
timegap = 1
framegap = 4

[State 3309, End]
type = ChangeState
trigger1 = time = 0
value = 2000
ctrl = 1

;--------------------------------------------

[Statedef 3303]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
poweradd = 20
anim = 3303
ctrl = 1
sprpriority = 2

[State 3303, VarSet]
type = VarSet
trigger1 = var(26) =1
time = 0
v = 26
value = 0

[State 3303, PalFX]
type = PalFX
trigger1 = var(25) = 1
time = 790
add = 0, 135, 175
mul = 100, 240, 255
sinadd = 15,35,55,85
trans = 0
ignorehitpause = 1

[State 3303, End]
type = ChangeState
trigger1 = time = 35
value = 0
ctrl = 1
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Images of Ikonn
[Statedef 3310]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 3310

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

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,6
volume = 255
channel = 5

[State 3310, sense bar]
type = Explod
trigger1 = animelem =1
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3310, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3307
id = 3307
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3310, VarSet]
type = VarSet
trigger1 = animelem = 1
v = 17
value = 3

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

;---------------------------------------------
;Images of Ikonn
[Statedef 33101]
type    = S
movetype= A
physics = S
juggle  = 0
ctrl = 0
anim = 3310
sprpriority = 3

;===============================================================================

[State 33101, Images]
type = Helper
triggerall = numhelper(33102) =0
trigger1 = animelem = 1
helpertype = normal
name = "Image1"
ID = 33102
stateno = 33102
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, Images]
type = Helper
triggerall = numhelper(33103) =0
trigger1 = animelem = 2
helpertype = normal
name = "Image1"
ID = 33103
stateno = 33103
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, Images]
type = Helper
triggerall = numhelper(33104) =0
trigger1 = animelem = 3
helpertype = normal
name = "Image1"
ID = 33104
stateno = 33104
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, Images]
type = Helper
triggerall = numhelper(33105) =0
trigger1 = animelem = 4
helpertype = normal
name = "Image1"
ID = 33105
stateno = 33105
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, Images]
type = Helper
triggerall = numhelper(33106) =0
trigger1 = animelem = 1
helpertype = normal
name = "Image1"
ID = 33106
stateno = 33106
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, Images]
type = Helper
triggerall = numhelper(33107) =0
trigger1 = animelem = 2
helpertype = normal
name = "Image1"
ID = 33107
stateno = 33107
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 33101, image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 50
pos = 30,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

[State 33101, Image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 53
pos = 50,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

[State 33101, Image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 53
pos = 70,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

[State 33101, Image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 53
pos = -30,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

[State 33101, Image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 53
pos = -50,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

[State 33101, Image]
type = explod
trigger1 = time = 0
anim = 3310
postype = p1
sprpriority = 4
supermovetime = -1
removetime = 53
pos = -70,0
bindtime = -1
;supermovetime = 9999
;pausemovetime = 9999
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0

;========================

[State 33101, effect]
type = explod
trigger1 = time = 0
anim = 4066
postype = p1
sprpriority = 3
supermovetime = -1
removetime = 33
pos = 5,-99
bindtime = -1
supermove = 9999
pausemove = 9999
removeongethit = 1
ownpal = 0
ontop =1

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


;---------------------------------------------------------------------------
;clones
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33102]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33102, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33102, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33102, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33102, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33102, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33102, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33102, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33102, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x -25)
y = (parent, pos y)
persistent = 1


[State 33102, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33102, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33103]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33103, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33103, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33103, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33103, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33103, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33103, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33103, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33103, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x -60)
y = (parent, pos y)
persistent = 1


[State 33103, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33103, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33104]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33104, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33104, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33104, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33104, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33104, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33104, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33104, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33104, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x -100)
y = (parent, pos y)
persistent = 1


[State 33104, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33104, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33105]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33105, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33105, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33105, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33105, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33105, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33105, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33105, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33105, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x +25)
y = (parent, pos y)
persistent = 1


[State 33105, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33105, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33106]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33106, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33106, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33106, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33106, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33106, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33106, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33106, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33106, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x +60)
y = (parent, pos y)
persistent = 1


[State 33106, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33106, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108


;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Images of Ikonn
[Statedef 33107]
type    = S
physics = N
velset = 0,0
ctrl = 0
anim = (parent,anim)
sprpriority = 3

[State 33107, PosSet]
type = PosSet
trigger1 = parent, pos y >= 0 || parent, stateno = 0 || parent, stateno = [51,53]
trigger2 = parent, anim = 47 || parent, stateno = [5080,5121]
trigger3 = parent, statetype = S && parent, movetype = A && parent, pos y >= 0 || parent, statetype = C && parent, movetype = A && parent, pos y >= 0
trigger4 = parent, statetype = S && parent, movetype = H && parent, pos y >= 0 || parent, statetype = L && parent, movetype = H && parent, pos y >= 0 || parent, statetype = C && parent, movetype = H && parent, pos y >= 0
y = 0
ignorehitpause = 0

[State 33107, VelSet]
type = VelSet
trigger1 = parent, pos y < -10
y = parent, vel y
ignorehitpause = 0

[State 33107, VelSet]
type = VelSet
trigger1 = (parent, stateno = [51,53] )|| (parent, stateno = [5080,5121])
y = 0
ignorehitpause = 0

[State 33107, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33107, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 700

[State 33107, ChangeAnim]
type = ChangeAnim
trigger1 = var(17) != (root,anim)
trigger1 = 1
value = (root,anim)
ignorehitpause = 0

[State 33107, VarSet]
type = VarSet
trigger1 = 1
v = 17
value = anim

[State 33107, PosSet]
type = PosSet
trigger1 = 1
x = (parent, pos x+100)
y = (parent, pos y)
persistent = 1


[State 33107, Turn]
type = Turn
trigger1 = parent, anim = 5 && animtime = 0 || parent, anim = 5 & animtime = 0 || facing != root, facing
ignorehitpause = 0


[State 33107, 7]
type = changestate
trigger1 = time >=700 || matchover || win || lose
value = 33108


;---------------------------------------------------------------------------
;Images of Ikonn - End
[Statedef  33108]
type    = S
movetype= A
physics = N
juggle  = 0
velset = 0,0
ctrl = 0
anim = 3310
sprpriority = 3

[State 33108, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 33108, 7]
type = destroyself
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;;---------------------------------------------------------------------------
;
;Seven Rings Of Raggadorr
[StateDef 3311]
type = S
movetype = I
physics = S
anim = 3300
ctrl = 0
velset = 0,0

[State 3300, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,7
volume = 255
channel = 5

[State 3311, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3300,8

[State 3311, VarSet]
type = VarSet
trigger1 = animelem = 1
v = 16
value = 3

[State 3311, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3304
id = 3304
pos = ifelse(TeamSide = 1, 1, 319), 240
postype = left
facing = ifelse(TeamSide = 1, 1, -1)
bindtime = -1
removetime = -2
sprpriority = 90
ignorehitpause = 1
ownpal = 1

[State 3311, sense bar]
type = Explod
trigger1 = animelem = 1
anim = 3311
id = 3311
pos = ifelse(TeamSide = 1, 48, 271), 240
postype = left
facing = 1
bindtime = -1
removetime = -2
sprpriority = 92
ignorehitpause = 1
ownpal = 1

[State 3311, Explod]
type = Explod
trigger1 = animelem = 1
anim = 4072
ID = 3308
pos = 0,-65
postype = p1
facing = -1
bindtime = 790
removetime = 790
scale = 0.66,1.33
sprpriority = 40
ownpal = 1

[State 3311, HitOverride]
type = HitOverride
trigger1 = time = 0
attr = SCA,NA,SA,HA,NT,ST,HT
stateno = 33111
time = 790
ignorehitpause = 1

[State 3308, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[StateDef 33111]
type = S
movetype = A
physics = S
anim = 33081
ctrl = 0
velset = 0,0

[State 33111, HitDef]
type = HitDef
trigger1 = Time = 0
attr = S, ST
hitflag = M-
priority = 1, Miss
sparkno = -1
sprpriority = 2
p1facing = 1
p2facing = 1
p1stateno = 33112
p2stateno = 33113
guard.dist = 0
fall.xvelocity = 0
fall.yvelocity = 0
fall = 0
fall.recover = 0
fall.damage = 40

[State 33111, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[Statedef 33112]
type    = S
movetype= A
physics = N
anim = 33082
sprpriority = 2

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

[State 33112, TargetState]
type = TargetState
trigger1 = time = 30
value = 33114

[State 33112, TargetBind]
type = TargetBind
trigger1 = time = 1
pos = 300,0

[State 33112, PlaySnd]
type = PlaySnd
trigger1 =  time = 3
value = S8200,0
volume = 255
channel = 4

[State 33112, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = AnimElem = 2
value = -40

[State 33112, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-------------------------------------------------------------------------------

[Statedef 33113]
type    = A
movetype= H
physics = N
velset = 0,0
sprpriority = 0

[State 33113, ChangeAnim2]
type = ChangeAnim2
trigger1 = Time = 0
value = 33083

[State 33113, ScreenBound]
type = ScreenBound
trigger1 = time < 16
value = 0
movecamera = 0,0

[State 33113, Explod]
type = Explod
trigger1 = time = 0
anim = 5030
ID = 33113
pos = 0,0
postype = p1
bindtime = 1
vel = -22,0
removetime = 14
scale = 1,1
sprpriority = 13
ownpal = 1
removeongethit = 1



;-------------------------------------------------------------------------------

[Statedef 33114]
type    = A
movetype= H
physics = N
velset = 10,0

[State 33114, ChangeAnim2]
type = ChangeAnim2
trigger1 = (Time = 0)
value = 33084

[State 33114, Turn]
type = Turn
trigger1 = time = 0

[State 33114, VelAdd]
type = VelAdd
trigger1 = Time >= 1
Y = 0.5

[State 33114, SelfState]
type = SelfState
trigger1 = (Pos Y >= 0) && (Vel Y > 0)
value = 5100
ctrl = 0
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Other States
;---------------------------------------------------------------------------------------------
;Beginning of the super jump
[Statedef 7000]
type = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

[State 7000, AfterImage]
type = AfterImage
trigger1 = animelem = 1
time = 30
length = 35
palcolor = 136
palinvertall = 0
palbright = 30,130,230
palcontrast = 120,190,220
palpostbright = 50,150,200
paladd = 10,10,25
palmul = .65,.65,1.75
timegap = 1
framegap = 4


[State 0, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 11
value = 0

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdfwd"
v = 11
value = 1

[State 7000, VarSet]
type = VarSet
trigger1 = command = "holdback"
v = 11
value = -1

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

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7001]
type = A
physics = A
ctrl = 1
anim = 41
velset = 0,-16.3


[State 0, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7001, VelAdd]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 7001, VelSet]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 0
trigger1 = Time = [0,4]
value = 41

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = 1
trigger1 = Time = [0,4]
value = 42

[State 7001, ChangeAnim]
type = ChangeAnim
trigger1 = Var(11) = -1
trigger1 = Time = [0,4]
value = 43

[State 7001, PlaySnd]
type = PlaySnd
trigger1 = Time = 0
value = 9999,5

[State 7001, Explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 6669
postype = p1
pos = 0, 60
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 1.20 - (time * 0.15), 1.54 - (time * 0.15)

[State 7001, explod]
type = Explod
trigger1 = Time = 0
ID = 474
anim = 9006
postype = p1
pos = 0, 20
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2
scale = 2, 2
 
[State 7001, Variavelzinha muito útil]
type = VarSet
trigger1 = Time = 0
v = 12
value = 1

;---------------------------------------------------------------------------------------------
;Super Jump

[Statedef 7002]
type    = A
physics = A
ctrl = 1


[State 0, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0

[State 7005, Vel]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
trigger1 = Anim != 43
x = -0.1

[State 7005, Vel]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
trigger1 = Anim != 42
x = 0.25

;---------------------------------------------------------------------------------------------
[Statedef 8882]
type = S
physics = S
anim = 0
sprpriority = 1
ctrl = 0

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

[State 8882, ChangeState]
type = Changestate
trigger1 = time = 30
value = 8883

[Statedef 8883]
type = S
physics = S
anim = 100
sprpriority = 1
ctrl = 0

[State 8883, PlaySnd]
type = PlaySnd
trigger1 = (AnimElem = 5) || (AnimElem = 9)
value = 8100,0

[State 8883, VelSet]
type = VelSet
trigger1 = 1
x = 8

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

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 8883, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 8883, ChangeState]
type = ChangeState
trigger1 = p2bodydist x <= 190
value = 101
ctrl = 0

;---------------------------------------------------------------------------
;Guard Push (Stand)
[Statedef 6300]
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 1111
sprpriority = 2

[State 6300, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6300, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6300, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6300, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6300, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6300, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 53,-80
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6300, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6300, a8]
type = PlaySnd
trigger1 = Time = 0
value = 1,0
channel = 0

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

[Statedef 6310];--------------crouch
type    = C
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 121
sprpriority = 2

[State 6310, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6310, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6310, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6310, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6310, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6310, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 33,-75
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6310, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6310, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6310, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1


[Statedef 6320];------------air
type    = S
movetype= I
physics = N
poweradd= 0
velset = 10,0
ctrl = 0
anim = 122
sprpriority = 2

[State 6320, a1]
type = VelMul
trigger1 = 1
x = 0.75

[State 6320, a2]
type = VelSet
trigger1 = Time = 10
x = 0

[State 6320, a3]
type = Width
trigger1 = 1
value = 10,0

[State 6320, a4]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 25

[State 6320, a5]
type = Helper
trigger1 = Time = 0
helpertype = Normal
name = "GuardPush"
postype = P1
pos = -50,0
stateno = 6350
ownpal = 1
size.height = 200
size.ground.back = 30
size.ground.front = 30

[State 6320, a6]
type = Explod
trigger1 = Time = 0
anim = 7020
postype = p1
pos = 33,-85
ownpal = 1
vel = 2,0
ignorehitpause = 1
sprpriority = 7
scale = .5,.5

[State 6320, a7]
type = PlaySnd
trigger1 = Time = 0
value = 54,3
volume = 255
channel = 1

[State 6320, a8]
type = PlaySnd
trigger1 = Time = 0
value = 50,0
channel = 0

[State 6320, a9]
type = ChangeState
trigger1 = AnimTime = 0
value = 51
ctrl = 1

[Statedef 6350];guard push helper
type    = S
movetype= I
physics = N
poweradd= 0
ctrl = 0
anim = 1112
sprpriority = -4

[State 6350, a1]
type = PlayerPush
trigger1 = Time >= 0
value = 1

[State 6350, a2]
type = VelSet
trigger1 = Time = [0,10]
x = 30

[State 6350, a3]
type = VelSet
trigger1 = Time = [11,13]
x = 20

[State 6350, a4]
type = VelSet
trigger1 = Time >= 14
x = 10

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

[State 6350, a6]
type = DestroySelf
trigger1 = Time >= 18

;---------------------------------------------------------------------------
;--------------------------------- Roll ------------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Roll

[Statedef 890]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 890, 1]
type = VelSet
trigger1 = Time != 1
x = 4

[State 890, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 890, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 890, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 890, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 890, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 890, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 890, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Medium Roll

[Statedef 895]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 895, 1]
type = VelSet
trigger1 = Time != 1
x = 5

[State 895, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 815, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 895, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 895, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 895, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 895, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 895, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Far Roll

[Statedef 898]
type    = S
movetype= I
physics = S
juggle  = 0
poweradd= 20
velset = 4,0
ctrl = 0
anim = 810
sprpriority = -1

[State 898, 1]
type = VelSet
trigger1 = Time != 1
x = 6

[State 898, 2]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 898, 4]
type = NotHitBy
trigger1 = 1
value = SCA

[State 898, 5]
type = VarRandom
trigger1 = Time = 0
v = 4
range = 0,1

[State 898, 6.1]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 0
value = 810,0

[State 898, 6.2]
type = PlaySnd
trigger1 = AnimElem = 2 && Var(4) = 1
value = 810,1

[State 898, 7]
type = AfterImage
trigger1 = AnimElem = 2
time = 999
length = 20
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = 1,1,1
FrameGap = 3
trans = add1
ignorehitpause = 1

[State 898, 8]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
;------------------------------ Recovery Roll ------------------------------
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; Near Foward Recovery Roll

[Statedef 831]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 831
sprpriority = -1

[State 831, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 831, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 831, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 831, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 831, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Medium Foward Recovery Roll

[Statedef 832]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 832
sprpriority = -1

[State 832, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 832, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 832, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 832, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 832, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 832, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Far Foward Recovery Roll

[Statedef 840]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 8,0
ctrl = 0
anim = 840
sprpriority = -1

[State 840, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 840, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 840, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 840, 4]
type = MakeDust
trigger1 = Time >= 0
pos = -16,0
spacing = 6

[State 840, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 840, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Near Backward Recovery Roll

[Statedef 850]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = 0,0
ctrl = 0
anim = 850
sprpriority = -1

[State 850, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 850, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 850, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 850, 5]
type = NotHitBy
trigger1 = Time >= 0
value = SCA
time = 1

[State 850, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Medium Backward Recovery Roll

[Statedef 855]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 855
sprpriority = -1

[State 855, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 855, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 855, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 855, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 855, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 10

[State 855, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Far Backward Recovery Roll

[Statedef 860]
type    = C
movetype= I
physics = N
juggle  = 0
poweradd= 0
velset = -8,0
ctrl = 0
anim = 860
sprpriority = -1

[State 860, 1]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 860, 2]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 860, 3]
type = PosSet
trigger1 = Time >= 0
y = 0

[State 860, 4]
type = MakeDust
trigger1 = Time >= 0
pos = 16,0
spacing = 6

[State 860, 5]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 860, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 11
ctrl = 1

[State 831, Dead]
type = ChangeState
trigger1 = alive = 0
value = 5150
ctrl = 0

;---------------------------------------------------------------------------
; Recovery Roll - Variable "Reset"

[State -2, 1]
type = VarSet
trigger1 = (StateNo != 5050) && (StateNo != 5071)
v = 30
value = 0

;-------------------------------------------------------------------------
; A.I. - Far Foward Recovery Roll

[State -2, 2]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
triggerall = (StateNo = 5050)||(StateNo = 5071)
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 840

;-------------------------------------------------------------------------
; A.I. - Far Backward Recovery Roll

[State -2, 3]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType != L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (Pos Y = [-10,0])
trigger1 = (StateNo = 5050)||(StateNo = 5071)
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 55

;-------------------------------------------------------------------------
; A.I. - Lie Down Forward Recovery Roll

[State -2, 4]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
triggerall = (StateNo = 5120)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) <= 160
trigger2 = (Enemy, NumProj > 0)
value = 832

;-------------------------------------------------------------------------
; A.I. - Lie Down Backward Recovery Roll

[State -2, 5]
type = ChangeState
triggerall = (RoundState = 2)&&(Var(59) = 2)
triggerall = (StateType != S)&&(StateType = L)
triggerall = (P2Life != 0)&&(Alive = 1)
trigger1 = (StateNo = 5120)
trigger1 = Time = 1
trigger1 = (P2Dist X)+(BackEdgeDist) > 160
value = 855

;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

[State 5030, 1]
type = VelAdd;Gravity
trigger1 = 1
y = GetHitVar(yaccel)

[State 5030, 2]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5030, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1
scale = .5,.5

[State 5030, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1
scale = .5,.5

[State 5030, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5040 ;HITA_RECOV

[State 5030, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver
trigger2 = Vel Y > 0    ;Hit ground
trigger2 = Pos Y >= 10  ;.
value = 5050 ;HITA_FALL

[State 5030, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 5035 ;HITA_UP (transition)

;---------------------------------------------------------------------------

; HITA_UP_T (transition)
[Statedef 5035]
type    = A
movetype= H
physics = N

[State 5035, 1]
type = ChangeAnim
trigger1 = Time = 0
trigger1 = SelfAnimExist(5035)
trigger1 = Anim != [5051,5059] ;Not if in hit up anim
trigger1 = Anim != 5090 ;Not if hit off ground anim
value = 5035

[State 5035, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5035, snd]
type = PlaySnd
triggerall = vel x != 0
triggerall = numexplod(72) <= 0
trigger1 = backedgebodydist <= 5
trigger2 = frontedgebodydist <= 5
persistent = 0
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = backedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = -20,-75
postype = p1
bindtime = 1
scale = .5,.5

[State 5035, GMA]
type = Explod
triggerall = vel x != 0
triggerall = frontedgebodydist <= 5
trigger1 = numexplod(72) <= 0
persistent = 0
ignorehitpause = 1
id = 72
anim = 6777
pos = 20,-75
sprpriority = 2
facing = -1
bindtime = 1
ownpal = 1
scale = .5,.5

[State 5035, 3]
type = ChangeState
triggerall = !HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Animation over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5040 ;HITA_RECOV

[State 5035, 4]
type = ChangeState
triggerall = HitFall
trigger1 = HitOver  ;Hit is over
trigger2 = AnimTime = 0 ;Anim is over
trigger3 = Vel Y > 0    ;Hit ground
trigger3 = Pos Y >= 10  ;.
trigger4 = Time = 0     ;No transition anim
trigger4 = Anim != 5035 ;.
value = 5050 ;HITA_FALL

;-----------------------------------------------------------------------------------------------------
; Hit by  - hit wall
; (a custom gethit state)
[Statedef 9027]
type    = A
movetype= H
physics = N

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

[State 9027]
type = EnvShake
trigger1 = time = 0
time = 30
freq = 100
ampl = -10
phase = 10

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

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

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

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

[State 9027, Anim]
type = ChangeAnim2
trigger1 = Time = 0
value = 1281

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

[State 9027, State]
type = ChangeState
trigger1 = Time = 5
value = 9028

;----------------------------------------------------------------
; Hit by  - bounce off wall
; (a custom gethit state)
[Statedef 9028]
type    = A
movetype= H
physics = N


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

[State 9028, Vel Y]
type = VelSet
trigger1 = Time = 0
y = -2

[State 9028, Vel X]
type = VelSet
trigger1 = Time = 0
x = 2


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

[State 9028, Gravity]
type = VelAdd
trigger1 = 1
y = .39

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

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

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

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

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


 ;----------------------------[2002 UM MAX2 BG]----------------------------------
[Statedef 40001]
anim = 9999

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noBG
flag2 = noFG

;[State 40001, Tile #1-7]
;type = Explod
;triggerall = !numexplod(15600)
;trigger1 = !time
;anim = 15600
;ID = 15600
;pos = 0,0
;postype = left  ;p2,front,back,left,right
;removetime = 10
;pausemovetime = -1
;supermovetime = -1
;scale = 1.1,1.1
;sprpriority = -20
;ownpal = 1
;ignorehitpause = 1
;bindtime = -1
;persistent = 0

[State 40001, Tile #1-7]
type = Explod
trigger1 = !time
trigger2 = numexplod(15601) = 0
anim = 15600
ID = 15601
pos = 0,0
postype = left  ;p2,front,back,left,right
removetime = -1
pausemovetime = -1
supermovetime = -1
scale = 1.1,1.1
sprpriority = -9999
ownpal = 1
ignorehitpause = 1
bindtime = -1

[State 40001, Glass Break]
type = ChangeState
;trigger1 = root, stateno != 3300 && root, stateno != 3350
;trigger2 = root, stateno = 3300 && root,animelemtime(61) = 1  || root, stateno = 3350 && root,animelemtime(50) = 1
trigger1 = root, stateno !=[3000,4999]
;trigger2 = root, NumHelper(8400) !=0|| root, NumHelper(8420) !=0
value = stateno+1

[Statedef 40002]
anim = 9999

;[State 40002, RemoveExplod]
;type = RemoveExplod
;trigger1 = !time
;id = 15600

[State 40002, RemoveExplod]
type = RemoveExplod
trigger1 = !time
id = 15601

[State 40002, PlaySnd]
type = PlaySnd
trigger1 = !time
value = S14001,0
volume = 200

[State 40001, Glass Break]
type = Explod
triggerall = !numexplod(15640)
trigger1 = !time
anim = 15604
ID = 15640
pos = 0,0
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
scale = 1,1
sprpriority = -20
ownpal = 1
bindtime = -1
ignorehitpause = 1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

;--------------------------[2002 UM MAX2 PORTRAIT]------------------------------
[Statedef 40003]
anim = 9999

[State 40001, P1 BG]
type = Explod
triggerall = !numexplod(15650)
triggerall = teamside = 1
trigger1 = !time
anim = 15605
ID = 15650
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P2 BG]
type = Explod
triggerall = !numexplod(15651)
triggerall = teamside = 2
trigger1 = !time
anim = 15606
ID = 15651
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -20
ownpal = 1
ignorehitpause = 1

[State 40001, P1 PORTRAIT]
type = Explod
triggerall = !numexplod(15660)
triggerall = teamside = 1
trigger1 = !time
anim = 15607
ID = 15660
pos = 0,abs((240*var(0))-81)
postype = left  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40001, P2 PORTRAIT]
type = Explod
triggerall = !numexplod(15661)
triggerall = teamside = 2
trigger1 = !time
anim = 15607
ID = 15661
pos = 0,abs((240*var(0))-81)
postype = right  ;p2,front,back,left,right
pausemovetime = -1
supermovetime = -1
removetime = -2
bindtime = -1
scale = 1,1
facing = -1
sprpriority = -19
ownpal = 1
ignorehitpause = 1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15650
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15650
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15650
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15650
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15650
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15651
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15651
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15651
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15651
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15651
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15660
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15660
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15660
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15660
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15660
scale = 1,1

[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 2
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 4
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 6
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 8
ID = 15661
scale = 1,1
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 56
ID = 15661
scale = 1,0.77
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 57
ID = 15661
scale = 1,0.54
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 58
ID = 15661
scale = 1,0.3
[State 40003, ModifyExplod]
type = ModifyExplod
trigger1 = time = 59
ID = 15661
scale = 1,1

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 60

[Statedef 40004]
anim = 9999

[State 40001, DestroySelf]
type = DestroySelf
trigger1 = time = 1

 ;-------------------------------------------------------------------------------


;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

;=========AvX Special Get Hit State Recognition===========
;Fvar(30)
;0 = Not Hit
;1 = Ground Bounce - stateno 5130
;2 = Wall Bounce - stateno 5045
;3 = Both

[State -2, VarSet]
type = VarSet
trigger1 = fvar(30) = 0
trigger1 = enemynear,stateno = 5132 ;Ground Bounce
fv = 30
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = fvar(30) = 0
trigger1 = enemynear,stateno = 5048 ;Wall Bounce
fv = 30
value = 2

[State -2, VarSet]
type = VarSet
trigger1 = fvar(30) = 2
trigger1 = enemynear,stateno = 5132 ;Ground Bounce
trigger2 = fvar(30) = 1
trigger2 = enemynear,stateno = 5048 ;Wall Bounce
fv = 30
value = 3

[State -2, VarSet]
type = VarSet
trigger1 = fvar(30) > 0
trigger1 = enemynear,movetype!=H
fv = 30
value = 0

[State -2, VarSet];OTG Recognition
type = VarSet
trigger1 = fvar(29) > 0
trigger1 = enemynear,movetype!=H
trigger1 = enemynear,stateno != 5110
fv = 29
value = 0

[State -2, VarSet]
type = ParentVarSet
trigger1 = hitdefattr = SCA, NA, NP, NT
trigger1 = enemynear, movetype =H
fv = 25
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = hitdefattr = SCA, NA, NP, NT
trigger1 = enemynear, movetype =H
fv = 25
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = movetype !=A
trigger1 = enemynear, movetype !=H
fv = 25
value = 0

[State -2, VarSet]
type = ParentVarSet
trigger1 = hitdefattr = SCA, SA, SP, ST
trigger1 = enemynear, movetype =H
fv = 26
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = hitdefattr = SCA, SA, SP, ST
trigger1 = enemynear, movetype =H
fv = 26
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = movetype !=A
trigger1 = enemynear, movetype !=H
fv = 26
value = 0

[State -2, VarSet]
type = ParentVarSet
trigger1 = hitdefattr = SCA, HA, HP, HT
trigger1 = enemynear, movetype =H
fv = 27
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = hitdefattr = SCA, HA, HP, HT
trigger1 = enemynear, movetype =H
fv = 27
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = movetype !=A
trigger1 = enemynear, movetype !=H
fv = 27
value = 0

[State -2, Varadd];hitcount
type = Varadd
trigger1 = movehit
trigger1 = enemynear, time = 0
trigger1 = p2stateno = [5000,5899]
fv = 28
value = 1
ignorehitpause = 1

[State -2, VarSet];hitcount
type = VarSet
trigger1 = movetype !=A
trigger1 = enemynear, movetype !=H
trigger1 = p2stateno != [5000,5899]
fv = 28
value = 0

[State -2, PowerAdd]
type = PowerAdd
triggerall = roundno = 1
trigger1 = p2name = "Cable Training"
trigger1 = enemynear,var(40)= 4
value = 3000

[State -2, PowerAdd]
type = PowerAdd
triggerall = roundno = 2
trigger1 = roundstate < 2
trigger1 = p2name = "Cable Training"
value = -3000

;==============================

;For debugging purposes
[State -2, Debug Info]
type = DisplayToClipboard
trigger1 = roundstate > 0
text = " AI On %d, Super Jump %d, Cape %d"
;text = "Intro No. %d, Win No. %d, Enemy Proj: %d, Enemy Helpers: %d"
;text = "Score %d"
;text = "P2 Distance X from P1 %f, P2 Distance Y from P1 %f"
params = var(59), var(0), numhelper(2)
;params = var(1), var(2), var(7), var(6)
;params = var(11)
;params = P2BodyDist X, P2BodyDist Y


; Misc SCtrls Section ==================================================
[State -2, Lie Down Snd]
type = PlaySnd
trigger1 = Time = 1
trigger1 = anim = 5300
value = 3,21
channel = 0

;Hover
[State -2, VelAdd]
type = VelAdd
triggerall = statetype = A
triggerall = vel y > 2
triggerall = movetype != A
triggerall = movetype != H
triggerall = ctrl
trigger1= command = "holdup"
y = -1.75

; ----------------------------------------------------------------------
[State -2, Revitalise]
type = Explod
trigger1 = anim = 5120
anim = 5302
ID = 5120
pos = 0,-30
postype = p1
facing = 1
vfacing = 1
bindtime = 9999
removetime = 5
scale = 1,1.25
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State -2, Revitalise]
type = Explod
trigger1 = anim = 7696
anim = 5302
ID = 7696
pos = 0,-30
postype = p1
facing = 1
vfacing = 1
bindtime = 9999
removetime = 5
scale = 1,1.25
sprpriority = 0
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

; ----------------------------------------------------------------------
[State -2, PosAdd]
type = PosAdd
trigger1 = Stateno = [5030, 5040]
trigger1 = (anim = 5040) && (AnimElem = 1, < 2)
y = -20
persistent = 0

; Reset Super Jump var
[State -2, Super Jump Reset]
type = VarSet
trigger1 = stateno = 52
trigger2 = stateno = 0
var(0) = 0

; Remove Explods Section ==============================================
; Remove Special BG if ------------------------------------------------
; State != 3100:
[State -2, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 3100
id = 9052

[State -2, Dizzy Spark]
type = RemoveExplod
trigger1 = anim != 5300
trigger1 = anim != 5120
trigger1 = anim != 7696
id = 5302

; Combo Messages and Score control =====================================
;>3 Yes
;>4 Good
;>5 Great
;>7 Very Good
;>9 Wonderful
;>11 Fantastic
;>14 Monster
;>20 Marvelous


[State -2, VS_Combo]
type = VarSet
trigger1 = var(8) >= 3
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(9) = 1+(var(8)>3)+(var(8)>4)+(var(8)>6)+(var(8)>8)+(var(8)>10)+(var(8)>13)+(var(8)>19)-(var(8)=-1)
ignorehitpause = 1

[State -2, Danger]
type = VarSet
trigger1 = var(10) !=1 && roundstate=2 && life = [1,250]
var(9) = 9
ignorehitpause = 1

[State -2, First Attack]
type = PlaySnd
triggerall = var(8)=-1
triggerall = NumExplod(8701) = 0
trigger1 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
persistent = 0
value = 230,0
volume=255
ignorehitpause = 1

[State -2, Combo Sound]
type = PlaySnd
trigger1 = NumExplod(8701) = 0
trigger1 = var(8)=0 && var(9)!=0
persistent = 0;1
value = 230,var(9)
volume=255
ignorehitpause = 1

[State -2, Left]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 1 && NumExplod(8701) = 0
anim = (8000 + var(9))
ID = 8701
postype = left
pos = 0,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
trigger1 = var(8)=0 && var(9)!=0
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
triggerall = TeamSide = 2 && NumExplod(8701) = 0
anim = (8100+ var(9))
ID = 8701
postype = right
pos = -1,80
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[State -2, VS_Combo]
type = VarAdd
trigger1 = enemynear, time = 0
trigger1 = enemynear, Hitshakeover = 0
trigger1 = p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
var(8) = 1 + (var(8)=-1)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
trigger1 = var(8)!=-1 && (p2movetype!=H || enemynear, ctrl)
trigger2 = var(8)=-1 && stateno = [5000,5899]
var(8) = 0 - (roundstate<2)
ignorehitpause = 1

[State -2, VS_Combo]
type = VarSet
triggerall = numexplod(8701)!=0
trigger1 = var(8)=0
var(9) = 0
ignorehitpause = 1

[State -2, Score]
type = Varadd
trigger1 = enemynear, time=0
trigger1 = enemynear, Hitshakeover=0
trigger1 = moveguarded || p2stateno = 6300 || p2stateno = [5000,5899]
trigger2 = var(8)=-1 && (movehit || p2stateno = 6300 || p2stateno = [5000,5899])
trigger3 = roundstate=4 && time=0 && stateno = [180,189]
var(11) = ceil(stateno/50)*var(8) + (life)*(roundstate=4) + (moveguarded)
ignorehitpause = 1

[State -2, Normalize Score]
type = Varset
triggerall = numpartner=1
trigger1 = var(11)< partner, var(11)
var(11) = partner, var(11)

[State -2, Is Danger]
type = VarSet
trigger2 = var(10) = 0 && life <= 250
trigger1 = var(10) = 1 && roundstate!=2
var(10) = (roundstate>1)
ignorehitpause = 1

[State -2, Is First Attack p3]
type = VarSet
triggerall = numpartner=1
trigger1 = partner, movehit
trigger1 = partner, var(8) != -1
var(8) = 0
ignorehitpause = 1



; ---------------------------------------------------------
; Down message (Appears when partner dies)
; sound First attack
[State -2, Finish]
type = PlaySnd
triggerall = numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
persistent = 0
value = f8560, 0
volume = 255
ignorehitpause = 1

[State -2, Left]
type = explod
triggerall = teamside = 2 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f221
ID = 8580
postype = left
pos = 0,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0
ignorehitpause = 1

[State -2, Right]
type = explod
triggerall = teamside = 1 && numexplod(8580) = 0
triggerall = roundstate = 2 && p2life = 0
trigger1 = (movehit) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger2 = (numproj > 0) && (p2stateno = 8000 || p2stateno = [5000,5899])
trigger3 = (numhelper(3001) >= 1) && (p2stateno = 8000 || p2stateno = [5000,5899])
anim = f222
ID = 8580
postype = right
pos = -9,100
ontop = 1
bindtime = -1
removetime = 60
supermovetime = 60
pausemovetime = 60
scale = 0.5,0.5
persistent = 0;1
ignorehitpause = 1

[state 19]
type = varadd
trigger1 = RoundState = 2
var(17) = 1

[State -2, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,1
channel = 0
ignorehitpause = 1
volume = 255

[State -2, 2]
type = PlaySnd
triggerall = Time = 1
triggerall = Life
triggerall = random % 10 > 5
trigger1 = stateno = 5000 || stateno = 5020
trigger1 = anim != 5000 && anim != 5010
trigger2 = stateno = 5010
trigger2 = anim != 5020
value = 11,2
channel = 0
ignorehitpause = 1
volume = 255


[State -2, VarSet] ;Selfststae = no
type = VarSet
trigger1 = var(42) = 0
v = 42
value = 1

[State -2, VarSet]
type = VarSet
trigger1 = var(42) = 1
v = 43
value = 9696

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------

;SPELL VARS
;
[State -2, VarSet]
type = VarSet
trigger1 = var(15)!= 0 && numexplod(3301) = 0
trigger2 = time >=276 || matchover || win || lose
v = 15
value = 0
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;
;Shield of Seraphim
[State -2]
type = AfterImage
trigger1 = numexplod(3305)>0 && Time%8 = 0
time = 7
ignorehitpause = 1
PalBright = 20, 200, 50
PalContrast =  25,255,55
PalAdd = 0, 0, 0
PalMul = 1,1,1
trans = none
Length = 25
FrameGap = 5

;Shield of Seraphim
[State -2, DefenceMulSet]
type = DefenceMulSet
trigger1 = var(19) = 3
value = 0.01

;Shield of Seraphim
[State -2, DefenceMulSet]
type = DefenceMulSet
trigger1 = var(19) = 0
value = 1

;Shield of Seraphim
[State -2, VarSet]
type = VarSet
trigger1 = var(19)!= 0 && numexplod(3304) = 0
v = 19
value = 0

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Cyttorak
[State -2]
type = AfterImage
trigger1 = numexplod(3303)>0 && Time%8 = 0
time = 7
ignorehitpause = 1
PalBright = 200, 50, 20
PalContrast =  255,25,55
PalAdd = 200, 0, 0
PalMul = 1,1,1
trans = none
Length = 25
FrameGap = 5

;Cyttorak
[State -2, Set Powered Up Attack]
type = AttackMulSet
trigger1 =  var(20) = 3
value = 1.5

;Cyttorak
[State -2, Set Powered Up Attack]
type = AttackMulSet
trigger1 =  var(20) = 0
value = 1

;Cyttorak
[State -2, VarSet]
type = VarSet
trigger1 = var(20)!= 0 && numexplod(3304) = 0
v = 20
value = 0

;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Valtorr
[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = var(18) = 3
flag = invisible

[State -2, VarSet]
type = VarSet
trigger1 = var(18)!= 0 && numexplod(3306) = 0
v = 18
value = 0
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Images of Ikonn
[State -2, VarSet]
type = VarSet
trigger1 = var(17)!= 0 && numexplod(3306) = 0
v = 17
value = 0
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Grace of Hoggoth
[State -2, VarSet]
type = VarSet
trigger1 = var(16)!= 0 && numexplod(3308) = 0
v = 16
value = 0
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;
[Statedef -3]




[State -3, VarAdd]
type = VarAdd
trigger1 = (HitPauseTime = 1) && (P2MoveType = H) && (MoveHit = 1) && (StateNo < 3000)
trigger2 = ProjHitTime(0) = 1
v = 21
value = 1
ignorehitpause = 1

[State -3, VarReset]
type = VarSet
trigger1 = P2MoveType != H
v = 21
value = 0

[State -3, AttackMulSet]
type = AttackMulSet
trigger1 = StateNo >= 3000
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) <= 1
value = 1

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 2
value = 0.8

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 3
value = 0.6

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) = 4
value = 0.4

[State -3, AttackMulSet]
type = AttackMulSet
triggerall = StateNo < 3000
trigger1 = Var(21) >= 5
value = .2


[State 8510, Pó]
type = Explod
trigger1 = Stateno = 52 && time = 1
trigger2 = Stateno = 240 && animelem = 8
trigger3 = Stateno = 1102 && time = 1
trigger4 = Stateno = 1112 && time = 1
trigger5 = Stateno = 1122 && time = 1
trigger6 = Stateno = 106 && time = 1
trigger7 = Stateno = 352 && AnimElemTime(2) = 1
anim = 8510
ID = 8510
postype = P1
pos = 0,4
sprpriority = -1
ownpal = 1
scale = 1.4, 1.2

[State -3, Aterrisagem]
type = PlaySnd
trigger1 = StateNo = 52 && Time = 1
value = 8100,0

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8901

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8900

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8998

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8997

[State -3, Explod]
type = RemoveExplod
trigger1 = StateNo != [3000,4999]
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Roundstate = 4
ID = 8999

[State -3, Explod]
type = RemoveExplod
trigger1 = Var(20) > 0
ID = 8999

[State -3, MSSM]
type = VarRandom
trigger1 = 1
v = 23
range = 0,8

[State -3, Super Jump]
type = VarSet
trigger1 = Stateno = 0
v = 12
value = 0

;[State -3, Afterimagetime]
type = Afterimagetime
trigger1 = stateno != [3000,4999]
time = 0

[State -3, ctrl set]
type = ctrlset
trigger1 = roundstate = 4
value = 0

[State -3, VarSet] ;Self State = Yes
type = VarSet
trigger1 = 1
v = 42
value = 0

[State 0, VarSet] ;*Reset The custom state var(43) if needed
type = VarSet
trigger1 = var(43) = 9696
v = 43
value = 0
