Frame 1
function gomusic(obj, id) {
obj.stop();
obj.attachSound(id);
obj.start();
}
function gosound(id) {
game_sound.attachSound(id);
game_sound.start();
}
function goloop(id) {
_root.currloop = id;
loop_sound.attachSound(id);
loop_sound.start();
}
function startintro() {
gomusic(game_music, "music0");
this.attachMovie("intro", "intro", this.getNextHighestDepth());
}
function startgame() {
gomusic(game_music, "music3");
game_music.setVolume(35);
_root.attachMovie("everything", "everything", _root.getNextHighestDepth());
_root.attachMovie("ui", "ui", _root.getNextHighestDepth());
}
function charselect() {
_root.attachMovie("charselect", "charselect", _root.getNextHighestDepth());
}
Stage.scaleMode = "noscale";
Stage.align = "TL";
_quality = "BEST";
_root.showdepth = false;
swidth = Stage.width;
sheight = Stage.height;
gravity = 1;
ground = 300;
power = 17;
maxspeed = 15;
accel = 0.8;
tvel = 20;
friction = 8;
yscalemod = 0.35;
gravity = 0.7;
ground = 300;
power = 12;
maxspeed = 2;
accel = 0.8;
tvel = 20;
friction = 8;
nmespeedmax = 3;
ospawnspeed = (spawnspeed = 30);
itemspawnspeed = 300;
nukecost = 250;
stats = new Object();
stats.level = 1;
stats.exp = 0;
stats.gold = 0;
xpval = 50;
combocount = 0;
combox = 1;
kills = (flees = (texts = 0));
this.onEnterFrame = function () {
gbl = _root.getBytesLoaded();
gbt = _root.getBytesTotal();
if (((gbl / gbt) * 100) > 99) {
delete onEnterFrame;
if (char) {
intro.swapDepths(99);
intro.removeMovieClip();
startgame();
} else {
startintro();
}
}
};
var game_sound = new Sound();
var game_music = new Sound();
var loop_sound = new Sound();
var player_sound = new Sound();
var nme_sound = new Sound();
loop_sound.onSoundComplete = function () {
loop_sound.start();
};
game_music.onSoundComplete = function () {
game_music.start();
};
_global.levelval = function (lvl) {
var _local2;
if (lvl < 11) {
_local2 = (40 * Math.pow(lvl, 2)) + (360 * lvl);
} else if (lvl <= 27) {
_local2 = ((-0.4 * Math.pow(lvl, 3)) + (40.4 * Math.pow(lvl, 2))) + (396 * lvl);
} else {
_local2 = (((65 * Math.pow(lvl, 2)) - (165 * lvl)) - 6750) * 0.82;
}
return(Math.round(_local2));
};
_global.randrange = function (min, max) {
min = ((!min) ? 0 : (min));
var _local2 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local2);
};
Symbol 33 MovieClip [bomb_trail] Frame 32
stop();
Symbol 36 MovieClip [lvlanim] Frame 114
stop();
this.removeMovieClip();
Symbol 45 MovieClip Frame 1
function gold(amt) {
amt = amt * _root.combox;
_root.stats.gold = _root.stats.gold + amt;
gettext(amt, "f6fc09", _root.combox);
_root.gosound("snd_gold");
}
function getxp() {
_root.stats.exp = _root.stats.exp + _root.xpval;
if (_root.texts < 10) {
gettext(_root.xpval, "e000ce");
}
}
function comboup() {
_root.combocount++;
if ((_root.combocount % 100) == 0) {
_root.combox = _root.combox + 0.5;
}
}
function gettext(val, color, size) {
size = size || 1;
_root.texts++;
newtxt = _parent.attachMovie("getval", "getval" + randrange(1, 1000), _parent.getNextHighestDepth());
newtxt.txt.txtval.text = "+" + val;
newtxt.txt.txtval.autoSize = "center";
if (color) {
newtxt.txt.txtval.textColor = "0x" + color;
}
newtxt._x = this._x;
newtxt._y = (this._y + this.anim._y) - this.anim._height;
newtxt._xscale = (newtxt._yscale = 100 + (size * 10));
}
function createswoosh(depth, varx, vary, delay, chargeoffset) {
chargeoffset = chargeoffset || 0;
chargeoffset = (100 - chargeoffset) / 100;
newswoosh = _parent.attachMovie("swoosh", "swoosh" + randrange(1, 999), _parent.player.getDepth() + depth);
newswoosh._xscale = (newswoosh._yscale = _xscale);
newswoosh.attacktype = chargetype;
newswoosh.chargetimer = chargetimer * chargeoffset;
newswoosh._xscale = newswoosh._xscale * dir;
newswoosh._x = varx;
newswoosh._y = vary;
newswoosh.vdelay = delay;
return(newswoosh);
}
uptype = "ddragon";
_root.player = this;
debug = _root.debug.debug;
yscalemod = _root.yscalemod;
if (uptype == "ddragon") {
ddragon = true;
}
if (ddragon) {
walktrack = _parent.walktrack;
}
yinertia = (yspeed = (xinertia = (idlespeed = 0)));
falling = true;
dashing = false;
tjump = (dbljump = 1);
dash = (chargeattack = false);
dir = 1;
dashtimer = 10;
dtimer = 0;
attacktimer = 20;
atimer = 0;
chargetimer = (charging = 0);
maxcharge = 240;
atkcombo = (_root.bulletcount = (testvar = 0));
maxatkcombo = 3;
atkcombo_timer = 10;
slash_duration = [20, 20, 30];
_root.bulletmax = 2;
oxscale = 100;
var depth;
var lastcode;
dp._visible = _root.showdepth;
char_attributes = {r:["bullet", "charge_beam", "ghost"], dk:["slash", "slam", "arthas"], wd:["bomb", "bounce", "horrify"]};
attacktype = char_attributes[_root.char][0];
chargetype = char_attributes[_root.char][1];
crashtype = char_attributes[_root.char][2];
this.attachMovie(_root.char + "_anim", "anim", this.getNextHighestDepth());
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local3 = Key.getCode();
if (_local3 == 36) {
_root.debug._alpha = ((_root.debug._alpha < 1) ? 100 : 0);
}
if ((_local3 == 32) && (!nuking)) {
chargetimer = (charging = false);
attacking = false;
if ((dbljump > 0) && (!jumplock)) {
_root.gosound("snd_jump");
if (dbljump != tjump) {
anim.gotoAndStop("jump");
} else {
anim.gotoAndStop("jump");
}
dbljump--;
yspeed = _root.power + (Math.abs(xinertia) / 4);
jumping = true;
jumplock = true;
_rotation = 0;
anim._y = anim._y - yspeed;
}
if ((((!jumping) && (!jumplock)) && (yspeed >= 0)) && (dbljump == 0)) {
jumplock = true;
anim.gotoAndStop("dbljump");
yspeed = yspeed + (_root.power + (Math.abs(xinertia) / 4));
jumping = true;
_rotation = 0;
anim._y = anim._y - yspeed;
}
}
if (((_local3 == 90) && (!atklock)) && (!nuking)) {
atklock = true;
if (Key.isDown(16)) {
anim.gotoAndStop("flyingkick");
} else {
if ((attacktype == "bullet") || (attacktype == "bomb")) {
atimer = attacktimer;
}
if ((attacktype == "bullet") && (_root.bulletcount < _root.bulletmax)) {
_root.gosound("snd_raynor_atk");
newswoosh = _parent.attachMovie("swoosh", "swoosh" + randrange(1, 999), _parent.player.getDepth() - 1);
newswoosh._x = _x + (dir * 14);
newswoosh._y = (_y + (anim._y * (_xscale / 100))) - (82 * (_xscale / 100));
newswoosh.xinertia = xinertia;
newswoosh._xscale = (newswoosh._yscale = _xscale);
newswoosh.attacktype = attacktype;
newswoosh._xscale = newswoosh._xscale * dir;
}
if ((attacktype == "slash") && (atkcombo < maxatkcombo)) {
attacking = true;
xinertia = xinertia - (dir * 10);
slash_timer = slash_duration[(++atkcombo) - 1];
anim.gotoAndStop("atk" + atkcombo);
newswoosh = _parent.attachMovie("swoosh", "swoosh" + randrange(1, 999), _parent.player.getDepth() + 10);
newswoosh._x = _x + (dir * 14);
newswoosh._y = (_y + (anim._y * (_xscale / 100))) - (82 * (_xscale / 100));
newswoosh.xinertia = xinertia;
newswoosh._xscale = (newswoosh._yscale = _xscale);
newswoosh.attacktype = attacktype;
newswoosh._xscale = newswoosh._xscale * dir;
}
if ((attacktype == "bomb") && (_root.bulletcount < _root.bulletmax)) {
_root.gosound("snd_wd_shot" + randrange(1, 3));
newswoosh = _parent.attachMovie("swoosh", "swoosh" + randrange(1, 999), _parent.player.getDepth() + 10);
newswoosh._x = _x + (dir * -24);
newswoosh._y = (_y + (anim._y * (_xscale / 100))) - (102 * (_xscale / 100));
newswoosh.xinertia = xinertia;
newswoosh._xscale = (newswoosh._yscale = _xscale);
newswoosh.attacktype = attacktype;
newswoosh._xscale = newswoosh._xscale * dir;
newswoosh.detonateheight = _y;
}
if (!jumping) {
} else {
anim.gotoAndStop("jump_shoot");
}
}
}
if ((_local3 == 88) && (chargeattack)) {
attacking = true;
anim.gotoAndStop("charge");
charging = true;
}
if ((_local3 == 67) && (_root.stats.gold >= _root.nukecost)) {
attacking = true;
nuking = true;
_parent.attachMovie("nuke", "nuke", _parent.getNextHighestDepth() + 9999);
_root.stats.gold = _root.stats.gold - _root.nukecost;
}
if ((((_local3 == 37) || (_local3 == 39)) && (dash)) && (xinertia < 10)) {
if ((lastcode == _local3) && (dtimer > 0)) {
anim.gotoAndStop("dash");
dashing = true;
_root.gosound("snd_dash_" + randrange(1, 3));
xinertia = 30 * (-dir);
if (!jumping) {
newdash = _parent.attachMovie("dash_fx", "dash_fx" + randrange(1, 999), _parent.player.getDepth() + 1);
newdash._x = _x - 9.7;
newdash._y = _y + 3.8;
newdash._xscale = (newdash._yscale = _xscale * 1.5);
newdash._xscale = newdash._xscale * dir;
} else {
yspeed = 2;
}
attacking = false;
chargetimer = (charging = false);
trace("dbltap");
}
}
};
keyListener.onKeyUp = function () {
if (nuking) {
return(undefined);
}
keycode = Key.getCode();
if (keycode == 32) {
jumplock = false;
}
if (keycode == 90) {
atklock = false;
}
if (((keycode == 37) || (keycode == 39)) && (dash)) {
dtimer = dashtimer;
lastcode = keycode;
_root.maxspeed = 2;
}
if ((keycode == 88) && (chargeattack)) {
if (chargetimer > 0) {
anim.gotoAndStop("charge_shot");
chargepct = chargetimer / maxcharge;
if (chargetype == "charge_beam") {
chargex = _x - (dir * 55);
chargey = (_y + (anim._y * (_xscale / 100))) - (82 * (_xscale / 100));
var _local2 = createswoosh(-50, chargex, chargey);
_local2.xinertia = xinertia;
}
if (chargetype == "slam") {
if (chargepct > 250) {
chargepct = 250;
}
var _local2 = createswoosh(50, _x, _y + 10);
if ((chargepct * 100) > 50) {
_local2 = createswoosh(30, _x - (30 * chargepct), _y, 10, 10);
_local2 = createswoosh(31, _x + (30 * chargepct), _y, 10, 10);
}
if ((chargepct * 100) > 80) {
_local2 = createswoosh(-6, _x - (60 * chargepct), _y - 10, 20, 30);
_local2 = createswoosh(-5, _x + (60 * chargepct), _y - 10, 20, 30);
_local2 = createswoosh(-11, _x - (70 * chargepct), _y - 15, 30, 40);
_local2 = createswoosh(-10, _x + (70 * chargepct), _y - 15, 30, 40);
}
}
if (chargetype == "bounce") {
var _local2 = createswoosh(-50, _x + (dir * -24), (_y + (anim._y * (_xscale / 100))) - (102 * (_xscale / 100)));
_local2.xinertia = xinertia;
_local2.detonateheight = _y;
attacking = false;
}
} else {
attacking = false;
}
charging = false;
chargetimer = -40;
}
};
Key.addListener(keyListener);
onEnterFrame = function () {
if (nuking) {
return(undefined);
}
if (dtimer) {
dtimer--;
}
if (atimer) {
atimer--;
}
if (atkcombo) {
if ((--slash_timer) < 0) {
atkcombo = 0;
attacking = false;
}
}
if (charging) {
chargetimer = chargetimer + 3;
if (chargetimer > maxcharge) {
}
} else {
_root.loop_sound.stop(_root.currloop);
}
dir = ((anim._xscale > 0) ? -1 : 1);
if (dashing && (Math.abs(xinertia) < 5)) {
dashing = false;
}
if (ddragon) {
yoffset = Math.abs((((_y - walktrack._y) / walktrack._height) * 100) - 100) - 0.6;
if (yoffset < 0) {
yoffset = 1;
}
_yscale = (100 - (yscalemod * yoffset));
_xscale = (100 - (yscalemod * yoffset));
depth = Math.round((Math.abs(yoffset - 100) * 100) + randrange(0, 10));
this.swapDepths(depth);
dp.text = depth;
}
xtarg = (_x + xinertia) + idlespeed;
if (ddragon && (walktrack.hitTest(xtarg, _y, true))) {
_x = xtarg;
} else {
x = xtarg;
}
xinertia = xinertia - (xinertia / _root.friction);
if ((xinertia < 0.2) && (xinertia > -0.2)) {
xinertia = 0;
}
ytarg = (_y + yinertia) + idlespeed;
if (walktrack.hitTest(_x, ytarg, true)) {
_y = ytarg;
}
if ((!dashing) || (dashing && (Math.abs(xinertia) < 5))) {
yinertia = yinertia - ((yinertia / _root.friction) * 1.5);
}
if ((yinertia < 0.2) && (yinertia > -0.2)) {
yinertia = 0;
}
if (falling) {
yspeed = yspeed - _root.gravity;
idlespeed = 0;
_rotation = 0;
}
b_btm = _y + (bbox._height / 2);
b_top = _y - (bbox._height / 2);
b_rgt = _x + (bbox._width / 2);
b_lft = _x - (bbox._width / 2);
if (vbump) {
vbump = ((yspeed >= 0) ? true : false);
}
if (!vbump) {
anim._y = anim._y - yspeed;
}
falling = true;
if (!maxex) {
maxex = 0;
}
if (anim._y > maxex) {
anim._y = 0;
yspeed = 0;
dbljump = tjump;
jumping = false;
if (((!attacking) && (!dashing)) && ((Math.abs(xinertia) + Math.abs(yinertia)) < 1)) {
var _local3 = (atimer ? "idle_shoot" : "idle");
anim.gotoAndStop(_local3);
}
}
if (ddragon && (!attacking)) {
if (Key.isDown(38)) {
if (yinertia > ((-_root.maxspeed) * 0.75)) {
yinertia = yinertia - _root.accel;
}
if ((!dashing) && (!jumping)) {
var _local3 = (atimer ? "walkshoot" : "walkright");
anim.gotoAndStop(_local3);
}
} else if (Key.isDown(40)) {
if (yinertia < (_root.maxspeed * 0.75)) {
yinertia = yinertia + _root.accel;
}
if ((!dashing) && (!jumping)) {
var _local3 = (atimer ? "walkshoot" : "walkright");
anim.gotoAndStop(_local3);
}
}
}
if (Key.isDown(40) && (!ddragon)) {
attacking = false;
if (!jumping) {
anim.gotoAndStop("crouch");
}
} else if (Key.isDown(37) && (jumping || (!attacking))) {
if (xinertia > (-_root.maxspeed)) {
xinertia = xinertia - _root.accel;
}
if (ddragon) {
anim._xscale = -100;
} else {
anim._xscale = oxscale * -1;
}
if ((!jumping) && (!dashing)) {
var _local3 = (atimer ? "walkshoot" : "walkright");
anim.gotoAndStop(_local3);
}
} else if (Key.isDown(39) && (jumping || (!attacking))) {
if (xinertia < _root.maxspeed) {
xinertia = xinertia + _root.accel;
}
if (ddragon) {
anim._xscale = 100;
} else {
anim._xscale = oxscale;
}
if ((!jumping) && (!dashing)) {
var _local3 = (atimer ? "walkshoot" : "walkright");
anim.gotoAndStop(_local3);
}
} else if (((((((Math.abs(yspeed) < 0.03) && (!jumping)) && (!charging)) && (!dashing)) && (!attacking)) && (!vbump)) && (Math.abs(yinertia) < 1)) {
var _local3 = (atimer ? "idle_shoot" : "idle");
anim.gotoAndStop(_local3);
idle = true;
}
if (jumping && (atimer)) {
var _local3 = (atimer ? "jump_shoot" : "jump");
anim.gotoAndStop(_local3);
}
if ((((yspeed < -2) && (!attacking)) && (!dashing)) && (_currentframe != 47)) {
var _local3 = (atimer ? "fall_shoot" : "fall");
anim.gotoAndStop(_local3);
attacking = false;
}
if (Key.isDown(38)) {
}
debug.text = (((((((((("atkcombo: " + atkcombo) + "\nbulletcount: ") + _root.bulletcount) + "\nattacking: ") + attacking) + "\ncharge: ") + ((chargetimer / maxcharge) * 100)) + "\nnmecount: ") + _root.nmecount.length) + "\ngetvals: ") + _root.texts;
(((("\nCode: " + Key.getCode()) + "\tACSII: ") + Key.getAscii()) + "\tKey: ") + chr(Key.getAscii());
debug.autoSize = true;
};
Symbol 46 MovieClip [everything] Frame 1
function spawnnme() {
newdude = this.attachMovie("nme", "nme" + (++nmenum), this.getNextHighestDepth());
newdude._x = -60;
newdude._y = randrange(walktrack._y, walktrack._y + walktrack._height);
}
function spawnitem() {
newitem = this.attachMovie("item_obj", "item" + (++itemnum), this.getNextHighestDepth());
newitem._x = randrange(walktrack._width - (walktrack._width / 3), walktrack._width - 40);
newitem._y = randrange(walktrack._y, walktrack._y + walktrack._height);
newitem.type = items[randrange(0, items.length - 1)];
}
if (!init) {
init = true;
_root.focus = player;
oscreenscale = (screenscale = 1);
otrackspeed = (trackspeed = 17);
nmenum = (itemnum = 0);
timer = (otimer = _root.spawnspeed);
itemspawnspeed = _root.itemspawnspeed;
init = true;
_root.debug._alpha = 0;
_root.debug.swapDepths(_root.getNextHighestDepth());
items = ["gold_s", "gold_s", "gold_s", "gold_s", "gold_s", "gold_l", "gold_l"];
pool = this;
}
onEnterFrame = function () {
_root.nmecount = [];
_root.bulletcount = 0;
for (var _local3 in pool) {
if (typeof(pool[_local3]) == "movieclip") {
if (pool[_local3]._name.indexOf("swoosh") > -1) {
_root.bulletcount++;
}
if (pool[_local3]._name.indexOf("nme") > -1) {
_root.nmecount.push(pool[_local3]);
}
}
}
if (_root.camtrack) {
if (screenscale != oscreenscale) {
trackspeed = screenscale;
}
targx = (Stage.width / 2) - (_root.focus._x * screenscale);
targy = (Stage.height / 2) - (_root.focus._y * screenscale);
this._x = this._x + ((targx - this._x) / (trackspeed / screenscale));
this._y = this._y + ((targy - this._y) / (trackspeed / screenscale));
trackspeed = otrackspeed;
oscreenscale = screenscale;
}
_yscale = (screenscale * 100);
_xscale = (screenscale * 100);
if (((--timer) < 0) && (_root.nmecount.length < 28)) {
timer = _root.spawnspeed;
spawnnme();
}
if ((--itemspawnspeed) < 0) {
itemspawnspeed = randrange(_root.itemspawnspeed / 1.5, _root.itemspawnspeed * 2);
spawnitem();
}
};
Symbol 59 MovieClip Frame 1
if (!init) {
timer = (otimer = 7 - _parent._parent.lopespeed);
init = true;
onEnterFrame = function () {
if ((--timer) <= 0) {
timer = otimer;
if (_currentframe != _totalframes) {
nextFrame();
} else {
gotoAndStop (1);
}
}
};
stop();
}
Symbol 65 MovieClip Frame 51
_parent._parent.bury();
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
_root.gosound("snd_murloc_die" + randrange(1, 3));
Symbol 68 MovieClip [nme] Frame 1
function die() {
_root.focus.getxp();
_root.focus.comboup();
this.onEnterFrame = function () {
_alpha = (_alpha ? 0 : 100);
};
_root.kills++;
this._name = "deadloc" + this._name.split("nme")[1];
anim.gotoAndStop("die");
}
function bury() {
this.removeMovieClip();
}
var depth;
dp._visible = _root.showdepth;
yscalemod = _root.yscalemod;
walktrack = _parent.walktrack;
lopespeed = randrange(1, _root.nmespeedmax);
this.onEnterFrame = function () {
if (_root.focus.nuking) {
return(undefined);
}
this._x = this._x + lopespeed;
yoffset = Math.abs((((_y - walktrack._y) / walktrack._height) * 100) - 100) - 0.6;
if (yoffset < 0) {
yoffset = 1;
}
_yscale = (100 - (yscalemod * yoffset));
_xscale = (100 - (yscalemod * yoffset));
depth = Math.round((Math.abs(yoffset - 100) * 100) + randrange(0, 10));
this.swapDepths(depth);
dp.text = depth;
if (_x > (_root.swidth + 50)) {
_root.combocount = 0;
_root.combox = 1;
_root.flees++;
this.removeMovieClip();
}
};
Symbol 124 MovieClip [wd_anim] Frame 1
stop();
Symbol 131 MovieClip Frame 16
stop();
Symbol 136 MovieClip Frame 20
stop();
Symbol 162 MovieClip Frame 1
mch.onEnterFrame = (mch2.onEnterFrame = function () {
this._height = _root.sheight * 3;
this._alpha = (this._alpha ? 0 : 100);
});
Symbol 167 MovieClip [dk_anim] Frame 1
stop();
Symbol 167 MovieClip [dk_anim] Frame 2
_root.gosound("snd_dk_atk1");
Symbol 167 MovieClip [dk_anim] Frame 3
_root.gosound("snd_dk_atk2");
Symbol 167 MovieClip [dk_anim] Frame 4
_root.gosound("snd_dk_atk3");
Symbol 167 MovieClip [dk_anim] Frame 11
_root.goloop("snd_dk_charge");
Symbol 167 MovieClip [dk_anim] Frame 12
_root.gosound("snd_dk_chargeshot");
Symbol 212 MovieClip Frame 10
stop();
Symbol 220 MovieClip Frame 1
function spawndot() {
ndot = holder.attachMovie("r_charge_fx", "rcharge" + randrange(1, 999), holder.getNextHighestDepth());
ndot._rotation = randrange(-70, 70);
ndot._xscale = (ndot._yscale = randrange(100, 500));
}
stimer = (ostimer = 10);
spawndot();
this.onEnterFrame = function () {
if ((--stimer) < 0) {
stimer = randrange(5, ostimer);
spawndot();
}
};
Symbol 226 MovieClip [r_anim] Frame 1
stop();
Symbol 226 MovieClip [r_anim] Frame 9
_root.goloop("snd_raynor_charge");
Symbol 226 MovieClip [r_anim] Frame 10
_root.gosound("snd_raynor_chargeshot");
Symbol 227 MovieClip [swoosh] Frame 1
function die() {
this.removeMovieClip();
}
mch._visible = false;
attacktype = attacktype || "slash";
if (attacktype == "bounce") {
nbounceheight = (_y - detonateheight) / 10;
attacktype = "bomb";
bounce = true;
trace(attacktype);
}
chargetimer = chargetimer || 0;
vdelay = vdelay || 0;
xinertia = (xinertia * 2) || 0;
yinertia = 0;
if (attacktype == "bullet") {
xinertia = 10;
if (_xscale > 0) {
xinertia = xinertia * -1;
}
}
if (attacktype == "bomb") {
yinertia = bounceheight || -10;
xinertia = Math.abs(xinertia) + 5;
if (_xscale > 0) {
xinertia = xinertia * -1;
}
}
pool = _root.nmecount;
newatk = this.attachMovie(attacktype + "_type", "graphic", this.getNextHighestDepth());
maxcharge = _root.focus.maxcharge;
var chargepct = ((chargetimer / maxcharge) * 100);
if (attacktype == "charge_beam") {
if (chargetimer > maxcharge) {
chargetimer = maxcharge;
}
chargepct = (chargetimer / maxcharge) * 100;
this._yscale = chargepct;
}
if (attacktype == "slam") {
_yscale = 0;
_xscale = 0;
}
onEnterFrame = function () {
if ((--vdelay) < 0) {
if (attacktype == "charge_beam") {
chargetimer = chargetimer - 3;
if (chargetimer < 0) {
_yscale = (_yscale - 3);
}
if (_yscale <= 0) {
_root.game_sound.stop("snd_raynor_chargeshot");
_root.focus.attacking = false;
die();
}
}
if (attacktype == "slam") {
if ((_yscale <= (chargepct - 10)) && (!descending)) {
_yscale = (_yscale - ((_yscale - chargepct) / 7));
_xscale = (_yscale - ((_yscale - chargepct) / 7));
} else {
descending = true;
_alpha = (_alpha - 4);
if (_xscale > 0) {
_xscale = (_xscale - 4);
}
if (_alpha < 0) {
_root.focus.attacking = false;
die();
}
}
}
_x = (_x + xinertia);
_y = (_y + yinertia);
if (attacktype == "bomb") {
yinertia = yinertia + 0.8;
}
for (var _local4 in pool) {
if ((pool[_local4]._name.indexOf("nme") > -1) && (attacktype != "bomb")) {
xtest = false;
if ((!chargetimer) && (Math.abs(pool[_local4]._x - this._x) < 15)) {
xtest = true;
}
if (chargetimer && (this.hitTest(pool[_local4]))) {
xtest = true;
}
if ((attacktype == "explosion") && (Math.abs(pool[_local4]._x - this._x) < 50)) {
xtest = true;
}
if (attacktype == "slam") {
ytest = Math.abs(pool[_local4]._y - this._y) < ((30 * chargepct) / 100);
} else if (attacktype == "explosion") {
ytest = Math.abs(pool[_local4]._y - this._y) < 30;
} else {
ytest = Math.abs((pool[_local4]._y - this._y) - (82 * (Math.abs(_xscale) / 100))) < 15;
}
if (xtest && (ytest)) {
if (_xscale < 0) {
pool[_local4]._xscale = pool[_local4]._xscale * -1;
}
pool[_local4].die();
if (attacktype == "bullet") {
die();
}
}
}
}
if ((_x < -40) || (_x > (_root.swidth + 40))) {
die();
}
if ((attacktype == "bomb") && (_y >= detonateheight)) {
_root.gosound("snd_wd_expl" + randrange(1, 3));
newswoosh = _parent.attachMovie("swoosh", "expl_" + randrange(1, 9999), this.getDepth() + 10);
newswoosh._x = _x;
newswoosh._y = detonateheight;
newswoosh._xscale = (newswoosh._yscale = _yscale * 2);
newswoosh.attacktype = "explosion";
if (bounce) {
newswoosh = _root.focus.createswoosh(this.getDepth() + 10, this._x + 20, this._y - 20);
newswoosh.detonateheight = detonateheight;
newswoosh.bounceheight = nbounceheight;
newswoosh.attacktype = "bomb";
}
die();
}
}
};
Symbol 248 MovieClip Frame 1
function togglesound() {
if (off) {
off = false;
this.gotoAndStop(1);
_root.game_sound.setVolume(100);
_root.game_music.setVolume(40);
} else {
off = true;
this.gotoAndStop(2);
_root.game_sound.setVolume(0);
_root.game_music.setVolume(0);
}
}
if (!init) {
init = true;
off = false;
this.onRelease = togglesound;
stop();
}
Symbol 251 MovieClip [ui] Frame 1
function levelup() {
_root.xpval = Math.round(_root.xpval * 1.5);
_root.stats.exp = _root.stats.exp - nextlevel;
_root.stats.level++;
updspeeds();
_root.player.attachMovie("lvlanim", "lvl", _root.player.getNextHighestDepth());
if (((_root.stats.level % 10) == 0) && ((_root.focus.attacktype == "bullet") || (_root.focus.attacktype == "bomb"))) {
_root.bulletmax++;
_root.focus.gettext("1 shots!");
}
if (((_root.stats.level % 1) == 0) && (_root.stats.level < 25)) {
spawncrowd("cr_rand" + randrange(1, 8), randrange(136, 775), randrange(299, 308));
}
if (_root.stats.level == 3) {
_root.focus.dash = true;
abltext("Dash UNLOCKED (<< or >>)");
}
if (_root.stats.level == 5) {
_root.focus.chargeattack = true;
abltext("Charge Attack UNLOCKED ('X')");
}
if (_root.stats.level == 10) {
spawncrowd("cr_black", 414, 310);
abltext("Double JUMP UNLOCKED");
_root.focus.tjump = (_root.focus.dbljump = 2);
}
if (_root.stats.level == 20) {
spawncrowd("cr_olaf", 496, 307);
}
if (_root.stats.level == 30) {
spawncrowd("cr_arthas", 454, 314);
}
}
function spawncrowd(type, xl, yl) {
newcr = _parent.everything.bg.attachMovie(type, (("cr_" + _root.stats.level) + "_") + randrange(1, 9), _parent.everything.bg.getNextHighestDepth());
newcr._x = xl;
newcr._y = yl;
newcr.swapDepths((newcr._y * 100) + randrange(1, 99));
return(newcr);
}
function abltext(str) {
abltxt.codetxt.text = str;
abltxt.going = true;
abltxt.codetxt.autoSize = "center";
abltxt._y = 421;
abltxt.timer = 120;
abltxt._alpha = 100;
abltxt.onEnterFrame = function () {
this._y = this._y - ((this._y - 399) / 7);
if ((--this.timer) < 0) {
this._alpha--;
if (this._alpha < 0) {
abltxt.going = false;
delete this.onEnterFrame;
}
}
};
}
function updspeeds() {
_root.xpval = Math.round(_root.stats.level * 16);
_root.nmespeedmax = (_root.stats.level * 0.1) + 3;
_root.spawnspeed = (_root.ospawnspeed - (_root.stats.level * 0.75)) + 3;
}
updspeeds();
xpbar._x = bgbar._x;
xpbar._y = bgbar._y;
timer = 60;
onEnterFrame = function () {
if (((_root.stats.gold > _root.nukecost) && (!abltxt.going)) && (!nuketext)) {
nuketext = true;
abltext("Nuke Available! ('C')");
}
nextlevel = levelval(_root.stats.level);
leveltxt.text = "level " + _root.stats.level;
xp.text = (_root.stats.exp + "/") + nextlevel;
goldtxt.text = _root.stats.gold + "G";
combotxt.text = ((("combo: " + _root.combocount) + " (") + _root.combox) + "x)";
bulletstxt.text = "shots: " + _root.bulletmax;
killtxt.text = _root.kills;
fleetxt.text = _root.flees;
bulletstxt.autoSize = (goldtxt.autoSize = true);
xp.autoSize = "center";
leveltxt.autoSize = (combotxt.autoSize = "right");
xpbar._width = (bgbar._width * _root.stats.exp) / nextlevel;
if (_root.stats.exp >= nextlevel) {
levelup();
}
};
Symbol 254 MovieClip [slash_type] Frame 1
this.onEnterFrame = function () {
if (this._currentframe >= this._totalframes) {
_parent.die();
}
};
Symbol 262 MovieClip [bullet_type] Frame 1
bfx.cacheAsBitmap = true;
bmask.cacheAsBitmap = true;
bfx.setMask(bmask);
Symbol 279 MovieClip [dash_fx] Frame 1
this.onEnterFrame = function () {
if (this._currentframe >= this._totalframes) {
this.removeMovieClip();
}
};
Symbol 285 MovieClip Frame 1
stop();
gotoAndStop(_parent.type);
Symbol 287 MovieClip [item_obj] Frame 1
if (!init) {
init = true;
yscalemod = _root.yscalemod;
walktrack = _parent.walktrack;
life = 300;
ostimer = 20;
stimer = (scount = 0);
type = type || "gold_s";
loot = {gold_s:10, gold_l:50};
this.die = function () {
this.removeMovieClip();
};
this.onEnterFrame = function () {
yoffset = Math.abs((((_y - walktrack._y) / walktrack._height) * 100) - 100) - 0.6;
if (yoffset < 0) {
yoffset = 1;
}
_yscale = (100 - (yscalemod * yoffset));
_xscale = (100 - (yscalemod * yoffset));
depth = Math.round((Math.abs(yoffset - 100) * 100) + randrange(0, 10));
this.swapDepths(depth);
if ((--life) < 0) {
_alpha = (_alpha ? 0 : 100);
if (life < -50) {
die();
}
}
if ((Math.abs(_root.focus._x - this._x) < 15) && (Math.abs(_root.focus._y - this._y) < 15)) {
if (type.indexOf("gold") > -1) {
_root.focus.gold(loot[type]);
}
die();
}
if ((--stimer) < 0) {
stimer = ostimer;
newspark = this.attachMovie("sparkle", "spark" + (++scount), this.getNextHighestDepth());
newspark._x = randrange(0, this._width / 4);
newspark._x = newspark._x * (randrange(0, 1) ? 1 : -1);
newspark.size = randrange(1, 3);
newspark._xscale = (newspark._yscale = 50 + (newspark.size * 10));
newspark.yspeed = newspark.size / 3;
}
};
}
Symbol 291 MovieClip [sparkle] Frame 1
var rot = randrange(1, 3);
yspeed = _xscale / 100;
this.onEnterFrame = function () {
_rotation = (_rotation + rot);
this._y = this._y - this.yspeed;
if (this._y < -70) {
this._alpha--;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
};
Symbol 295 MovieClip [getval] Frame 1
onEnterFrame = function () {
_y = (_y-1);
_alpha = (_alpha - 3);
if (_alpha < 0) {
_root.texts--;
this.removeMovieClip();
}
};
Symbol 328 MovieClip Frame 79
stop();
Symbol 348 MovieClip Frame 1
targy = _y - 30;
targalpha = 100;
_alpha = 0;
btntxt.text = txt;
this.onRelease = function () {
_root.gosound("snd_select");
btnfunction();
};
onRollOver = function () {
sarrow._alpha = 100;
_root.gosound("snd_blip");
};
onRollOut = (onReleaseOutside = function () {
sarrow._alpha = 0;
});
onEnterFrame = function () {
_alpha = (_alpha + ((targalpha - _alpha) / 7));
_y = (_y + ((targy - _y) / 7));
};
Symbol 349 MovieClip [intro] Frame 1
function codetext(string) {
combo = [];
_root.gosound("snd_select");
code._alpha = 100;
code.codetxt.text = string;
code.timer = 120;
code.onEnterFrame = function () {
if ((--this.timer) < 0) {
this._alpha = this._alpha - 0.5;
}
};
}
combo = [];
combotimer = (ocombotimer = 30);
var keyListenercode = new Object();
keyListenercode.onKeyDown = function () {
combotimer = ocombotimer;
var _local1 = Key.getCode();
combo.push(_local1);
if (_local1 == 32) {
trace("combo:" + combo);
}
};
Key.addListener(keyListenercode);
this.onEnterFrame = function () {
if ((--combotimer) < 0) {
combotimer = ocombotimer;
combo = [];
}
combostring = combo.join(",");
if (combostring == "38,38,40,40,37,39,37,39,66,65") {
codetext("30 Lives UNLOCKED!");
}
if (combostring == "73,68,68,81,68") {
codetext("God Mode UNLOCKED!");
}
if (combostring == "73,68,75,70,65") {
codetext("All Ammo UNLOCKED!");
}
if (combostring == "77,85,83,84,65,67,72,69") {
codetext("MUSTACHE MODE Enabled!");
}
if (combostring == "66,76,65,67,75,83,72,69,69,80,87,65,76,76") {
codetext("Fog of War LIFTED!");
}
};
Instance of Symbol 348 MovieClip in Symbol 349 MovieClip [intro] Frame 57
onClipEvent (load) {
txt = "Start!!";
btnfunction = function () {
Key.removeListener(_parent.keyListenercode);
_root.charselect();
_root.intro.swapDepths(99);
_root.intro.removeMovieClip();
};
}
Instance of Symbol 348 MovieClip in Symbol 349 MovieClip [intro] Frame 62
onClipEvent (load) {
txt = "Instructions";
btnfunction = function () {
_parent.attachMovie("tips", "tips", _parent.getNextHighestDepth());
};
}
Symbol 349 MovieClip [intro] Frame 75
stop();
Symbol 354 MovieClip Frame 1
if (!init) {
init = true;
stop();
}
Symbol 355 MovieClip Frame 1
chara = this.attachMovie(char + "_anim", "char", this.getNextHighestDepth());
chara._y = chara._height / 2;
this.onRollOver = function () {
bg.play();
_root.gosound("snd_blip");
};
this.onRollOut = (onReleaseOutside = function () {
bg.gotoAndStop(1);
});
onRelease = function () {
_root.gosound("snd_select");
_root.char = char;
_root.startgame();
_parent.removeMovieClip();
};
Instance of Symbol 355 MovieClip in Symbol 357 MovieClip [charselect] Frame 5
onClipEvent (load) {
this.char = "r";
}
Instance of Symbol 355 MovieClip in Symbol 357 MovieClip [charselect] Frame 7
onClipEvent (load) {
this.char = "dk";
}
Instance of Symbol 355 MovieClip in Symbol 357 MovieClip [charselect] Frame 9
onClipEvent (load) {
this.char = "wd";
}
Symbol 357 MovieClip [charselect] Frame 24
stop();
Symbol 363 MovieClip [bomb_type] Frame 1
dir = ((_parent.xinertia < 0) ? 1 : -1);
this.xinertia = randrange(2, 7);
this.yinertia = randrange(1, 2);
timer = (otimer = 1);
faderate = 2;
onEnterFrame = function () {
if ((--timer) < 0) {
timer = otimer;
ntrail = this._parent.attachMovie("bomb_trail", "bombtrail" + randrange(1, 999), this._parent.getNextHighestDepth());
ntrail._x = _x;
ntrail._y = _y;
scalemod = (randrange(0, 1) * 2) - (1 * randrange(0, 40));
ntrail._xscale = (ntrail._yscale = _root.focus._yscale - (scalemod * 3));
ntrail._xscale = ntrail._xscale * dir;
ntrail.yinertia = yinertia;
ntrail.xinertia = -_parent.xinertia;
ntrail.targ = _parent;
ntrail.faderate = faderate;
ntrail.onEnterFrame = function () {
this._alpha = this._alpha - 5;
this._x = this._x + (dir * this.xinertia);
this._y = this._y - (this.yinertia + this.targ.yinertia);
this._alpha = this._alpha - this.faderate;
this._rotation = this._rotation + 40;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
}
};
Symbol 389 MovieClip Frame 60
if (_parent._parent.attacktype) {
_parent._parent.removeMovieClip();
}
Symbol 395 MovieClip [tips] Frame 1
function gotip(dir) {
tiptxt.text = tips[(currtip = currtip + dir)];
}
currtip = -1;
tips = ["Kill the Failocs", "Use the arrow keys on your keyboard to move.\nPress the spacebar to jump.", "Press 'Z' to attack.\nEach hero has a unique attack.", "Press and hold 'X' to use your charge attack.", ("Press 'C' to use a nuke.\n*Costs " + _root.nukecost) + " gold", "Double tap left/right to dash.\n(Once you've acquired the ability)", "Use the typewriter to save.", "As your character levels, the enemy spawns quicker and can move faster.", "Use the codec to call for support.", "Build your combo by attacking the enemy without letting any escape. Build a high enough combo to earn a multiplier which increases the value of gold pick ups.", "Learn the enemy's pattern to defeat him.", "There is no pattern.", "There might be a cow level.", "No, there isn't. Sorry.", "Have fun.", "Write Poetry.", "Learn an instrument.", "Take up fly fishing.", "Write a book.", "Read your book aloud to strangers.", "Explore caves.", "Fight bears.", "Actually, don't fight bears.\nLeave that to Russian Wrestling Professionals.", "Become a Russian Wrestler.", "Meet interesting people.", "Join the Army, they said.", "See the World, they said.", "I'd rather be sailing.", "The Witchdoctor is not a licensed medical professional.\nFair warning."];
gotip(1);
onEnterFrame = function () {
if (currtip <= 0) {
pre._visible = false;
} else {
pre._visible = true;
}
if (currtip >= (tips.length - 1)) {
nxt._visible = false;
} else {
nxt._visible = true;
}
};
Instance of Symbol 392 MovieClip in Symbol 395 MovieClip [tips] Frame 1
onClipEvent (load) {
this.onRelease = function () {
};
useHandCursor = false;
}
Instance of Symbol 348 MovieClip "pre" in Symbol 395 MovieClip [tips] Frame 1
onClipEvent (load) {
txt = "Prev";
btnfunction = function () {
_parent.gotip(-1);
};
}
Instance of Symbol 348 MovieClip in Symbol 395 MovieClip [tips] Frame 1
onClipEvent (load) {
txt = "Ok, ok";
btnfunction = function () {
_parent.removeMovieClip();
};
}
Instance of Symbol 348 MovieClip "nxt" in Symbol 395 MovieClip [tips] Frame 1
onClipEvent (load) {
txt = "Next";
btnfunction = function () {
_parent.gotip(1);
};
}
Symbol 439 MovieClip Frame 32
gotoAndPlay (13);
Symbol 442 MovieClip [nuke] Frame 1
_root.gosound("snd_nuke");
Symbol 442 MovieClip [nuke] Frame 116
pool = this._parent;
for (var i in pool) {
if (typeof(pool[i]) == "movieclip") {
if (pool[i]._name.indexOf("nme") > -1) {
pool[i].die();
}
}
}
_root.focus.attacking = false;
_root.focus.nuking = false;
Symbol 442 MovieClip [nuke] Frame 134
this.removeMovieClip();