Frame 1
stop();
Frame 2
nextFrame();
Frame 3
function checkMaximums() {
((exnum >= (exnummax - 1)) ? ((exnum = 0)) : null);
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
((hitnum >= (hitnummax - 1)) ? ((hitnum = 0)) : null);
((kanum >= (kanummax - 1)) ? ((kanum = 0)) : null);
((refire > 200) ? ((refire = 200)) : null);
((boost > 2.5) ? ((boost = 2.5)) : null);
((speed > 10) ? ((speed = 10)) : null);
((reloadtime < 10) ? ((reloadtime = 10)) : null);
}
function shipFunc() {
space = Key.isDown(32);
up = Key.isDown(38) || (Key.isDown(87));
down = Key.isDown(40) || (Key.isDown(83));
rite = Key.isDown(39) || (Key.isDown(68));
left = Key.isDown(37) || (Key.isDown(65));
((up && (ship._y > 10)) ? ((ship._y = ship._y - speed)) : null);
((down && (ship._y < 390)) ? ((ship._y = ship._y + speed)) : null);
((rite && (ship._x < 450)) ? ((ship._x = ship._x + speed)) : null);
((left && (ship._x > 10)) ? ((ship._x = ship._x - speed)) : null);
((((space && (ftime >= 10)) && (reloaded < 1)) && (doom < 1)) ? (makeMissile()(reloaded = reloadtime)) : null);
((ftime < refire) ? ((ftime = ftime + boost)) : null);
((reloaded > 0) ? (reloaded--) : null);
if (doom > 0) {
ftime = refire;
hp = hp + 5;
((reloaded < 1) ? (makeMissile()(reloaded = reloadtime)) : ((reloaded = Math.min(reloaded, 10))));
doom--;
} else {
doom = 0;
}
a = 0;
while (a < hitnummax) {
q = this["hh" + a];
w = this["en" + a];
if (q != undefined) {
if (ship.hitTest(q._x, q._y, true)) {
hp = hp - q.power;
ship.gotoAndPlay(11);
q.removeMovieClip();
}
}
if (w != undefined) {
if (ship.hitTest(w)) {
hp = hp - ((2 * level) / 10);
ship.gotoAndPlay(11);
}
}
a++;
}
((hp > maxhp) ? ((hp = maxhp)) : null);
((ftime > refire) ? ((ftime = refire)) : null);
((reloaded < 0) ? ((reloaded = 0)) : null);
}
function makeMissile() {
ship.play();
fnum = Math.floor(ftime / 10);
fnum = Math.ceil(fnum / 2);
if ((fnum % 2) == 0) {
fnum = fnum - 1;
}
ftime = ftime - (10 * fnum);
a = 0;
while (a < fnum) {
((fnum > 0) ? ((ang = (-fnum) + (((a / (fnum - 1)) * fnum) * 2))) : ((ang = 0)));
missile.duplicateMovieClip("mis" + minum, 3000 + minum, {_x:ship._x, _y:ship._y, _rotation:ang});
((minum >= (minummax - 1)) ? ((minum = 0)) : (minum++));
a++;
}
}
function scoreStuff() {
tts.spawn.bar._width = Math.min((ftime / refire) * 100, 100);
tts.spawn.ubar._width = Math.min(100 - ((reloaded / reloadtime) * 100), 100);
tts.health.bar._width = Math.min((hp / maxhp) * 100, 100);
tts.sts.score = score;
if (score > bestscore) {
bestscore = score;
}
tts.sts.bbs = "Best: " + bestscore;
tts.dahp = (Math.round(hp) + "/") + Math.round(maxhp);
tts.sts.lvl = "Level: " + level;
((exnum < 30) ? (exnum++) : ((exnum = 0)));
if (hp < 1) {
restart();
}
}
function enemyManager() {
if (htime < 1) {
w = Math.min(1 + Math.floor(level / 12), 3);
a = 0;
while (a < w) {
sgh.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1000 + random(300), _y:20 + random(360)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
a++;
}
htime = 80 * ((level + 1) / level);
}
if (rtime < 1) {
w = Math.min(1 + Math.floor(level / 12), 3);
a = 0;
while (a < w) {
rgh.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1000 + random(300), _y:20 + random(360)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
a++;
}
rtime = 110 * ((level + 1) / level);
}
if ((btime < 1) && (level > 4)) {
w = Math.min(1 + Math.floor(level / 15), 2);
a = 0;
while (a < w) {
bgh.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1000 + random(300), _y:20 + random(360)});
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
enem++;
a++;
}
btime = 140 * ((level + 3) / level);
}
if (inboss > 0) {
htime--;
rtime--;
btime--;
inboss--;
} else if (endboss == 0) {
if ((bossnum % 4) == 0) {
garf.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1300, _y:50 + random(300)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
} else if ((bossnum % 4) == 1) {
goo.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1300, _y:50 + random(300)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
} else if ((bossnum % 4) == 2) {
golf.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1300, _y:50 + random(300)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
} else if ((bossnum % 4) == 3) {
puft.duplicateMovieClip("en" + enem, 1700 + enem, {_x:1300, _y:50 + random(300)});
enem++;
((enem >= (enemmax - 1)) ? ((enem = 0)) : null);
}
endboss = 2;
} else if (endboss == 1) {
level = level + 1;
inboss = 1000 * ((level + 1) / level);
bossnum++;
power = power + 2;
maxhp = maxhp + 20;
hp = hp + Math.round(maxhp / 2);
endboss = 0;
}
q = random(5000 * ((level + 1) / level));
if (q == 0) {
mayhem.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:200});
minum++;
} else if (q < 10) {
e = random(7);
((e == 0) ? (kit.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 1) ? (hpup.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 2) ? (mac.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 3) ? (booster.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 4) ? (char.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 5) ? (spee.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
((e == 6) ? (pow.duplicateMovieClip("zounds" + minum, 5000 + minum, {_x:1000, _y:50 + random(300)})minum++) : null);
}
a = 0;
while (a < 20) {
q = this["soundclip" + a];
q.dd--;
((q.st == 0) ? ((st = 0)) : null);
if (q.dd < 1) {
q.removeMovieClip();
}
a++;
}
ssdone--;
if ((((firstS > 10) && (vol < 90)) && (st != 0)) && (dead < 1)) {
vol = vol + 0.5;
gost.setVolume(vol);
}
st = 1;
dead--;
}
function restart() {
removeIt();
gost.stop();
gost.start();
minum = 0;
minummax = 60;
exnum = 0;
exnummax = 60;
enem = 28;
enemmax = 80;
hitnum = 0;
hitnummax = 200;
kanum = 0;
kanummax = 20;
power = 20;
refire = 60;
ftime = 0;
speed = 5;
maxhp = 100;
hp = maxhp;
score = 0;
boost = 0.5;
reloadtime = 25;
reloaded = 0;
level = 1;
htime = 10;
rtime = 300;
inboss = 1000;
bossnum = 0;
endboss = 0;
soundnum = 0;
ssdone = 10;
vol = 0;
dead = 60;
gameOver.play();
}
function removeIt() {
a = 0;
while (a < 200) {
this["exx" + a].removeMovieClip();
this["hh" + a].removeMovieClip();
this["en" + a].removeMovieClip();
this["zounds" + a].removeMovieClip();
this["mis" + a].removeMovieClip();
a++;
}
}
function soundMake(ss) {
if (ssdone < 1) {
this.createEmptyMovieClip("soundclip" + soundnum, 9000 + soundnum, {dd:300});
this["sou" + soundnum] = new Sound(this["soundclip" + soundnum]);
this["sou" + soundnum].attachSound("sound" + ss);
if ((ss == 1) || (ss == 4)) {
this["sou" + soundnum].setVolume(80);
} else {
this["sou" + soundnum].setVolume(firstS);
}
this["sou" + soundnum].start();
soundnum++;
((soundnum >= 19) ? ((soundnum = 0)) : null);
}
}
onEnterFrame = function () {
checkMaximums();
shipFunc();
scoreStuff();
enemyManager();
};
minum = 0;
minummax = 60;
exnum = 0;
exnummax = 60;
enem = 28;
enemmax = 80;
hitnum = 0;
hitnummax = 200;
kanum = 0;
kanummax = 20;
power = 20;
refire = 60;
ftime = 0;
speed = 5;
maxhp = 100;
hp = maxhp;
score = 0;
boost = 0.5;
reloadtime = 25;
reloaded = 0;
level = 1;
tss.swapDepths(10000);
bestscore = 0;
htime = 10;
rtime = 100;
btime = 100;
inboss = 1800;
bossnum = 0;
endboss = 0;
ppp.swapDepths(8000);
dead = 10;
vol = 0;
this.createEmptyMovieClip("dabg", 9910);
gost = new Sound(dabg);
gost.attachSound("awes");
gost.setVolume(vol);
soundnum = 0;
this.createEmptyMovieClip("enterss", 9900);
goph = new Sound(enterss);
goph.attachSound("lolgoph");
goph.start();
firstS = 10;
goph.onSoundComplete = function () {
enterss.removeMovieClip();
firstS = 30;
gost.start();
};
ssdone = 10;
gost.onSoundComplete = function () {
gost.start();
};
Symbol 14 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
slider.counter.gotoAndStop(1 + Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 10));
slider.ff.nextFrame();
Symbol 81 MovieClip Frame 1
phead._xscale = 0;
phead._yscale = 0;
_root.stop();
bface.bc.gotoAndStop(1 + random(3));
onEnterFrame = function () {
_root.stop();
bar.bar._width = (_root.getBytesLoaded() / _root.getBytesTotal()) * 50;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
if (bar._xscale > 0) {
bar._xscale = bar._xscale - 5;
bar._yscale = bar._xscale;
} else {
bar._xscale = 0;
bar._yscale = 0;
}
if (phead._xscale < 100) {
phead._xscale = phead._xscale + 5;
phead._yscale = phead._xscale;
} else {
phead._xscale = 100;
phead._yscale = 100;
}
}
xd = bface.bc._x - _xmouse;
yd = bface.bc._y - _ymouse;
dist = Math.sqrt((xd * xd) + (yd * yd));
frm = (dist / 800) * 100;
bface.bc.inner.gotoAndStop(Math.min(Math.max(Math.round(frm), 0), 100));
};
phead.onRelease = function () {
_root.play();
};
Symbol 97 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
_x = 0;
_y = 0;
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 10
gotoAndStop (1);
Symbol 120 MovieClip Frame 1
speed = 1;
_xscale = Math.min(10 + (_parent.power / 5), 25);
_yscale = Math.min(10 + (_parent.power / 5), 25);
_parent.soundMake(3);
onEnterFrame = function () {
if (_name != "missile") {
xx = Math.cos((_rotation * Math.PI) / 180) * speed;
yy = Math.sin((_rotation * Math.PI) / 180) * speed;
_x = (_x + xx);
_y = (_y + yy);
ff._width = speed * 10;
speed = speed + 0.5;
((_x > 900) ? (this.removeMovieClip()) : null);
a = 0;
while (a <= _parent.enemmax) {
q = _parent["en" + a];
dx = q._x - _x;
dy = q._y - _y;
di = Math.sqrt((dx * dx) + (dy * dy));
if ((di < 50) || (q.hitTest(_x, _y, true))) {
_parent.splode.duplicateMovieClip("exx" + _parent.exnum, 4000 + _parent.exnum, {_x:_x, _y:_y, _width:50 + (_parent.power / 2), _height:50 + (_parent.power / 2)});
_parent.exnum++;
this.removeMovieClip();
}
a++;
}
}
};
Symbol 125 MovieClip Frame 1
time = 10;
_width = Math.min(_width, 100);
_height = Math.min(_height, 100);
_parent.soundMake(2);
onEnterFrame = function () {
a = 0;
while (a < _parent.enemmax) {
q = _parent["en" + a];
if (this.hitTest(q)) {
q.hp = q.hp - (_parent.power / 10);
q.htime = 4;
}
a++;
}
((time < 1) ? (this.removeMovieClip()) : (time--));
};
Symbol 131 MovieClip Frame 1
_alpha = 0;
Symbol 137 MovieClip Frame 1
function action() {
usp = 12 - ((hp / hpmax) * 10);
((_x > 600) ? (_x = (_x-1)_x(hp = hpmax)(htime = 0)(health._visible = false)) : ((health._visible = true)));
if (_x <= 600) {
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 350) && (up == 1)) ? ((up = 0)) : null);
(((_y < 50) && (up == 0)) ? ((up = 1)) : null);
}
if ((_x <= 600) && (random(((lv + 1) / lv) * 8) == 1)) {
dx = _x + hs._x;
dy = _y + hs._y;
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:2 + random(5), power:(1 + random(11)) * lp, cone:20});
_parent.hitnum++;
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
}
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
health.bar._width = (hp / hpmax) * 100;
if (hp < 1) {
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:200, _yscale:200});
_parent.kanum++;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.score = _parent.score + 1000;
_parent.endboss = 1;
_parent.soundMake(1);
this.removeMovieClip();
}
}
lv = _parent.level;
hpmax = (600 * (1 + (lv / 6))) + random(200 * lv);
hp = hpmax;
htime = 0;
cow = 0;
up = random(2);
onEnterFrame = function () {
if (_name != "goo") {
action();
}
};
lp = 1 + (lv / 10);
Symbol 141 MovieClip Frame 1
function action() {
((_x > moveout) ? (_x = (_x - speed)_x - speed) : null);
if ((mod > 4) && (mod <= 8)) {
usp = speed;
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 380) && (up == 1)) ? ((up = 0)) : null);
(((_y < 20) && (up == 0)) ? ((up = 1)) : null);
} else if ((mod > 8) && (mod <= 11)) {
usp = usp + (random(2) + 1);
_y = (_y + (Math.sin(usp / 10) * 20));
((_y > 380) ? (_y = 380380) : null);
((_y < 20) ? (_y = 2020) : null);
} else if (mod > 11) {
usp = usp + ((random(15) / 10) + 0.5);
_y = (_y + (Math.sin(usp / 10) * 20));
_x = (_x - (Math.cos(usp / 10) * 20));
((_y > 380) ? (_y = 380380) : null);
((_y < 20) ? (_y = 2020) : null);
((_x < moveout) ? (_x = moveout) : null);
}
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
if (hp < 1) {
_parent.score = _parent.score + 10;
_parent.score = _parent.score + power;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:100, _yscale:100});
_parent.soundMake(0);
_parent.kanum++;
}
if ((hp < 1) || (_x < (-_width))) {
this.removeMovieClip();
}
}
function attack() {
if ((_x <= moveout) || ((_x < 900) && (mod > 11))) {
if ((random(20) == 0) && (rested < 1)) {
dx = _x + hs._x;
dy = _y + hs._y;
if (att == 0) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:6, power:power});
} else if (att == 1) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:4, power:power, mod:0});
} else if (att == 2) {
q = random(Math.min(Math.floor(lv / 15), 3));
q = 3 + (q * 2);
a = 0;
while (a < q) {
ang = 30 - ((a / (q - 1)) * 60);
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:4, power:power, mod:1, tn:ang});
_parent.hitnum++;
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
a++;
}
}
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
_parent.hitnum++;
rested = resting;
}
rested--;
}
}
lv = _parent.level;
hpmax = (45 * (1 + (lv / 6))) + random(30 * lv);
hp = hpmax;
speed = 2 + Math.min(1 + (lv / 10), 5);
htime = 0;
cow = 0;
up = random(2);
usp = 0;
mod = random(Math.min(lv, 15));
att = random(Math.min(Math.floor(lv / 2), 3));
((mod == 0) ? ((att = 0)) : null);
power = 2 + Math.floor(lv / 3);
rate = 40 - random(Math.min(Math.floor(lv / 5), 20));
moveout = 500 + random(100);
onEnterFrame = function () {
if (_name != "rgh") {
action();
attack();
}
};
resting = 30 + random(121);
rested = 0;
Symbol 145 MovieClip Frame 1
function action() {
_x = (_x - speed);
if ((mod > 0) && (mod <= 3)) {
usp = mod * 4;
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 380) && (up == 1)) ? ((up = 0)) : null);
(((_y < 20) && (up == 0)) ? ((up = 1)) : null);
} else if ((mod > 3) && (mod <= 6)) {
usp = usp + (random(2) + 1);
_y = (_y + (Math.sin(usp / 10) * 20));
((_y > 380) ? (_y = 380380) : null);
((_y < 20) ? (_y = 2020) : null);
} else if (mod > 6) {
usp = usp + (random(2) + 1);
_y = (_y + (Math.sin(usp / 10) * 30));
_x = (_x + (Math.cos(usp / 10) * 20));
((_y > 380) ? (_y = 380380) : null);
((_y < 20) ? (_y = 2020) : null);
}
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
if (hp < 1) {
_parent.score = _parent.score + 5;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, ss:0, _xscale:100, _yscale:100});
_parent.kanum++;
_parent.soundMake(0);
}
if ((hp < 1) || (_x < (-_width))) {
this.removeMovieClip();
}
}
lv = _parent.level;
hpmax = (35 * (1 + (lv / 6))) + random(20 * lv);
hp = hpmax;
speed = 1 + Math.min(1 + (lv / 10), 5);
htime = 0;
cow = 0;
up = random(2);
usp = 0;
mod = random(Math.min(lv, 15));
onEnterFrame = function () {
if (_name != "sgh") {
action();
}
};
Symbol 149 MovieClip Frame 1
function action() {
usp = 25 - ((hp / hpmax) * 25);
((_x > 600) ? (_x = (_x-1)_x(hp = hpmax)(htime = 0)(health._visible = false)) : ((health._visible = true)));
if (_x <= 600) {
if ((rested < 1) || (redo > 0)) {
if (redo < 0) {
att = random(2);
((att == 0) ? ((redo = 20)) : ((redo = 30)));
}
dx = _x + hs._x;
dy = _y + hs._y;
if (att == 0) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:5 + random(6), power:4 * lp, cone:45});
_parent.hitnum++;
} else if (att == 1) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:20, power:1 * lp, mod:0});
_parent.hitnum++;
}
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
rested = resting;
}
}
redo--;
rested--;
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 350) && (up == 1)) ? ((up = 0)) : null);
(((_y < 50) && (up == 0)) ? ((up = 1)) : null);
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
health.bar._width = (hp / hpmax) * 100;
if (hp < 1) {
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:200, _yscale:200});
_parent.kanum++;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.score = _parent.score + 2000;
_parent.endboss = 1;
_parent.soundMake(1);
this.removeMovieClip();
}
}
lv = _parent.level;
hpmax = (700 * (1 + (lv / 6))) + random(200 * lv);
hp = hpmax;
htime = 0;
cow = 0;
up = random(2);
onEnterFrame = function () {
if (_name != "golf") {
action();
}
};
resting = 60 + random(Math.ceil(200 / lv));
rested = 1;
redo = 0;
lp = 1 + (lv / 10);
Symbol 154 MovieClip Frame 1
function action() {
usp = 25 - ((hp / hpmax) * 25);
((_x > 600) ? (_x = (_x-1)_x(hp = hpmax)(htime = 0)(health._visible = false)) : ((health._visible = true)));
if (_x <= 600) {
if ((rested < 1) || (redo > 0)) {
if (redo < 0) {
att = random(20);
if (att <= 6) {
redo = 10;
} else if ((att > 6) && (att <= 12)) {
redo = 60;
}
dx = (_x + hs._x) - _parent.ship._x;
dy = (_y + hs._y) - _parent.ship._y;
zz = Math.sqrt((dx * dx) + (dy * dy));
angle = (Math.atan2(dy, dx) * 180) / Math.PI;
}
if (att <= 6) {
dx = _x + hs._x;
dy = _y + hs._y;
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:5 + random(15), power:7 * lp, mod:0});
_parent.hitnum++;
} else if ((att > 6) && (att <= 12)) {
dx = _x + hs._x;
dy = _y + hs._y;
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:20, power:5 * lp, mod:1, tn:angle});
_parent.hitnum++;
} else if ((att > 12) && (att <= 16)) {
q = Math.min(random(Math.ceil(lv / 5)), 3);
dx = _x + hog._x;
dy = _y + hog._y;
a = 0;
while (a < q) {
_parent.sgh.duplicateMovieClip("en" + _parent.enem, 1800 + _parent.enem, {_x:dx, _y:(dy - 20) + random(40)});
_parent.enem++;
((_parent.enem >= (_parent.enemmax - 1)) ? ((_parent.enem = 0)) : null);
a++;
}
} else if (att > 16) {
dx = _x + rhog._x;
dy = _y + rhog._y;
_parent.rgh.duplicateMovieClip("en" + _parent.enem, 1800 + _parent.enem, {_x:dx, _y:(dy - 20) + random(40)});
_parent.enem++;
((_parent.enem >= (_parent.enemmax - 1)) ? ((_parent.enem = 0)) : null);
if (lv > 5) {
if (random(3) == 0) {
dx = _x + rhog._x;
dy = _y + rhog._y;
_parent.bgh.duplicateMovieClip("en" + _parent.enem, 1800 + _parent.enem, {_x:dx, _y:(dy - 20) + random(40)});
_parent.enem++;
} else {
dx = _x + rhog._x;
dy = _y + rhog._y;
_parent.rgh.duplicateMovieClip("en" + _parent.enem, 1800 + _parent.enem, {_x:dx, _y:(dy - 20) + random(40)});
_parent.enem++;
}
}
}
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
((_parent.enem >= (_parent.enemmax - 1)) ? ((_parent.enem = 0)) : null);
rested = resting;
}
}
redo--;
rested--;
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
if ((cow % 10) == 0) {
dx = _x + hs._x;
dy = _y + hs._y;
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:2, power:1 * lp, cone:45});
_parent.hitnum++;
}
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
health.bar._width = (hp / hpmax) * 100;
if (hp < 1) {
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:200, _yscale:200});
_parent.kanum++;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.endboss = 1;
_parent.score = _parent.score + 5000;
_parent.soundMake(0);
this.removeMovieClip();
}
}
lv = _parent.level;
hpmax = (1000 * (1 + (lv / 5))) + random(400 * lv);
hp = hpmax;
htime = 0;
cow = 0;
up = random(2);
onEnterFrame = function () {
if (_name != "puft") {
_y = 215;
action();
}
};
resting = 50 + random(Math.ceil(450 / lv));
rested = 1;
redo = 0;
lp = 1 + (lv / 10);
Symbol 160 MovieClip Frame 1
((speed == undefined) ? ((speed = 6)) : null);
((power == undefined) ? ((power = 2)) : null);
_parent.soundMake(4);
if (mod == 0) {
dx = _x - _parent.ship._x;
dy = _y - _parent.ship._y;
zz = Math.sqrt((dx * dx) + (dy * dy));
tn = Math.atan2(dy, dx);
xx = Math.cos(tn) * speed;
yy = Math.sin(tn) * speed;
} else if (mod == 1) {
if (tn == undefined) {
tn = 5 - random(10);
}
xx = Math.cos((tn * Math.PI) / 180) * speed;
yy = Math.sin((tn * Math.PI) / 180) * speed;
} else if (cone > 0) {
xx = Math.cos(((cone - random(cone * 2)) * Math.PI) / 180) * speed;
yy = Math.sin(((cone - random(cone * 2)) * Math.PI) / 180) * speed;
} else {
xx = speed;
yy = 0;
}
ss._rotation = random(360);
spin = 10;
test = Math.ceil(power / Math.floor((_parent.level / 8) + 1));
if (test <= 3) {
ss.gotoAndStop(1);
} else if ((test > 3) && (test <= 6)) {
ss.gotoAndStop(2);
} else if ((test > 6) && (test <= 10)) {
ss.gotoAndStop(3);
}
onEnterFrame = function () {
if (_name != "hit") {
ss._rotation = ss._rotation - spin;
spin = spin * 1.08;
spin = Math.min(spin, 77);
_x = (_x - xx);
_y = (_y - yy);
(((((_x > 910) || (_x < -10)) || (_y > 410)) || (_y < -10)) ? (this.removeMovieClip()) : null);
}
};
Symbol 195 MovieClip Frame 17
_parent.removeMovieClip();
stop();
Symbol 207 MovieClip Frame 1
if (_name != "kit") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.hp = _parent.hp + (_parent.maxhp / 3);
_parent.ppp.timer = 30;
_parent.ppp.pd = 2;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 209 MovieClip Frame 1
if (_name != "hpup") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.maxhp = _parent.maxhp + 10;
_parent.hp = _parent.hp + 10;
_parent.ppp.timer = 30;
_parent.ppp.pd = 3;
this.removeMovieClip();
}
if (_x < -20) {
this.removeMovieClip();
}
};
}
Symbol 214 MovieClip Frame 1
if (_name != "booster") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.reloadtime = _parent.reloadtime - 1;
_parent.ppp.timer = 30;
_parent.ppp.pd = 5;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 217 MovieClip Frame 1
if (_name != "char") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.boost = _parent.boost + 0.2;
_parent.ppp.timer = 30;
_parent.ppp.pd = 6;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 220 MovieClip Frame 1
if (_name != "mayhem") {
onEnterFrame = function () {
_x = (_x - 10);
if (this.hitTest(_parent.ship)) {
_parent.doom = 150;
_parent.ppp.timer = 30;
_parent.ppp.pd = 1;
this.removeMovieClip();
}
if (_x < -20) {
this.removeMovieClip();
}
};
}
Symbol 223 MovieClip Frame 1
if (_name != "mac") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.refire = _parent.refire + 10;
_parent.boost = _parent.boost + 0.1;
_parent.ppp.timer = 30;
_parent.ppp.pd = 4;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 227 MovieClip Frame 1
if (_name != "spee") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.speed = _parent.speed + 1;
_parent.ppp.timer = 30;
_parent.ppp.pd = 7;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
if (_name != "pow") {
onEnterFrame = function () {
_x = (_x - 3);
if (this.hitTest(_parent.ship)) {
_parent.power = _parent.power + 2;
_parent.ppp.timer = 30;
_parent.ppp.pd = 8;
this.removeMovieClip();
}
if (_x < -50) {
this.removeMovieClip();
}
};
}
Symbol 250 MovieClip Frame 1
onEnterFrame = function () {
if (timer > 0) {
_x = 450;
_y = 180;
_visible = true;
gotoAndStop(pd);
timer--;
} else {
_visible = false;
}
};
Symbol 255 MovieClip Frame 1
function action() {
((redo < 1) ? ((usp = 8)) : ((usp = 0)));
((_x > 650) ? (_x = (_x-1)_x(hp = hpmax)(htime = 0)(health._visible = false)) : ((health._visible = true)));
if (_x <= 650) {
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 350) && (up == 1)) ? ((up = 0)) : null);
(((_y < 50) && (up == 0)) ? ((up = 1)) : null);
}
if (_x <= 650) {
if ((rested < 1) || (redo > 1)) {
if (redo < 0) {
redo = 25;
}
dx = _x + hs._x;
dy = _y + hs._y;
q = Math.min(2 + Math.floor(lv / 10), 8);
if ((redo % 3) == 0) {
a = 0;
while (a < q) {
ang = 30 - ((a / (q - 1)) * 60);
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:5, power:5 * lp, mod:1, tn:ang});
_parent.hitnum++;
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
a++;
}
}
rested = resting;
}
}
redo--;
rested--;
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 350) && (up == 1)) ? ((up = 0)) : null);
(((_y < 50) && (up == 0)) ? ((up = 1)) : null);
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
health.bar._width = (hp / hpmax) * 100;
if (hp < 1) {
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:200, _yscale:200});
_parent.kanum++;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.score = _parent.score + 500;
_parent.endboss = 1;
_parent.soundMake(1);
this.removeMovieClip();
}
}
lv = _parent.level;
hpmax = (500 * (1 + (lv / 6))) + random(100 * lv);
hp = hpmax;
htime = 0;
cow = 0;
up = random(2);
onEnterFrame = function () {
if (_name != "garf") {
action();
}
};
resting = 50 + random(Math.ceil(200 / lv));
rested = 1;
redo = 0;
lp = 1 + (lv / 10);
Symbol 260 MovieClip Frame 1
function action() {
((_x > moveout) ? (_x = (_x - speed)_x - speed) : null);
if (mod > 5) {
usp = speed;
((up == 0) ? (_y = (_y - usp)_y - usp) : (_y = (_y + usp)_y + usp));
(((_y > 380) && (up == 1)) ? ((up = 0)) : null);
(((_y < 20) && (up == 0)) ? ((up = 1)) : null);
}
if (htime > 0) {
(((cow % 2) > 0) ? ((ha._alpha = 100)) : ((ha._alpha = 0)));
cow++;
htime--;
} else {
ha._alpha = 0;
cow = 0;
}
if (hp < 1) {
_parent.score = _parent.score + 20;
_parent.score = _parent.score + power;
_parent.score = _parent.score + Math.floor(hpmax / 10);
_parent.kaboom.duplicateMovieClip("ka" + _parent.kanum, 5800 + _parent.kanum, {_x:_x, _y:_y, _xscale:100, _yscale:100});
_parent.soundMake(0);
_parent.kanum++;
}
if ((hp < 1) || (_x < (-_width))) {
this.removeMovieClip();
}
}
function attack() {
if (_x <= moveout) {
if (((random(20) == 0) && (rested < 1)) || (redo > 1)) {
dx = _x + hs._x;
dy = _y + hs._y;
if (att == 0) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:10, power:power});
if (redo <= 0) {
redo = 8;
}
} else if (att == 1) {
_parent.hit.duplicateMovieClip("hh" + _parent.hitnum, 2500 + _parent.hitnum, {_x:dx, _y:dy, speed:4, power:power, cone:20});
_parent.hitnum++;
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
if (redo <= 0) {
redo = 5 + random(Math.min(Math.floor(lv / 15), 11));
}
}
((_parent.hitnum >= (_parent.hitnummax - 1)) ? ((_parent.hitnum = 0)) : null);
_parent.hitnum++;
rested = resting;
}
redo--;
rested--;
}
}
lv = _parent.level;
hpmax = (70 * (1 + (lv / 6))) + random(20 * lv);
hp = hpmax;
speed = 2 + Math.min(1 + (lv / 15), 4);
htime = 0;
cow = 0;
up = random(2);
usp = 0;
mod = random(Math.min(lv, 9));
att = random(2);
power = 3 + Math.floor(lv / 3);
rate = 50 - random(Math.min(Math.floor(lv / 5), 20));
moveout = 600 + random(100);
onEnterFrame = function () {
if (_name != "bgh") {
action();
attack();
}
};
resting = 60 + random(121);
rested = 0;
redo = 0;