
; VARIABLES:
;----------------------------------------------------
; var(0) - Temp
; var(1) - Temp
; var(2) - Opponent's mid x
; var(3) - Opponent's mid y
; var(4) - Recovery roll var 
; var(5) - Screenpos Y at start of round
; var(6) - Y Throw Flag
; var(7) - Combo Active?
; var(8) - Total hits of current combo
; var(9) - Hitcount of previous state
; var(10) - New hits this tick which must be accounted for
; var(11) - Helper hits to account for this tick
; var(12) - Facing at start of round
; var(13) - First attack counter
; var(14) - "Danger" counter
; var(15) - Holds Combo Count
; var(16) - Hyper Combo Finish
; var(17) - AI Active
; var(18) - temp
; var(19) - Ice Fist Active
; var(20) - Number of punches landed w/Ice Fist
; var(21) - Counter for custom state detection
; var(22) - " " " " "
; var(23) - Is 1 if in a custom state
; var(24) - Arctic Attack flag
; var(25) - Hyper Combo finish signal variable
; var(26) - Air Combo Var
; var(27) - Signal var for shard
; var(59) - Records AI being active
;
; fvar(0) - Temp
; fvar(1) - Current attack constant

[Data]
;Amount of life to start with
life = 1000
;attack power (more is stronger)
attack = 115
;defensive power (more is stronger)
defence = 120
;Percentage to increase defense everytime player is knocked down
fall.defence_up = 50
;Time which player lies down for, before getting up
liedown.time = 20
;Number of points for juggling
airjuggle = 15
;Default hit spark number for HitDefs
sparkno = 2
;Default guard spark number
guard.sparkno = 40
;1 to enable echo on KO
KO.echo = 0
;Volume offset (negative for softer)
volume = 150
;Variables with this index and above will not have their values
;reset to 0 between rounds or matches. There are 60 int variables,
;indexed from 0 to 59, and 40 float variables, indexed from 0 to 39.
;If omitted, then it defaults to 60 and 40 for integer and float
;variables repectively, meaning that none are persistent, i.e. all
;are reset. If you want your variables to persist between matches,
;you need to override state 5900 from common1.cns.
IntPersistIndex = 59
FloatPersistIndex = 40

[Size]
xscale = 1.05          ;Horizontal scaling factor.
yscale = 1.05           ;Vertical scaling factor.
ground.back = 13     ;Player width (back, ground)
ground.front = 22    ;Player width (front, ground)
air.back = 12        ;Player width (back, air)
air.front = 12       ;Player width (front, air)
height = 80      ;Height of player (for opponent to jump over)
attack.dist = 160    ;Default attack distance
proj.attack.dist = 90 ;Default attack distance for projectiles
proj.doscale = 0     ;Set to 1 to scale projectiles too
head.pos = 25, -78   ;Approximate position of head
mid.pos = 0, -54    ;Approximate position of midsection
shadowoffset = -3     ;Number of pixels to vertically offset the shadow
draw.offset = 0,-3    ;Player drawing offset in pixels (x, y)

[Velocity]
walk.fwd  = 4.2      ;Walk forward
walk.back = -3     ;Walk backward
run.fwd  = 12.6, 0    ;Run forward (x, y)
run.back = -8.5,-3.8 ;Hop backward (x, y)
jump.neu = 0,-8.4    ;Neutral jumping velocity (x, y)
jump.back = -2.65    ;Jump back Speed (x, y)
jump.fwd = 2.6       ;Jump forward Speed (x, y)
runjump.back = -2.55,-8.1 ;Running jump speeds (opt)
runjump.fwd = 4,-8.1      ;.
airjump.neu = 0,-8.1      ;.
airjump.back = -2.55      ;Air jump speeds (opt)
airjump.fwd = 2.5         ;.

[Movement]
airjump.num = 0      ;Number of air jumps allowed (opt)
airjump.height = 35  ;Minimum distance from ground before you can air jump (opt)
yaccel = .39         ;Vertical acceleration
stand.friction = .85  ;Friction coefficient when standing
crouch.friction = .82 ;Friction coefficient when crouching

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

;---------------------------------------------------------------------------
; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 200, 3]
type = PlaySnd
trigger1 = animelem = 51
value = 3, 16
volume = 100

[State 0, Explod]
type = Explod
trigger1 = animelem = 51
trigger2 = animelem = 52
trigger3 = animelem = 53
trigger4 = animelem = 54
trigger5 = animelem = 55
trigger6 = animelem = 56
trigger7 = animelem = 57
trigger8 = animelem = 58
anim = 1905
ID = 196
pos = -5,-50
bindtime = 3
removetime = 3
supermove = 1
scale = .2, .2
ontop = 1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 51
trigger2 = animelem = 52
trigger3 = animelem = 53
trigger4 = animelem = 54
trigger5 = animelem = 55
trigger6 = animelem = 56
trigger7 = animelem = 57
trigger8 = animelem = 58
anim = 1905
ID = 196
pos = 45,-63
bindtime = 3
removetime = 3
supermove = 1
scale = .2, .2
ontop = 1
ownpal = 1

[State 1025, flames]
type=helper
trigger1 = animelem = 51
trigger2 = animelem = 52
trigger3 = animelem = 53
trigger4 = animelem = 54
trigger5 = animelem = 55
trigger6 = animelem = 56
trigger7 = animelem = 57
trigger8 = animelem = 58
helpertype=normal
stateno=7181
name="black_spots"
pos = -5,-50
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 1025, flames]
type=helper
trigger1 = animelem = 51
trigger2 = animelem = 52
trigger3 = animelem = 53
trigger4 = animelem = 54
trigger5 = animelem = 55
trigger6 = animelem = 56
trigger7 = animelem = 57
trigger8 = animelem = 58
helpertype=normal
stateno=7181
name="black_spots"
pos = 45,-63
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

; Walk
[Statedef 20]
type    = S
physics = S
sprpriority = 0

[State 20, 1]
type = VelSet
trigger1 = command = "holdfwd"
x = const(velocity.walk.fwd.x)

[State 20, 2]
type = VelSet
trigger1 = command = "holdback"
x = const(velocity.walk.back.x)

[State 20, 3]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 20 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 20

[State 20, 4]
type = ChangeAnim
triggerall = vel x < 0
trigger1 = Anim != 21 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 21

;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
trigger1 = prevstateno = 730
trigger1 = command = "xa"
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
trigger1 = prevstateno = 730
trigger1 = command = "xa"
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

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

[State 50, 2]
type = ChangeAnim
triggerall = (PrevStateNo != [600,655]) && (PrevStateNo != [1030,1050]) && (PrevStateNo != 1060) && (PrevStateNo != [1100,1110]) && (PrevstateNo != 2000)
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = ChangeAnim
triggerall = (PrevStateNo != [600,655]) && (PrevStateNo != [1030,1050]) && (PrevStateNo != 1060) && (PrevStateNo != [1100,1110]) && (PrevstateNo != 2000)
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

[State 50, 4]
type = ChangeAnim
trigger1 = time = 0
trigger1 = (PrevStateNo = [600,655]) || (PrevStateNo = [1030,1050]) || (PrevStateNo = 1060) || (PrevStateNo = [1100,1110]) || (PrevStateNo = 2000)
value = 48

;---------------------------------------------------------------------------
; Jump Land
[Statedef 52]
type    = S
physics = S
ctrl = 0
anim = 47

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

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

[State 52, 3]
type = CtrlSet
trigger1 = Time = 3
value = 1

[State 52, Reset]
type = VarSet
trigger1 = time = 0
v = 26
value = 0

[State 52, Landing Wave]
type = Explod
trigger1 = time = 0
ID = 589
anim = 7010
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = -2

[State 52, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------


;---------------------------------------------------------------------------
[Statedef 100]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 6005
ctrl = 0
facep2 = 1

[State 1010, 3]
type = Explod
trigger1 = time >= 3
trigger1 = time < 13
ID = 7095
anim = 7095
postype = p1
vel = -5,0
pos = 0, -50
random = 30,50
scale = .2, .2
removetime = -2
sprpriority = 5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = time>12
time = 5
length = 10
;palcolor = 256
;palinvertall = 0
;palbright = 30,30,30
;palcontrast = 120,120,220
;palpostbright = 0,0,0
;paladd = 10,10,25
;palmul = .65,.65,.75
;timegap = 1
framegap = 1
;trans =
;ignorehitpause = 0
;persistent = 1


[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 881
ID = 881
pos = 0,-50
ontop = 1
ownpal = 1
scale = .5,.5
vel = -3,0
removetime = 10

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 2
time = 5
;freq = 60
;ampl = -4
;phase =
;ignorehitpause = 0
;persistent = 1


[State 1000, 3]
type = Explod
trigger1 = animelem = 2
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 27

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 7
x = 10

[State 0, VelAdd]
type = VelAdd
trigger1 = command =  "holdfwd" && time >=6
x = 3
;y =
;ignorehitpause = 0
;persistent = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = command =  "holdback" && time >=6
x = -2

[State 100, NotHitBy]
type = NotHitBy
Trigger1 = Time = 0
value = SCA
time = 19

[State 100, AfterImage]
type = AfterImage
Trigger1 = AnimElem = 1
time = 15
trans = add1
TimeGap  = 2
FrameGap = 1
length = 30
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =   1,  1,  1




[State 200, 6]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 9



[State 100, 4]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 100, 7]
type = ScreenBound
Trigger1 = Time = 0
Trigger2 = Time >= 10
Trigger3 = AnimElem = 2
Trigger4 = AnimElem = 3
Trigger5 = AnimElem = 4
Trigger6 = AnimTime = 0
value = 0
movecamera = 1,1

[State 100, 8]
type = PlaySnd
Trigger1 = AnimElem = 2
value = 100,0
volume = 255

;----------------------------------------------------------------------------------------
;Velocidade aparecendo
[Statedef 103]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 432
ctrl = 0
facep2 = 1

[State 103, 0]
type = AfterImage
Trigger1 = AnimElem = 1
time = 15
trans = add1
TimeGap  = 2
FrameGap = 1
length = 3
PalBright   =   0,  0,  0
PalContrast = 128,128,128
PalAdd      =   0,  0,  0
PalMul      =   1,  1,  1

[State 103, 1]
type = PlaySnd
Trigger1 = AnimElem = 1
value = 100,1
volume = 255

[State 103, 2]
type = Projectile
Trigger1 = Time = AnimElem = 1
projanim = 6005
projremovetime = 50
velocity = 0
offset = 0

[State 103, 5]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

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

[State 105, 1]
type = VelSet
trigger1 = AnimElem = 2
x = -8
y = -4

[State 150, 1a]
type = Gravity
trigger1 = AnimElemNo(0) >= 2

[State 105, 2]
type = PosSet
triggerall = time > 2
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
y = 0

[State 105, 2a]
type = VelSet
triggerall = time > 2
trigger1 = command = "x"
trigger2 = command = "y"
trigger3 = command = "z"
trigger4 = command = "a"
trigger5 = command = "b"
trigger6 = command = "c"
y = 0

[State 105, 3]
type = ChangeState
triggerall = time > 2
trigger1 = command = "x"
value = 200

[State 105, 3a]
type = ChangeState
triggerall = time > 2
trigger1 = command = "y"
value = 210

[STate 105, 3b]
type = ChangeState
triggerall = time > 2
trigger1 = command = "z"
value = 220

[State 105, 3c]
type = ChangeState
triggerall = time > 2
trigger1 = command = "a"
value = 230

[State 105, 3d]
type = ChangeState
triggerall = time > 2
trigger1 = command = "b"
value = 240

[State 105, 3e]
type = ChangeState
triggerall = time > 2
trigger1 = command = "c"
value = 250

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

;------------------------------------------------
; Hopback land
[Statedef 106]
type = S
movetype = I
physics = S
ctrl = 1
anim = 106

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

[State 106, Landing Wave]
type = Explod
trigger1 = time = 0
ID = 589
anim = 7010
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = -2

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

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

; STAND GUARD (guarding)
[Statedef 130]
type    = S
physics = S

[State 130, 1]
type = ChangeAnim
trigger1 = Anim != 130
value = 130

[State 130, Hi to Lo]
type = ChangeState
trigger1 = command = "holddown"
value = 131

[State 130, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; CROUCH GUARD (guarding)
[Statedef 131]
type    = C
physics = C

[State 131, 1]
type = ChangeAnim
trigger1 = Anim != 131
value = 131

[State 131, Lo to Hi]
type = ChangeState
trigger1 = command != "holddown"
value = 130

[State 131, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; AIR GUARD (guarding)
[Statedef 132]
type    = A
physics = N

[State 132, 1]
type = ChangeAnim
trigger1 = Anim != 132
value = 132

[State 132, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 132, 3]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 132, 4]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 132, 5]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 132, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 132, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

[State 132, Stop Guarding]
type = ChangeState
trigger1 = command != "holdback"
trigger2 = !inguarddist
value = 140

;---------------------------------------------------------------------------
; GUARD (end)
[Statedef 140]
type = U    ;Leave state type unchanged
physics = U ;Leave physics unchanged
ctrl = 1

[State 140, 1]
type = ChangeAnim
trigger1 = Time = 0
value = 140 + (statetype = C) + (statetype = A)*2

[State 140, 2]
type = StateTypeSet
trigger1 = Time = 0 && statetype = S
physics = S

[State 140, 3]
type = StateTypeSet
trigger1 = Time = 0 && statetype = C
physics = C

[State 140, 4]
type = StateTypeSet
trigger1 = Time = 0 && statetype = A
physics = A

[State 140, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 140, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

;[State 140, 5] ;Implemented within engine
;type = ChangeState
;trigger1 = AnimTime = 0
;value = (statetype = C)*11 + (statetype = A)*51

[Statedef 141]
type=A
physics=N
movetype=A
anim=143
ctrl=0
velset=0,0
sprpriority=4

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1+(.02*time),1+(.02*time)

[State 0]
type = Trans
trigger1 = 1
trans = add

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,31

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

; Reversal Hard Punch=====================================
[Statedef 143]
type = S
movetype = A
physics = S
anim = 220
ctrl = 0
juggle = 8
poweradd = 30
sprpriority = 1

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

; Display "Reversal" Message
[State -2, Create Helper]
type = Helper
trigger1 = movecontact = 1
ID = 929
name = "Reversal"
StateNo = 9040
postype = p1
pos = 0, 0
ownpal = 1

[State 9030, 1]
type = Explod
trigger1 = time = 0
ID = 894
anim = 7110
postype = left
pos = 0, 0
bindtime = -1
removetime = 20
sprpriority = -5
ownpal = 1
supermove = 1
pausemovetime = 20



[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 20
sound = S2,4
pos = 0,-75
poweradd = 100
unhittable = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 1620
ID = 1620
pos = 0,0
vel = 0,0
ontop = 1
bindtime = -1
removetime = 25
ownpal = 1
pausemovetime = 1
;removeongethit = 0
;persistent = 1

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,6


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

[State 220, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3, 10
channel = 0

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAFD
;pausetime = 11, 11
damage = 85 + (33 * var(19))
animtype = Hard
priority = 4, Hit
sparkno = s900
sparkxy = -10, -53
hitsound = S0, 5
fall =1
guard.sparkno=S910
guardsound = S0, 9
ground.type = High
ground.slidetime = 15
ground.hittime = 23
ground.velocity = -8, -5
air.velocity = -6, -8
air.hittime = 25
down.velocity = -3, 0
down.hittime = 18
guard.slidetime = 13
guard.hittime = 17
guard.velocity = -7.6 - (var(19) * 1.5)
givepower = 50
getpower = 70
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

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

; Reversal Hard Kick====================================
[Statedef 144]
type = S
movetype = A
physics = S
ctrl = 0
anim = 250
juggle = 10
poweradd = 30
sprpriority = 1

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

; Display "Reversal" Message
[State -2, Create Helper]
type = Helper
trigger1 = movecontact = 1
ID = 929
name = "Reversal"
StateNo = 9040
postype = p1
pos = 0, 0
ownpal = 1

[State 9030, 1]
type = Explod
trigger1 = time = 0
ID = 894
anim = 7110
postype = left
pos = 0, 0
bindtime = -1
removetime = 20
sprpriority = -5
ownpal = 1
supermove = 1
pausemovetime = 20

[State 0, SuperPause]
type = SuperPause
trigger1 = time = 0
time = 20
sound = S2,4
pos = 0,-75
poweradd = 100
unhittable = 1

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

[State 250, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAFD
pausetime = 11, 11
damage = 86
animtype = back
priority = 4, Hit
guard.sparkno=S910
sparkno=S900
sparkxy = -10, -71
hitsound = S0, 8
guardsound = S0, 9
p2stateno = 326
guard.slidetime = 22
guard.hittime = 22
guard.velocity = -9
givepower = 30
getpower = 45

[State 0, Explod]
type = Explod
trigger1 = numexplod(920) = 0
trigger1 = movehit = 1
anim = 920
ID = 920
pos = 0,-50
vel = 0, 4
postype = p2
sprpriority = 3
ontop = 1
ownpal = 1
ignorehitpause = 1

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,6

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


;---------------------------------------------------------------------------
; SGUARDHIT (shaking)
[Statedef 150]
type    = S
movetype= H
physics = N
velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-75
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 150, 1]
type = ChangeAnim
trigger1 = 1
value = 150

[State 150, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 150, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 150, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 150, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 3

;---------------------------------------------------------------------------
; SGUARDHIT2 (knocked back)
[Statedef 151]
type    = S
movetype= H
physics = S
anim = 150

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-75
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 151, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 151, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 151, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 151, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 151, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 151, 4]
type = ChangeState
trigger1 = HitOver
value = 130
ctrl = 1

;---------------------------------------------------------------------------
; CGUARDHIT (shaking)
[Statedef 152]
type    = C
movetype= H
physics = N
velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-50
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 152, 1]
type = ChangeAnim
trigger1 = 1
value = 151

[State 152, 3]
type = ChangeState
trigger1 = HitShakeOver
value = 151 + 2*(command = "holddown")

[State 152, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 152, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 152, 4]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; CGUARDHIT2 (knocked back)
[Statedef 153]
type    = C
movetype= H
physics = C
anim = 151

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-50
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 153, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 153, 2]
type = VelSet
trigger1 = Time = GetHitVar(slidetime)
trigger2 = HitOver
x = 0

[State 153, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 153, Hi to Lo]
type = StateTypeSet
trigger1 = statetype = S && command = "holddown"
statetype = C
physics = C

[State 153, Lo to Hi]
type = StateTypeSet
trigger1 = statetype = C && command != "holddown"
statetype = S
physics = S

[State 153, 4]
type = ChangeState
trigger1 = HitOver
value = 131
ctrl = 1

;---------------------------------------------------------------------------
; AGUARDHIT (shaking)
[Statedef 154]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-75
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 154, 1]
type = ChangeAnim
trigger1 = 1
value = 152

[State 154, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 155 ;AGUARDHIT2

[State 154, 3]
type = ForceFeedback
trigger1 = time = 0
waveform = square
time = 4

;---------------------------------------------------------------------------
; AGUARDHIT2 (knocked away)
[Statedef 155]
type    = A
movetype= H
physics = N
anim = 152

[State 0, Helper]
type = Helper
trigger1 = numhelper(141) = 0
trigger1 = time = 0
helpertype = normal
name = "shield"
ID = 141
pos = 20,-75
postype = p1
facing = 1
stateno = 141
ownpal = 1

[State 155, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 155, 2]
type = VelAdd
trigger1 = 1
y = Const(movement.yaccel)

[State 155, 3]
type = CtrlSet
trigger1 = Time = GetHitVar(ctrltime)
value = 1

[State 155, 4]
type = VarSet
trigger1 = 1
sysvar(0) = (pos y >= 0) && (vel y > 0)

[State 155, 5]
type = VelSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = PosSet
trigger1 = sysvar(0)
y = 0

[State 155, 6]
type = ChangeState
trigger1 = sysvar(0)
trigger1 = command = "holdback"
trigger1 = inguarddist
value = 130

[State 155, 7]
type = ChangeState
trigger1 = sysvar(0)
value = 52

; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 185
velset = 0,0

[State 200, 6]
type = PlaySnd
trigger1 = time = 0
value = 13, 9

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

;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S
ctrl = 0

[State 180,0]
type = Changestate
trigger1 = Prevstateno = 183
trigger1 = Time = 0
value = 184

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

[State 180, 2]
type = ChangeState
trigger1 = var(0) = [0,125]
value = 181

[State 180, 3]
type = ChangeState
trigger1 = var(0) = [126,250]
value = 182



;---------------------------------------------------------------------------
; Win pose A
[Statedef 181]
type = S
ctrl = 0
anim = 183
velset = 0,0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 24
value = 13,6

[State 0, Explod]
type = Explod
trigger1 = time = 80
anim = 940
pos = 0, 10
ontop = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 80
value = 1,4

[State 0, VelSet]
type = Velset
trigger1 = time = 89
y = -8
ignorehitpause = 0
persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 90
helpertype=normal
stateno=185
name="board"
size.xscale = 1.05
size.yscale = 1.05
pos = -340,-15
postype=p1
ownpal=0
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, VelSet]
type = Veladd
trigger1 = time > 89
x = -.05
y = .07
ignorehitpause = 0
persistent = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 118
value = 3,19

[State 0, VelSet]
type = Veladd
trigger1 = time > 118
x = .9
y = -2
ignorehitpause = 0
persistent = 1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = time > 118
value = 0
movecamera = 0,1
;ignorehitpause = 0
;persistent = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = 0
;ignorehitpause = 0
;persistent = 1


[State 0, AngleAdd]
type = AngleAdd
trigger1 = time > 118
value = 2
;ignorehitpause = 0
;persistent = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = time = 118
time = 18
length = 20
;palcolor = 256
;palinvertall = 0
;palbright = 30,30,30
;palcontrast = 120,120,220
;palpostbright = 0,0,0
;paladd = 10,10,25
;palmul = .65,.65,.75
;timegap = 1
framegap = 4
;trans =
;ignorehitpause = 0
;persistent = 1

[State 181, 2]
type = AssertSpecial
trigger1 = time <= 150
flag = RoundNotOver

;---------------------------------------------------------------------------
; Win Pose B - Board Win
[Statedef 182]
type = S
ctrl = 0
anim = 182
velset = 0, 0
sprpriority = 1

[State 1025, flames]
type=helper
trigger1 = time = 25
helpertype=normal
stateno=1821
name="board"
pos = -270,-300
postype=p1
ownpal=0
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = 1.05
size.yscale = 1.05

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

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

[State 182, 3]
type = AssertSpecial
trigger1 = time <= 145
flag = RoundNotOver

; Win Pose B - Iceman Sign
[Statedef 1821]
physics=N
ctrl = 0
anim = 181
velset = 5, 5
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,32

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 48
value = 3,30

[State 1000, 3]
type = Explod
trigger1 = time = 48
ID = 857
anim = 7010
facing = 1
postype = p1
pos = -15, 60
bindtime = 1
;scale = .5,.5
removetime = -2
sprpriority = -3
ownpal = 1

[State 1000, 3]
type = Explod
trigger1 = time = 48
ID = 857
anim = 7080
facing = 1
vel = -2,0
postype = p1
pos = -20, 60
bindtime = 1
scale = .5,.5
removetime = -2
sprpriority = 3
ownpal = 1

[State 1000, 3]
type = Explod
trigger1 = time = 48
ID = 857
anim = 7080
vel = 2,0
facing = -1
postype = p1
pos = -20, 60
bindtime = 1
scale = .5,.5
removetime = -2
sprpriority = 3
ownpal = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 =  1
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 48
x = 0
y = 0
;ignorehitpause = 0
;persistent = 1


[State 0, AngleAdd]
type = AngleAdd
trigger1 = timemod = 1,0
trigger1 = time < 48
value = -2
;ignorehitpause = 0
;persistent = 1


;---------------------------------------------------------------------------
; Win Pose C - Fly Away
[Statedef 183]
type    = S
movetype= I
physics = S
anim = 1
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 100
value = 1
;ignorehitpause = 0
;persistent = 1


[State 730, 5.1]
type = VarSet
trigger1 = Var(12) != 2
trigger2 = Var(12) = 2
trigger2 = Vel Y >= 1
v = 12
value = 1

[State 730, 5.2]
type = VarSet
trigger1 = Var(12) = 1
trigger1 = Vel Y <= -1
v = 12
value = 2

[State 730, 7.1]
type = VelAdd
trigger1 = Var(12) = 1
y = -0.1

[State 730, 7.2]
type = VelAdd
trigger1 = Var(12) = 2
y = 0.1

;[State 3810,5]
;type = Changestate
;trigger1 = time = 140
;trigger1 = roundstate = 4
;value = 184
;ctrl = 0

; Win Pose C - Fly Away
[Statedef 184]
type = A
anim = 184
ctrl = 0
velset = 0, 0
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,32

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

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .4
y = -.5
;ignorehitpause = 0
;persistent = 1

[State 184,3]
type = Assertspecial
trigger1 = time <= 145
flag = roundnotover

[Statedef 185]
type = S
movetype = I
physics = S
ctrl = 0
anim = 186

[State 0, AfterImage]
type = AfterImage
trigger1 = time = 0
time = 18
length = 40
;palcolor = 256
;palinvertall = 0
;palbright = 30,30,30
;palcontrast = 120,120,220
;palpostbright = 0,0,0
;paladd = 10,10,25
;palmul = .65,.65,.75
;timegap = 1
framegap = 4
;trans =
;ignorehitpause = 0
;persistent = 1

[State 0, SprPriority]
type = SprPriority
trigger1 = 1
value = 10
;ignorehitpause = 0
;persistent = 1


[State 0, VelAdd]
type = Velset
trigger1 = time = 0
x = 12
y =  0

[State 0, VelAdd]
type = VelAdd
trigger1 = timemod = 1,0
x = 1.7
y =  -.5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,32

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
;ignorehitpause = 0
;persistent = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = 1
;ignorehitpause = 0
;persistent = 1

[State 1006, end]
type=destroyself
trigger1=root, animelem = 20

; PREINTRO
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 180, 1]
type = VarRandom
trigger1 = time = 0
v = 10
range = 0, 100

[State 190, 1]
type = ChangeState
trigger1 = !Time
trigger1 = var(10) = [0,45]
value = 191

[State 190, 1]
type = ChangeState
trigger1 = !Time
trigger1 = var(10) = [46,94]
value = 192

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = !Time
trigger1 = var(10) = [95,100]
value = 193

;---------------------------------------------------------------------------
; Galactus Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 170
velset = 0,0
sprpriority = 0

[State 191, 2]
type = PlaySnd
trigger1 = time = 0
channel = 10
value = 13, 3

[State 191, 2]
type = PlaySnd
trigger1 = time = 0
channel = 11
value = 14, 2

[State 191, 5]
type = Explod
trigger1 = time = 10
ID = 3905
anim = 3905
postype = p1
pos = -20, -120
bindtime = 1
removetime = 200
sprpriority = 3
ownpal = 1

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

[State 191, 10]
type = ChangeState
trigger1 = Time = 300
value = 0

; Board Introduction
[Statedef 192]
type = S
ctrl = 0
anim = 192
velset = 0,0
sprpriority = 0

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = -90
;ignorehitpause = 0
;persistent = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time > 40

trigger1 = time < 100
value = 1
;ignorehitpause = 0
;persistent = 1

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 100
value = 0
;ignorehitpause = 0
;persistent = 1

[State 0, ScreenBound]
type = ScreenBound
trigger1 = time < 100
value = 0
movecamera = 0,1
;ignorehitpause = 0
;persistent = 1

[State 0, PosSet]
type = PosSet
trigger1 = facing = 1
trigger1 = !time; = 0
x = -500
y = -200

[State 0, PosSet]
type = PosSet
trigger1 = facing = -1
trigger1 = !time; = 0
x = 500
y = -200

[State 0, VelSet]
type = VelSet
trigger1 = time = 20
x = 5

[State 0, VelSet]
type = VelSet
trigger1 = time > 20
trigger1 = time < 100
y = -.01

[State 2000, A4]
type = PlaySnd
trigger1 = time = 50
value = 3,32
persistent=0

[State 2000, A4]
type = PlaySnd
trigger1 = time = 100
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
trigger1 = time = 100
anim = 4002
ID = 4002
ontop = 1
facing = -1
removetime = 60
scale = 1.05, 1.05
vel = 7,-1
accel = 0,-.3

[State 0, VelSet]
type = VelSet
trigger1 = time = 100
x = 0

[State 0, VelSet]
type = Veladd
trigger1 = anim = 192
trigger1 = time > 100
x = .015
y = .1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 193
x = 0
y = 0

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Pos Y >= -10
value = 193

[State 52, Landing Wave]
type = Explod
trigger1 =  time = 165
ID = 589
anim = 7010
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = -2

[State 0, PlaySnd]
type = PlaySnd
trigger1 =  time = 165
value = 1,0

[State 52, 2]
type = PosSet
trigger1 = anim = 193
trigger1 = Time = 0
y = 0

[State 191, 10]
type = ChangeState
trigger1 = time = 200
value = 0

; Dilver Durfer Intro
[Statedef 193]
type = S
ctrl = 0
anim = 189
velset = 0,0
sprpriority = 0

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

[State 0, PosSet]
type = PosSet
trigger1 = facing = 1
trigger1 = time = 0
x = -220

[State 0, PosSet]
type = PosSet
trigger1 = facing = -1
trigger1 = time = 0
x = 220

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 2
x = 25

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 8
x = 0

[State 191, 2]
type = PlaySnd
trigger1 = time = 80
channel = 15
value = 3, 35
loop = 1

[State 0, StopSnd]
type = StopSnd
trigger1 = time = 500
channel = 15

[State 191, 2]
type = PlaySnd
trigger1 = time = 516
value = 3, 10

[State 191, 2]
type = PlaySnd
trigger1 = time = 516
channel = 15
value = 0, 5

[State 200, 6]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 9

[State 0, EnvShake]
type = EnvShake
trigger1 = AnimElem = 2
time = 5
;freq = 60
;ampl = -4
;phase =
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 8
anim = 1620
pos = 0,-5
vel = 0,0
ontop = 1
bindtime = -1
removetime = 25
ownpal = 1
pausemovetime = 1
removeongethit = 1
;persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
stateno=194
name="TheDilverDurfer"
pos = 150,-50
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

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

[State 191, 10]
type = ChangeState
trigger1 = Time = 580
value = 0

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

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 20
x = 5

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 21
x = -8

[State 0, VelSet]
type = VelSet
trigger1 = animelem = 22
x = 8

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

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 516
value = 191

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
;ignorehitpause = 0
;persistent = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = time > 516
x = 3
y = -2
;ignorehitpause = 0
;persistent = 1


[State 0, AngleAdd]
type = AngleAdd
trigger1 = time > 516
value = -10
;ignorehitpause = 0
;persistent = 1


[State 191, 10]
type = destroyself
trigger1 = Time = 666
value = 0

;Taunt 1=============================
[Statedef 195]
type = S
ctrl = 0
anim = 195
velset = 0,0
movetype = I
physics = S
sprpriority = 2

[State 200, 3]
type = PlaySnd
trigger1 = animelem = 1
value = 13, 1
channel = 10
volume = 200

[State 0, Explod]
type = Explod
trigger1 = time = [6,123]
trigger1 = timemod = 3,0
anim = 1905
ID = 196
pos = -0,-104
bindtime = 3
removetime = 3
supermove = 1
scale = .05, .05
ontop = 1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = time = 6
anim = 1905
ID = 195
pos = -22,-60
bindtime = 123
removetime = 123
supermove = 1
scale = .3, .3
ontop = 1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = time = [6,123]
trigger1 = timemod = 5,0
anim = 3505
pos = -22,-60
vel = -3+(random%2),-3+(random%2)
random = 5,5
removetime = 20
supermove = 1
scale = .1, .1
ontop = 1
ownpal = 1

[State 200, 3]
type = PlaySnd
trigger1 = time = 6
value = 3, 16
volume = 100

[State 1025, flames]
type=helper
trigger1 = time = [6,123]
trigger1 = timemod = 12,0
helpertype=normal
stateno=7181
name="black_spots"
pos = -22,-60
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, Explod]
type = Explod
trigger1 = time = 6
anim = 1905
ID = 195
pos = 25,-65
bindtime = 123
removetime = 123
supermove = 1
scale = .27, .27
ontop = 1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = time = [6,123]
trigger1 = timemod = 5,0
anim = 3505
pos = 25,-65
vel = -3+(random%2),-3+(random%2)
random = 5,5
removetime = 20
supermove = 1
scale = .1, .1
sprpriority = -2
ontop = 0
ownpal = 1

[State 1025, flames]
type=helper
trigger1 = time = [6,123]
trigger1 = timemod = 12,0
helpertype=normal
stateno=7181
name="black_spots"
pos = 25,-65
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 195, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Stand Light Punch
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 2
ctrl = 0
anim = 200
poweradd = 10
sprpriority = 1

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,5

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
damage = 25 + (12 * var(19))
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 11, 11
guard.sparkno=S910
sparkno=S930
sparkxy = -10, -63
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -6.5 - (var(19) * 1.5)
air.type = Low
air.velocity = -4.5 - (var(19) * 1.5), -2
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35

[State 200, 3]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

[State 0, CtrlSet]
type = CtrlSet
trigger1 = time = 13
value = 1

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

;---------------------------------------------------------------------------
; Standing medium punch
[Statedef 210]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd = 20
ctrl = 0
anim = 210
sprpriority = 1

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,5

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,16

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1905
ID = 210
pos = 49,-46
bindtime = 3
removetime = 3
supermove = 1
scale = .3, .3
ontop = 1
ownpal = 1
;ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 1905
ID = 210
pos = 54,-64
bindtime = 6
removetime = 6
supermove = 1
scale = .4, .4
ontop = 1
ownpal = 1
;ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1905
ID = 210
pos = 88,-80
bindtime = 3
removetime = 3
supermove = 1
scale = .5, .5
ontop = 1
ownpal = 1
;ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 4
anim = 1905
ID = 210
pos = 54,-87
bindtime = 3
removetime = 3
supermove = 1
scale = .3, .3
ontop = 1
ownpal = 1
;ignorehitpause = 1
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 5
anim = 1905
ID = 210
pos = 42,-74
bindtime = 4
removetime = 4
supermove = 1
scale = .2, .2
ontop = 1
ownpal = 1
;ignorehitpause = 1
persistent = 1

[State 210, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 210, 2]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
attr = S, NA
animtype  = Medium
damage    = 30 + (var(19) * 23)
hitflag = MAF
guardflag = MA
pausetime = 5,5
guard.sparkno=S910
sparkno=S930
sparkxy = -10,-68
hitsound   = S0, 4
guardsound = S0, 9
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
ground.velocity = -4.2 - (var(19) * 1.5)
air.velocity = -2 - (var(19) * 1.5),-2
air.hittime = 16
guard.slidetime = 11
guard.hittime = 17
guard.velocity = -6.5 - (var(19) * 1.5)
givepower = 35
getpower = 50
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 210, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Stand Hard Punch
[Statedef 220]
type = S
movetype = A
physics = S
anim = 220
ctrl = 0
juggle = 8
poweradd = 30
sprpriority = 1



[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 1620
ID = 1620
pos = 0,-5
vel = 0,0
ontop = 1
bindtime = -1
removetime = 25
ownpal = 1
pausemovetime = 1
removeongethit = 1
;persistent = 1

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,6


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

[State 220, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = 3, 10
channel = 0

[State 220, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
hitflag = MAFD
guardflag = MA
;pausetime = 11, 11
damage = 85 + (33 * var(19))
animtype = Hard
priority = 4, Hit
sparkno = s900
sparkxy = -10, -53
hitsound = S0, 5
fall =1
guard.sparkno=S910
guardsound = S0, 9
ground.type = High
ground.slidetime = 15
ground.hittime = 23
ground.velocity = -8, -5
air.velocity = -6, -8
air.hittime = 25
down.velocity = -3, 0
down.hittime = 18
guard.slidetime = 13
guard.hittime = 17
guard.velocity = -7.6 - (var(19) * 1.5)
givepower = 50
getpower = 70
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

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

;---------------------------------------------------------------------------
; Standing light kick
[Statedef 230]
type    = S
movetype= A
physics = S
juggle  = 2
poweradd= 10
ctrl = 0
anim = 230
sprpriority = 2

[State 230, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 0

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,5

[State 230, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAF
animtype  = Light
damage    = 26
guardflag = MA
pausetime = 11,11
priority = 3, Hit
guard.sparkno=S910
sparkno=S930
sparkxy = -10,-77
hitsound   = S0, 6
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 13
ground.velocity = -7.6
air.velocity = -4, -2
air.hittime = 11
guard.slidetime = 13
guard.hittime = 17
guard.velocity = -5
givepower = 20
getpower = 30

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

;--------------------------------------------------------
;---------------------------------------------------------------------------
; Standing medium kick
[Statedef 240]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 20
ctrl = 0
anim = 240
sprpriority = 2

[State 240, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 240, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = Back
damage    = 54
guardflag = MA
hitflag = MAF
pausetime = 11,11
guard.sparkno=S910
sparkno=S930
sparkxy = -10,-87
hitsound   = S0,7
guardsound = S0,9
ground.slidetime = 12
ground.hittime  = 15
ground.velocity = -8
air.velocity = -5, -2
air.hittime = 15
guard.slidetime = 12
guard.hittime = 17
guard.velocity = -6
givepower = 30
getpower = 45

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,5

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

;--------------------------------------------------------
;---------------------------------------------------------------------------
; Stand Hard Kick
[Statedef 250]
type = S
movetype = A
physics = S
ctrl = 0
anim = 250
juggle = 10
poweradd = 30
sprpriority = 1

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


[State 250, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
hitflag = MAFD
guardflag = MA
pausetime = 11, 11
damage = 86
animtype = back
priority = 4, Hit
guard.sparkno=S910
sparkno=S900
sparkxy = -10, -71
hitsound = S0, 8
guardsound = S0, 9
p2stateno = 326
guard.slidetime = 22
guard.hittime = 22
guard.velocity = -9
givepower = 30
getpower = 45


[State 0, Explod]
type = Explod
trigger1 = numexplod(920) = 0
trigger1 = movehit = 1
anim = 920
ID = 920
pos = 0,-50
vel = 0, 4
postype = p2
sprpriority = 3
ontop = 1
ownpal = 1
ignorehitpause = 1

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


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

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

[Statedef 326]
type = A
movetype = H
physics = N
ctrl = 0
facep2 = 1
velset = 0, 0

[State 326, 1]
type = ChangeAnim
trigger1 = Time < 9
value = IfElse(SelfAnimExist(5052),5052,(IfElse(SelfAnimExist(5051),5051,5050)))

[State 326, 2]
type = VelSet
trigger1 = time = 11
x = -.1
y = -12

[State 326, 3]
type = VelAdd
trigger1 = time > 11
y = .39

[State 326, 4]
type = VelSet
trigger1 = !Alive
x = -8
y = -15

[State 0, Explod]
type = Explod
trigger1 = time = 0
triggerall = p2name = "SilverSurfer" ;&& enemy,authorname = "TOPS"
triggerall = numexplod(4002) = 0
trigger1 = prevstateno = 730
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 326, 5]
type = SelfState
trigger1 = !Alive
value = 5050

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

;---------------------------------------------------------------------------
;Crouching light punch
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 2
poweradd= 15
ctrl = 0
anim = 400
sprpriority = 1

[State 400, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 400, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 24 + (var(19) * 14)
priority  = 3
animtype  = Light
hitflag = MAF
guardflag = MA
pausetime = 11,11
sparkno = 0
sparkxy = -10,-63
hitsound   = S0,3
guardsound = S0,9
ground.type = Low
ground.slidetime = 8
ground.hittime  = 10
ground.velocity = -5 - (var(19) * 1.5)
air.velocity = -1.5 - (var(19) * 1.5),-1
guard.slidetime = 7
guard.hittime = 15
guard.velocity = -5.5 - (var(19) * 1.5)
givepower = 15
getpower = 25

[State 400, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;Crouching Medium punch
[Statedef 410]
type    = C
movetype= A
physics = C
juggle  = 3
poweradd= 20
ctrl = 0
anim = 410
sprpriority = 1

[State 410, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 1

[State 410, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
damage    = 56 + (var(19) * 24)
animtype  = Medium
hitflag = MAF
guardflag = MA
priority = 4
pausetime = 11,11
sparkno = 1
sparkxy = -10,-82
hitsound   = S0,4
guardsound = S0,9
ground.type = Low
ground.slidetime = 8
ground.hittime  = 13
ground.velocity = -5.4 - (var(19) * 1.5)
air.velocity = -3 - (var(19) * 1.5),-4
air.hittime = 16
guard.slidetime = 8
guard.hittime = 14
guard.velocity = -5 - (var(19) * 1.5)
givepower = 30
getpower = 45

[State 410, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
; Crouching hard Punch
[Statedef 420]
type = C
movetype = A
physics = C
ctrl = 0
anim = 420
juggle = 5
poweradd = 30
sprpriority = 1

[State 420, 1]
type = PlaySnd
trigger1 = time = 0
value = 0, 2

[State 420, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 5
channel = 0

[State 420, 3]
type = HitDef
trigger1 = AnimElem = 3
attr = C, NA
hitflag = MA
guardflag = MA
pausetime = 1, 11
damage = 90 + (var(19) * 31)
animtype = Hard
priority = 5
guard.sparkno=S910
sparkno=S900
sparkxy = -10, -40
hitsound = S0, 5
guardsound= S0, 9
ground.type = Trip
ground.velocity = -2, -4
air.velocity = -2, -3
guard.slidetime = 7
guard.hittime = 14
guard.velocity = -6 - (var(19) * 1.5)
fall = 1
air.fall = 1
fall.recover = 0
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 200, 6]
type = PlaySnd
trigger1 = animelem = 3
value = 3, 8

[State 0, Explod]
type = Explod
trigger1 =  animelem = 1
anim = 421
ID = 421
pos = 0,0
removetime = -2
bindtime = -1
ownpal = 1
ontop = 1
scale = 1.05,1.05
removeongethit = 1
;ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 =  animelem = 4
anim = 422
ID = 422
vel = -3,0
pos = 1,-2
removetime = -2
ontop = 1
ownpal = 1
;ignorehitpause = 1

[State 420, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

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

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Crouching light kick
[Statedef 440]
type    = C
movetype= A
physics = C
juggle  = 4
poweradd= 20
ctrl = 0
anim = 430
sprpriority = 1

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

[State 430, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = C, NA
damage    = 35
priority = 3
animtype  = Light
hitflag = MAFD
guardflag = L
pausetime = 11,11
sparkno = 0
sparkxy = -10,-13
hitsound   = S0,6
guardsound = S0,9
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-1.5
air.hittime = 12
down.velocity = -5,0
down.hittime = 20
guard.slidetime = 5
guard.hittime = 15
guard.velocity = -4.8
givepower = 15
getpower = 25

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

;---------------------------------------------------------------------------
;Crouch Medium Kick
[Statedef 430]
type    = C
movetype= A
physics = C
juggle  = ifelse((p2movetype=H&&p2statetype=A),15,5)
poweradd= 30
ctrl = 0
anim = 440
sprpriority = 1

[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 255, hit]
type=hitdef
trigger1=animelem = 3
attr = C, NA
damage    = 22
priority = 4
animtype = Medium
hitflag = MAFD
guardflag = L
pausetime = 11,11
sparkno = 0
sparkxy = -10,-13
hitsound   = S0,6
guardsound = S0,9
ground.type = Low
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-1.5
air.hittime = 12
down.velocity = -5,0
down.hittime = 20
guard.slidetime = 5
guard.hittime = 15
guard.velocity = -4.8
givepower = 15
getpower = 25

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

;---------------------------------------------------------------------------
; Crouch Hard Kick
[Statedef 450]
type = C
movetype = A
physics = C
ctrl = 0
anim = 450
juggle = 12
poweradd = 40
sprpriority = 1

[State 440, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 440, 2]
type = velset
trigger1 = AnimElem = 5
x = 9

[State 255, push]
type=playerpush
trigger1=animelemtime(3)>=0&&animelemtime(6)<0&&movehit
value=0
ignorehitpause=1

[State 450, 3]
type = HitDef
trigger1 = animelem = 5
attr = C, NA
hitflag = MAF
guardflag = MA
pausetime = 11, 11
damage = 66
animtype = Up
priority = 4
sparkno = 1
sparkxy = -5,-21
hitsound   = S0,7
guardsound = S0,9
ground.type=low
ground.slidetime=16
ground.hittime=16
ground.velocity=-2.33,-6.85
air.type=Low
air.velocity=-1.33,-6.85
air.cornerpush.veloff=0
down.velocity=-2,-4
getpower=180*!var(20)
yaccel=.5
fall=1

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

;-------------------------------------------------------------------
; Custom State - Launched
[Statedef 455]
type = A
movetype = H
physics = N
ctrl = 0
facep2 = 1
velset = 0, 0

[State 455, 1]
type = ChangeAnim
trigger1 = Time < 9
value = IfElse(SelfAnimExist(5052),5052,(IfElse(SelfAnimExist(5051),5051,5050)))

[State 455, 2]
type = VelSet
trigger1 = time = 11
x = -1.6
y = -10

[State 455, 3]
type = VelAdd
trigger1 = time > 11
y = .39

[State 455, 4]
type = VelSet
trigger1 = !Alive
x = -8
y = -15

[State 455, 5]
type = SelfState
trigger1 = !Alive
value = 5050

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

;----------------------------------
; Launcher followup jump
[Statedef 460]
type    = S
physics = S
anim = 40
ctrl = 0
sprpriority = 1

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

[State 460, 1a]
type = VarSet
trigger1 = time = 0
v = 26
value = 1

[State 460, 2]
type = VarSet
trigger1 = command = "holdfwd"
trigger2 = Var(17) = 1
sysvar(1) = 1

[State 460, 3]
type = VarSet
trigger1 = !var(17)
trigger1 = command = "holdback"
sysvar(1) = -1

[State 460, 4]
type = VelSet
trigger1 = AnimTime = 0
x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y) -2.4

[State 460, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;Jump energy shot
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 600
sprpriority = 2


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

[State 0, Explod]
type = Explod
trigger1 = animelem = 1
anim = 1905
;ID = 1905
pos = -43,-90
removetime = 8
bindtime = 8
scale = .3, .3
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 2
anim = 1905
;ID = 1905
pos = 19,-100
removetime = 4
bindtime = 4
scale = .4, .4
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 0, Explod]
type = Explod
trigger1 = animelem = 3
anim = 1905
;ID = 1905
pos = 65,-45
removetime = 8
bindtime = 8
scale = .5, .5
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1

[State 1025, flames]
type=helper
trigger1 = animelem = 3
helpertype=normal
stateno=7181
name="black_spots"
pos = 65,-45
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, Helper]
type = Helper
trigger1 = animelem = 4
helpertype = normal
name = "fireball"
ID = 8796
pos = 81,-45
postype = p1
stateno = 601
ownpal = 1
size.xscale = .75
size.yscale = .75


[State 460, 6]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;Normal Fireball----------------------------------------------
[Statedef 601]
type=A
physics=N
movetype=A
anim=6000
ctrl=0
velset=0,0
sprpriority=4

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3505
ID = 3505
pos = 0,0
vel = -10+(random%10),-10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 10

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0
value = -23

[State 0]
type = trans
trigger1 = 1
trans = add

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 602;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = !time
x = 5
y = 1
;ignorehitpause = 0
;persistent = 1

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

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S, SP
hitflag = MAF
guardflag =  MA
;affectteam = E
animtype = Hard
;air.animtype = Light
;fall.animtype = Back
;priority = 4,Hit
damage = 50,5
;hitsound
guardsound = S0, 9
;ground.velocity = -3, -8
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
;trigger1 = Pos Y = 0
value = 602

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 602

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

;Normal Fireball (Board)------------------------------------
[Statedef 6011]
type=A
physics=N
movetype=A
anim=6000
ctrl=0
velset=0,0
sprpriority=4



[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3505
ID = 3505
pos = 0,0
vel = -10+(random%10),-10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 10

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0
value = -23

[State 0]
type = trans
trigger1 = 1
trans = add

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 602;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, VelAdd]
type = VelAdd
trigger1 = !time
x = 5
y = 1
;ignorehitpause = 0
;persistent = 1

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

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S, SP
hitflag = MAF
guardflag =  MA
;affectteam = E
animtype = Hard
;air.animtype = Light
;fall.animtype = Back
;priority = 4,Hit
damage = 60,6
;hitsound
guardsound = S0, 9
;ground.velocity = -3, -8
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
;trigger1 = Pos Y = 0
value = 602

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 602

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


[Statedef 602]
type=A
physics=N
movetype=I
anim=6001
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3507
ID = 3507
pos = 0,0
vel = -5+(random%10),-5+(random%10)
ontop = 1
scale = .5,.5
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3507
ID = 3507
pos = 0,0
vel = 5+(random%10),5+(random%10)
ontop = 1
scale = .5,.5
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3505
ID = 3505
pos = 0,0
vel = -10+(random%10),-10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 3505
ID = 3505
pos = 0,0
vel = 10+(random%10),10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 28

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0
value = -10

[State 0]
type = trans
trigger1 = 1
trans = add

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,7

[State 1006, end]
type=destroyself
trigger1 = animtime = 0

;---------------------------------------------------------------------------
;Jump light Punch
[Statedef 610]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 30
ctrl = 0
anim = 610
sprpriority = 2

[State 610, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(26), 1, 0)

[State 610, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 610, 3]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 45 + (var(19) * 22)
animtype = Medium
hitflag = MAF
guardflag = HA
priority = 4
pausetime = 11,11
guard.sparkno=S910
sparkno=S930
sparkxy = -10,-29
hitsound   = S0,4
guardsound = S0,9
ground.type = High
ground.slidetime = 9
ground.hittime  = 12
ground.velocity = -6 - (var(19) * 1.5)
air.velocity = -2 - (var(19) * .4),-3
air.hittime = 20
guard.slidetime = 9
guard.hittime = 16
guard.velocity = -6 - (var(19) * 1.5)
givepower = 30
getpower = 45

[State 610, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

[State 610, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(0) = 0, 50, 670)
ctrl = ifelse(var(0) = 0, 0, 1)

;---------------------------------------------------------------------------
; Jump Hard Punch
[Statedef 620]
type = A
movetype = A
physics = A
ctrl = 0
anim = 620
juggle = 5
poweradd = 40
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 2
anim = 621
ID = 621
pos = 0,0
vel = 0,0
ontop = 1
bindtime = 10
removetime = -2
ownpal = 1
ontop = 1
pausemovetime = 1
;removeongethit = 0
;persistent = 1


[State 620, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(26), 1, 0)

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,20]
trigger1 = time = 0
value = 4,5

[State 180, 2]
type = playsnd
trigger1 = time = 10
value = 3,8

[State 620, 4]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAFD
guardflag = HA
pausetime = 11, 11
animtype = Hard
damage = 65 + (var(19) * 30)
priority = 4, Hit
guard.sparkno=S910
sparkno=S930
sparkxy = -10, -34
hitsound = S0, 5
guardsound = S0, 9
ground.type = high
ground.slidetime = 10
ground.hittime = 16
ground.velocity = -7 - (var(19) * 1.5)
air.velocity = -4 - (var(19) * 1.5), 9
air.fall = 1
fall.recover = 0
down.velocity = -5
down.hittime = 15
guard.slidetime = 7
guard.hittime = 15
guard.velocity = -6.5 - (var(19) * 1.5)
givepower = 35
getpower = 55

[State 620, Icefist]
type = VarAdd
triggerall = var(19)
trigger1 = MoveContact
v = 20
value = 1
persistent = 0
ignorehitpause = 1

[State 620, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(0) = 0, 50, 670)
ctrl = ifelse(var(0) = 0, 0, 1)

;---------------------------------------------------------------------------
; Jump Down + Hard Punch
[Statedef 625]
type = A
movetype = A
physics = A
ctrl = 0
anim = 625
poweradd = 10
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 1
anim = 626
ID = 626
pos = 0,0
vel = 0,0
ontop = 1
scale = 1,1
bindtime = -1
removetime = -2

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 3
anim = 1610
ID = 1610
pos = 33,-10
vel = 0,0
ontop = 1
scale = .5,.5
bindtime = -1
removetime = 10

[State 625, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 0, 2

[State 625, 2]
type = PlaySnd
trigger1 = AnimElem = 2
value = 3, 13

[State 625, 2]
type = PlaySnd
trigger1 = AnimElem = 3
value = 3, 14

[State 620, 4]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAFD
guardflag = HA
pausetime = 11, 11
animtype = Hard
damage = 88 + (var(19) * 30)
fall = 1
priority = 4, Hit
guard.sparkno=S910
sparkno=S900
sparkxy = -10, -51
hitsound = S0, 8
guardsound = S0, 9
guardsound = S0, 9
ground.type = high
ground.slidetime = 10
ground.hittime = 16
ground.velocity = -1,5
air.velocity = -2,10
air.fall = 1
fall.recover = 0
down.velocity = -5
down.hittime = 15
guard.slidetime = 7
guard.hittime = 15
guard.velocity = -6.5 - (var(19) * 1.5)
givepower = 35
getpower = 55
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0


;---------------------------------------------------------------------------
;Jump Light Kick
[Statedef 630]
type    = A
movetype= A
physics = A
juggle  = 2
poweradd= 20
ctrl = 0
anim = 630
sprpriority = 2

[State 630, a]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(26), 1, 0)

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

[State 630, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage = 25
hitflag = MAF
guardflag = HA
animtype = light
priority = 3
pausetime = 11,11
guard.sparkno=S910
sparkno=S930
sparkxy = -10, -41
hitsound = S0, 8
guardsound = S0, 9
ground.type = High
ground.slidetime = 6
ground.hittime  = 10
ground.velocity = -5
air.velocity = -2,-2
air.hittime = 15
guard.slidetime = 7
guard.hittime = 15
guard.velocity = -5
givepower = 15
getpower = 25

[State 630, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(0) = 0, 50, 670)
ctrl = ifelse(var(0) = 0, 0, 1)

;---------------------------------------------------------------------------
;Jump Medium Kick
[Statedef 640]
type    = A
movetype= A
physics = A
juggle  = 4
poweradd= 30
ctrl = 0
anim = 640
sprpriority = 1

[State 640, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(26), 1, 0)

[State 640, 2]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 640, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
damage    = 53
hitflag = MAFD
guardflag = HA
priority = 4
pausetime = 11,11
guard.sparkno=S910
sparkno=S930
sparkxy = -10, -51
hitsound = S0, 8
guardsound = S0, 9
animtype = Med
ground.type = High
ground.slidetime = 9
ground.hittime  = 15
ground.velocity = -5.5
air.velocity = -2,-3
air.hittime = 15
down.velocity = -5
down.hittime = 17
guard.slidetime = 8
guard.hittime = 15
guard.velocity = -6
givepower = 35
getpower = 45

[State 640, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(0) = 0, 50, 670)
ctrl = ifelse(var(0) = 0, 0, 1)

;---------------------------------------------------------------------------
; Jump Hard Kick
[Statedef 650]
type = A
movetype = A
physics = A
ctrl = 0
anim = 650
juggle = 5
poweradd = 40
sprpriority = 1

[State 650, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(PrevStateNo = 670 || var(26), 1, 0)

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

[State 650, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = A, NA
hitflag = MAF
guardflag = HA
pausetime = 11, 11
priority = 4, Hit
damage = 81
animtype = hard
guard.sparkno=S910
sparkno=S900
sparkxy = -10, -71
hitsound = S0, 8
guardsound = S0, 9
ground.type = high
ground.slidetime = 9
ground.hittime = 19
fall = 1
air.fall = 1
fall.recover = 1
fall.recovertime = 70
ground.velocity = -1, -12
air.velocity = -1, -10
air.hittime = 15
guard.slidetime = 9
guard.hittime = 15
guard.velocity = -6
air.fall = 1
fall.recover = 0
givepower = 55
getpower = 65

[State 650, 4]
type = ChangeState
trigger1 = AnimTime = 0
value = ifelse(var(0) = 0, 50, 670)
ctrl = ifelse(var(0) = 0, 0, 1)

;---------------------------------------------------------------------------
; Jumping Down + Hard Kick
[Statedef 655]
type = A
movetype = A
physics = A
ctrl = 0
anim = 660
juggle = 5
poweradd = 54
sprpriority = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = Veladd
trigger1 = time > 9
x = 0
y = 10
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = time > 9
trigger1 = Vel Y = 40
x = 0
y = 40
;ignorehitpause = 0
;persistent = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = time>9
time = 5
length = 10
;palcolor = 256
;palinvertall = 0
;palbright = 30,30,30
;palcontrast = 120,120,220
;palpostbright = 0,0,0
;paladd = 10,10,25
;palmul = .65,.65,.75
;timegap = 1
framegap = 1
;trans =
;ignorehitpause = 0
;persistent = 1


[State 0, Explod]
type = Explod
trigger1 = time = 9
anim = 882
ID = 882
pos = 0,0
ontop = 1
ownpal = 1
scale = .5,.5
vel = 0,-3
removetime = 10

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 9
time = 5
;freq = 60
;ampl = -4
;phase =
;ignorehitpause = 0
;persistent = 1


[State 655, 1]
type = PlaySnd
trigger1 = time = 9
value = 3, 9

[State 52, Landing Wave]
type = Explod
trigger1 =  animelem = 3
trigger1 = timemod = 8,0
anim = 7093
postype = p1
pos = 5, -15
bindtime = -1
removetime = -2
ownpal = 1
ontop = 1
sprpriority = 2
removeongethit = 1

[State 655, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = A, NA
hitflag = MAF
guardflag = HA
pausetime = 11, 11
priority = 5
damage = 91,12
animtype = hard
sparkno = S900
sparkxy = -10, 0
hitsound = S0, 8
guardsound = S0, 9
ground.type = High
ground.slidetime = 10
ground.hittime = 20
ground.velocity = -10, -10
air.velocity = 0, 10
air.hittime = 20
guard.slidetime = 10
guard.hittime = 15
guard.velocity = -7
fall = 1
air.fall = 1
fall.recover = 0
getpower = 60
givepower = 50

[State 655, 3]
type = ChangeState
trigger1 = Pos Y > 0
value = 656
ctrl = 0

[Statedef 656]
type    = C
movetype= I
physics = C
juggle  = 3
poweradd= 0
ctrl = 0
anim = 661
sprpriority = 1

[State 52, Landing Wave]
type = Explod
trigger1 =  time = 0
ID = 589
anim = 7010
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = -2

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

;---------------------------------------------------------------------------
; Super Jump - Start
[Statedef 660]
type = S
movetype = I
physics = S
anim = 40
velset = 0, 0
sprpriority = 1
ctrl = 0

[State 660, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = ifelse(command = "holdfwd", 1, ifelse(command = "holdback", -1, 0))

[State 660, 2]
type = Explod
trigger1 = AnimTime = 0
ID = 474
anim = 7050
postype = p1
pos = 0, 15
bindtime = 1
removetime = -2
ownpal = 1
sprpriority = 2

[State 660, 3]
type = PlaySnd
trigger1 = AnimTime = 0
value = 1, 4

[State 660, 4]
type = VelSet
trigger1 = AnimTime = 0
x = 2.25 * var(0)
y = -12.5

[State 660, 5]
type = Helper
trigger1 = AnimTime = 0
name = "Superjump FX Spawner"
ID = 840
stateno = 680
postype = p1
pos = 0, 0
ownpal = 1

[State 660, 6]
type = ChangeState 
trigger1 = AnimTime = 0
value = 670
ctrl = 1

;---------------------------------------------------------------------------
; Super Jump - Neutral
[Statedef 670]
type = A
movetype = I
physics = A

[State 670, 1]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo = 660
value = 41

[State 670, 2]
type = ChangeAnim
trigger1 = time = 0
trigger1 = PrevStateNo != 660
trigger2 = Anim = 41 && AnimTime = 0
value = 44

[State 670, 3]
type = VelAdd
trigger1 = command = "holdfwd"
x = .1

[State 670, 4]
type = VelAdd
trigger1 = command = "holdback"
x = -.1

;---------------------------------------------------------------------------
; Superjump FX Spawner
[Statedef 680]
type = A
movetype = I
physics = N
anim = 9741

[State 680, 1]
type = BindToParent
trigger1 = time = 0
pos = 0, 0
time = 9999

[State 680, 2]
type = Explod
trigger1 = time = 0
ID = 940
anim = 940
postype = p1
pos = 0, 20
random = 0, 0
bindtime = 1
removetime = -2
vel = 0, 0
ontop = 1
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 1
anim = 940
scale = 1+(.2*time), 1+(-.2*time)



[State 680, 4]
type = DestroySelf
trigger1 = Parent, Vel Y >= -1
trigger2 = time = 1000

;---------------------------------------------------------------------------
; Recovery Roll
[Statedef 690]
type = L
movetype = I
physics = N
ctrl = 0
anim = 670
sprpriority = 1
facep2 = 1
velset = 0, 0

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

[State 690, VelSet]
type = VelSet
trigger1 = AnimElem = 1
x = 8

[State 690, NotHitBy]
type = NotHitBy
trigger1 = 1
time = 1
value = SCA, AA, AP

[State 690, NotHitBy]
type = NotHitBy
trigger1 = 1
time = 11
value = SCA, AT

[State 690, ChangeAnim]
type = VelSet
trigger1 = AnimTime = 0
x = 0

[State 690, State]
type = ChangeState
trigger1 = AnimTime = 0
value = 5120

;---------------------------------------------------------------------------
; Z Throw - Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT      
hitflag = M-         
priority = 1, Miss    
sparkno = -1     
hitsound = S2, 2   
sprpriority = 1       
p1facing = ifelse (command = "holdfwd", 1, -1) 
p2facing = 1         
p1stateno = 810
p2stateno = 820      
guard.dist = 0        
fall = 1             

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

;---------------------------------------------------------------------------
; Z Throw - Throwing Opponent
[Statedef 810]
type = S
movetype = I
physics = N
ctrl = 0
anim = 810
velset = 0, 0
sprpriority = 1
poweradd = 80

[State 810, 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 44, 0
time = 10

[State 810, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 45, 0
time = 4

[State 810, 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 61, 0
time = 2

[State 810, 4]
type = TargetBind
trigger1 = AnimElem = 4
pos = 98, 0
time = 6

[State 810, 4a]
type = TargetFacing
trigger1 = AnimElem = 4
value = 1

[State 810, 5]
type = TargetBind
trigger1 = AnimElem = 5
pos = 66, -20
time = 2

[State 810, 6]
type = TargetBind
trigger1 = AnimElem = 6
pos = 69, -20
time = 10

[State 810, 7]
type = TargetBind
trigger1 = AnimElem = 7
pos = 4, -20
time = 2

[State 810, 8]
type = TargetBind
trigger1 = AnimElem = 8
pos = -20, -20
time = 2

[State 810, 9]
type = TargetBind
trigger1 = AnimElem = 9
pos = 0, -390
time = 20


[State 810, 10]
type = PlaySnd
trigger1 = AnimElem = 9
value = 2, 5

[State 810, 11]
type = TargetLifeAdd
trigger1 = AnimElem = 9
value = -98

[State 810, 12]
type = EnvShake
trigger1 = AnimElem = 9
time = 30
freq = 120
ampl = -4


[State 810, 13]
type = TargetState
trigger1 = AnimElem = 9 = 21
value = 825

[State 810, 14]
type = TargetDrop
trigger1 = AnimElem = 9 = 21


[State 0, Helper]
type = Helper
trigger1 = animelem = 2
helpertype = normal
name = "return portal"
postype = p1
pos = -50,0
facing = -1
stateno = 7193



[State 810, 15]
type = Turn
trigger1 = AnimTime = 0

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


;---------------------------------------------------------------------
; Z Throw - Attempt
[Statedef 900]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
hitsound = S2, 2
sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p2facing = 1
p1stateno = 910
p2stateno = 920
guard.dist = 0

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

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

[Statedef 910]
type = S
movetype = I
physics = N
ctrl = 0
anim = 196
velset = 0, 0
sprpriority = 1
poweradd = 80

[State 0, Helper]
type = Helper
trigger1 = animelem = 3
helpertype = normal
name = "eyebeam"
ID = 911
pos = 0,-100
postype = p1
stateno = 911
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 910, 1]
type = TargetBind
trigger1 = AnimElem = 3
pos = 110, -25
time = 10

[State 810, 10]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 20

[State 810, 10]
type = PlaySnd
trigger1 = AnimElem = 1
value = 3, 21

[State 810, 10]
type = PlaySnd
trigger1 = time = 93
value = 3, 20

[State 0, Explod]
type = Explod
trigger1 =  time = 10
anim = 935
pos = -10,-50
postype = p2
bindtime = 93
scale = .9, .9
sprpriority = 1
ontop = 1
ownpal = 1

[State 810, 10]
type = PlaySnd
trigger1 = timemod = 20,0
trigger1 = time < 93
value = 3, 3

[State 0, Explod]
type = Explod
trigger1 = timemod = 20,0
trigger1 = time < 93
anim = 930
ID = 930
pos = 0,-75
postype = p2
random = 20,20
ontop = 1

[State 910, 13]
type = TargetState
trigger1 = AnimElem = 13
value = 925

[State 910, 15]
type = Turn
trigger1 = AnimTime = 0

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

[Statedef 911]
physics=N
velset=0,0
anim=197
sprpriority=6000

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = 1,1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = timemod = 2,0
value = 1
;ignorehitpause = 0
;persistent = 1

[State 0]
type = trans
trigger1 = 1
trans = add

[State 0, BindToParent]
type = BindToroot
trigger1 = root, animelem = 3
time = 35
pos = 0,-105

[State 0, BindToParent]
type = BindToroot
trigger1 = root, animelem = 6
time = 30
pos = 0,-107

[State 0, BindToParent]
type = BindToroot
trigger1 = root, animelem = 9
time = 30
pos = -1,-109

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, animelem = 12
;ignorehitpause = 0
;persistent = 1


; f0rcefield Throw
[Statedef 920]
type = A
movetype = H
physics = N
ctrl = 0
poweradd = 60
sprpriority = 0

[State 0, VelSet]
type = VelSet
trigger1 = time < 10
x = -5
y = 0
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = time >= 10
x = 0
y = -1
;ignorehitpause = 0
;persistent = 1

[State 0, LifeAdd]
type = LifeAdd
trigger1 = timemod = 20,0
value = -3
kill = 1
absolute = 1
;ignorehitpause = 0
;persistent = 1

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

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

[State 820, 3]
type = SelfState
trigger1 = time > 900
value = 5050

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

[Statedef 925]
type = A
movetype = A
physics = N
ctrl = 0

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

[State 825, 1a]
type = ChangeAnim2
trigger1 = time = 0
value = 825

[State 825, 2]
type = VelSet
trigger1 = time = 0
x =  -15
y = -10

[State 825, 3]
type = VelAdd
trigger1 = 1
y = .39

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

[State 3040, 11]
type = Changestate
trigger1 = BackEdgeBodyDist <= 0
value = 930
ctrl = 0

[Statedef 930]
type    = A
movetype= H
physics = N
ctrl = 0

[State 3041, a0 ]
type = AfterImageTime
trigger1 = !time
time = 1

[State 3011,l ]
type = LifeAdd
trigger1 = !time
value = -120
kill = 1
persistent = 0

[State 3041, a2]
type = ChangeAnim2
trigger1 = time = 0
value = 826

[State 3041, av]
type = VelAdd
trigger1 = Time > 5
y = .3

[State 3041, a4]
type = NotHitBy
trigger1 = 1
value = SCA
ignorehitpause = 1

[State 3041, en]
type = EnvShake
trigger1 = time = 0
time = 35
ampl = -6

[State 3041, s];trigger helper sound
type = StateTypeSet
trigger1 = time = 5
movetype = I

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

;---------------------------------------------------------------------------
; Z Throw - Being Thrown
[Statedef 820]
type = A
movetype = H
physics = N
ctrl = 0
poweradd = 60
sprpriority = 0

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

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




[State 820, 3]
type = SelfState
trigger1 = time > 900
value = 5050


;P2 Flying Through Air
[Statedef 825]
type = A
movetype = H
physics = N
ctrl = 0




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

[State 825, 1a]
type = ChangeAnim2
trigger1 = time = 0
value = 825

[State 825, 1b]
type = PosAdd
trigger1 = time = 0
y = const(size.height)

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

[State 825, 3]
type = VelAdd
trigger1 = 1
y = .39

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

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


;----------------------------
; Bounce Up
[Statedef 856]
type = A
movetype = H
physics = N
ctrl = 0
velset = -1.4, -4.4

[State 856, a]
type = PosSet
trigger1 = time = 0
y = 0

[State 856, 1]
type = VelAdd
trigger1 = 1
y = .39

[State 856, 2]
type = VelAdd
trigger1 = 1
y = .39

[State 856, 3]
type = PalFx
trigger1 = (time % 60) = 0
time = 60
add = -100, -100, 7
sinadd = 30, 30, 0, 44
color = 0
invertall = 1

[State 856, 4]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 857

;------------------------------------
; Being Thrown - Rest
[Statedef 857]
type = S
movetype = H
physics = N
ctrl = 0
velset = 0, 0

[State 857, 1]
type = PosSet
trigger1 = time = 0
y = 0

[State 857, 2]
type = ChangeAnim
trigger1 = 1
value = 5002

[State 857, 3]
type = PalFx
trigger1 = (time % 60) = 0
time = 60
add = -100, -100, 7
sinadd = 30, 30, 0, 44
color = 0
invertall = 1

[State 857, 4]
type = SelfState
trigger1 = time >= 117
value = 0
ctrl = 1



;===========================================================================
; SPECIAL MOVES

;---------------------------------------------------------------------------
; Shockwave==========================
[Statedef 1000]
type = S
movetype = A
physics = S
ctrl = 0
anim = 890
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 4
anim = 881
ID = 881
pos = 40,-60
ontop = 1
scale = .5,.5
vel = -2,0
removetime = 10

[State 1000, 2]
type = Helper
trigger1 = AnimElem = 4
ID = 1001
name = "force"
StateNo = 1001
postype = p1
pos = 40,-60
ownpal = 1

[State 1000, 3]
type = Explod
trigger1 = animelem = 4
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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

[Statedef 1001]
type=A
physics=N
movetype=A
anim=1001
ctrl=0
velset=6,0
sprpriority=4

[State 0, EnvShake]
type = EnvShake
trigger1 = time = 0
time = 5
freq = 60

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,24

[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, NA
damage = 70 ,5
animtype = medium
guardflag = MA
hitflag = MA
pausetime = 11, 11
guard.sparkno=S910
sparkno=S930
sparkxy = -10, 0
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -12,0
air.type = Low
air.velocity = -5,0
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
givepower = 20
getpower = 35


[State 1006, end]
type=destroyself
trigger1=movecontact
trigger2 = time = 20

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

;------------------------------
; State for cosmic Beam
[Statedef 1005]
type = A
movetype = A
physics = N
sprpriority = 2
juggle = 15
hitdefpersist = 1

[State 1005, Increment Counter]
type = VarAdd
trigger1 = 1
v = 2
value = 1

[State 1005, Get Parent AA Flag]
type = VarSet
trigger1 = time = 0
v = 6
value = parent, var(24)

[State 1005, Change Anim]
type = ChangeAnim
trigger1 = var(2) = 1
value = parent, var(18)

[State 1005, Get Bind Pos X]
type = VarSet
trigger1 = var(2) = 1
v = 3
value = parent, var(0)

[State 1005, Get Bind Pos Y]
type = VarSet
trigger1 = var(2) = 1
v = 4
value = parent, var(1)

[State 1005, a]
type = VarSet
trigger1 = time = 0
fv = 0
value = parent, fvar(1)

[State 1005, b]
type = AttackMulSet
trigger1 = 1
value = fvar(0)

[State 1005, g]
type = AssertSpecial
trigger1 = 1
flag = NoShadow

[State 1005, 1]
type = PlaySnd
trigger1 = time = 0
value = 2, 0

[State 1005, 1]
type = PlaySnd
trigger1 = time = 0
value = 2, 5

[State 1005, 2]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1005, 3]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1005
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1005, 4]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1005, 5]
type = BindToParent
trigger1 = 1
pos = var(3), var(4)

[State 1005, 5a]
type = VarSet
trigger1 = time = 0
v = 5
value = EnemyNear, const(size.mid.pos.y)

[State 1005, 6]
type = HitDef
triggerall = Anim = 1080
triggerall = !var(6)
trigger1 = var(2) = 1 ;time = 0
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 6
animtype = Back
damage = 16, 2
sparkno = S7090
sparkxy = -10, Floor((p2dist Y) + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 40
getpower = 60

[State 1005, 6a]
type = HitDef
triggerall = Anim = 1080
triggerall = !var(6)
trigger1 = var(13) > 0 ;time = 0
trigger1 = (var(13) % 2) = 0
trigger1 = var(13) <= 10
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 2
animtype = Back
damage = 16, 1
sparkno = S7090
sparkxy = -10, Floor((p2dist Y) + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 20
getpower = 10

[State 1005, 6b]
type = HitDef
triggerall = Anim = 1090
triggerall = !var(6)
trigger1 = var(2) = 1 ;time = 0
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 6
animtype = Back
damage = 16, 2
sparkno = S7092
sparkxy = 0, -(floor(p2Dist X)) ;floor(p2Dist Y + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 40
getpower = 60

[State 1005, 6c]
type = HitDef
triggerall = Anim = 1090
triggerall = !var(6)
trigger1 = var(13) > 0 ;time = 0
trigger1 = (var(13) % 2) = 0
trigger1 = var(13) <= 10
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 2
animtype = Back
damage = 16, 1
sparkno = S7092
sparkxy = 0, -(floor(p2Dist X)) ;floor(p2Dist Y + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 20
getpower = 10

[State 1005, 6d]
type = HitDef
triggerall = (Anim = 1060) || (Anim = 1070)
triggerall = !var(6)
trigger1 = var(2) = 1 ;time = 0
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 6
animtype = Back
damage = 16, 2
sparkno = S7091
sparkxy = 0, floor(p2dist X) ;floor(p2dist Y + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 40
getpower = 60

[State 1005, 6e]
type = HitDef
triggerall = (Anim = 1060) || (Anim = 1070)
triggerall = !var(6)
trigger1 = var(13) > 0 ;time = 0
trigger1 = (var(13) % 2) = 0
trigger1 = var(13) <= 10
attr = A, SP
hitflag = MAFD
guardflag = MA
pausetime = 1, 2
animtype = Back
damage = 16, 1
sparkno = S7091
sparkxy = 0, floor(p2dist X) ;floor(p2dist Y + var(5))
hitsound = S2, 4
guardsound = S0, 9
ground.velocity = -3, -8
ground.hittime = 30
air.velocity = -3, -8
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
;numhits = 6
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1
givepower = 20
getpower = 10

[State 1005, 7]
type = ParentVarAdd
trigger1 = MoveHit
v = 11
value = 6
persistent = 0

[State 1005, 7a]
type = EnvColor
trigger1 = MoveHit
time = 3
persistent = 0

[State 1005, 8]
type = VarAdd
trigger1 = MoveHit
v = 10
value = 1

; Check targets
; var(11) = Number of targets
; var(12) = index
; var(13) = Set to 1 if a player is hit
[State 1005, 9]
type = VarSet
trigger1 = 1
v = 11
value = NumTarget
ignorehitpause = 1

[State 1005, 10]
type = VarSet
triggerall = NumTarget > 0
trigger1 = PlayerIdExist(Target(var(12)), ID)
v = 13
value = 1
ignorehitpause = 1
persistent = 0

[State 1005, 11]
type = VarAdd
trigger1 = 1
v = 12
value = 1
ignorehitpause = 1

[State 1005, 12]
type = VarSet
trigger1 = var(12) > NumTarget
v = 12
value = 0
ignorehitpause = 1

[State 1005, 12a]
type = VarAdd
trigger1 = var(13) > 0
v = 13
value = 1
ignorehitpause = 1

[State 1005, 13a]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 9741

[State 1005, 14]
type = DestroySelf
trigger1 = (Anim = 9741) && (NumExplod = 0)
trigger2 = Parent, MoveType = H
trigger3 = Parent, StateNo != [1000,1050]

;---------------------------------------------------------------------------
; Stand Forward cosmic Beam
[Statedef 1010]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1010
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1910
ID = 1910
pos = 50,-60
ontop = 1
bindtime = 20
removetime = 20

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 14, 1
volume = 1000


[State 1010, 1a]
type = VarSet
trigger1 = time = 0
v = 0
value = 28

[State 1010, 1b]
type = VarSet
trigger1 = time = 0
v = 1
value = -64

[State 1010, 1c]
type = VarSet
trigger1 = time = 0
v = 18
value = 1080

[State 1010, 2]
type = Helper
trigger1 = AnimElem = 5 = 2
ID = 8796
name = "Ice Beam"
StateNo = 1005
postype = p1
pos = var(0), var(1)
ownpal = 1

[State 1010, 3]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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

;---------------------------------------------------------------------------
; Stand Upward cosmic Beam
[Statedef 1020]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1020
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1910
ID = 1910
pos = 25,-90
ontop = 1
bindtime = 20
removetime = 20

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 14, 1
volume = 1000

[State 1020, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1020, 1a]
type = VarSet
trigger1 = time = 0
v = 0
value = 9

[State 1020, 1b]
type = VarSet
trigger1 = time = 0
v = 1
value = -81

[State 1020, 1c]
type = VarSet
trigger1 = time = 0
v = 18
value = 1090

[State 1020, 2]
type = Helper
trigger1 = AnimElem = 5 = 2
ID = 8796
name = "Ice Beam"
StateNo = 1005
postype = p1
pos = var(0), var(1)
ownpal = 1

[State 1020, 3]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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

;---------------------------------------------------------------------------
; Air Down cosmic Beam
[Statedef 1030]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1030
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 1910
ID = 1910
pos = 40,-50
ontop = 1
bindtime = 20
removetime = 20

[State 1030, 1]
type = VelSet
triggerall = Vel X != 0
trigger1 = time = 0
x = ifelse(Vel X > 0, .5, -.5)

[State 1030, 2]
type = VelMul
trigger1 = time = 0
y = .2

[State 1030, 3]
type = VelAdd
trigger1 = Vel Y <= .7
trigger1 = Pos Y < 0
y = .03

[State 1030, 4]
type = VelSet
trigger1 = Pos Y >= 0
y = 0

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 14, 1
volume = 1000

[State 1030, 5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1030, 6]
type = VarSet
trigger1 = time = 0
v = 0
value = 25

[State 1030, 7]
type = VarSet
trigger1 = time = 0
v = 1
value = -59

[State 1030, 8]
type = VarSet
trigger1 = time = 0
v = 18
value = 1070

[State 1030, 9]
type = Helper
trigger1 = AnimElem = 6 = 2
ID = 8796
name = "Ice Beam"
StateNo = 1005
postype = p1
pos = var(0), var(1)
ownpal = 1
  
[State 1030, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Air Forward cosmic Beam
[Statedef 1040]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1040
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 1910
ID = 1910
pos = 60,-80
ontop = 1
bindtime = 20
removetime = 20

[State 1040, 1]
type = VelSet
triggerall = Vel X != 0
trigger1 = time = 0
x = ifelse(Vel X > 0, .5, -.5)

[State 1040, 2]
type = VelMul
trigger1 = time = 0
y = .2

[State 1040, 3]
type = VelAdd
trigger1 = Vel Y <= .7
trigger1 = Pos Y < 0
y = .03

[State 1040, 4]
type = VelSet
trigger1 = Pos Y >= 0
y = 0

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 14, 1
volume = 1000

[State 1040, 5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1040, 6]
type = VarSet
trigger1 = time = 0
v = 0
value = 40

[State 1040, 7]
type = VarSet
trigger1 = time = 0
v = 1
value = -81

[State 1040, 8]
type = VarSet
trigger1 = time = 0
v = 18
value = 1080

[State 1040, 9]
type = Helper
trigger1 = AnimElem = 6 = 2
ID = 8796
name = "Ice Beam"
StateNo = 1005
postype = p1
pos = var(0), var(1)
ownpal = 1

[State 1040, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
; Air Upward cosmic Beam
[Statedef 1050]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1050
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 6
anim = 1910
ID = 1910
pos = 40,-110
ontop = 1
bindtime = 20
removetime = 20

[State 1050, 1]
type = VelSet
triggerall = Vel X != 0
trigger1 = time = 0
x = ifelse(Vel X > 0, .5, -.5)

[State 1050, 2]
type = VelMul
trigger1 = time = 0
y = .2

[State 1050, 3]
type = VelAdd
trigger1 = Vel Y <= .7
trigger1 = Pos Y < 0
y = .03

[State 1050, 4]
type = VelSet
trigger1 = Pos Y >= 0
y = 0

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 1
value = 14, 1
volume = 1000

[State 1050, 5]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1050, 6]
type = VarSet
trigger1 = time = 0
v = 0
value = 21

[State 1050, 7]
type = VarSet
trigger1 = time = 0
v = 1
value = -96

[State 1050, 8]
type = VarSet
trigger1 = time = 0
v = 18
value = 1090

[State 1050, 9]
type = Helper
trigger1 = AnimElem = 6 = 2
ID = 8796
name = "Ice Beam"
StateNo = 1005
postype = p1
pos = var(0), var(1)
ownpal = 1
  
[State 1050, 10]
type = ChangeState
trigger1 = AnimTime = 0
value = 50
ctrl = 1

;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Boulder Drop
[Statedef 1080]
type = A
movetype = A
physics = N
hitdefpersist = 1

[State 1080, a]
type = ChangeAnim
trigger1 = time = 0
value = 5555

[State 1080, 1]
type = PlaySnd
trigger1 = var(1) = 1
value = 2, 3

[State 1100, 1]
type = PlaySnd
trigger1 = time = 0
value = 12, 0
channel = 0

[State 0, StopSnd]
type = StopSnd
trigger1 = Pos Y >= 0
channel = 0
;ignorehitpause = 0
;persistent = 1

[State 1080, 2]
type = VelSet
trigger1 = time = 0
x = 1.5 ;* var(0)
y = 6

[State 1080, 3]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1080, 4]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1080
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1080, 5]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1080, 6]
type = HitDef
trigger1 = !movecontact
attr = A, SA
hitflag = MAFD
guardflag = MA
pausetime = 13, 13
damage = 120, 4
animtype = Hard
sparkno = 3
sparkxy = -10, 0
hitsound = S0, 5
guardsound = S0, 9
ground.type = low
ground.hittime = 24
ground.velocity = -4, -10
air.velocity = -4, -9
air.hittime = 25
guard.slidetime = 11
guard.hittime = 18
guard.velocity = -8.5
givepower = 70
getpower = 55



[State 1080, 7]
type = ChangeState
trigger1 = Pos Y >= 0
value = 1090


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

[Statedef 1085]
type = A
movetype = A
physics = N
hitdefpersist = 1

[State 1080, a]
type = ChangeAnim
trigger1 = time = 0
value = 5555

[State 1080, 1]
type = PlaySnd
trigger1 = var(1) = 1
value = 2, 3

[State 1080, 2]
type = VelSet
trigger1 = time = 0
x = 1.5 ;* var(0)
y = 6

[State 1080, 3]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 1080, 4]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 1080
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 1080, 5]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 1080, 6]
type = HitDef
trigger1 = !movecontact
attr = A, SA
hitflag = MAFD
guardflag = MA
pausetime = 13, 13
damage = 140, 5
animtype = Hard
sparkno = 3
sparkxy = -10, 0
hitsound = S0, 5
guardsound = S0, 9
ground.type = low
ground.hittime = 24
ground.velocity = -4, -10
air.velocity = -4, -9
air.hittime = 25
guard.slidetime = 11
guard.hittime = 18
guard.velocity = -8.5
givepower = 70
getpower = 55



[State 1080, 7]
type = ChangeState
trigger1 = Pos Y >= 0
value = 1090

;---------------------------------------------------------------------------
; Ice Boulder Shatter
[Statedef 1090]
type = A
movetype = I
physics = N
velset = 0, 0
sprpriority = 2

[State 1090, 1]
type = PosSet
trigger1 = time = 0
y = -20

[State 1090, 1a]
type = EnvShake
trigger1 = time = 0
freq = 120
ampl = 3
time = 50

[State 1090, 2]
type = PlaySnd
trigger1 = time = 0
value = 12, 1

[State 1090, 3]
type = ChangeAnim
trigger1 = time = 9
value = 9741

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6a]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6a]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6b]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6b]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6c]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6c]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6d]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6d]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6e]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 1232, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6e]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 1232, ifelse(Random <= 499, 1232, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6f]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6f]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 1232, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6g]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6g]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6h]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 1232, ifelse(Random <= 499, 123, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6h]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 1232, ifelse(Random <= 499, 123, 123))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 0
range = -30, 30

[State 1090, Random]
type = VarRandom
trigger1 = time = 0
v = 1
range = -30, 30

[State 1090, Random]
type = VarSet
trigger1 = var(0) = [-12,12]
v = 0
value = ifelse(var(0) < 0, -13, 13)

[State 1090, Random]
type = VarSet
trigger1 = var(1) = [-12,12]
v = 1
value = ifelse(var(1) < 0, -13, 13)

[State 1090, 6i]
type = Explod
trigger1 = prevstateno = 1080
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
scale = .5,.5
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 6i]
type = Explod
trigger1 = prevstateno = 1085
trigger1 = time = 0
ID = 4945
anim = ifelse(Random <= 499, 123, ifelse(Random <= 499, 123, 1232))
postype = p1
pos = 0, 0
bindtime = 1
removetime = 40
vel = (var(0) * .1), (var(1) * .1)
ownpal = 1
sprpriority = 3

[State 1090, 7]
type = DestroySelf
trigger1 = NumExplod(4945) = 0

;---------------------------------------------------------------------------
; Ice Boulder - Down
[Statedef 1100]
type = U
movetype = A
physics = N
ctrl = 0
anim = 1100
poweradd = 70
sprpriority = 1

[State 1100, a]
type = VarSet
trigger1 = time = 0
v = 0
value = 0

[State 1100, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 12, 0

[State 1100, 2]
type = Explod
triggerall = StateType != A
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

[State 1100, 3]
type = Helper
trigger1 = time = 17
ID = 8409
name = "Boulder"
StateNo = 1085
postype = p1
pos = -30, -1200
ownpal = 1

[State 1100, 4]
type = VelMul
triggerall = StateType = A
triggerall = Vel X != 0
trigger1 = time = 0
x = .1

[State 1100, 5]
type = VelMul
triggerall = StateType = A
trigger1 = time = 0
y = .1

[State 1100, 6]
type = VelAdd
triggerall = StateType = A
trigger1 = Vel Y <= 1
trigger1 = Pos Y < 0
y = .02

[State 1100, 7]
type = VelSet
triggerall = StateType = A
trigger1 = Pos Y >= 0
y = 0

[State 1100, 8]
type = VelSet
triggerall = StateType != A
trigger1 = time = 0
x = 0
y = 0

[State 1100, 9]
type = SelfState
trigger1 = AnimTime = 0
value = ifelse(StateType = A, 50, 0)
ctrl = ifelse(StateType = A, 0, 1)

;---------------------------------------------------------------------------
; asteroid - Away
[Statedef 1110]
type = U
movetype = A
physics = N
ctrl = 0
anim = 1100
poweradd = 70
sprpriority = 1

[State 1110, a]
type = VarSet
trigger1 = time = 0
v = 0
value = 1

[State 1110, 1]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4, 6
channel = 0

[State 1110, 2]
type = Explod
triggerall = StateType != A
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

[State 1110, 3]
type = Helper
trigger1 = time = 17
ID = 8409
name = "Boulder"
StateNo = 1080
postype = p1
pos = 70, -220
size.xscale = .75
size.yscale = .75
ownpal = 1


[State 1110, 4]
type = VelMul
triggerall = StateType = A
triggerall = Vel X != 0
trigger1 = time = 0
x = .1

[State 1110, 5]
type = VelMul
triggerall = StateType = A
trigger1 = time = 0
y = .1

[State 1110, 6]
type = VelAdd
triggerall = StateType = A
trigger1 = Vel Y <= 1
trigger1 = Pos Y < 0
y = .02

[State 1110, 7]
type = VelSet
triggerall = StateType = A
trigger1 = Pos Y >= 0
y = 0

[State 1110, 8]
type = VelSet
triggerall = StateType != A
trigger1 = time = 0
x = 0
y = 0

[State 1110, 9]
type = SelfState
trigger1 = AnimTime = 0
value = ifelse(StateType = A, 50, 0)
ctrl = ifelse(StateType = A, 0, 1)

;Portal Beam Low==================================
[Statedef 1200]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1200
velset = 0, 0
poweradd = 35
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1 = AnimElem = 5
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 50
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = AnimElem = 15
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 2000, 6]
type = Explod
trigger1 = AnimElem = 5
ID = 1201
anim = 1201
postype = p1
pos = 5, -105
bindtime = -1
removetime = -2
sprpriority = 2
ontop = 1
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8005
postype = p1
ID = 8005
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8006
postype = p1
ID = 8005
pos = 5,-200
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8007
postype = p1
ID = 8006
pos = 5,-200
sprpriority=-30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8008
postype = p1
ID = 8006
pos = 5,-200
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 7
helpertype = normal
name = "beam caller"
Id = 8796
pos = 5,-170
postype = p1
facing = 1
stateno = 1201

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

[Statedef 1201]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1121:         BgPalfx]
type  = bgpalfx
trigger1 = time = 0
add                 = 200, 200, 200
sinadd              = -155,-155,-155,90
time                = 20

[State 2000, 8]
type = Explod
trigger1 = time = 0
anim = 7130
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ontop = 1
sprpriority = 80
supermovetime = 9999
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 49
helpertype = normal
name = "telebeams"
Id = 8796
pos = 50,0
postype = p1
stateno = 3007
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 50
;ignorehitpause = 0
;persistent = 1

;Portal Beam Mid==================================
[Statedef 1202]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1200
velset = 0, 0
poweradd = 35
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1 = AnimElem = 5
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 50
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = AnimElem = 15
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 2000, 6]
type = Explod
trigger1 = AnimElem = 5
ID = 1201
anim = 1201
postype = p1
pos = 5, -105
bindtime = -1
removetime = -2
sprpriority = 2
ontop = 1
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8005
postype = p1
ID = 8005
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8006
postype = p1
ID = 8005
pos = 5,-200
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8007
postype = p1
ID = 8006
pos = 5,-200
sprpriority=-30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8008
postype = p1
ID = 8006
pos = 5,-200
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 7
helpertype = normal
name = "beam caller"
Id = 8796
pos = 5,-170
postype = p1
facing = 1
stateno = 1203

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

[Statedef 1203]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1121:         BgPalfx]
type  = bgpalfx
trigger1 = time = 0
add                 = 200, 200, 200
sinadd              = -155,-155,-155,90
time                = 20

[State 2000, 8]
type = Explod
trigger1 = time = 0
anim = 7130
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ontop = 1
sprpriority = 80
supermovetime = 9999
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 49
helpertype = normal
name = "telebeam"
Id = 8796
pos = 50,0
postype = p1
stateno = 3005
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 50
;ignorehitpause = 0
;persistent = 1

;Portal Beam High==================================
[Statedef 1204]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1200
velset = 0, 0
poweradd = 35
sprpriority = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1 = AnimElem = 5
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 50
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = AnimElem = 15
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 2000, 6]
type = Explod
trigger1 = AnimElem = 5
ID = 1201
anim = 1201
postype = p1
pos = 5, -105
bindtime = -1
removetime = -2
sprpriority = 2
ontop = 1
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8005
postype = p1
ID = 8005
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8006
postype = p1
ID = 8005
pos = 5,-200
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8007
postype = p1
ID = 8006
pos = 5,-200
sprpriority=-30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8008
postype = p1
ID = 8006
pos = 5,-200
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 10
removetime = 10
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 7
helpertype = normal
name = "beam caller"
Id = 8796
ID = 1201
pos = 5,-170
postype = p1
facing = 1
stateno = 1205

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

[Statedef 1205]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1121:         BgPalfx]
type  = bgpalfx
trigger1 = time = 0
add                 = 200, 200, 200
sinadd              = -155,-155,-155,90
time                = 20

[State 2000, 8]
type = Explod
trigger1 = time = 0
anim = 7130
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ontop = 1
sprpriority = 80
supermovetime = 9999
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 49
helpertype = normal
name = "telebeam"
Id = 8796
pos = 50,0
postype = p1
stateno = 3003
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 50
;ignorehitpause = 0
;persistent = 1

;=========================================================
;Board Throws 1300 - 1305---------------------------------
;=========================================================

[Statedef 1300]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1300
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1910
ID = 1910
pos = 50,-60
ontop = 1
bindtime = 20
removetime = 20


[State 1010, 1a]
type = VarSet
trigger1 = time = 0
v = 0
value = 24

[State 1010, 1b]
type = VarSet
trigger1 = time = 0
v = 1
value = -62

[State 1010, 1c]
type = VarSet
trigger1 = time = 0
v = 18
value = 1080

[State 1010, 2]
type = Helper
trigger1 = AnimElem = 1
ID = 8796
name = "Board"
StateNo = 1301
postype = front
pos = -420, -50
size.xscale = 1.05
size.yscale = 1.05
ownpal = 0



[State 1010, 3]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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


[Statedef 1301]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 1301
juggle = 15
hitdefpersist = 1

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

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

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time = 1
x = 8
;y =
;ignorehitpause = 0
;persistent = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = timemod = 2,0
time=9
timegap=1
framegap=3
length=10
paladd = 0,200,0
trans=add
persistent=0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = timemod = 2,0
time = 9
;ignorehitpause = 0
;persistent = 1



[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S, SP
hitflag = MAF
guardflag =
animtype = Hard
;air.animtype = Light
;fall.animtype = Back
;priority = 4,Hit
damage = 70,5
;pausetime = 0,0
;guard.pausetime = 0,0
sparkno = 2
sparkxy = -10, -53
hitsound = S0, 5
fall =1
;ground.type = High
;air.type = High
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hittime = 0
;guard.hittime = 0
ground.velocity = -3,2
;guard.velocity = 3,2
air.velocity = -3,2
sprpriority = 5



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


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


[Statedef 1302]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1300
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1910
ID = 1910
pos = 50,-60
ontop = 1
bindtime = 20
removetime = 20

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1010, 1a]
type = VarSet
trigger1 = time = 0
v = 0
value = 24

[State 1010, 1b]
type = VarSet
trigger1 = time = 0
v = 1
value = -62

[State 1010, 1c]
type = VarSet
trigger1 = time = 0
v = 18
value = 1080

[State 1010, 2]
type = Helper
trigger1 = AnimElem = 1
ID = 8796
name = "Board"
StateNo = 1303
postype = front
pos = -420, -50
size.xscale = 1.05
size.yscale = 1.05
ownpal = 1


[State 1010, 3]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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


[Statedef 1303]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 1301
juggle = 15
hitdefpersist = 1

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

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

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time = 1
x = 12
;y =
;ignorehitpause = 0
;persistent = 1


[State 0, AfterImage]
type = AfterImage
trigger1 = timemod = 2,0
time=9
timegap=1
framegap=3
length=10
paladd = 0,200,0
trans=add
persistent=0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = timemod = 2,0
time = 9
;ignorehitpause = 0
;persistent = 1


[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S, SP
hitflag = MAF
guardflag =
animtype = Hard
;air.animtype = Light
;fall.animtype = Back
;priority = 4,Hit
damage = 80,7
;pausetime = 0,0
;guard.pausetime = 0,0
sparkno = 2
sparkxy = -10, -53
hitsound = S0, 5
fall =1
;ground.type = High
;air.type = High
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hittime = 0
;guard.hittime = 0
ground.velocity = -3,2
;guard.velocity = 3,2
air.velocity = -3,2
sprpriority = 5


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



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


[Statedef 1304]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1300
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, Explod]
type = Explod
trigger1 = AnimElem = 5
anim = 1910
ID = 1910
pos = 50,-60
ontop = 1
bindtime = 20
removetime = 20

[State 1010, 1]
type = PlaySnd
trigger1 = AnimElem = 2
value = 4, 3
channel = 0

[State 1010, 1a]
type = VarSet
trigger1 = time = 0
v = 0
value = 24

[State 1010, 1b]
type = VarSet
trigger1 = time = 0
v = 1
value = -62

[State 1010, 1c]
type = VarSet
trigger1 = time = 0
v = 18
value = 1080

[State 1010, 2]
type = Helper
trigger1 = AnimElem = 1
ID = 8796
name = "Board"
StateNo = 1305
postype = front
pos = -420, -50
size.xscale = 1.05
size.yscale = 1.05
ownpal = 0


[State 1010, 3]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
ownpal = 1

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


[Statedef 1305]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 1301
juggle = 15
hitdefpersist = 1

[State 1010, 3]
type = Explod
trigger1 = timemod = 11,0
ID = 1302
anim = 1302
postype = p1
pos = 83, 0
bindtime = -1
scale = 1, .5
removetime = 12
sprpriority = 5
ontop = 1
ownpal = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = animtime = 0
ID = 1302
;ignorehitpause = 0
;persistent = 1


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

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

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

[State 0, VelAdd]
type = VelAdd
trigger1 = time = 1
x = 16
;y =
;ignorehitpause = 0
;persistent = 1

[State 0, AfterImage]
type = AfterImage
trigger1 = timemod = 2,0
time=9
timegap=1
framegap=3
length=10
paladd = 0,200,0
trans=add
persistent=0

[State 0, AfterImageTime]
type = AfterImageTime
trigger1 = timemod = 2,0
time = 9
;ignorehitpause = 0
;persistent = 1


[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = S, SP
hitflag = MAF
guardflag =
animtype = Hard
;air.animtype = Light
;fall.animtype = Back
;priority = 4,Hit
damage = 95,10
;pausetime = 0,0
;guard.pausetime = 0,0
sparkno = 2
sparkxy = -10, -53
hitsound = S0, 5
fall =1
ground.velocity = -3,2
;guard.velocity = 3,2
air.velocity = -3,2
sprpriority = 5

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

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

;Telepathic rock=======================================
;Telepathic rock=======================================
[statedef 1400]
type = A
movetype = A
physics = S
sprpriority = 2
shadow = 0,0,0
anim =  1300

[State 0, Helper]
type = Helper
trigger1 = animelem =2
helpertype = normal
name = "rock"
ID = 8796
pos = 60,0
postype = p1
stateno = 1401


[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0

[statedef 1401]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,30

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3006
pos = 0,0
ownpal = 1
persistent = 1


[State 0, VelSet]
type = VelSet
trigger1 = time = 1
y = -3

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, ChangeState]
type = ChangeState
trigger1 =time = 20
value = 1402

[statedef 1402]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 15

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = 0


[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A, HP
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
fall.animtype = Back
priority = 4,Hit
damage = 75,5
;sparkno =
;guard.sparkno =
;sparkxy = 0,0
hitsound = S0, 8
guardsound = S0, 9
;ground.type = High
;air.type = High
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hittime = 0
;guard.hittime = 0
;air.hittime = 20
;guard.ctrltime = 0
;guard.dist =
;yaccel = 0
;ground.velocity = 0,0
ground.velocity = -8, -5
air.velocity = -6, -8
;airguard.velocity = 0,0
;ground.cornerpush.veloff =
;air.cornerpush.veloff =
;down.cornerpush.veloff =
;guard.cornerpush.veloff =
;airguard.cornerpush.veloff =
;airguard.ctrltime = 0
;air.juggle = 0
;mindist =
;maxdist =
;snap = 0,0
;sprpriority = 1
;p1facing =
;p1getp2facing = 0
;p2facing = 0
;p1stateno =
;p2stateno =
;p2getp1state =
;forcestand =
fall = 1
;fall.xvelocity =
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall =
;down.velocity = ,
;down.hittime =
;down.bounce = 0
;ID = 0
;chainID = -1
;nochainID =
;hitonce = 0
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
;getpower = 0,0
;givepower = 0,0


[State 1080, 7]
type = ChangeState
trigger1 = movecontact
value = 1403


[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 40
;ignorehitpause = 0
;persistent = 1

;------------------------------------------------------------------
[statedef 1403]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim = 9741


[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3002
ID = 3002
pos = 0,0
vel = -5,5
removetime = 100
sprpriority = 0
ontop = 1
ownpal = 1
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3002
ID = 3002
pos = 0,0
vel = 5,-5
removetime = 100
sprpriority = 0
ontop = 1
ownpal = 1
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3003
ID = 3003
pos = 0,0
vel = -5,-5
removetime = 100
sprpriority = 0
ontop = 1
ownpal = 1
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3003
ID = 3003
pos = 0,0
vel = 5,5
removetime = 100
sprpriority = 0
ontop = 1
ownpal = 1
;ignorehitpause = 0
;persistent = 1




[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10
;ignorehitpause = 0
;persistent = 1

;-------------------------------------------------------------------
;Telepathic portal rock
[statedef 1410]
type = A
movetype = A
physics = S
sprpriority = 2
shadow = 0,0,0
anim =  1300

[State 0, Helper]
type = Helper
trigger1 = animelem =2
helpertype = normal
name = "rock"
ID = 8796
pos = 60,0
postype = p1
stateno = 1411


[State 0, Helper]
type = Helper
trigger1 = time = 25
helpertype = normal
name = "rockportel"
ID = 8796
pos = 140,-70
postype = p1
facing = -1
stateno = 1470

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
;ctrl = 1
;anim =
;ignorehitpause = 0
;persistent = 1


[statedef 1411]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,30

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3006
pos = 0,0
ownpal = 1
persistent = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 1
;x = 6
y = -3
;ignorehitpause = 0
;persistent = 1

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1


[State 0, ChangeState]
type = ChangeState
trigger1 =time = 20
value = 1412
;ctrl = 1
;anim =
;ignorehitpause = 0
;persistent = 1

[statedef 1412]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 6

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = 0

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A, HP
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
fall.animtype = Back
priority = 4,Hit
damage = 75,5
;sparkno =
;guard.sparkno =
;sparkxy = 0,0
hitsound = S0, 8
guardsound = S0, 9
;ground.type = High
;air.type = High
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hittime = 0
;guard.hittime = 0
;air.hittime = 20
;guard.ctrltime = 0
;guard.dist =
;yaccel = 0
;ground.velocity = 0,0
ground.velocity = -8, -5
air.velocity = -6, -8
;airguard.velocity = 0,0
;ground.cornerpush.veloff =
;air.cornerpush.veloff =
;down.cornerpush.veloff =
;guard.cornerpush.veloff =
;airguard.cornerpush.veloff =
;airguard.ctrltime = 0
;air.juggle = 0
;mindist =
;maxdist =
;snap = 0,0
;sprpriority = 1
;p1facing =
;p1getp2facing = 0
;p2facing = 0
;p1stateno =
;p2stateno =
;p2getp1state =
;forcestand =
fall = 1
;fall.xvelocity =
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall =
;down.velocity = ,
;down.hittime =
;down.bounce = 0
;ID = 0
;chainID = -1
;nochainID =
;hitonce = 0
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
;getpower = 0,0
;givepower = 0,0


[State 0, ChangeState]
type = ChangeState
trigger1 = time = 10
value = 1413

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
value = 1403



[statedef 1413]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim = 9741


[State 0, ChangeState]
type = ChangeState
trigger1 = time = 100
value = 1414
;ctrl = 1
;anim =
;ignorehitpause = 0
;persistent = 1


[statedef 1414]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0


[State 0, Helper]
type = Helper
trigger1 = time = 0
helpertype = normal
name = "rockportel2"
ID = 8796
pos = 110,-75
postype = p2
facing = -1
stateno = 1471

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 1



[statedef 1420]
type = A
movetype = A
physics = S
sprpriority = 2
shadow = 0,0,0
anim =  1300

[State 0, Helper]
type = Helper
trigger1 = animelem =2
helpertype = normal
name = "rock"
ID = 8796
pos = 60,0
postype = p1
;facing = 1
stateno = 1421
;keyctrl = 0
;ownpal = 0
;supermovetime = 0
;pausemovetime = 0
;size.xscale =
;size.yscale =
;size.ground.back =
;size.ground.front =
;size.air.back =
;size.air.front =
;size.height =
;size.proj.doscale =
;size.head.pos =
;size.mid.pos =
;size.shadowoffset =
;ignorehitpause = 0
;persistent = 1



[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
;ctrl = 1
;anim =
;ignorehitpause = 0
;persistent = 1


[statedef 1421]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,30

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3006
pos = 0,0
ownpal = 1
persistent = 1

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 1
;x = 6
y = -3
;ignorehitpause = 0
;persistent = 1


[State 0, ChangeState]
type = ChangeState
trigger1 =time = 20
value = 1422
;ctrl = 1
;anim =
;ignorehitpause = 0
;persistent = 1

[statedef 1422]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim =  3001

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 8

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = 0

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = (Time > 0)
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A, HP
hitflag = MAF
guardflag = MA
animtype = Medium
air.animtype = Medium
fall.animtype = Back
priority = 4,Hit
damage = 75,5
;sparkno =
;guard.sparkno =
;sparkxy = 0,0
hitsound = S0, 8
guardsound = S0, 9
;ground.type = High
;air.type = High
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hittime = 0
;guard.hittime = 0
;air.hittime = 20
;guard.ctrltime = 0
;guard.dist =
;yaccel = 0
;ground.velocity = 0,0
ground.velocity = -8, -5
air.velocity = -6, -8
;airguard.velocity = 0,0
;ground.cornerpush.veloff =
;air.cornerpush.veloff =
;down.cornerpush.veloff =
;guard.cornerpush.veloff =
;airguard.cornerpush.veloff =
;airguard.ctrltime = 0
;air.juggle = 0
;mindist =
;maxdist =
;snap = 0,0
;sprpriority = 1
;p1facing =
;p1getp2facing = 0
;p2facing = 0
;p1stateno =
;p2stateno =
;p2getp1state =
;forcestand =
fall = 1
;fall.xvelocity =
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall =
;down.velocity = ,
;down.hittime =
;down.bounce = 0
;ID = 0
;chainID = -1
;nochainID =
;hitonce = 0
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
;getpower = 0,0
;givepower = 0,0

[State 1080, 7]
type = ChangeState
trigger1 = movecontact
value = 1403

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 15
value = 1423


[statedef 1423]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim = 3004

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

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 10
value = 3,22

[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = (Time > 0)
time            = 1
value           = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause  = 1

[State 8061:    HitBy]
type            = HitBy
trigger1        = (Time > 0)
value           = SCA, NP, SP, HP
time            = 1
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = Time < 44
slot            = 1
time            = 1
stateno         = 1403;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 8062:    HitOverride]
type            = HitOverride
trigger1        = Time >= 44
slot            = 1
time            = 1
stateno         = 1424;3513
attr            = SCA, NP, SP, HP
ignorehitpause  = 1

[State 0, ExitSpark]
type = Explod
trigger1 = time = 5
anim = 1510
pos = 0,0
sprpriority=40
scale = .5,.5
bindtime = -1
removetime = -2

[State 3000, superchargehelper]
type=helper
trigger1        = Time >= 5
trigger1        = Time <= 44
trigger1 = timemod = 6,0
helpertype=normal
stateno=1921
ID=1921
name="Halo"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .5
size.yscale = .5

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A, HP
hitflag = MAF
guardflag = MA
animtype = Hard
priority = 4,Hit

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
trigger2 = time = 200
value = 1424

[statedef 1424]
type = A
movetype = A
physics = N
sprpriority = 2
shadow = 0,0,0
anim = 3005

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,23

[State 0, HitDef]
type = HitDef
trigger1 = !movecontact
attr = A, HP
hitflag = MAF
guardflag = MA
animtype = Hard
priority = 4,Hit
damage = 150,5
fall = 1
ground.velocity = -10, -7
air.velocity = -8, -9


[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 0
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;Rock Portal 1==================================================
[Statedef 1470]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,26

[State 0, EnterSpark]
type = Explod
trigger1 = time = 0
anim = 3506
pos = 0,0
sprpriority=-40
scale = 1.5,1.5
bindtime = 1
removetime = 6

[State 0, ExitSpark]
type = Explod
trigger1 = time = 70
anim = 3506
pos = 0,0
sprpriority=-40
scale = 1.5,1.5
bindtime = 1
removetime = 6

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8001
ID = 9001
pos = 0,0
sprpriority=-40
ownpal = 1
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8002
ID = 9002
pos = 0,0
ontop = 1
sprpriority=40
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8003
ID = 9003
pos = -22,0
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8004
ID = 9004
pos = -22,0
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
;ontop = 1
sprpriority=40
scale = .2,.2
vel = -3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
;ontop = 1
sprpriority=40
scale = .1,.1
vel = -3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
;ontop = 1
sprpriority=40
scale = .2,.2
vel = -3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
;ontop = 1
sprpriority=40
scale = .1,.1
vel = -3,0
;bindtime = 1
removetime = 15

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 150
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 3000, superchargehelper]
type=helper
trigger1 = time = [10, 15]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = [70, 75]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 7180, end]
type=destroyself
trigger1 = time = 75

;Rock Portal 2-------------------
[Statedef 1471]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,26

[State 0, EnterSpark]
type = Explod
trigger1 = time = 0
anim = 3506
pos = 0,0
sprpriority=-40
scale = 1.5,1.5
bindtime = 1
removetime = 6

[State 0, ExitSpark]
type = Explod
trigger1 = time = 70
anim = 3506
pos = 0,0
sprpriority=-40
scale = 1.5,1.5
bindtime = 1
removetime = 6

[State 0, Helper]
type = Helper
trigger1 = time = 30
helpertype = normal
name = "rock"
ID = 1402
pos = 0,0
postype = p1
facing = 1
stateno = 1402

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8001
ID = 9001
pos = 0,0
sprpriority=-40
ownpal = 1
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8002
ID = 9002
pos = 0,0
ontop = 1
sprpriority=40
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8003
ID = 9003
pos = -22,0
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8004
ID = 9004
pos = -22,0
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1
[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
;ontop = 1
sprpriority=40
scale = .2,.2
vel = 3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
;ontop = 1
sprpriority=40
scale = .1,.1
vel = 3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
;ontop = 1
sprpriority=40
scale = .2,.2
vel = 3,0
;bindtime = 1
removetime = 15

[State 9999, Explod]
type = Explod
trigger1 = time = 12
trigger2 = timemod = 5,0
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
;ontop = 1
sprpriority=40
scale = .1,.1
vel = 3,0
;bindtime = 1
removetime = 15

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 150
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 3000, superchargehelper]
type=helper
trigger1 = time = [10, 15]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = [70, 75]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 7180, end]
type=destroyself
trigger1 = time = 75


;cosmic reflector
[Statedef 1500]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1500
sprpriority         = 2
poweradd            = 10

[State -2:          varset KOF 2k3]
type                = VarSet
trigger1            = !time
var(56)             = ifelse(command = "cosmicreflectorc",2,ifelse(command = "cosmicreflectorb",1,0))

[State 700:         Changestate]
type                = ChangeState
trigger1            = animelem = 5
value               = 1501



[Statedef 1501]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1501
sprpriority         = 2
poweradd            = 10

[State 701:         explod escudo]
type                = removeExplod
trigger1            = 1
id                  = 1000

[State 701:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 6,11
channel             = 11

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1503)
trigger1            = time = 0
ID                  = 1503
stateno             = 1503
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
name                = "Cosmic Reflector"

[State 701:         Changestate]
type                = ChangeState
trigger1            = Time = 100
trigger2            = !numhelper(1503)
value               = 1502
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1502]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1502
sprpriority         = 2
poweradd            = 10

[State 702:         Changestate]
type                = ChangeState
trigger1            = !AnimTime
value               = 0
ctrl                = 1



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

[Statedef 1503]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1503
sprpriority         = 3
velset              = 0,0
juggle              = 7

[State 703:         pause]
type                = Pause
triggerall          = (gametime%3) = 0
trigger1            = movehit
time                = 1
movetime            = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13



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

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA, AA, AT
ignorehitpause 	    = 1

[State 703:	        HitBy]
type 			    = HitBy
trigger1 		    = Time >= 0
value 		        = SCA,AP
time 			    = 1
ignorehitpause 	    = 1

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1506
attr                = SCA,AP
slot                = 0
time                = -1

[State 705:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 0,16
channel             = 10

[State 703:         Bindtoparent]
type                = Bindtoparent
trigger1            = 1
pos                 = 25,-59
postype             = p1

[State 703:         hitdef]
type                = HitDef
trigger1            = time >= 0
animtype            = hard
attr                = A, SP
damage              = 90,10
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -15,-5.5
guard.velocity      = -6
air.velocity        = -15,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55

[State 703:         destroyself]
type                = changestate
trigger1            = movecontact
trigger2            = root, anim != 1501
value               = 1504

[State 703:         destroyself]
type                = destroyself
trigger1            = root, anim != 1501
value               = 0
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1504]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1504
sprpriority         = 5
velset              = 0,0

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA
ignorehitpause 	    = 1

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

[State 704:         destroyself]
type                = destroyself
trigger1            = animtime = 0



[Statedef 1506]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1505
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3, 15
channel = 10
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1506
attr                = SCA,AP
slot                = 0
time                = -1

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

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1508)
trigger1            = time = 40
ID                  = 8796
stateno             = 1508
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
name                = "Return Shot"

;[State 703:         Bindtoparent]
;type                = Bindtoparent
;trigger1            = 1
;pos                 = 25,-55
;postype             = p1



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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20



[State 704:         destroyself]
type                = changestate
trigger1            = time = 50
value = 1507

[Statedef 1507]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1506
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

[Statedef 1508]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1507
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = 1
value = 3, 14

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

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

[State 703:         hitdef]
type                = HitDef
trigger1            = timemod = 3,0
animtype            = hard
attr                = A, SP
damage              = 20,5
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -4,-5.5
guard.velocity      = -6
air.velocity        = -4,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55
sprpriority = 20
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 704:         destroyself]
type                = destroyself
trigger1            = time = 20

;---------------------------------------------------------------------
;Cosmic reflector 2

[Statedef 1510]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1500
sprpriority         = 2
poweradd            = 10

[State -2:          varset KOF 2k3]
type                = VarSet
trigger1            = !time
var(56)             = ifelse(command = "cosmicreflectorc",2,ifelse(command = "cosmicreflectorb",1,0))

[State 700:         Changestate]
type                = ChangeState
trigger1            = animelem = 5
value               = 1511



[Statedef 1511]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1501
sprpriority         = 2
poweradd            = 10

[State 701:         explod escudo]
type                = removeExplod
trigger1            = 1
id                  = 1000

[State 701:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 6,11
channel             = 11

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1513)
trigger1            = time = 0
ID                  = 1513
stateno             = 1513
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
name                = "Cosmic Reflector"

[State 701:         Changestate]
type                = ChangeState
trigger1            = Time = 100
trigger2            = !numhelper(1513)
value               = 1512
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1512]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1502
sprpriority         = 2
poweradd            = 10

[State 702:         Changestate]
type                = ChangeState
trigger1            = !AnimTime
value               = 0
ctrl                = 1



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

[Statedef 1513]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1503
sprpriority         = 3
velset              = 0,0
juggle              = 7

[State 703:         pause]
type                = Pause
triggerall          = (gametime%3) = 0
trigger1            = movehit
time                = 1
movetime            = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13



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

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA, AA, AT
ignorehitpause 	    = 1

[State 703:	        HitBy]
type 			    = HitBy
trigger1 		    = Time >= 0
value 		        = SCA,AP
time 			    = 1
ignorehitpause 	    = 1

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1516
attr                = SCA,AP
slot                = 0
time                = -1

[State 705:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 0,16
channel             = 10

[State 703:         Bindtoparent]
type                = Bindtoparent
trigger1            = 1
pos                 = 25,-59
postype             = p1



[State 703:         hitdef]
type                = HitDef
trigger1            = time >= 0
animtype            = hard
attr                = A, SP
damage              = 90,10
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -15,-5.5
guard.velocity      = -6
air.velocity        = -15,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55

[State 703:         destroyself]
type                = changestate
trigger1            = movecontact
trigger2            = root, anim != 1501
value               = 1514

[State 703:         destroyself]
type                = destroyself
trigger1            = root, anim != 1501
value               = 0
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1514]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1504
sprpriority         = 5
velset              = 0,0

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA
ignorehitpause 	    = 1

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

[State 704:         destroyself]
type                = destroyself
trigger1            = animtime = 0



[Statedef 1516]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1505
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3, 15
channel = 10
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1516
attr                = SCA,AP
slot                = 0
time                = -1

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

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1518)
trigger1            = time = 40
ID                  = 8796
stateno             = 1518
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
name                = "Return Shot"

;[State 703:         Bindtoparent]
;type                = Bindtoparent
;trigger1            = 1
;pos                 = 25,-55
;postype             = p1

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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 704:         destroyself]
type                = changestate
trigger1            = time = 50
value = 1517

[Statedef 1517]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1506
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

[Statedef 1518]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1509
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5

[State 0]
type = trans
trigger1 = 1
trans = add


[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
;x =
x = 1

[State 0, VelAdd]
type = Veladd
trigger1 = timemod = 2,0
x = .1

[State 3000, superchargehelper]
type=helper
trigger1 = timemod = 7,0
helpertype=normal
stateno=3802
ID=3802
name="Halo"
postype=p1
pos=0,0
ownpal=1
persistent=1
size.xscale = .3
size.yscale = .1
supermovetime = 100
pausemovetime = 100

[State 0, Explod]
type = Explod
trigger1 = timemod = 4,0
anim = 1910
bindtime = -1
removetime = 4
scale = 1, 1
sprpriority = 4
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 5,0
value = 3,29

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

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

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

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

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

[State 703:         hitdef]
type                = HitDef
trigger1            = !movecontact
animtype            = hard
attr                = A, SP
damage              = 100,5
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -4,-5.5
guard.velocity      = -6
air.velocity        = -4,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55
sprpriority = 20
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 704:         destroyself]
type                = destroyself
trigger1            = time = 120
trigger2            = movecontact


[Statedef 1519]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1509
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5

[State 0]
type = trans
trigger1 = 1
trans = add

[State 0, Explod]
type = Explod
trigger1 = timemod = 2,0
anim = 3507
ID = 3507
pos = 0,0
ontop = 1
scale = 1,1
bindtime = 1
removetime = 10

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = timemod = 2,0
anim = 3507
scale = 1+(-.01*time), 1+(-.01*time)

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
;x =
x = 4

[State 0, VelAdd]
type = Velset
trigger1 = time = 20
trigger2 = time = 60
trigger3 = time = 100
trigger4 = time = 140
trigger5 = time = 180
;x =
y = -3
;ignorehitpause = 0
;persistent = 1

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
trigger2 = time = 40
trigger3 = time = 80
trigger4 = time = 120
trigger5 = time = 160
;x =
y = 3
;ignorehitpause = 0
;persistent = 1

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

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

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

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

[State 703:         hitdef]
type                = HitDef
trigger1            = !movecontact
animtype            = hard
attr                = A, SP
damage              = 75,5
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = 2
sparkxy = -10, -53
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -4,-5.5
guard.velocity      = -6
air.velocity        = -4,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55
sprpriority = 20
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 704:         destroyself]
type                = destroyself
trigger1            = time = 120
trigger2            = movecontact

;----------------------------------------------------------------------
;Cosmic reflector 3
[Statedef 1520]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1500
sprpriority         = 2
poweradd            = 10

[State -2:          varset KOF 2k3]
type                = VarSet
trigger1            = !time
var(56)             = ifelse(command = "cosmicreflectorc",2,ifelse(command = "cosmicreflectorb",1,0))

[State 700:         Changestate]
type                = ChangeState
trigger1            = animelem = 5
value               = 1521



[Statedef 1521]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1501
sprpriority         = 2
poweradd            = 10

[State 701:         explod escudo]
type                = removeExplod
trigger1            = 1
id                  = 1000

[State 701:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 6,11
channel             = 11

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1523)
trigger1            = time = 0
ID                  = 1523
stateno             = 1523
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
name                = "Cosmic Reflector"

[State 701:         Changestate]
type                = ChangeState
trigger1            = Time = 100
trigger2            = !numhelper(1523)
value               = 1522
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1522]
type                = S
movetype            = A
physics             = S
juggle              = 7
velset              = 0,0
ctrl                = 0
anim                = 1502
sprpriority         = 2
poweradd            = 10

[State 702:         Changestate]
type                = ChangeState
trigger1            = !AnimTime
value               = 0
ctrl                = 1



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

[Statedef 1523]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1503
sprpriority         = 3
velset              = 0,0
juggle              = 7

[State 703:         pause]
type                = Pause
triggerall          = (gametime%3) = 0
trigger1            = movehit
time                = 1
movetime            = 0

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13



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

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA, AA, AT
ignorehitpause 	    = 1

[State 703:	        HitBy]
type 			    = HitBy
trigger1 		    = Time >= 0
value 		        = SCA,AP
time 			    = 1
ignorehitpause 	    = 1

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1526
attr                = SCA,AP
slot                = 0
time                = -1

[State 705:         Playsnd]
type                = playsnd
trigger1            = time = 0
value               = 0,16
channel             = 10

[State 703:         Bindtoparent]
type                = Bindtoparent
trigger1            = 1
pos                 = 25,-59
postype             = p1

[State 703:         hitdef]
type                = HitDef
trigger1            = time >= 0
animtype            = hard
attr                = A, SP
damage              = 90,10
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -15,-5.5
guard.velocity      = -6
air.velocity        = -15,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55

[State 703:         destroyself]
type                = changestate
trigger1            = movecontact
trigger2            = root, anim != 1501
value               = 1524

[State 703:         destroyself]
type                = destroyself
trigger1            = root, anim != 1501
value               = 0
;---------------------------------------------------------------------------;

;---------------------------------------------------------------------------;
[Statedef 1524]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1504
sprpriority         = 5
velset              = 0,0

[State 703:	        NotHitBy]
type 			    = NotHitBy
trigger1 		    = Time >= 0
time 			    = 1
value 		        = SCA
ignorehitpause 	    = 1

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

[State 704:         destroyself]
type                = destroyself
trigger1            = animtime = 0



[Statedef 1526]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1505
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3, 15
channel = 10
volume = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 12,0
value = 3, 13

[State 703:         hitoverride]
type                = HitOverride
trigger1            = 1
stateno             = 1526
attr                = SCA,AP
slot                = 0
time                = -1

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

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1528)
trigger1            = time = 40
ID                  = 8796
stateno             = 1528
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
size.xscale = 1.5
size.yscale = 1.5
name                = "Return Shot"

[State 701:         helper escudo]
type                = helper
triggerall          = !numhelper(1529)
trigger1            = time = 40
ID                  = 8796
stateno             = 1529
postype             = p1
pos                 = 0,0
sprpriority         = 5
ownpal              = 1
helpertype          = normal
keyctrl             = 0
size.xscale = 1.5
size.yscale = 1.5
name                = "Return Shot"

;[State 703:         Bindtoparent]
;type                = Bindtoparent
;trigger1            = 1
;pos                 = 25,-55
;postype             = p1

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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 704:         destroyself]
type                = changestate
trigger1            = time = 50
value = 1527

[Statedef 1527]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 1506
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

[Statedef 1528]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 889
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5

[State 0]
type = trans
trigger1 = 1
trans = add

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
;x =
x = 4

[State 0, VelAdd]
type = Velset
trigger1 = time = 20
trigger2 = time = 60
trigger3 = time = 100
trigger4 = time = 140
trigger5 = time = 180
;x =
y = 3
;ignorehitpause = 0
;persistent = 1

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
trigger2 = time = 40
trigger3 = time = 80
trigger4 = time = 120
trigger5 = time = 160
;x =
y = -3
;ignorehitpause = 0
;persistent = 1



[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

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

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

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

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

[State 703:         hitdef]
type                = HitDef
trigger1            = !movecontact
animtype            = hard
attr                = A, SP
damage              = 40,5
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -4,-5.5
guard.velocity      = -6
air.velocity        = -4,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55
sprpriority = 20
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 704:         destroyself]
type                = changestate
trigger1            = time = 120
trigger2            = movecontact
value = 1530


[Statedef 1529]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 889
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5

[State 0]
type = trans
trigger1 = 1
trans = add

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 1
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
;x =
x = 4

[State 0, VelAdd]
type = Velset
trigger1 = time = 20
trigger2 = time = 60
trigger3 = time = 100
trigger4 = time = 140
trigger5 = time = 180
;x =
y = -3
;ignorehitpause = 0
;persistent = 1

[State 0, VelAdd]
type = Velset
trigger1 = time = 0
trigger2 = time = 40
trigger3 = time = 80
trigger4 = time = 120
trigger5 = time = 160
;x =
y = 3
;ignorehitpause = 0
;persistent = 1

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

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

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

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

[State 703:         hitdef]
type                = HitDef
trigger1            = !movecontact
animtype            = hard
attr                = A, SP
damage              = 40,5
hitflag             = MAF
guardflag           = M
pausetime           = 0,10
sparkno = S900
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 5
ground.type         = high
ground.slidetime    = 18
ground.hittime      = 18
ground.velocity     = -4,-5.5
guard.velocity      = -6
air.velocity        = -4,-3.5
guard.velocity      = -9.2
air.cornerpush.veloff = 0
fall                = 1
fall.recover        = 0
yaccel              = .55
sprpriority = 20
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

[State 704:         destroyself]
type                = changestate
trigger1            = time = 120
trigger2            = movecontact
value = 1530

[Statedef 1530]
type                = S
movetype            = A
physics             = N
ctrl                = 0
anim                = 895
sprpriority         = 5
velset              = 0,0
juggle              = 7

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .5,.5
;ignorehitpause = 0
;persistent = 1

[State 0]
type = trans
trigger1 = 1
trans = add
;alpha =

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

[State 704:         destroyself]
type                = destroyself
trigger1            = animtime = 0

;==========================================
;=======Summon Nova========================
;==========================================
[Statedef 1800]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1800
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 1010, 2]
type = Helper
trigger1 = time = 31
ID = 1800
name = "Nova 1"
StateNo = 1801
postype = front
pos = -419, -50
ownpal = 1

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

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

;Nova Attack 1
[Statedef 1801]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1801
velset = 5, 0
poweradd = 65
sprpriority = 5

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

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

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,50]
trigger1 = time = 0
value = 15,2
channel = 8
volume = 255


[State 0, VelSet]
type = Veladd
trigger1 = timemod = 3,0
x = .1
y = -.1
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = Veladd
trigger1 = time > 40
trigger1 = timemod = 1,0
x = -.5
y = -.1
;ignorehitpause = 0
;persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
ID=1804
stateno=1804
name="hair"
postype=p1
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 1025, flames]
type=helper
triggerall = time = [10,40]
trigger1 = timemod = 10,0
helpertype=normal
ID=1802
stateno=1802
name="attack"
postype=p1
pos = 8,-56
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 1025, flames]
type=helper
triggerall = time = [10,40]
trigger1 = timemod = 10,0
helpertype=normal
ID=1802
stateno=1802
name="attack"
postype=p1
pos = 60,-101
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

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

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

;Nova fireballs
[Statedef 1802]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1890
velset = 5, 0
poweradd = 65
sprpriority = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1  = time = 5
value = 15,6

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

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

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

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 3+(random%10)
y = 1+(random%10)
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = timemod = 7,0
anim = 1891
pos = 0,0
removetime = -2
vel = -5+(random%10), 0+(random%10)
ontop = 1
ownpal = 1
scale = .5,.5

[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, SP
damage = 5, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = S930
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -6.5 - (var(19) * 1.5)
air.type = Low
air.velocity = -4.5 - (var(19) * 1.5), -2
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
sprpriority = 2
palfx.time = 30
palfx.add = 200,100,0
palfx.sinadd = 200,150,0,24
palfx.color = 0
palfx.invertall = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
;trigger1 = Pos Y = 0
value = 1803

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 1803

;Nova fireball death
[Statedef 1803]
type=A
physics=N
movetype=A
ctrl = 0
anim = 9741
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 0
y = 0
;ignorehitpause = 0
;persistent = 1

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

[State 0, Explod]
type = Explod
trigger1 = timemod = 2,0
anim = 1891
pos = 0,0
removetime = -2
vel = 1+(random%10), -1+(random%10)
ontop = 1
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = timemod = 3,0
anim = 1891
pos = 0,0
removetime = -2
vel = -1+(random%10), 1+(random%10)
ontop = 1
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10
;ignorehitpause = 0
;persistent = 1

;Nova Hair 1
[Statedef 1804]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1805
poweradd = 65
sprpriority = 4

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

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 0
time = -1
pos = 38,-83

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 30
time = -1
pos = 40,-100

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 40
time = -1
pos = 10,-100

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 50
time = -1
pos = -10,-101

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 53
time = -1
pos = -10,-101

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != 1801
;ignorehitpause = 0
;persistent = 1

[Statedef 1810]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1800
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 1010, 2]
type = Helper
trigger1 = time = 31
ID = 1800
name = "Nova 2"
StateNo = 1811
postype = front
pos = -419, -50
ownpal = 1

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

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

;Nova Attack 2
[Statedef 1811]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1802
velset = 5, 0
poweradd = 65
sprpriority = 5

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

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

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,50]
trigger1 = time = 0
value = 15,2

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,33]
trigger1 = time = 90
value = 15,0

[State 180, 2]
type = playsnd
trigger1 = var(0) = [34,66]
trigger1 = time = 90
value = 15,1

[State 0, VelSet]
type = Veladd
trigger1 = time < 20
trigger1 = timemod = 3,0
x = -.2
y = -.1
;ignorehitpause = 0
;persistent = 1



[State 0, VelSet]
type = Veladd
trigger1 = time > 90
trigger1 = timemod = 1,0
x = .5
y = -.1
;ignorehitpause = 0
;persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
ID=1804
stateno=1814
name="hair"
postype=p1
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 1025, flames]
type=helper
triggerall = time = [20,90]
trigger1 = timemod = 3,0
helpertype=normal
ID=1802
stateno=1802
name="attack"
postype=p1
pos = 34,-28
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

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

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

;Nova Hair 2
[Statedef 1814]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1806
poweradd = 65
sprpriority = 4

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


[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 0
time = -1
pos = -40,-83

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 10
time = -1
pos = 40,-80

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 20
time = -1
pos = 10,-60

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 90
time = -1
pos = 40,-85

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != 1811
;ignorehitpause = 0
;persistent = 1

[Statedef 1820]
type = S
movetype = A
physics = S
ctrl = 0
anim = 1800
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 1010, 2]
type = Helper
trigger1 = time = 31
ID = 1800
name = "Nova 3"
StateNo = 1822
postype = front
pos = -419, -90
ownpal = 1

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

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

;Nova Attack 3
[Statedef 1822]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1803
velset = 5, 0
poweradd = 65
sprpriority = 5

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

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

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,50]
trigger1 = time = 0
value = 15,2

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,33]
trigger1 = time = 140
value = 15,0

[State 180, 2]
type = playsnd
trigger1 = var(0) = [34,66]
trigger1 = time = 140
value = 15,1

[State 0, VelSet]
type = Veladd
trigger1 = time < 35
trigger1 = timemod = 2,0
x = .01
y = .3
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = Velset
trigger1 = time = 35
x = 0
y = 0
;ignorehitpause = 0
;persistent = 1

[State 0, VelSet]
type = Veladd
trigger1 = time > 140
x = -.1
y = -.4
;ignorehitpause = 0
;persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
ID=1804
stateno=1824
name="hair"
postype=p1
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100



[State 1025, flames]
type=helper
triggerall = time = [35,130]
trigger1 = timemod = 5,0
helpertype=normal
ID=1802
stateno=1823
name="attack"
postype=p1
pos = 40,-75
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

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

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

;Nova fireballs
[Statedef 1823]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1890
velset = 5, 0
poweradd = 65
sprpriority = 10

[State 0, PlaySnd]
type = PlaySnd
trigger1  = time = 0
value = 15,6

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

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

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

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 3+(random%10)
y = -3+(random%10)
;ignorehitpause = 0
;persistent = 1

[State 0, Explod]
type = Explod
trigger1 = timemod = 7,0
anim = 1891
pos = 0,0
removetime = -2
vel = -5+(random%10), 0+(random%10)
ontop = 1
ownpal = 1
scale = .5,.5



[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, SP
damage = 5, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = S930
guard.sparkno = S910
sparkxy = -10, -33
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -6.5 - (var(19) * 1.5)
air.type = Low
air.velocity = -4.5 - (var(19) * 1.5), -2
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
sprpriority = 2
palfx.time = 30
palfx.add = 200,100,0
palfx.sinadd = 200,150,0,24
palfx.color = 0
palfx.invertall = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
;trigger1 = Pos Y = 0
value = 1803

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 1803

;Nova Hair 3
[Statedef 1824]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1807
poweradd = 65
sprpriority = 4

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

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 0
time = -1
pos = -2,-93

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 35
time = -1
pos = 0,-100

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 130
time = -1
pos = 10,-100

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 140
time = -1
pos = -10,-100

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 150
time = -1
pos = -10,-100

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
;ignorehitpause = 0
;persistent = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time > 141
value = 1
;ignorehitpause = 0
;persistent = 1

[State 0]
type = Trans
trigger1 = 1
trans = add
;alpha =


[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != 1822
;ignorehitpause = 0
;persistent = 1

;Nova Hurt
[Statedef 1850]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1804
sprpriority = 5

[State 180, 2]
type = playsnd
trigger1 = time = 0
value = 15,3

[State 0, VelSet]
type = Veladd
trigger1 = timemod = 3,0
x = -3
y = -.1
;ignorehitpause = 0
;persistent = 1

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
ID=1851
stateno=1851
name="hair"
postype=p1
ignorehitpause=1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

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

;Nova Hair 1
[Statedef 1851]
type=A
physics=N
movetype=A
ctrl = 0
anim = 1810
sprpriority = 4

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

[State 0, BindToRoot]
type = BindToparent
trigger1 = time = 0
time = -1
pos = -24,-13

[State 0, DestroySelf]
type = DestroySelf
trigger1 = parent,stateno != 1850
;ignorehitpause = 0
;persistent = 1

;Effect Beams=================================
[Statedef 1920]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1920
sprpriority = 5
velset = 0,0

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = parent, stateno != 3800
trigger1 = time = 0
value = 3,1

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 3500
time = 6
pos = 60, -80

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 2000
time = 6
pos = -12,-135

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 3800
time = 6
pos = 0,-75

[State 0, BindToParent]
type = BindToRoot
trigger1 = root, stateno = 1510
time = -1
pos = 0,0

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleSet]
type = AngleSet
trigger1 = 1
value = 0+(random%360)
;ignorehitpause = 0
;persistent = 1

[State 0]
type = trans
trigger1 = 1
trans = add
;alpha =

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

;Effect Halo=================================
[Statedef 1921]
type = A
movetype = A
physics = N
ctrl = 0
anim = 1921
sprpriority = 5
velset = 0,0

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

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 3500
time = 6
pos = 60, -80

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 2000
time = 6
pos = -5,-125

[State 0, BindToParent]
type = BindToRoot
trigger1 = root, stateno = 1510
time = -1
pos = 0,0

[State 0, BindToParent]
type = BindToParent
trigger1 = parent, stateno = 3800
time = 6
pos = 0,-75

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale = .1+(.1*time),.1+(.1*time)

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = 0+(random%360)
;ignorehitpause = 0
;persistent = 1

[State 0]
type = trans
trigger1 = 1
trans = add
;alpha =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime  = 0
;===========================================================================
; HYPER COMBOS

;---------------------------------------------------------------------------
; Ultra Cosmic beam


; Avalanche
[Statedef 2010]
type = S
movetype = A
physics = S
ctrl = 0
anim = 2040
sprpriority = 1

[State 2010, 1]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 6

[State 2010, 2]
type = VarSet
trigger1 = time = 0
v = 0
value = EnemyNear, Life

[State 2010, 2a]
type = VarSet
trigger1 = 1
v = 1
value = EnemyNear, Life

[State 2010, 2b]
type = VarSet
trigger1 = time = 0
v = 18
value = 0

[State 2010, 2c]
type = VarSet
trigger1 = (var(0) - var(1)) >= 300
v = 18
value = 1
persistent = 0

[State 2010, 2d]
type = VarSet
trigger1 = time = 0
v = 27
value = 0

[State 2010, 3]
type = Explod
trigger1 = AnimElem = 4
ID = 4084
anim = 7100
postype = front
pos = 0, 0
facing = ifelse(Facing = -1, -1, 1)
bindtime = -1
removetime = -1
sprpriority = -2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2010, 4]
type = Explod
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
supermovetime = 9999
ownpal = 1

[State 2010, 5]
type = EnvColor
trigger1 = AnimElem = 4
value = 0, 0, 0
time = 50
under = 1
persistent = 0

[State 2010, 6]
type = SuperPause
trigger1 = AnimElem = 4
time = 50
anim = S7130
pos = 42, -104
sound = S3, 0
movetime = 50
poweradd = -1000
p2defmul = 1
unhittable = 1
persistent = 0

[State 2010, 7]
type = RemoveExplod
trigger1 = time = 56
ID = 4084

[State 2010, 8]
type = PlaySnd
trigger1 = AnimElem = 5
value = 4,6
channel = 0

[State 2010, 9]
type = Helper
trigger1 = AnimElem = 6
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 80, -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9a]
type = Helper
trigger1 = AnimElem = 6 = 2
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 100, -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9b]
type = Helper
trigger1 = AnimElem = 6 
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 140, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9c]
type = Helper
trigger1 = AnimElem = 6
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 170, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9d]
type = Helper
trigger1 = AnimElem = 6 = 2
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 210, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9e]
type = Helper
trigger1 = AnimElem = 6 
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 250, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9f]
type = Helper
trigger1 = AnimElem = 7
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 150, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9g]
type = Helper
trigger1 = AnimElem = 7
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 70, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9h]
type = Helper
trigger1 = AnimElem = 7
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 200, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 9i]
type = Helper
trigger1 = AnimElem = 7 = 2
name = "Ice Shard"
ID = 867
StateNo = 2020
postype = p1
pos = 190, -40 -(floor(ScreenPos Y))
ownpal = 1

[State 2010, 10]
type = PlaySnd
trigger1 = AnimElem = 6
value = 3, 4

[State 2010, 11]
type = EnvShake
trigger1 = AnimElem = 6
time = 40
freq = 150
ampl = -4

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

;---------------------------------------------------------------------------
; Avalanche - Ice Shard Fall
[Statedef 2020]
type = A
movetype = A
physics = N
sprpriority = ifelse(Random <= 499, 2, 3)
velset = 0, 3

[State 2020, 1]
type = ChangeAnim
trigger1 = var(0) = 0
value = 777

[State 2020, 1a]
type = VarRandom
trigger1 = var(0) = 0
v = 1
range = 5,50

[State 2020, 1b]
type = VelSet
trigger1 = var(0) = 0
y = .1 * var(1)

[State 2020, 1c]
type = VarSet
trigger1 = 1
fv = 0
value = parent, fvar(1)
ignorehitpause = 1

[State 2020, 1d]
type = AttackMulSet
trigger1 = 1
value = fvar(0) 
ignorehitpause = 1

[State 2020, 1e]
type = VarSet
trigger1 = 1
v = 4
value = parent, var(18)
ignorehitpause = 1

[State 2020, 2]
type = VarAdd
trigger1 = 1
v = 0
value = 1

[State 2020, 3]
type = VelAdd
trigger1 = 1
y = .31

[State 2020, 4]
type = NotHitBy
trigger1 = Time >= 0
time = 1
value = SCA, NA, SA, HA, NT, ST, HT
ignorehitpause = 1

[State 2020, 5]
type = HitOverride
trigger1 = Time >= 0
slot = 1
time = 1
stateno = 2030
attr = SCA, NP, SP, HP
ignorehitpause = 1

[State 2020, 6]
type = HitBy
trigger1 = Time >= 0
value = SCA, NP, SP, HP
time = 1
ignorehitpause = 1

[State 2020, 7]
type = HitDef
trigger1 = 1 ;var(0) = 1
attr = A, HP
hitflag = MAF
guardflag = MA
pausetime = 7, 11
damage = ifelse(var(4) = 1, 8, 75), 4
animtype = Hard
sparkno = 3
sparkxy = -10, -77
hitsound = S0, 5
guardsound = S0, 9
ground.velocity = -3, -5
ground.hittime = 18
air.velocity = -2, -5
air.hittime = 20
guard.slidetime = 11
guard.hittime = 14
guard.velocity = -8
fall = 1
air.fall = 1
fall.recover = 0
givepower = 45
getpower = 0

[State 2020, 8]
type = ParentVarAdd
trigger1 = MoveHit
v = 11
value = 1
persistent = 0
ignorehitpause = 1

[State 2020, 8a]
type = ParentVarSet
trigger1 = MoveHit
trigger1 = parent, WinKO
v = 16
value = 1
persistent = 0
ignorehitpause = 1

[State 2020, 8b]
type = ParentVarSet
trigger1 = MoveHit
v = 27
value = 1
persistent = 0
ignorehitpause = 1

[State 2020, 9]
type = ChangeState
trigger1 = MoveContact
value = 2030

[State 2020, 10]
type = ChangeState
trigger1 = Pos Y >= 35
value = 2030

;----------------------------------------------------------------------------
; Avalanche - Ice Shard Shatter
[Statedef 2030]
type = A
movetype = I
physics = N
anim = 9741
velset = 0, 0

[State 2030, 1]
type = PlaySnd
trigger1 = time = 0
value = 3, 5

[State 2030, 2]
type = VarRandom
trigger1 = 1
v = 1
range = -30,30

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

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

[State 2030, 5]
type = Explod
trigger1 = time = 0
ID = 7778
anim = 2070 + var(0)
postype = p1
bindtime = 1
removetime = 60
pos = 0, -35
scale = .75,.75
vel = .1 * var(1), -5 - (.1 * var(2))
accel = 0, .39
sprpriority = 4
ownpal = 1

[State 2030, 6]
type = Explod
trigger1 = time = 1
ID = 7778
anim = 2070 + var(0)
postype = p1
bindtime = 1
removetime = 60
pos = 0, -35
scale = .75,.75
vel = .1 * var(1), -5 - (.1 * var(2))
accel = 0, .39
sprpriority = 4
ownpal = 1

[State 2030, 7]
type = Explod
trigger1 = time = 2
ID = 7778
anim = 2070 + var(0)
postype = p1
bindtime = 1
removetime = 60
pos = 0, -35
scale = .75,.75
vel = .1 * var(1), -5 - (.1 * var(2))
accel = 0, .39
sprpriority = 4
ownpal = 1

[State 2030, 8]
type = Explod
trigger1 = time = 3
ID = 7778
anim = 2070 + var(0)
postype = p1
bindtime = 1
removetime = 60
pos = 0, -35
scale = .75,.75
vel = .1 * var(1), -5 - (.1 * var(2))
accel = 0, .39
sprpriority = 4
ownpal = 1

[State 2030, 9]
type = Null ;Explod
trigger1 = time = 4
ID = 7778
anim = 2070 + var(0)
postype = p1
bindtime = 1
removetime = 60
pos = 0, -35
scale = .75,.75
vel = .1 * var(1), -5 - (.1 * var(2))
accel = 0, .39
sprpriority = 4
ownpal = 1

[State 2030, 10]
type = DestroySelf
trigger1 = NumExplod(7778) = 0

;Super Portal Beams==================================
[Statedef 3000]
type = S
movetype = A
physics = S
ctrl = 0
anim = 3000
velset = 0, 0
sprpriority = 1

[State 2000, a]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 6

[State 2000, 7]
type = Explod
trigger1 = AnimElem = 2
ID = 4084
anim = 7100
postype = front
pos = 0, 0
facing = ifelse(Facing = -1, -1, 1)
bindtime = -1
removetime = 30
sprpriority = -2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2000, 8]
type = Explod
triggerall = StateType != A
trigger1 = AnimElem = 5
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
supermovetime = 9999
ownpal = 1

[State 2000, 8a]
type = PosFreeze
trigger1 = time = [7,57]
value = 1

[State 2000, 8b]
type = EnvColor
trigger1 = AnimElem = 2
value = 0, 0, 0
time = 50
under = 1
persistent = 0

[State 2000, 9]
type = SuperPause
trigger1 = AnimElem = 2
time = 50
anim = S7130
pos = 3, -72
sound = S3, 0
movetime = 50
poweradd = -1000
p2defmul = 1
unhittable = 1
persistent = 0
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1 = AnimElem = 5
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 50
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = AnimElem = 15
anim = 3506
ID = 8000
pos = 5,-200
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 2000, 6]
type = Explod
trigger1 = AnimElem = 5
ID = 8010
anim = 8010
postype = p1
pos = 7, -105
bindtime = -1
removetime = -2
sprpriority = 2
ontop = 1
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8005
postype = p1
ID = 8005
pos = 7,-200
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 42
removetime = 42
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, BlueFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8006
postype = p1
ID = 8005
pos = 7,-200
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 42
removetime = 42
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowBack]
type = Explod
trigger1 = AnimElem = 5
anim = 8007
postype = p1
ID = 8006
pos = 7,-200
sprpriority=-30
scale = .5,.5
bindtime = 42
removetime = 42
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, YellowFront]
type = Explod
trigger1 = AnimElem = 5
anim = 8008
postype = p1
ID = 8006
pos = 7,-200
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 42
removetime = 42
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 0, Helper]
type = Helper
trigger1 = AnimElem = 15
helpertype = normal
name = "beam caller"
Id = 8796
pos = 7,-170
postype = p1
facing = 1
stateno = 3001

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

[Statedef 3001]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1121:         BgPalfx]
type  = bgpalfx
trigger1 = time = 0
add                 = 200, 200, 200
sinadd              = -155,-155,-155,90
time                = 20

[State 2000, 8]
type = Explod
trigger1 = time = 0
anim = 7130
postype = p1
pos = 0, 0
bindtime = 1
removetime = -2
ontop = 1
sprpriority = 80
supermovetime = 9999
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 50
helpertype = normal
name = "telebeam"
Id = 8796
pos = 50,0
postype = p1
stateno = 3008
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 60
helpertype = normal
name = "telebeam"
Id = 8796
pos = 100,0
postype = p1
stateno = 3008
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 70
helpertype = normal
name = "telebeam"
Id = 8796
pos = 150,0
postype = p1
stateno = 3008
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 80
helpertype = normal
name = "telebeam"
Id = 8796
pos = 200,0
postype = p1
stateno = 3008
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 90
helpertype = normal
name = "telebeam"
Id = 8796
pos = 250,0
postype = p1
stateno = 3008
ownpal = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 100
;ignorehitpause = 0
;persistent = 1

;Portal Beam 1----------------------------------------------
[Statedef 3002]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

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

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -3, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0, Helper]
type = Helper
trigger1 = time = 20
helpertype = normal
name = "beam"
Id = 8796
pos = 0,0
postype = p1
stateno = 3005
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 20
helpertype = normal
name = "beam"
Id = 8796
pos = 0,0
postype = p1
stateno = 3006
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 10
helpertype = normal
name = "beam"
Id = 8796
pos = 0,0
postype = p1
stateno = 3003
ownpal = 1

[State 0, Helper]
type = Helper
trigger1 = time = 10
helpertype = normal
name = "beam"
Id = 8796
pos = 0,0
postype = p1
stateno = 3004
ownpal = 1

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 2----------------------------------------------
[Statedef 3003]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .1



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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -3, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 3----------------------------------------------
[Statedef 3004]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = -.1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -3, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 4----------------------------------------------
[Statedef 3005]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = .04



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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -3, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 5----------------------------------------------
[Statedef 3006]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

[State 0, VelAdd]
type = VelAdd
trigger1 = 1
x = -.04

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

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -3, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 6----------------------------------------------
[Statedef 3007]
type=A
physics=N
movetype=A
anim=8009
ctrl=0
velset=0,0
sprpriority=4

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP

[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = S, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -11, 0
ground.hittime = 30
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;Portal Beam 7----------------------------------------------
[Statedef 3008]
type = A
movetype = A
physics = N
anim=8009
ctrl=0
velset=0,0
sprpriority=4

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,11

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0,]
type = Explod
trigger1 = time = 10
anim = 7093
pos = 0,190
sprpriority=-40
ownpal = 1
scale = .75,.75
bindtime = 60
removetime = 60

[State 0,]
type = Explod
trigger1 = time > 10
trigger1 = timemod = 3,0
anim = 3505
pos = 0,0
vel = 0, 5
accel = 0, 2
random = 40, 10
scale = .2,.2
ontop = 1
sprpriority=35
ownpal = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 10
anim = 8005
ID = 8005
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 10
anim = 8006
ID = 8005
pos = 0,-10
ontop = 1
sprpriority=40
scale = .5,.75
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowBack]
type = Explod
trigger1 = time = 10
anim = 8007
ID = 8006
pos = 0,10
sprpriority=-30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 10
anim = 8008
ID = 8006
pos = 0,10
ontop = 1
sprpriority=30
scale = .5,.5
bindtime = 70
removetime = 60
persistent = 1

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

[State 3055, hitoverride]
type=nothitby
trigger1=1
time=-1
value=SCA,NP,SP,HP



[State 0, HitDef]
type = HitDef
trigger1 = timemod = 10,0
attr = A, SP
hitflag = MAF
guardflag =  MA
animtype = Hard
priority = 99,Hit
damage = 15,2
guard.sparkno=S910
sparkno=S900
sparkxy = -10, 81
hitsound = S0, 8
guardsound = S0, 9
ground.velocity = -11, 0
ground.hittime = 30
;ground.cornerpush.veloff = 0
air.hittime = 30
guard.slidetime = 8
guard.hittime = 16
guard.velocity = -5
down.velocity = -4, -5
down.hittime = 15
givepower = 40
getpower = 60
sprpriority = 2
palfx.time = 10
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 70
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 0,]
type = Explod
trigger1 = time = 70
anim = 3506
ID = 8000
pos = 0,-10
sprpriority=-40
ownpal = 1
scale = 2,2
bindtime = 70
removetime = 6

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;===========================================
;Cosmic Orb---------------------------------
;===========================================
[Statedef 3500]
type = S
movetype = A
physics = S
ctrl = 0
anim = 3500
velset = 0, 0
poweradd = 65
sprpriority = 1

[State 2000, a]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 6

[State 2000, 7]
type = Explod
trigger1 = AnimElem = 2
ID = 4084
anim = 7100
postype = front
pos = 0, 0
facing = ifelse(Facing = -1, -1, 1)
bindtime = -1
removetime = 30
sprpriority = -2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2000, 8]
type = Explod
triggerall = StateType != A
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
supermovetime = 9999
ownpal = 1

[State 2000, 8a]
type = PosFreeze
trigger1 = time = [7,57]
value = 1

[State 2000, 8b]
type = EnvColor
trigger1 = AnimElem = 2
value = 0, 0, 0
time = 50
under = 1
persistent = 0

[State 2000, 9]
type = SuperPause
trigger1 = AnimElem = 2
time = 50
anim = S7130
pos = 3, -72
sound = S3, 0
movetime = 50
poweradd = -1000
p2defmul = 1
unhittable = 1
persistent = 0
ignorehitpause = 1

[State 200, 3]
type = PlaySnd
trigger1 = animelem = 2
value = 13, 7


[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 200
value = 3504

[State 0, Explod]
type = Explod
trigger1 = time = 8
anim = 1905
;ID = 1905
pos = 55, -80
ontop = 1
scale = 1,1
bindtime = -1
removetime = 50
supermove = 1
pausemovetime = 50
persistent = 1

[State 3000, superchargehelper]
type=helper
triggerall =  time > 8
trigger1 = timemod = 12,0
trigger1 = time < 58
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 0, Explod]
type = Explod
trigger1 = time > 60
trigger1 = timemod = 4,0
anim = 1905
ID = 196
pos = 37,-112
bindtime = 3
removetime = 3
supermove = 1
scale = .3, .3
ontop = 1
ownpal = 1

[State 1000, 2]
type = Helper
trigger1 = AnimElem = 4
helpertype = normal
ID = 8796
name = "Orb"
StateNo = 3510
postype = p1
pos = 60, -80
ownpal = 1
size.xscale = 1
size.yscale = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 203
value = 0
ctrl = 1

[Statedef 3510]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 3510
juggle = 15
hitdefpersist = 1


[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = parent,WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -10

[State 3000, superchargehelper]
type=helper
trigger1 = root,command = "z"
;trigger1 = timemod = 10,0
helpertype=normal
stateno=3512
ID = 8796
name="Scatter shots"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, VelAdd]
type = Veladd
trigger1 = root,command = "holdup"
y = -.1

[State 0, VelAdd]
type = Veladd
trigger1 = root,command = "holddown"
y = .1

[State 0, VelAdd]
type = Veladd
trigger1 = root,command = "holdback"
x = -.1

[State 0, VelAdd]
type = Veladd
trigger1 = root,command = "holdfwd"
x = .1

[State 0, VelSet]
type = Velset
trigger1 = root,command = "holdc"
y = 0
x = 0

[State 0, VelSet]
type = Veladd
trigger1 = pos y >= 20
y = -.5


[State 0, Explod]
type = Explod
trigger1 = timemod = 4,0
anim = 1910
ID = 1910
pos = 0,0
sprpriority = 3
ontop = 1
scale = 1,1
bindtime = -1
removetime = 4

[State 3000, superchargehelper]
type=helper
trigger1 = timemod = 6,0
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = root,command = "z"
helpertype=normal
stateno=1921
ID=1921
name="Halo"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0]
type = Trans
trigger1 = 1
trans = add

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

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

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

[State 200, 1]
type = HitDef
trigger1 = timemod = 5,0
attr = S, SP
damage = 10, 2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 98, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, 0
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -6.5 - (var(19) * 1.5)
air.type = Low
air.velocity = -4.5 - (var(19) * 1.5), -2
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

[State 0, DestroySelf]
type = changestate
trigger1 = time = 193
value = 3511

[State 0, DestroySelf]
type = changestate
trigger1 = parent, stateno != 3500
value = 3511

[Statedef 3511]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 3510
juggle = 15
hitdefpersist = 1
shadow = 0,0,0

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 1910
ID = 1910
pos = 0,0
ontop = 1
bindtime = -1
removetime = 25

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 19
anim = 1910
scale = 1+(-.05*time), 1+(-.05*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time >= 19
anim = 1910
scale = 0+(.1*time), 0+(.1*time)

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

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1

[State 0, AngleAdd]
type = AngleAdd
trigger1 = 1
value = -10

[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
scale= 1+(-.05*time), 1+(-.05*time)

[State 3000, superchargehelper]
type=helper
trigger1 = time = 19
helpertype=normal
stateno=1920
ID=1920
name="Beam"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = 19
helpertype=normal
stateno=1920
ID=1920
name="Beam"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = 19
helpertype=normal
stateno=1921
ID=1921
name="Halo"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = 1
size.yscale = 1

[State 3000, superchargehelper]
type=helper
trigger1 = time = 19
helpertype=normal
stateno=1921
ID=1921
name="Halo"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = 1
size.yscale = 1

[State 0]
type = Trans
trigger1 = 1
trans = add

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 19
value = 3,16

[State 0, Explod]
type = Explod
trigger1 = time = 19
anim = 3506
ID = 3506
pos = 0,0
ontop = 1
scale = .5+(.05*time), .5+(.05*time)
bindtime = 1
removetime = 6

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 20

[Statedef 3512]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 3507
juggle = 15
hitdefpersist = 1
shadow = 0,0,0

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

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

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

[State 0, VelSet]
type = VelSet
trigger1 = timemod = 10,0
x = 0+(random%10)
y = -1+(random%10)
;ignorehitpause = 0
;persistent = 1


[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,6

[State 0, Explod]
type = Explod
trigger1 = timemod = 1,0
anim = 3505
ID = 3505
pos = 0,0
ontop = 1
scale = .5,.5
bindtime = 1
removetime = 6

[State 0, Explod]
type = Explod
trigger1 = timemod = 6,0
anim = 3506
ID = 3506
pos = 0,0
ontop = 1
scale = .5,.5
bindtime = -1
removetime = 6


[State 200, 1]
type = HitDef
trigger1 = 1
attr = S, SP
damage = 5, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, -63
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
ground.slidetime = 11
ground.hittime  = 12
ground.velocity = -6.5 - (var(19) * 1.5)
air.type = Low
air.velocity = -4.5 - (var(19) * 1.5), -2
air.hittime = 12
guard.slidetime = 9
guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
sprpriority = 2
palfx.time = 30
palfx.add = 0,200,200
palfx.sinadd = 0,200,50,24
palfx.color = 0
palfx.invertall = 1

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

[State 0, ChangeState]
type = ChangeState
trigger1 = movecontact
;trigger1 = Pos Y = 0
value = 3513

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >= 0
value = 3513

[Statedef 3513]
type = A
movetype = A
physics = N
sprpriority = 2
anim = 3506
juggle = 15
hitdefpersist = 1
shadow = 0,0,0

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = WinKO
;trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,7

[State 0, DestroySelf]
type = DestroySelf
trigger1 = animtime = 0
;ignorehitpause = 0
;persistent = 1

;lightspeed dash (off board)
[Statedef 3600]
type=A
physics=N
movetype=A
anim=8011
ctrl=0
velset=-10,0
juggle=15

[State 2000, a]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 6

[State 2000, 7]
type = Explod
trigger1 = AnimElem = 2
ID = 4084
anim = 7100
postype = front
pos = 0, 0
facing = ifelse(Facing = -1, -1, 1)
bindtime = -1
removetime = 30
sprpriority = -2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2000, 8]
type = Explod
triggerall = StateType != A
trigger1 = AnimElem = 5
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
supermovetime = 9999
ownpal = 1


[State 2000, 8b]
type = EnvColor
trigger1 = AnimElem = 2
value = 0, 0, 0
time = 50
under = 1
persistent = 0

[State 2000, 9]
type = SuperPause
trigger1 = AnimElem = 2
time = 50
anim = S7130
pos = 3, -72
sound = S3, 0
movetime = 50
poweradd = -1000
p2defmul = 1
unhittable = 1
persistent = 0
ignorehitpause = 1

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

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

[State 0, PosSet]
type = velset
trigger1 = time = 49
x= 0
y= -25

[State 0, ChangeState]
type = ChangeState
trigger1 = time = 50
value = 3601
ctrl = 0

[Statedef 3601]
type=A
physics=N
movetype=A
anim=8000
ctrl=0
;velset=25,0
juggle=15

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

[State 200, 6]
type = PlaySnd
trigger1 = time = 0
value = 3, 9

[State 4000, nhb]
type=nothitby
trigger1=1
time=5
value=SCA

;Immune to air throws
[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = 1
time            = 5
value           = , NT, ST, HT
ignorehitpause  = 1

;Immune to air throws
[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = 1
time            = 5
value           = , NP, SP, HP
ignorehitpause  = 1

[State 3005, hitoverride]
type=hitoverride
trigger1=1
time=1
attr=SCA,NP,SP,HP
stateno=3601
ignorehitpause=1


[State 0, Explod]
type = Explod
trigger1 = timemod = 2,0
trigger1 = time < 80
anim = 881
ID = 881
pos = 50,-5
ontop = 1
ownpal = 1
scale = .5,.5
vel = -3,0
removetime = 10

[State 1010, 3]
type = Explod
trigger1 = timemod = 3,0
trigger1 = time < 80
ID = 7094
anim = 7094
postype = p1
vel = 0,0
pos = 0, -10
;random = 10,10
scale = 1, 1
removetime = -2
sprpriority = -5

ownpal = 1
ignorehitpause = 1

;[State 0, PosSet]
;type = velset
;trigger1 = time = 0
;x= 0
;y= -50

[State 0, PosSet]
type = velset
trigger1 = time = 1
x= 35
y= 0

[State 1010, 3]
type = Explod
trigger1 = time = 0
ID = 1302
anim = 1302
postype = p1
pos = 106, -11
bindtime = -1
scale = 2, .5
removetime = 80
removeongethit = 1
sprpriority = 5
ontop = 1
ownpal = 1
ignorehitpause = 1

[State 4000, hit]
type=hitdef
trigger1=!movecontact
attr=S,HA
damage=300,20
animtype=Diagup
guardflag=M
hitflag=MAF
priority=100,Hit
pausetime= 1,15
sparkno=s900
guard.sparkno=s910
sparkxy=10,0
hitsound=s0,5
guardsound=s1,1
ground.type=Low
ground.slidetime=24
ground.hittime=24
ground.velocity=-3,-15
ground.cornerpush.veloff=0
air.type=Low
air.velocity=-3,-15
guard.dist=320
getpower=0
envshake.time=16
envshake.freq=60
envshake.ampl=8
sprpriority=5
fall=1
fall.recover=0
ID=4000
yaccel=.5

[State 4000, hit]
type=hitdef
trigger1=moveguarded
trigger1 = timemod = 5,0
attr=S,HA
damage=0,20
animtype=Diagup
guardflag=M
hitflag=MAF
priority=100,Hit
pausetime= 5,5
sparkno=s900
guard.sparkno=s910
sparkxy=10,0
hitsound=s0,5
guardsound=s1,1
ground.type=Low
ground.slidetime=24
ground.hittime=24
ground.velocity=-3,-15
ground.cornerpush.veloff=0
air.type=Low
air.velocity=-3,-15
guard.dist=320
getpower=0
envshake.time=16
envshake.freq=60
envshake.ampl=8
sprpriority=5
fall=1
fall.recover=0
ID=4000
yaccel=.5





[State 0, PlayerPush]
type = PlayerPush
trigger1 = moveguarded
value = 0
;ignorehitpause = 0
;persistent = 1



[State 1025, flames]
type=helper
trigger1=movehit
helpertype=normal
stateno=7180
ID=7181
name="cosmic_sparks"
postype=p2
bindtime=1000
ownpal=1
facing=-1
size.ground.front=0
size.ground.back=0
ignorehitpause=1
persistent=0

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



[State 0, ChangeState]
type = ChangeState
trigger1 = time = 100
value = 3602
ctrl = 0

[Statedef 3602]
type=A
physics=N
movetype=I
ctrl=0
velset=0,0
anim = 8012

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

[State 0, Helper]
type = Helper
trigger1 = time = 1
helpertype = normal
name = "return portal"
pos = 0,-30
stateno = 7183

[State 0, VelSet]
type = VelSet
trigger1 = time = 20
x = 5

[State 0, VelSet]
type = VelSet
trigger1 = time > 25
y = -1

[State 4002, pos]
type=posset
trigger1=time = 0
x=-100

[State 4002, pos]
type=posset
trigger1=time = 0
trigger1 = facing = -1
x=100



[State 4002, end]
type=changestate
trigger1=animtime = 0
value=730
ctrl=1



;=============================================================
;Call Galactus================================================
;=============================================================

[Statedef 3900]
type    = S
movetype= A
physics = S
ctrl = 0
anim = 2005
velset = 0, 0
sprpriority = 5

[State 2000, a]
type = NotHitBy
trigger1 = time = 0
value = SCA
time = 6

[State 2000, 6]
type = Explod
trigger1 = Anim = 2000
trigger1 = AnimElem = 3
trigger2 = Anim = 2100
trigger2 = AnimElem = 2
ID = 4084
anim = ifelse(Anim = 2000, 2001, 2002)
postype = p1
pos = 0, 0
bindtime = -1
removetime = -1
sprpriority = 2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2000, 7]
type = Explod
trigger1 = AnimElem = 2
ID = 4084
anim = 7100
postype = front
pos = 0, 0
facing = ifelse(Facing = -1, -1, 1)
bindtime = -1
removetime = 30
sprpriority = -2
ownpal = 1
supermovetime = 9999
removeongethit = 1
persistent = 0

[State 2000, 8]
type = Explod
triggerall = StateType != A
trigger1 = time = 0
ID = 857
anim = 7080
postype = p1
pos = 0, 8
bindtime = 1
removetime = -2
sprpriority = 3
supermovetime = 9999
ownpal = 1

[State 2000, 8a]
type = PosFreeze
trigger1 = time = [7,57]
value = 1

[State 2000, 8b]
type = EnvColor
trigger1 = AnimElem = 2
value = 0, 0, 0
time = 50
under = 1
persistent = 0

[State 2000, 9]
type = SuperPause
trigger1 = AnimElem = 2
time = 50
anim = S7130
pos = 3, -72
sound = S3, 0
movetime = 50
poweradd = -1000
p2defmul = 1
unhittable = 1
persistent = 0
ignorehitpause = 1

[State 0, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 13, 4
volume = 200


[State 0, PowerAdd]
type = PowerAdd
trigger1 = AnimElem = 2
value = -3000
;ignorehitpause = 0
;persistent = 1

[State 3000, superchargehelper]
type=helper
trigger1=time = 60
helpertype=normal
stateno=3901
ID=3901
name="Galactus"
postype = front
pos=-520,40
ownpal=1
persistent=0
supermovetime=9999

[State 200, 7]
type = ChangeState
trigger1 = time = 300
value = 0
ctrl = 1



; Galactus==========================
[Statedef 3901]
type=A
physics=N
movetype=A
ctrl = 0
;anim = 3901
velset = 6, 0
poweradd = 65
sprpriority = -1

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = parent,WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = 6

[State 0, VelSet]
type = Veladd
trigger1 = time > 0
trigger2 = time < 30
x = -.02

[State 0, VelSet]
type = VelSet
trigger1 = time = 30
x = 0

[State 0, VelSet]
type = Veladd
trigger1 = time > 60
x = .1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 1
value = 3901
;elem =
;ignorehitpause = 0
;persistent = 1


[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nofg
flag2 = nobg

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

[State 0, PlaySnd]
type = PlaySnd
trigger1 = timemod = 6,0
trigger1 = time < 66
value = 3, 17
channel = 3
volume = 50

[State 3000, superchargehelper]
type=helper
trigger1 = time = 6;,0
helpertype=normal
stateno=3902
ID=3512
name="eyebeams"
postype=p1
pos=100,-219
ownpal=1
persistent=1
size.xscale = 1
size.yscale = .6
supermovetime = 100
pausemovetime = 100

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 66
value = 14, 0
channel = 10
volume = 200
ignorehitpause = 1
persistent = 1

[State 3000, superchargehelper]
type=helper
trigger1 = time = 6
helpertype=normal
stateno=3903
ID=3512
name="eyebeams"
postype=p1
pos=130,-219
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, Explod]
type = Explod
trigger1 = time = 0
anim = 3902
ID = 3902
bindtime = 123456
supermove = 1
sprpriority = -1
ignorehitpause = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = frontedgedist<-320||backedgedist<-320
ID = 3902

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = time = 400
ID = 3902

[State 200, 1]
type = HitDef
trigger1 = timemod = 5,0
attr = S, SP
damage = 25, 5
animtype = Light
guardflag = MA
hitflag = MAF
priority = 100, Hit
pausetime = 0, 0
sparkno = 0
sparkxy = -10, -63
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
fall = 1
;ground.slidetime = 11
;ground.hittime  = 12
ground.velocity = 6, -5
air.type = Low
air.velocity = -4.5 , -3
sprpriority = 1
;air.hittime = 12
;guard.slidetime = 9
;guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35

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

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

[Statedef 3902]
type=A
physics=N
movetype=A
ctrl = 0
anim = 3903
;velset = 6, 0
poweradd = 65
sprpriority = -1

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = parent,WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

[State 0, Explod]
type = Explod
trigger1 = timemod = 4,0
anim = 3904
ID = 3904
postype = p1
bindtime = 10
removetime = 4
supermove = 1
scale = .75,.75
sprpriority = 10
ontop = 1
ownpal = 1

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

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

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

;Immune to air throws
[State 8061:    NotHitBy]
type            = NotHitBy
trigger1        = 1
time            = 1
value           = , NT, ST, HT
ignorehitpause  = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 40,-70,-200
mul = 256,256,256
sinadd = 40,30,0,6
invertall = 0
color = 10


[State 0, BindToRoot]
type = BindToparent
trigger1 = 1
time = 1
;facing = 0
pos=100,-219
;ignorehitpause = 0
;persistent = 1

[State 200, 1]
type = HitDef
trigger1 = timemod = 5,0
attr = S, SP
damage = 15, 2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 110, Hit
pausetime = 0, 0
sparkno = -1
sparkxy = -10, -63
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
fall = 1
;ground.slidetime = 11
;ground.hittime  = 12
ground.velocity = 6, -7
air.type = Low
air.velocity = -1.5 , -3
;air.hittime = 12
;guard.slidetime = 9
;guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
persistent = 1
yaccel = .09
sprpriority = 2
palfx.time = 30
palfx.add = 200,100,0
palfx.sinadd = 200,100,0,24
palfx.color = 0
palfx.invertall = 1

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

[Statedef 3903]
type=A
physics=N
movetype=A
ctrl = 0
anim = 3903
;velset = 6, 0
poweradd = 65
sprpriority = -1

[State -2, Hyper Combo Finish]
type = Helper
triggerall = NumHelper(111) = 0
trigger1 = parent,WinKO
trigger1 = movecontact
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

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

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

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

[State 0, Explod]
type = Explod
trigger1 = timemod = 4,0
anim = 3904
ID = 3904
postype = p1
bindtime = 10
removetime = 4
supermove = 1
scale = .75,.75
sprpriority = 10
ontop = 1
ownpal = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
time = 1
add = 40,-70,-200
mul = 256,256,256
sinadd = 40,30,0,6
invertall = 0
color = 10


[State 0, BindToRoot]
type = BindToparent
trigger1 = 1
time = 1
;facing = 0
pos=130,-219
;ignorehitpause = 0
;persistent = 1

[State 200, 1]
type = HitDef
trigger1 = timemod = 5,0
attr = S, SP
damage = 15, 2
animtype = Light
guardflag = MA
hitflag = MAF
priority = 110, Hit
pausetime = 0, 0
sparkno = -1
sparkxy = -10, -63
hitsound = S0, 3
guardsound = S0, 9
ground.type = High
fall = 1
;ground.slidetime = 11
;ground.hittime  = 12
ground.velocity = 6, -7
air.type = Low
air.velocity = -1.5 , -3
;air.hittime = 12
;guard.slidetime = 9
;guard.hittime = 18
guard.velocity = -5.8 - (var(19) * 1.5)
givepower = 20
getpower = 35
persistent = 1
yaccel = .09
sprpriority = 2
palfx.time = 30
palfx.add = 200,100,0
palfx.sinadd = 100,100,0,24
palfx.color = 0
palfx.invertall = 1

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

;===========================================================================
; REPORT HELPER STATES

;---------------------------------------------------------------------------
; "Danger!" Helper
[Statedef 9000]
type = A
movetype = I
physics = N
anim = 9741

[State 9000, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = parent, var(12)

[State 9000, 2]
type = Explod
triggerall = var(0) = 1
trigger1 = time = 0
ID = 547
anim = 6150
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9000, 2]
type = Explod
triggerall = var(0) = 1
trigger1 = time = 0
ID = 547
anim = 6151
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9000, 3]
type = Explod
triggerall = var(0) = -1
trigger1 = time = 0
ID = 547
anim = 6155
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9000, 3]
type = Explod
triggerall = var(0) = -1
trigger1 = time = 0
ID = 547
anim = 6156
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9000, 4]
type = PlaySnd
trigger1 = time = 0
value = 5, 0
volume = 200

[State 9000, 5]
type = DestroySelf
trigger1 = NumExplod(547) = 0
trigger2 = time = 500

;---------------------------------------------------------------------------
; "First Attack" Message
[Statedef 9010]
type = A
movetype = I
physics = N
anim = 9741

[State 9010, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = parent, var(12)

[State 9010, 2]
type = Explod
triggerall = var(0) = 1
trigger1 = time = 0
ID = 548
anim = 6160
postype = left
pos = 0, 54
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9010, 3]
type = Explod
triggerall = var(0) = -1
trigger1 = time = 0
ID = 548
anim = 6165
postype = right
pos = 0, 54
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9010, 4]
type = PlaySnd
trigger1 = time = 0
value = 5, 2
volume = 200

[State 9010, 5]
type = DestroySelf
trigger1 = NumExplod(548) = 0
trigger2 = time = 500

;---------------------------------------------------------------------------
; Combo Report Helper
[Statedef 9020]
type = A
movetype = I
physics = N
anim = 9741

[State 9020, 2]
type = VarSet
trigger1 = time = 0
v = 1
value = parent, var(15)

[State 9020, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = parent, var(12)

[State 9020, 1a]
type = VarSet
trigger1 = time = 0
v = 2
value = parent, var(16)

[State 9020, 3]
type = Explod
triggerall = var(0) = 1
triggerall = var(1) = [3,4]
trigger1 = time = 0
ID = 548
anim = 6170
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 4]
type = Explod
triggerall = !var(2)
triggerall = var(0) = -1
triggerall = var(1) = [3,4]
trigger1 = time = 0
ID = 548
anim = 6175
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 5]
type = Explod
triggerall = !var(2)
triggerall = var(0) = 1
triggerall = var(1) = [5,6]
trigger1 = time = 0
ID = 548
anim = 6180
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 6]
type = Explod
triggerall = !var(2)
triggerall = var(0) = -1
triggerall = var(1) = [5,6]
trigger1 = time = 0
ID = 548
anim = 6185
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 7]
type = Explod
triggerall = !var(2)
triggerall = var(0) = 1
triggerall = var(1) = [7,9]
trigger1 = time = 0
ID = 548
anim = 6190
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 8]
type = Explod
triggerall = !var(2)
triggerall = var(0) = -1
triggerall = var(1) = [7,9]
trigger1 = time = 0
ID = 548
anim = 6195
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 9]
type = Explod
triggerall = !var(2)
triggerall = var(0) = 1
triggerall = var(1) = [10,12]
trigger1 = time = 0
ID = 548
anim = 6200
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 10]
type = Explod
triggerall = var(0) = -1
triggerall = var(1) = [10,12]
trigger1 = time = 0
ID = 548
anim = 6205
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 11]
type = Explod
triggerall = var(0) = 1
triggerall = var(1) = [13,14]
trigger1 = time = 0
ID = 548
anim = 6210
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 12]
type = Explod
triggerall = var(0) = -1
triggerall = var(1) = [13,14]
trigger1 = time = 0
ID = 548
anim = 6215
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 13]
type = Explod
triggerall = var(0) = 1
triggerall = var(1) >= 15
trigger1 = time = 0
ID = 548
anim = 6220
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 14]
type = Explod
triggerall = var(0) = -1
triggerall = var(1) >= 15
trigger1 = time = 0
ID = 548
anim = 6225
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9020, 15]
type = PlaySnd
triggerall = var(1) = [3,4]
trigger1 = time = 0
value = 5, 3
volume = 200

[State 9020, 16]
type = PlaySnd
triggerall = var(1) = [5,6]
trigger1 = time = 0
value = 5, 7
volume = 200

[State 9020, 17]
type = PlaySnd
triggerall = var(1) = [7,9]
trigger1 = time = 0
value = 5, 4
volume = 200

[State 9020, 18]
type = PlaySnd
triggerall = var(1) = [10,12]
trigger1 = time = 0
value = 5, 8
volume = 200

[State 9020, 19]
type = PlaySnd
triggerall = var(1) = [13,14]
trigger1 = time = 0
value = 5, 6
volume = 200

[State 9020, 20]
type = PlaySnd
triggerall = var(1) >= 15
trigger1 = time = 0
value = 5, 1
volume = 200

[State 9020, 21]
type = DestroySelf
trigger1 = NumExplod(548) = 0
trigger2 = time = 500

;---------------------------------------------------------------------------
; Hyper Combo Finish
[Statedef 9030]
type = A
movetype = I
physics = N
anim = 9741

[State 9030, 1]
type = Explod
trigger1 = time = 0
ID = 894
anim = 7110
postype = left
pos = 0, 0
bindtime = -1
removetime = -2
sprpriority = -5
ownpal = 1

[State 9030, 1a]
type = ParentVarSet
trigger1 = time = 0
v = 25
value = 1

[State 9030, 2]
type = AssertSpecial
trigger1 = NumExplod(894) > 0
flag = NoBG
flag2 = NoFG
flag3 = NoMusic

[State 9030, 3]
type = PlaySnd
trigger1 = time = 0
value = 3, 2
volume = 250

[State 9030, 4]
type = PlaySnd
trigger1 = time = 30
value = 5, 5

[State 9030, 5]
type = VarAdd
trigger1 = NumExplod(894) = 0
v = 0
value = 1

[State 9030, 6]
type = ParentVarSet
trigger1 = var(0) >= 1
v = 25
value = 2

;---------------------------------------------------------------------------
; "Reversal" Helper
[Statedef 9040]
type = A
movetype = I
physics = N
anim = 9741

[State 9040, 1]
type = VarSet
trigger1 = time = 0
v = 0
value = parent, var(12)

[State 9040, 2]
type = Explod
triggerall = var(0) = 1
trigger1 = time = 0
ID = 547
anim = 6230
postype = left
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9040, 3]
type = Explod
triggerall = var(0) = -1
trigger1 = time = 0
ID = 547
anim = 6235
postype = right
pos = 0, 70
bindtime = -1
removetime = -2
ontop = 1
ownpal = 1

[State 9040, 5]
type = DestroySelf
trigger1 = NumExplod(547) = 0
trigger2 = time = 500

;Super Afterimage====================
[Statedef 9050]
type=A
physics=N
anim=9741
sprpriority=20
ctrl=0

[State 0, PalFXWiz]
type = PalFX
trigger1 = time = 0
time = 30
add = 0,200,100
mul = 0,200,100
sinadd = 0,200,100,5
invertall = 0
color = 0
ignorehitpause = 0
persistent = 1

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

[State 77, noshadow]
type=assertspecial
trigger1=1
flag=noshadow

[State 77, bind]
type=bindtoroot
trigger1=1
pos= 0,0
facing=1
persistent = 1

[State 77, trans]
type=angledraw
trigger1= 1
scale= 1 + (.01*time), 1 + (.01*time)
persistent = 1

[State 77, trans]
type=trans
trigger1= 1
trans=add
ignorehitpause=1

[State 77, anim]
type=changeanim
trigger1=selfanimexist(root,anim)
value=(root,anim)
elem=(root,animelemno(0))
persistent = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 10
;ignorehitpause = 0
;persistent = 1


;---------------------------------------------------------------------------
; HITG_SHAKE
[Statedef 5000]
type    = S
movetype= H
physics = N
velset = 0,0

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,50]
trigger1 = time = 0
value = 4,4

[State 5000, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(groundtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5000, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5000, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5000, 4] ;Freeze anim
type = Null ;ChangeAnim
trigger1 = Time > 0
value = anim

[State 5000, 5] ;State type gets set to aerial if getting hit up
type = StateTypeSet
trigger1 = Time = 0
trigger1 = GetHitVar(yvel) != 0 && GetHitVar(fall)
trigger2 = Pos Y != 0
type = a

[State 5000, 6]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5001 ;HITG_SLIDE

[State 5000, 7]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5000, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5000, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5000, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITG_SLIDE
[Statedef 5001]
type    = S
movetype= H
physics = S

[State 5001, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5001, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10

[State 5001, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5001, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5001, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5001, 6]
type = ChangeState
trigger1 = HitOver
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HITC_SHAKE
[Statedef 5010]
type    = C
movetype= H
physics = N
velset = 0,0

[State 5010, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = 5020 + GetHitVar(animtype)

[State 5010, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5010, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5010, 4] ;Freeze anim
type = Null ;ChangeAnim
trigger1 = Time > 0
value = anim

[State 5010, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5011 ;HITC_SLIDE

[State 5010, 6]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5010, FFB Light]
type = ForceFeedback
trigger1 = anim = 5020
persistent = 0
time = 6
waveform = square

[State 5010, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5021
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5010, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5022
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HITC_SLIDE
[Statedef 5011]
type    = C
movetype= H
physics = C

[State 5011, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5011, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 5025 + GetHitVar(animtype)

[State 5011, 3] ;Stop sliding back
type = VelMul
trigger1 = Time >= GetHitVar(slidetime)
x = .6

[State 5011, 4]
type = VelSet
trigger1 = HitOver
x = 0

[State 5011, 5]
type = DefenceMulSet
trigger1 = HitOver
value = 1

[State 5011, 6]
type = ChangeState
trigger1 = HitOver
value = 11
ctrl = 1

;---------------------------------------------------------------------------
; HITA_SHAKE
[Statedef 5020]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5020, 1] ;Anim for HIT_LIGHT to HIT_HARD
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) != [3,5]
value = ifelse((GetHitVar(airtype) = 1),5000,5010) + GetHitVar(animtype)

[State 5020, 2] ;Anim for HIT_BACK
type = ChangeAnim
trigger1 = Time = 0
trigger1 = GetHitVar(animtype) = [3,5]
value = 5030

[State 5020, 3] ;Anim for HIT_UP/HIT_DIAGUP (only if it exists)
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (GetHitVar(animtype) = [4,5]) && (SelfAnimExist(5047 + GetHitVar(animtype)))
value = 5047 + GetHitVar(animtype) ;5051 - 4 + type

[State 5020, 4] ;Freeze anim
type = Null ;ChangeAnim
trigger1 = Time > 0
value = anim

[State 5020, 5]
type = ChangeState
trigger1 = HitShakeOver
value = 5030

[State 5020, FFB Light]
type = ForceFeedback
trigger1 = anim = 5000
trigger2 = anim = 5010
persistent = 0
time = 6
waveform = square

[State 5020, FFB Medium]
type = ForceFeedback
trigger1 = anim = 5001
trigger2 = anim = 5011
persistent = 0
time = 8
waveform = sinesquare
ampl = 110,-1,-.3

[State 5020, FFB Hard]
type = ForceFeedback
trigger1 = anim = 5012
trigger2 = anim = 5002
trigger3 = anim = 5030
trigger4 = anim = [5051,5059]
persistent = 0
time = 15
waveform = sinesquare
ampl = 140

; HITA_UP (initial going up)
[Statedef 5030]
type    = A
movetype= H
physics = N
ctrl = 0

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

[State 180, 2]
type = playsnd
trigger1 = var(0) = [0,50]
trigger1 = time = 0
value = 4,1

[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, 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, 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

;---------------------------------------------------------------------------
; HITA_RECOV (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMPLAND

;---------------------------------------------------------------------------
; HITA_FALL (knocked up, falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

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

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > -1
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, 25)
value = 5100 ;HIT_BOUNCE

;---------------------------------------------------------------------------
; HIT_TRIP (shaking)
[Statedef 5070]
type    = A
movetype= H
physics = N
velset = 0,0

[State 5070, 1]
type = ChangeAnim
trigger1 = 1
value = 5070

[State 5070, 2]
type = ChangeState
trigger1 = HitShakeOver
value = 5071

[State 5070, 3]
type = ForceFeedback
trigger1 = time = 0
time = 12
waveform = sinesquare
ampl = 140

;---------------------------------------------------------------------------
; HIT_TRIP2 (fall through air)
[Statedef 5071]
type    = A
movetype= H
physics = N

[State 5071, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1
y = 1

[State 5071, 2] ;Acceleration
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5071, 3] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 15
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HITL_SHAKE
[Statedef 5080]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5080, 1] ;Set default anim
type = VarSet
trigger1 = time = 0
sysvar(2) = ifelse (GetHitVar(yvel) = 0, 5080, 5090)

[State 5080, 2]
type = VarAdd
trigger1 = time = 0
trigger1 = (anim = [5081,5089]) || (anim = [5111,5119])
trigger1 = SelfAnimExist(sysvar(2) + (anim % 10))
sysvar(2) = anim % 10

[State 5080, 3] ;If 5090 doesn't exist, default to 5030
type = VarSet
trigger1 = time = 0
trigger1 = sysvar(2) = 5090
trigger1 = !SelfAnimExist(5090)
sysvar(2) = 5030

[State 5080, 3] ;Freeze
type = ChangeAnim
trigger1 = 1
value = sysvar(2)
persistent = 0

[State 5080, 4]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) = 0
value = 5081 ;HITL_SLIDE

[State 5080, 5]
type = ChangeState
trigger1 = HitShakeOver
trigger1 = GetHitVar(yvel) != 0
value = 5030 ;HITA_UP

;---------------------------------------------------------------------------
; HITL_SLIDE
[Statedef 5081]
type    = L
movetype= H
physics = C

[State 5081, 1]
type = HitVelSet
trigger1 = Time = 0
x = 1

[State 5081, 2]
type = VelSet
trigger1 = HitOver
x = 0

[State 5081, 3] ;Don't show hit ground frame
type = VarSet
trigger1 = Time = 0
sysvar(0) = 1

[State 5081, 4]
type = ChangeState
trigger1 = HitOver
value = 5110 ;HIT_LIEDOWN

;---------------------------------------------------------------------------
; HIT_BOUNCE (hit ground)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, 1]
type = VelSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
trigger1 = vel x > 1
x = 1

[State 5100, ChangeState]
type = ChangeState
triggerall = Alive
trigger1 = var(4) = 1
value = 690

[State 5100, Thud]
type = PlaySnd
trigger1 = Time = 1
;value = F7, 0 ;Hit ground
value = F7, (sysvar(1) > 5) + (sysvar(1) > 14)

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
;trigger1 = GetHitVar(fall.yvel) = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;HIT_LIEDOWN

[State 5100, 8]
type = GameMakeAnim
trigger1 = Time = 1
;value = 61
;pos = 0, 0
;under = 1
value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
pos = 0, 0
under = sysvar(1) <= 10

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5110

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20

; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = PosSet
trigger1 = Time = 0
y = 20

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = 1
y = .4

[State 5101, 6] ;Hit ground
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 12
type = ChangeState
value = 5110

;---------------------------------------------------------------------------
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, Reset]
type = VarSet
trigger1 = time = 0
v = 26
value = 0

[State 5110, 1]
type = ChangeAnim
trigger1 = time = 0
value = 5110

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine

; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

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

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 5] ;Can't be thrown right after getting up
type = NotHitBy
trigger1 = AnimTime = 0
value = , NT,ST,HT
time = 12

[State 5120, 6] ;Can't be hit right after getting up (short time)
type = NotHitBy
trigger1 = AnimTime = 0
value2 = SCA
time = 3

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

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

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

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (still falling)
[Statedef 5200]
type    = A
movetype= H
physics = N

[State 5200, 1] ;Change anim if done with transition
type = ChangeAnim
trigger1 = Anim = 5035
trigger1 = AnimTime = 0
value = 5050

[State 5200, 2]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5200, 3]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 10
value = 5201

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = A
movetype= H
physics = A
anim = 5200

[State 5201, 1] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 5201, 2]
type = VelSet
trigger1 = Time = 0
x = -.15
y = -3.5

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

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

[State 5201, 5] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5201, 6]
type = GameMakeAnim
trigger1 = Time = 1
value = 60
pos = 0, 0
under = 1

;---------------------------------------------------------------------------
; HIT_AIRFALLRECOVER
[Statedef 5210]
type    = A
movetype= I
physics = N
anim = 5210
ctrl = 0

[State 5210, 1] ;Blink white
type = PalFX
trigger1 = Time = 0
time = 3
add = 128,128,128 ;256,256,256

[State 5210, 1]
type = PosFreeze
trigger1 = Time = 0
value = 4

[State 5210, 2] ;Turn if not facing opponent
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -20

[State 5210, 1]
type = VelMul
trigger1 = Time = 4
x = .8
y = .8

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
y = -4.5

[State 5210, 1]
type = VelMul
trigger1 = Time = 4
trigger1 = Vel Y > 0
y = .5

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -3
y = -2

[State 5210, 1]
type = VelAdd
trigger1 = Time = 4
trigger1 = Vel Y > -2
y = -1

[State 5210, 2] ;Go up
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdup"
y = -2

[State 5210, 2] ;Go down
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holddown"
y = 1.5

[State 5210, 2] ;Go fwd
type = VelMul
trigger1 = Time = 4
trigger1 = Command = "holdfwd"
x = 1

[State 5210, 2] ;Go back
type = VelAdd
trigger1 = Time = 4
trigger1 = Command = "holdback"
x = -1

[State 5210, 3]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 15

[State 5210, 4]
type = CtrlSet
trigger1 = Time = 20
value = 1

[State 5210, 5]
type = VelAdd;Gravity
trigger1 = Time >= 4
y = .35

[State 5210, 5] ;Land on ground
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;JUMP_LAND
ctrl = 1

;---------------------------------------------------------------------------
; Continue?
[Statedef 5500]
type = S
ctrl = 0
anim = 5300
velset = 0,0

[State 5500, 1] ;Use continue animation if available
type = ChangeAnim
trigger1 = time = 0
trigger1 = SelfAnimExist(5500)
value = 5500

;---------------------------------------------------------------------------
; Initialize (at the start of the round)
[Statedef 5900]
type = S

[State 5900, 1] ;Clear all int variables
type = VarRangeSet
trigger1 = roundno = 1
value = 0

[State 5900, 2] ;Clear all float variables
type = VarRangeSet
trigger1 = roundno = 1
fvalue = 0

[State 5900, 2a]
type = VarSet
trigger1 = time = 0
fv = 1
value = 1

[State 5900, Get ScreenPos]
type = VarSet
triggerall = var(5) = 0
trigger1 = time = 0
v = 5
value = floor(ScreenPos Y)

[State 5900, Get Facing]
type = VarSet
triggerall = var(12) = 0
trigger1 = time = 0
v = 12
value = Facing

[State 5900, Set AI]
type = VarSet
triggerall = var(59) = 1
trigger1 = time = 0
v = 17
value = 1

[State 5900, 3] ;Intro
type = ChangeState
trigger1 = roundno = 1
value = 190

;Damage Sparks
[Statedef 7180]
physics=N
velset=0,0
anim=9741
sprpriority=4

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

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3507
ID = 3507
pos = 0,0
vel = -5+(random%10),-10+(random%10)
ontop = 1
scale = .5,.5
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3507
ID = 3507
pos = 0,0
vel = 5+(random%10),10+(random%10)
ontop = 1
scale = .5,.5
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3505
ID = 3505
pos = 0,0
vel = -10+(random%10),-10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 28

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 3505
ID = 3505
pos = 0,0
vel = 10+(random%10),10+(random%10)
ontop = 1
scale = .1,.1
bindtime = 1
removetime = 28

[State 7180, pos]
type=posadd
trigger1=time<5
x=ceil(p2dist x)
y=ceil(p2dist y)

[State 7180, end]
type=destroyself
trigger1 = time = 3
trigger2=enemynear,ctrl||(enemynear,movetype!=H)||(enemynear,statetype=L)


[Statedef 7181]
physics=N
velset=0,0
anim=9741
sprpriority=6000

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

[State 0, BindToRoot]
type = BindToRoot
trigger1 = root, stateno = 600
time = 100
pos = 65,-45
persistent = 1

[State 0, BindToRoot]
type = BindToparent
trigger1 = parent, stateno = 601
time = 100
pos = 10,0
persistent = 1

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
ontop = 1
sprpriority=40
scale = .2,.2
bindtime = 1
removetime = 5

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
ontop = 1
sprpriority=40
scale = .1,.1
bindtime = 1
removetime = 5

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 9999
ID = 9999
pos = 0,0
random = 20,20
ontop = 1
sprpriority=40
scale = .2,.2
bindtime = 1
removetime = 5

[State 0, Explod]
type = Explod
trigger1 = 1
anim = 9999
ID = 9999
pos = 0,0
random = 30,30
ontop = 1
sprpriority=40
scale = .1,.1
bindtime = 1
removetime = 5

[State 7180, end]
type=destroyself
trigger1 = time = 6

[Statedef 7182]
physics=N
velset=0,0
anim=1905
sprpriority=4

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

[State 0, BindToParent]
type = BindToParent
trigger1 = time = 0
time = 1000
pos = -51,-98

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time < 10
scale = .2, .2

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 10
trigger1 = time < 20
scale = .3, .3

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 20
trigger1 = time < 30
scale = .4, .4

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 30
trigger1 = time < 40
scale = .5, .5

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 40
trigger1 = time < 50
scale = .6, .6

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 50
trigger1 = time < 60
scale = .7, .7

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 70
trigger1 = time < 80
scale = .8, .8

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 80
trigger1 = time < 90
scale = .9, .9

[State 0, ModifyExplod]
type = AngleDraw
trigger1 = time >= 90
scale = 1, 1

[State 0]
type = trans
trigger1 = 1
trans = add
;alpha =

[State 0, DestroySelf]
type = DestroySelf
trigger1 = root, stateno !=603
;ignorehitpause = 0
;persistent = 1

;Portal - Part1==================================================
[Statedef 7183]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,25

[State 0, BlueBack]
type = Explod
trigger1 = timemod = 3,0
trigger1 = time > 10
trigger1 = time < 110
anim = 9999
;ID = 9999
pos = -30,0
vel = 7+(random%3),1
accel = -.1,0
random = 5,100
sprpriority = 10
scale = .5,.5
bindtime = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,0
sprpriority=-40
scale = 1,1
bindtime = 1
removetime = 6

[State 0, BlueBack]
type = Explod
trigger1 = time = 150
anim = 3506
ID = 8000
pos = 0,0
sprpriority=-40
scale = 2,2
bindtime = 1
removetime = 6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 5
anim = 8000
scale = 1+(.1*time),1+(.1*time)

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 150
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1025, flames]
type=helper
trigger1 = time = 10
helpertype=normal
stateno=7184
name="portal2"
pos = 0,-0
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 3000, superchargehelper]
type=helper
trigger1 = time = [0, 5]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = [150, 155]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 7180, end]
type=destroyself
trigger1 = time = 160

;Portal - Part2
[Statedef 7184]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
stateno=7185
name="portal3"
pos = 0,-0
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, BlueBack]
type = Explod
trigger1 = time = 0
anim = 8001
ID = 8001
pos = 0,0
sprpriority=-40
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 0
anim = 8002
ID = 8001
pos = 0,0
ontop = 1
sprpriority=40
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8001
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8001
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8001
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8001
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8001
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8001
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8001
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8001
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8001
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8001
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8001
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8001
scale = .01,.01

[State 7180, end]
type=destroyself
trigger1 = time = 160

;Portal - Part3
[Statedef 7185]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, YellowBack]
type = Explod
trigger1 = time = 0
anim = 8003
ID = 8002
pos = -25,0
sprpriority=-30
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 0
anim = 8004
ID = 8002
pos = -25,0
ontop = 1
sprpriority=30
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8002
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8002
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8002
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8002
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8002
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8002
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8002
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8002
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8002
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8002
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8002
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8002
scale = .01,.01

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8003
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8003
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8003
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8003
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8003
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8003
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8003
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8003
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8003
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8003
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8003
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8003
scale = .01,.01

[State 7180, end]
type=destroyself
trigger1 = time = 160

;Portal2 - Part1==================================================
[Statedef 7193]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = 3,25

[State 0, BlueBack]
type = Explod
trigger1 = timemod = 3,0
trigger1 = time > 10
trigger1 = time < 110
anim = 9999
;ID = 9999
pos = -30,0
vel = 7+(random%3),1
accel = -.1,0
random = 5,100
sprpriority = 10
scale = .5,.5
bindtime = 1
removetime = 10

[State 0, BlueBack]
type = Explod
trigger1 = time = 0
anim = 3506
ID = 8000
pos = 0,0
sprpriority=-40
scale = 1,1
bindtime = 1
removetime = 6

[State 0, BlueBack]
type = Explod
trigger1 = time = 150
anim = 3506
ID = 8000
pos = 0,0
sprpriority=-40
scale = 2,2
bindtime = 1
removetime = 6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 5
anim = 8000
scale = 1+(.1*time),1+(.1*time)

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 10
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1121:         BgPalfx]
type                = bgpalfx
trigger1            = time = 150
add                 = 155, 155, 155
sinadd              = -155,-155,-155,90
time                = 20

[State 1025, flames]
type=helper
trigger1 = time = 10
helpertype=normal
stateno=7194
name="portal2"
pos = 0,-0
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 3000, superchargehelper]
type=helper
trigger1 = time = [0, 5]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 3000, superchargehelper]
type=helper
trigger1 = time = [150, 155]
helpertype=normal
stateno=1920
ID=1920
name="Beams"
postype=p1
;pos=0,-95
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100
size.xscale = .3
size.yscale = .3

[State 7180, end]
type=destroyself
trigger1 = time = 160

;Portal2 - Part2
[Statedef 7194]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 1025, flames]
type=helper
trigger1 = time = 0
helpertype=normal
stateno=7195
name="portal3"
pos = 0,-0
postype=p1
ownpal=1
persistent=1
supermovetime = 100
pausemovetime = 100

[State 0, BlueBack]
type = Explod
trigger1 = time = 0
anim = 8005
ID = 8005
pos = 0,0
sprpriority=-40
scale = .1,.1
bindtime = 1
vfacing = -1
removetime = 150
persistent = 1

[State 0, BlueFront]
type = Explod
trigger1 = time = 0
anim = 8006
ID = 8005
pos = 0,0
ontop = 1
sprpriority=40
scale = .1,.1
bindtime = 1
vfacing = -1
removetime = 150
persistent = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8005
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8005
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8005
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8005
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8005
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8005
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8005
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8005
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8005
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8005
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8005
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8005
scale = .01,.01

[State 7180, end]
type=destroyself
trigger1 = time = 160

;Portal2 - Part3
[Statedef 7195]
physics=N
velset=0,0
anim=9741
sprpriority=4

[State 0, YellowBack]
type = Explod
trigger1 = time = 0
anim = 8008
ID = 8004
pos = 0,-20
sprpriority=-30
vfacing = -1
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, YellowFront]
type = Explod
trigger1 = time = 0
anim = 8007
ID = 8004
pos = 0,-20
ontop = 1
sprpriority=30
vfacing = -1
scale = .1,.1
bindtime = 1
removetime = 150
persistent = 1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8004
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8004
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8004
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8004
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8004
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8004
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8004
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8004
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8004
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8004
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8004
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8004
scale = .01,.01

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time < 10
anim = 8004
scale = .1+(.1*time),.1+(.1*time)

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 100
anim = 8004
scale = 1,1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 105
anim = 8004
scale = .9,.9

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 110
anim = 8004
scale = .8,.8

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 115
anim = 8004
scale = .7,.7

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 120
anim = 8004
scale = .6,.6

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 125
anim = 8004
scale = .5,.5

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 130
anim = 8004
scale = .4,.4

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 135
anim = 8004
scale = .3,.3

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 140
anim = 8004
scale = .2,.2

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 145
anim = 8004
scale = .1,.1

[State 0, ModifyExplod]
type = ModifyExplod
trigger1 = time = 149
anim = 8004
scale = .01,.01

[State 7180, end]
type=destroyself
trigger1 = time = 160

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

;Board Ctrls==========================================

;Dismount---------------
[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "xa"
value = 50
ctrl = 0

;Win---------------
;[State 2000, A4]
;type = PlaySnd
;triggerall = numexplod(4002) = 0
;trigger1 = stateno = 730
;trigger1 = win
;value = 3,18
;persistent=0

;[State 0, Explod]
;type = Explod
;triggerall = numexplod(4002) = 0
;trigger1 = stateno = 730
;trigger1 = win
;anim = 4002
;ID = 4002
;removetime = 60
;vel = -7,-1
;accel = 0,-.3

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
trigger1 = stateno = 201
trigger1 = win
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
trigger1 = stateno = 201
trigger1 = win
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

;Time Exceeded---------------
[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
trigger1 = stateno = 730
trigger1 = time = 699
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
trigger1 = stateno = 730
trigger1 = time = 699
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

;Damage---------------
[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 730
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 730
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = p2name = "SilverSurfer" ;&& enemy,authorname = "TOPS"
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 730
trigger1 = Stateno = 326
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3
persistent = 1

;===================================================
;Board Ctrls (Attacks)==============================
;===================================================

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 201
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 221
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 231
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 241
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2411
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 251
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2511
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 603
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 604
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 605
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 850
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1120
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1121
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1095
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2000
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 3800
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 2000, A4]
type = PlaySnd
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 3801
trigger1 = StateNo = [5000,5999]
value = 3,18
persistent=0

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 201
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 221
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 231
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 241
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2000
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2411
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 251
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 2511
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 603
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 604
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 605
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 850
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1120
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1121
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 1095
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 3801
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, Explod]
type = Explod
triggerall = numexplod(4002) = 0
triggerall = prevstateno = 3801
trigger1 = StateNo = [5000,5999]
anim = 4002
ID = 4002
removetime = 60
vel = -7,-1
accel = 0,-.3

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 603
ID = 1905

;===================================================
;===================================================

;===================================================
;Luster Loss========================================
;===================================================
[State 0, PalFXWiz]
type = PalFX
trigger1 = life < 500
trigger1 = life > 450
time = 1
add = 50,50,50
mul = 200,200,200
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=450
trigger1 = life > 400
time = 1
add = 50,50,50
mul = 175,175,175
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=400
trigger1 = life > 350
time = 1
add = 50,50,50
mul = 150,150,150
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=350
trigger1 = life > 250
time = 1
add = 50,50,50
mul = 125,125,125
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=250
trigger1 = life > 200
time = 1
add = 50,50,50
mul = 100,100,100
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=200
trigger1 = life > 150
time = 1
add = 50,50,50
mul = 75,75,75
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=150
trigger1 = life > 0
time = 1
add = 50,50,50
mul = 50,50,50
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

[State 0, PalFXWiz]
type = PalFX
trigger1 = life <=0
time = 1
add = 50,50,50
mul = 25,25,25
sinadd = -80,-80,-80,1
invertall = 0
color = 200
ignorehitpause = 1
persistent = 1

;===================================================
;===================================================

; Guard triggers for AI (from BB Hood)
[State -2, Stand guard]
type = ChangeState
triggerall = var(17) > 0
triggerall = StateType != A
triggerall = EnemyNear, StateType != C
triggerall = EnemyNear, MoveType = A
trigger1 = ctrl = 1
value = 130

[State -2, S-to-C guard]
type = ChangeState
triggerall = var(17) > 0
triggerall = StateType != A
triggerall = EnemyNear, statetype = C
triggerall = EnemyNear, Movetype = A
trigger1 = stateno = 150
value = 152

[State -2, Crouch guard]
type = ChangeState
triggerall = var(17) > 0
triggerall = StateType != A
triggerall = EnemyNear, statetype = C
triggerall = EnemyNear, Movetype = A
trigger1 = ctrl = 1
value = 131

[State -2, C-to-S guard]
type = ChangeState
triggerall = var(17) > 0
triggerall = StateType != A
triggerall = EnemyNear, statetype != C
triggerall = EnemyNear, Movetype = A
trigger1 = stateno = 152
value = 150

[State -2, Air guard]
type = ChangeState
triggerall = var(17) > 0
triggerall = StateType = A
triggerall = EnemyNear, Movetype = A
trigger1 = ctrl = 1
value = 132

; Recovery roll (from Sunboy's Psylocke)
[State -2]
type = VarSet
triggerall = statetype = A
triggerall = movetype = H
triggerall = Alive
trigger1 = command = "RecoveryRoll"
trigger2 = var(17) = 1
trigger2 = Random <= 50
var(4) = 1

[State -2]
type = VarSet
trigger1 = StateNo < 5000
trigger2 = StateNo > 5999
var(4) = 0

; First Attack message (by M@ppy, cut and pasted from BB Hood, with mods by ME!)
[State -2, Var]
type = VarSet
triggerall = Var(13) = 0
triggerall = p2movetype = H
triggerall = p2StateNo != [150,155]
triggerall = RoundState = 2
trigger1 = movecontact = 1
trigger2 = projcontact = 1
trigger3 = NumHelper(8796) > 0
trigger3 = Helper(8796), MoveHit
trigger4 = NumHelper(8409) > 0
trigger4 = Helper(8409), MoveHit
trigger5 = NumHelper(867) > 0
trigger5 = var(27)
trigger6 = NumHelper(1503) > 0
trigger6 = Helper(1503), MoveHit
trigger7 = NumHelper(3512) > 0
trigger7 = Helper(3512), MoveHit
trigger8 = NumHelper(3901) > 0
trigger8 = Helper(3901), MoveHit
trigger9 = NumHelper(1802) > 0
trigger9 = Helper(1802), MoveHit
v = 13
value = 1
ignorehitpause = 1

[State -2, Message]
type = Helper
triggerall = NumHelper(9208) = 0
trigger1 = Var(13) = 1
ID = 9208
name = "First Attack!"
facing = 1
postype = left
stateno = 9010
ownpal = 1
ignorehitpause = 1

[State -2, Var]
type = VarSet
trigger1 = Var(13) = 1
trigger2 = movetype = H
trigger2 = StateNo != [150,155]
v = 13
value = 2
ignorehitpause = 1

; Get opponent mid pos for positioning hit FX
[State -2, Get Nearest Opponent Mid]
type = VarSet
trigger1 = 1
v = 2
value = floor(EnemyNear, const(size.mid.pos.x))

[State -2, Get Nearest Opponent Mid]
type = VarSet
trigger1 = 1
v = 3
value = floor(EnemyNear, const(size.mid.pos.y))

; Combo Tracker
[State -2, Start Count]
type = VarSet
triggerall = P2MoveType = H && !WinKO
trigger1 = var(7) = 0
v = 7
value = 1
ignorehitpause = 1

[State -2, Set]
type = VarSet
triggerall = var(7)
trigger1 = HitCount > var(9)
v = 10
value = HitCount - var(9)

[State -2, Set]
type = VarSet
triggerall = var(7)
trigger1 = HitCount < var(9)
trigger1 = HitCount != 0
v = 10
value = HitCount

[State -2, Set]
type = VarSet
triggerall = var(7)
trigger1 = HitCount = var(9)
trigger2 = HitCount = 0
v = 10
value = 0

[State -2, Projectile Hits]
type = VarAdd
triggerall = var(7)
trigger1 = ProjHit = 1
v = 10
value = 1

[State -2, Add new hits to combo]
type = VarAdd
triggerall = var(7)
trigger1 = var(10) > 0 || var(11) > 0
v = 8
value = var(10) + var(11)

; Set Attack Ratio for Damage Dampening
[State -2, First Decrease]
type = VarSet
triggerall = var(7)
trigger1 = var(8) > 1
trigger1 = var(8) < 4
fv = 1
value = .44
ignorehitpause = 1

[State -2, Second Decrease]
type = VarSet
triggerall = var(7)
trigger1 = var(8) = [4,8]
fv = 1
value = .37
ignorehitpause = 1

[State -2, Third Decrease]
type = VarSet
triggerall = var(7)
trigger1 = var(8) = [9,12]
fv = 1
value = .31
ignorehitpause = 1

[State -2, Fourth Decrease]
type = VarSet
triggerall = var(7)
trigger1 = var(8) = [13,16]
fv = 1
value = .28
ignorehitpause = 1

[State -2, Final Decrease]
type = VarSet
triggerall = var(7)
trigger1 = var(8) > 16
fv = 1
value = .24
ignorehitpause = 1

[State -2, Clear Helper Hits]
type = VarSet
trigger1 = var(7)
v = 11
value = 0

[State -2, Spawn Combo Report Helper]
type = Helper
triggerall = var(7)
triggerall = NumHelper(929) = 0
triggerall = (StateNo != 1500) && (StateNo != [1645,1650])
trigger1 = P2MoveType != H || WinKO
trigger1 = NumHelper(930) = 0
ID = 930
name = "Combo Report"
StateNo = 9020
postype = p1
pos = 0, 0
ownpal = 1
ignorehitpause = 1

[State -2, Leave Combo Counting Mode]
type = VarSet
triggerall = var(7)
trigger1 = P2MoveType != H || WinKO
v = 15
value = var(8)
ignorehitpause = 1

[State -2, Leave Combo Counting Mode]
type = VarSet
triggerall = var(7)
trigger1 = P2MoveType != H || WinKO
v = 8
value = 0
ignorehitpause = 1

[State -2, Leave Combo Counting Mode]
type = VarSet
triggerall = var(7)
trigger1 = P2MoveType != H || WinKO
v = 9
value = 0
ignorehitpause = 1

[State -2, Leave Combo Counting Mode]
type = VarSet
triggerall = var(7)
trigger1 = P2MoveType != H || WinKO
v = 7
value = 0
ignorehitpause = 1

; Display "Danger" Message
[State -2, Create Helper]
type = Helper
triggerall = var(14) = 0
triggerall = Alive
triggerall = NumHelper(929) = 0
trigger1 = Life <= 200
ID = 929
name = "Danger!"
StateNo = 9000
postype = p1
pos = 0, 0
ownpal = 1

[State -2, Set Danger Var]
type = VarSet
triggerall = var(14) = 0
trigger1 = Life <= 200
v = 14
value = 1


[State -2, Spawn Exploding Ice Helper]
type = Helper
triggerall = var(6) = 1
trigger1 = (P2StateNo != [850,857]) || (P2MoveType != H)
ID = 1115
name = "Exploding Ice Spawner"
StateNo = 860
postype = p2
pos = 0, 0

[State -2, Reset Variable]
type = VarSet
triggerall = var(6) = 1
trigger1 = (P2StateNo != [850,857]) || (P2MoveType != H)
v = 6
value = 0

[State -2, Check if in custom state]
type = VarSet
trigger1 = 1
v = 23
value = ifelse(var(21) - var(22) = 0, 1, 0)

[State -2, Set Var]
type = VarSet
trigger1 = 1
v = 22
value = var(21)

[State -2, Hyper Combo Finish]
type = Helper
triggerall = WinKO
triggerall = NumHelper(111) = 0
trigger1 = var(16) > 0
trigger2 = ProjHit1121 = 1, < 5
name = "Hyper Combo Finish"
ID = 111
StateNo = 9030
postype = p1
pos = 0, 0
ownpal = 1

; End-of-tick updates

[State -2, Hit Count]
type = VarSet
trigger1 = var(7)
v = 9
value = HitCount

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno !=195
ID = 195
ignorehitpause = 1
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno !=2000
ID = 1999
ignorehitpause = 1
persistent = 1

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 420
ID = 421

[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = stateno != 220
ID = 1620

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno !=191
trigger1 = stateno !=195
channel = 10

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno !=193
channel = 15

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno !=191
channel = 11

[State 0, StopSnd]
type = StopSnd
trigger1 = stateno !=3801
channel = 12



[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = power >= 1000
trigger1 = command = "ArcticAttack"
value = 2000
ctrl = 0

[State -1, board cosmic beamx]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "bcosmicbeamx"
value = 1095
ctrl = 0

[State -1, board cosmic beamx]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "bcosmicbeamy"
value = 1097
ctrl = 0

[State -1, board cosmic beamx]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "bcosmicbeamz"
value = 1099
ctrl = 0

[State -1, Cosmic Explosion]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "cosmicexplosion"
trigger1 = Power >= 3000
value = 3800
ctrl = 0

[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = power >= 1000
trigger1 = command = "LSR"
value = 3603
ctrl = 0

[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = power >= 1000
trigger1 = command = "Avalanche"
value = 2011
ctrl = 0

;Board Throw
[State -1, Z Throw]
type = ChangeState
triggerall = stateno = 730
triggerall = p2bodydist X < 55
triggerall = p2bodydist Y > -80
triggerall = p2bodydist Y < 20
triggerall = p2statetype = A
trigger1 = command = "z"
trigger1 = command = "holdfwd"
trigger2 = command = "holdback"
trigger2 = command = "z"
trigger2 = p2movetype != H
value = 850

[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "Boulderyb"
value = 1120
ctrl = 0

[State 730, 21]
type = ChangeState
triggerall = stateno = 730
trigger1 = command = "Boulderzc"
value = 1121
ctrl = 0

;throw portal
[State 0, Helper]
type = Helper
trigger1 = stateno = 810 && time = 43
helpertype = normal
name = "return portal"
postype = p2
pos = 0,0
facing = -1
stateno = 7183

[State -2, Debug]
type=displaytoclipboard
trigger1= 1
text="Silver Surfer by Team Omega Pwnage Supreme"

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------

[Statedef -3]

[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 1, 0

; Ow sound 1
[State -3, Owie 1]
type = PlaySnd
triggerall = alive
triggerall = time = 1
trigger1 = stateno = 5001 || stateno = 5011
trigger1 = (anim % 10) != 0
trigger2 =  stateno = 5050
trigger2 = random < 500
trigger3 = stateno = 5070
value = 4, 4

[State -3, Set Normal Attack Value]
type = VarSet
triggerall = !var(7)
trigger1 = fvar(1) < 1
fv = 1
value = 1

[State -3, Set Attack]
type = AttackMulSet
trigger1 = 1
value = fvar(1)

[State -3, Increment Custom State Counter]
type = VarAdd
trigger1 = 1
v = 21
value = 1

[State -3, Turn off Arctic Attack Flag]
type = VarSet
triggerall = var(24)
trigger1 = P2MoveType != H
v = 24
value = 0

[State -3, Deactivate Ctrl for HC Finish]
type = CtrlSet
triggerall = WinKO
triggerall = NumHelper(111) > 0
trigger1 = var(25) = 1
value = 0

[State -3, Reactivate Ctrl for HC Finish]
type = CtrlSet
triggerall = WinKO
triggerall = NumHelper(111) > 0
trigger1 = var(25) = 2
trigger1 = RoundState != 4
value = 1

[State -3, Kill AI When Fight is Over]
type = VarSet
triggerall = var(17)
trigger1 = Win
trigger2 = Lose
v = 17
value = 0

[State -3, Record AI being active]
type = VarSet
triggerall = var(17)
trigger1 = !var(59)
v = 59
value = 1
;-----------------------------------------------------
