Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
fscommand ("showmenu", "false");
Stage.showMenu = false;
__com_mochibot__("a0ac3862", this, 10301, true);
stop();
var CPMStarPoolID = 2035;
var CPMStarSubPoolID = 100;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
startButt._visible = false;
var domain = _url.substring(7);
domain = domain.toLowerCase();
if (domain.substring(0, 3) == "www") {
domain = domain.substring(4);
}
var end = domain.indexOf("/");
domain = domain.substring(0, end);
logoMC.alpha = 0;
onEnterFrame = function () {
_root.percLoaded.text = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100) + "%";
_root.logoMC._alpha = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_root._framesloaded == _root._totalframes) {
delete onEnterFrame;
startButt._visible = true;
percLoaded._visible = false;
startButt.gotoAndPlay(2);
}
};
startButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
startButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
MovieClip.prototype.fluxTint = function ($colObj, $amountStart, $amountEnd, $pace, $loop, $limit) {
this.$colour = new Color(this);
var $loops = 0;
var $unlimited = (($limit == undefined) ? true : false);
var $way = (($amountStart <= $amountEnd) ? "up" : "down");
var $top = (($amountStart <= $amountEnd) ? ($amountEnd) : ($amountStart));
var $bottom = (($amountStart <= $amountEnd) ? ($amountStart) : ($amountEnd));
var $a_curr = $amountStart;
this.onEnterFrame = function () {
this.$colour.setTint($colObj.r, $colObj.g, $colObj.b, $a_curr);
if ($way == "up") {
if ($a_curr >= $top) {
$loops = $loops + 0.5;
var _local2 = (!$loop) || (((!$unlimited) && ($loop)) && ($loops >= $limit));
if (_local2) {
delete this.onEnterFrame;
}
$way = "down";
}
$a_curr = $a_curr + $pace;
} else if ($way == "down") {
if ($a_curr <= $bottom) {
$loops = $loops + 0.5;
var _local2 = (!$loop) || (((!$unlimited) && ($loop)) && ($loops >= $limit));
if (_local2) {
delete this.onEnterFrame;
}
$way = "up";
}
$a_curr = $a_curr - $pace;
}
};
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local4 = 100 - amount;
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = _local4));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
Instance of Symbol 164 MovieClip "startButt" in Frame 1
on (release) {
_root.gotoAndStop(3);
}
Instance of Symbol 176 MovieClip in Frame 1
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Instance of Symbol 183 MovieClip in Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=preloader", "_blank");
}
Frame 2
stop();
Frame 3
stop();
Frame 4
MovieClip.prototype.fluxTint = function ($colObj, $amountStart, $amountEnd, $pace, $loop, $limit) {
this.$colour = new Color(this);
var $loops = 0;
var $unlimited = (($limit == undefined) ? true : false);
var $way = (($amountStart <= $amountEnd) ? "up" : "down");
var $top = (($amountStart <= $amountEnd) ? ($amountEnd) : ($amountStart));
var $bottom = (($amountStart <= $amountEnd) ? ($amountStart) : ($amountEnd));
var $a_curr = $amountStart;
this.onEnterFrame = function () {
this.$colour.setTint($colObj.r, $colObj.g, $colObj.b, $a_curr);
if ($way == "up") {
if ($a_curr >= $top) {
$loops = $loops + 0.5;
var _local2 = (!$loop) || (((!$unlimited) && ($loop)) && ($loops >= $limit));
if (_local2) {
delete this.onEnterFrame;
}
$way = "down";
}
$a_curr = $a_curr + $pace;
} else if ($way == "down") {
if ($a_curr <= $bottom) {
$loops = $loops + 0.5;
var _local2 = (!$loop) || (((!$unlimited) && ($loop)) && ($loops >= $limit));
if (_local2) {
delete this.onEnterFrame;
}
$way = "up";
}
$a_curr = $a_curr - $pace;
}
};
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local4 = 100 - amount;
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = _local4));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
MovieClip.prototype.fadeMC = function (fadeOut, rate) {
clearInterval(_root.fadeInt);
this.fadeIn = true;
if (fadeOut == true) {
_root.stage++;
}
this.onEnterFrame = function () {
if (fadeOut == "fadeOnce") {
if (this.fadeIn == true) {
if (this._alpha < 100) {
this._alpha = this._alpha + rate;
} else {
this.fadeIn = false;
delete this.onEnterFrame;
}
}
} else if (fadeOut == "fadeMap") {
if (this.fadeIn == true) {
if (this._alpha > 0) {
this._alpha = this._alpha - rate;
} else {
this.fadeIn = false;
trace("SDFDS");
_root.loadMap(_root.level);
delete this.onEnterFrame;
}
}
} else if (fadeOut == "fadeTitle") {
if (this.fadeIn == true) {
if (this._alpha > 0) {
this._alpha = this._alpha - rate;
} else {
this.fadeIn = false;
_root.titleMC.removeMovieClip();
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(4);
_root.menuMC._alpha = 0;
_root.menuMC.fadeMC("fadeOnce", 10);
delete this.onEnterFrame;
}
}
} else if (fadeOut == true) {
if (this.fadeIn == true) {
if (this._alpha < 150) {
this._alpha = this._alpha + rate;
} else {
this.fadeIn = false;
}
} else if (this._alpha > 0) {
this._alpha = this._alpha - 2;
} else {
_root.waveTimer();
delete this.onEnterFrame;
}
} else if (this.fadeIn == true) {
if (this._alpha < 100) {
this._alpha = this._alpha + rate;
} else {
this.fadeIn = false;
delete this.onEnterFrame;
}
}
};
};
function getRadius(thisTile) {
_root.radArray = [];
if (!(_root.selectedMC === "mage1")) {
} else {
_root.radArray = [_root.display.tiles[(("tile_" + [thisTile.y + 1]) + "_") + [thisTile.x]], _root.display.tiles[(("tile_" + [thisTile.y + 2]) + "_") + [thisTile.x]]];
}
}
function getZone(defender, axis, dirFront) {
r = 0;
while (r < defender.zoneArray.length) {
defender.zoneArray[r].defenderRange._visible = false;
r++;
}
defender.zoneArray = [];
if (defender.tileSize == 1) {
i = 1;
while (i <= defender.range) {
if (axis == "y") {
if (dirFront == 1) {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y + i]) + "_") + [defender.tile.x]];
} else {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y - i]) + "_") + [defender.tile.x]];
}
} else if (axis == "x") {
if (dirFront == 1) {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y]) + "_") + [defender.tile.x + i]];
} else {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y]) + "_") + [defender.tile.x - i]];
}
}
i++;
}
} else {
i = 1;
while (i <= defender.range) {
if (axis == "y") {
if (dirFront == 1) {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y + i]) + "_") + [defender.tile.x]];
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y + i]) + "_") + [defender.tile.x - 1]];
} else {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y - (i + 1)]) + "_") + [defender.tile.x]];
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y - (i + 1)]) + "_") + [defender.tile.x - 1]];
}
} else if (axis == "x") {
if (dirFront == 1) {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y]) + "_") + [defender.tile.x + i]];
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y - 1]) + "_") + [defender.tile.x + i]];
} else {
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y]) + "_") + [defender.tile.x - (i + 1)]];
defender.zoneArray[defender.zoneArray.length] = _root.display.tiles[(("tile_" + [defender.tile.y - 1]) + "_") + [defender.tile.x - (i + 1)]];
}
}
i++;
}
}
r = 0;
while (r < defender.zoneArray.length) {
defender.zoneArray[r].defenderRange._visible = true;
r++;
}
}
function getStats(defender, defenderTile) {
switch (defender.type) {
case "archer1" :
defender.name = "archer";
defender.power = 1;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "archer2";
defender.upgradeEXP = 500;
defender.weapon = "arrowShot";
break;
case "archer2" :
defender.name = "archer";
defender.power = 2;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "archer3";
defender.upgradeEXP = 1000;
defender.weapon = "arrowShot";
break;
case "archer3" :
defender.name = "archer";
defender.power = 3;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = null;
defender.upgradeEXP = null;
defender.weapon = "arrowShot";
break;
case "mage1" :
defender.name = "mage";
defender.power = 2;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "mage2";
defender.upgradeEXP = 600;
defender.weapon = "magicShot";
break;
case "mage2" :
defender.name = "mage";
defender.power = 3;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "mage3";
defender.upgradeEXP = 1200;
defender.weapon = "magicShot";
break;
case "mage3" :
defender.name = "mage";
defender.power = 4;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = null;
defender.upgradeEXP = null;
defender.weapon = "magicShot";
break;
case "ninja1" :
defender.name = "ninja";
defender.power = 3;
defender.tileSize = 1;
defender.range = 3;
defender.tile = defenderTile;
defender.upgrade = "ninja2";
defender.upgradeEXP = 700;
defender.weapon = "ninjaStar";
break;
case "ninja2" :
defender.name = "ninja";
defender.power = 4;
defender.tileSize = 1;
defender.range = 3;
defender.tile = defenderTile;
defender.upgrade = "ninja3";
defender.upgradeEXP = 1300;
defender.weapon = "ninjaStar";
break;
case "ninja3" :
defender.name = "ninja";
defender.power = 5;
defender.tileSize = 1;
defender.range = 3;
defender.tile = defenderTile;
defender.upgrade = null;
defender.upgradeEXP = null;
defender.weapon = "ninjaStar";
break;
case "knight1" :
defender.name = "knight";
defender.power = 6;
defender.tileSize = 1;
defender.range = 1;
defender.tile = defenderTile;
defender.upgrade = "knight2";
defender.upgradeEXP = 900;
defender.weapon = null;
break;
case "knight2" :
defender.name = "knight";
defender.power = 7;
defender.tileSize = 1;
defender.range = 1;
defender.tile = defenderTile;
defender.upgrade = "knight3";
defender.upgradeEXP = 1600;
defender.weapon = null;
break;
case "knight3" :
defender.name = "knight";
defender.power = 8;
defender.tileSize = 1;
defender.range = 1;
defender.tile = defenderTile;
defender.upgrade = null;
defender.upgradeEXP = null;
defender.weapon = null;
break;
case "warrior1" :
defender.name = "warrior";
defender.power = 6;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "warrior2";
defender.upgradeEXP = 1200;
defender.weapon = null;
break;
case "warrior2" :
defender.name = "warrior";
defender.power = 7;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = "warrior3";
defender.upgradeEXP = 2000;
defender.weapon = null;
break;
case "warrior3" :
defender.name = "warrior";
defender.power = 8;
defender.tileSize = 1;
defender.range = 2;
defender.tile = defenderTile;
defender.upgrade = null;
defender.upgradeEXP = null;
defender.weapon = null;
break;
case "dragon" :
defender.name = "dragon";
defender.power = 4;
defender.tileSize = 4;
defender.range = 3;
defender.tile = defenderTile;
defender.tileGroup = _root.tileGroupArr;
defender.upgrade = "dragon2";
defender.upgradeEXP = 1400;
break;
case "dragon2" :
defender.name = "dragon";
defender.power = 5;
defender.tileSize = 4;
defender.range = 3;
defender.tile = defenderTile;
defender.tileGroup = _root.tileGroupArr;
defender.upgrade = "dragon3";
defender.upgradeEXP = 2600;
break;
case "dragon3" :
defender.name = "dragon";
defender.power = 6;
defender.tileSize = 4;
defender.range = 3;
defender.tile = defenderTile;
defender.tileGroup = _root.tileGroupArr;
defender.upgrade = null;
defender.upgradeEXP = null;
}
}
function getMinMax(defender) {
if (defender.tileSize == 1) {
if (defender.axis == "y") {
if (defender.dirFront == 1) {
defender.minX = defender.tile.x;
defender.maxX = defender.tile.x;
defender.minY = defender.tile.y + 1;
defender.maxY = defender.tile.y + defender.range;
} else if (defender.dirFront == 0) {
defender.minX = defender.tile.x;
defender.maxX = defender.tile.x;
defender.minY = defender.tile.y - defender.range;
defender.maxY = defender.tile.y - 1;
}
} else if (defender.axis == "x") {
if (defender.dirFront == 1) {
defender.minX = defender.tile.x + 1;
defender.maxX = defender.tile.x + defender.range;
defender.minY = defender.tile.y;
defender.maxY = defender.tile.y;
} else if (defender.dirFront == 0) {
defender.minX = defender.tile.x - defender.range;
defender.maxX = defender.tile.x - 1;
defender.minY = defender.tile.y;
defender.maxY = defender.tile.y;
}
}
} else if (defender.axis == "y") {
if (defender.dirFront == 1) {
defender.minX = defender.tile.x - 1;
defender.maxX = defender.tile.x;
defender.minY = defender.tile.y + 1;
defender.maxY = defender.tile.y + defender.range;
} else if (defender.dirFront == 0) {
defender.minX = defender.tile.x - 1;
defender.maxX = defender.tile.x;
defender.minY = defender.tile.y - (defender.range + 1);
defender.maxY = defender.tile.y - 1;
}
} else if (defender.axis == "x") {
if (defender.dirFront == 1) {
defender.minX = defender.tile.x + 1;
defender.maxX = defender.tile.x + defender.range;
defender.minY = defender.tile.y - 1;
defender.maxY = defender.tile.y;
} else if (defender.dirFront == 0) {
defender.minX = defender.tile.x - (defender.range + 1);
defender.maxX = defender.tile.x - 1;
defender.minY = defender.tile.y - 1;
defender.maxY = defender.tile.y;
}
}
}
function defenderIconStatus() {
i = 0;
while (i < defenderIcons.length) {
if (_root.userGold < _root[defenderIcons[i] + "Price"]) {
_root.interfaceMC.defenders.icons[defenderIcons[i] + "Icon"].iconGraphic._alpha = 30;
} else {
_root.interfaceMC.defenders.icons[defenderIcons[i] + "Icon"].iconGraphic._alpha = 100;
}
i++;
}
i = 0;
while (i < spellIcons.length) {
if (_root.mana < _root[spellIcons[i] + "Price"]) {
_root.interfaceMC.spells.icons[spellIcons[i] + "Icon"].iconGraphic._alpha = 30;
} else {
_root.interfaceMC.spells.icons[spellIcons[i] + "Icon"].iconGraphic._alpha = 100;
}
i++;
}
_root.interfaceMC.items.icons.manaPriceTxt.text = "x " + _root.manaPotions;
if (_root.manaPotions > 0) {
_root.interfaceMC.items.icons.manaIcon.iconGraphic._alpha = 100;
} else {
_root.interfaceMC.items.icons.manaIcon.iconGraphic._alpha = 30;
}
if (_root.timerOn != true) {
_root.interfaceMC.items.icons.digIcon.iconGraphic._alpha = 30;
_root.interfaceMC.items.icons.digIcon.enabled = false;
} else {
_root.interfaceMC.items.icons.digIcon.iconGraphic._alpha = 100;
_root.interfaceMC.items.icons.digIcon.enabled = true;
}
if (isNaN(_root.mana)) {
_root.mana = 100;
}
if (isNaN(_root.userGold)) {
_root.userGold = _root.userGoldStart;
}
}
function populateStats(defender, box) {
box.defenderName.text = defender.name.toUpperCase();
box.defenderLevel.text = defender.level;
box.defenderExp.text = defender.exp;
box.defenderDamage.text = defender.power;
box.defenderRange.text = defender.range;
box.defenderSell.text = ("SELL (" + (defender.price / 2)) + " G)";
box.blankIcon.attachMovie(defender.name + "Icon", "statIcon", 1);
box.blankIcon.statIcon.iconLock._visible = false;
box.blankIcon.statIcon._width = 60;
box.blankIcon.statIcon._height = 60;
box.expMeter.expMC._x = ((defender.exp / defender.upgradeEXP) * 130) - 130;
if (defender.upgradeEXP == null) {
box.expMeter._visible = false;
}
}
function checkLevelUp(defender) {
if (defender.upgradeEXP != null) {
if (defender.exp >= defender.upgradeEXP) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
defender.level++;
defender.levelUpMC.gotoAndPlay(2);
defender.defenderMC.defenderGraphic.gotoAndStop(defender.level);
defender.type = defender.upgrade;
getStats(defender, defender.tile);
defender.defenderMC.defenderGraphic.defenderAnim.gotoAndPlay(2);
defender.attacking = true;
}
}
}
function updateDefenderStats(defender) {
if (_root.selectedDefender != null) {
_root.interfaceMC.statsBox.expMeter.expMC._x = ((_root.selectedDefender.exp / _root.selectedDefender.upgradeEXP) * 130) - 130;
_root.interfaceMC.statsBox.defenderLevel.text = _root.selectedDefender.level;
_root.interfaceMC.statsBox.defenderExp.text = _root.selectedDefender.exp;
_root.interfaceMC.statsBox.defenderDamage.text = _root.selectedDefender.power;
}
}
function shootEnemy(defender, enemy) {
if (_root.timerOn != false) {
var _local2 = {};
_local2.x = defender.defenderMC._x;
_local2.y = defender.defenderMC._y;
defender.localToGlobal(_local2);
var _local4 = {};
_local4.x = enemy.enemyMC._x + (enemy.enemyMC._width / 2);
_local4.y = enemy.enemyMC._y + (enemy.enemyMC._height / 2);
enemy.localToGlobal(_local4);
var shooter = _root.attachMovie(defender.weapon, "shooter", _root.getNextHighestDepth(), {_x:_local2.x, _y:_local2.y});
if (_root.soundOn == true) {
if (defender.name == "archer") {
_root.archerSnd.start();
} else if (defender.name == "mage") {
_root.mageSnd.start();
} else if (defender.name == "ninja") {
_root.ninjaSnd.start();
} else if (defender.name == "knight") {
_root.swordSnd.start();
} else if (defender.name == "warrior") {
}
}
defender.exp = defender.exp + 2;
checkLevelUp(defender);
updateDefenderStats(defender);
if ((defender.name == "mage") || (defender.name == "archer")) {
switch (defender.dir) {
case 1 :
_local2.y = _local2.y - 10;
_local2.x = _local2.x + 5;
shooter._rotation = 15;
break;
case 2 :
_local2.y = _local2.y - 5;
_local2.x = _local2.x - 20;
shooter._rotation = 155;
break;
case 3 :
_local2.y = _local2.y - 5;
_local2.x = _local2.x - 20;
shooter._rotation = 145;
break;
case 4 :
_local2.x = _local2.x + 10;
shooter._rotation = 30;
}
}
var _local6 = new mx.transitions.Tween(shooter, "_x", mx.transitions.easing.None.easeOut, _local2.x, _local4.x, 0.25, true);
var _local7 = new mx.transitions.Tween(shooter, "_y", mx.transitions.easing.None.easeOut, _local2.y, _local4.y + 15, 0.25, true);
_local6.onMotionFinished = function () {
shooter.removeMovieClip();
};
}
}
function dragonFire(dragon, num) {
if (_root.soundOn == true) {
_root.dragonSnd.start();
}
if (dragon.dir == 4) {
var _local3 = _root.display.attachMovie("fire_f", "fire" + num, _root.display.getNextHighestDepth(), {_x:dragon._x + 80, _y:dragon._y + 33});
dragon.fireMC = _local3;
} else if (dragon.dir == 3) {
var _local3 = _root.display.attachMovie("fire_f", "fire" + num, _root.display.getNextHighestDepth(), {_x:dragon._x - 32, _y:dragon._y + 32});
_local3._xscale = -100;
dragon.fireMC = _local3;
} else if (dragon.dir == 2) {
var _local3 = _root.display.attachMovie("fire_f", "fire" + num, _root.display.getNextHighestDepth(), {_x:dragon._x - 32, _y:dragon._y + 20});
_local3._yscale = -100;
_local3._xscale = -100;
_local3._rotation = _local3._rotation - 10;
dragon.fireMC = _local3;
} else if (dragon.dir == 1) {
var _local3 = _root.display.attachMovie("fire_f", "fire" + num, _root.display.getNextHighestDepth(), {_x:dragon._x + 82, _y:dragon._y + 20});
_local3._yscale = -100;
_local3._rotation = _local3._rotation + 20;
dragon.fireMC = _local3;
}
}
function enemyStats(num, thisEnemy) {
switch (num) {
case 1 :
thisEnemy.health = 80;
thisEnemy.speed = 2;
thisEnemy.gold = 40;
thisEnemy.mana = 5;
thisEnemy.exp = 50;
break;
case 2 :
thisEnemy.health = 160;
thisEnemy.speed = 2;
thisEnemy.gold = 75;
thisEnemy.mana = 5;
thisEnemy.exp = 100;
break;
case 3 :
thisEnemy.health = 280;
thisEnemy.speed = 2;
thisEnemy.gold = 125;
thisEnemy.mana = 10;
thisEnemy.exp = 200;
break;
case 4 :
thisEnemy.health = 800;
thisEnemy.speed = 2;
thisEnemy.gold = 500;
thisEnemy.mana = 50;
thisEnemy.exp = 400;
break;
case 5 :
thisEnemy.health = 1200;
thisEnemy.speed = 2;
thisEnemy.gold = 650;
thisEnemy.mana = 50;
thisEnemy.exp = 500;
break;
case 6 :
thisEnemy.health = 1600;
thisEnemy.speed = 2;
thisEnemy.gold = 800;
thisEnemy.mana = 50;
thisEnemy.exp = 500;
break;
case 7 :
thisEnemy.health = 160;
thisEnemy.speed = 3;
thisEnemy.gold = 50;
thisEnemy.mana = 5;
thisEnemy.exp = 75;
break;
case 8 :
thisEnemy.health = 275;
thisEnemy.speed = 3;
thisEnemy.gold = 75;
thisEnemy.mana = 5;
thisEnemy.exp = 150;
break;
case 9 :
thisEnemy.health = 400;
thisEnemy.speed = 3;
thisEnemy.gold = 125;
thisEnemy.mana = 10;
thisEnemy.exp = 250;
break;
case 10 :
thisEnemy.health = 1000;
thisEnemy.speed = 2;
thisEnemy.gold = 500;
thisEnemy.mana = 5;
thisEnemy.exp = 200;
break;
case 11 :
thisEnemy.health = 1400;
thisEnemy.speed = 2;
thisEnemy.gold = 750;
thisEnemy.mana = 5;
thisEnemy.exp = 200;
break;
case 12 :
thisEnemy.health = 1800;
thisEnemy.speed = 2;
thisEnemy.gold = 1000;
thisEnemy.mana = 5;
thisEnemy.exp = 200;
break;
case 13 :
thisEnemy.health = 75;
thisEnemy.speed = 4;
thisEnemy.gold = 75;
thisEnemy.mana = 5;
thisEnemy.exp = 100;
break;
case 14 :
thisEnemy.health = 150;
thisEnemy.speed = 4;
thisEnemy.gold = 100;
thisEnemy.mana = 5;
thisEnemy.exp = 150;
break;
case 15 :
thisEnemy.health = 300;
thisEnemy.speed = 4;
thisEnemy.gold = 150;
thisEnemy.mana = 10;
thisEnemy.exp = 250;
break;
case 16 :
thisEnemy.health = 2000;
thisEnemy.speed = 2;
thisEnemy.gold = 500;
thisEnemy.mana = 5;
thisEnemy.exp = 500;
break;
case 17 :
thisEnemy.health = 2200;
thisEnemy.speed = 2;
thisEnemy.gold = 600;
thisEnemy.mana = 5;
thisEnemy.exp = 700;
break;
case 18 :
thisEnemy.health = 2400;
thisEnemy.speed = 2;
thisEnemy.gold = 1000;
thisEnemy.mana = 5;
thisEnemy.exp = 1000;
break;
case 19 :
thisEnemy.health = 100;
thisEnemy.speed = 3;
thisEnemy.gold = 40;
thisEnemy.mana = 5;
thisEnemy.exp = 50;
break;
case 20 :
thisEnemy.health = 240;
thisEnemy.speed = 3;
thisEnemy.gold = 75;
thisEnemy.mana = 5;
thisEnemy.exp = 150;
break;
case 21 :
thisEnemy.health = 440;
thisEnemy.speed = 2;
thisEnemy.gold = 100;
thisEnemy.mana = 10;
thisEnemy.exp = 200;
break;
case 22 :
thisEnemy.health = 200;
thisEnemy.speed = 2;
thisEnemy.gold = 60;
thisEnemy.mana = 5;
thisEnemy.exp = 120;
break;
case 23 :
thisEnemy.health = 400;
thisEnemy.speed = 2;
thisEnemy.gold = 100;
thisEnemy.mana = 5;
thisEnemy.exp = 200;
break;
case 24 :
thisEnemy.health = 550;
thisEnemy.speed = 2;
thisEnemy.gold = 175;
thisEnemy.mana = 10;
thisEnemy.exp = 300;
break;
case 25 :
thisEnemy.health = 200;
thisEnemy.speed = 2;
thisEnemy.gold = 80;
thisEnemy.mana = 5;
thisEnemy.exp = 100;
break;
case 26 :
thisEnemy.health = 350;
thisEnemy.speed = 2;
thisEnemy.gold = 150;
thisEnemy.mana = 5;
thisEnemy.exp = 175;
break;
case 27 :
thisEnemy.health = 600;
thisEnemy.speed = 2;
thisEnemy.gold = 200;
thisEnemy.mana = 10;
thisEnemy.exp = 275;
break;
case 28 :
thisEnemy.health = 250;
thisEnemy.speed = 2;
thisEnemy.gold = 100;
thisEnemy.mana = 5;
thisEnemy.exp = 100;
break;
case 29 :
thisEnemy.health = 400;
thisEnemy.speed = 2;
thisEnemy.gold = 175;
thisEnemy.mana = 5;
thisEnemy.exp = 200;
break;
case 30 :
thisEnemy.health = 750;
thisEnemy.speed = 2;
thisEnemy.gold = 225;
thisEnemy.mana = 10;
thisEnemy.exp = 300;
break;
case 31 :
thisEnemy.health = 450;
thisEnemy.speed = 2;
thisEnemy.gold = 300;
thisEnemy.mana = 5;
thisEnemy.exp = 250;
break;
case 32 :
thisEnemy.health = 700;
thisEnemy.speed = 2;
thisEnemy.gold = 500;
thisEnemy.mana = 5;
thisEnemy.exp = 450;
break;
case 33 :
thisEnemy.health = 900;
thisEnemy.speed = 2;
thisEnemy.gold = 800;
thisEnemy.mana = 10;
thisEnemy.exp = 600;
}
}
function killEnemy(enemy) {
_root.display.attachMovie("coin", "coin" + _root.display.getNextHighestDepth(), _root.display.getNextHighestDepth(), {_x:enemy._x - 10, _y:enemy._y - 20});
_root.miniMap[(("miniTiles_" + enemy.xTile) + "_") + enemy.yTile].gotoAndStop(2);
_root.miniMap[(("miniTiles_" + enemy.xTile) + "_") + enemy.yTile]._alpha = 50;
_root.userGold = _root.userGold + enemy.gold;
if (isNaN(_root.userGold)) {
trace("KILL ENEMY IS NAN!!!!!!!!!");
_root.userGold = 400;
}
_root.defenderIconStatus();
if ((_root.mana + enemy.mana) > 100) {
_root.mana = 100;
} else {
_root.mana = _root.mana + enemy.mana;
}
if (_root.soundOn == true) {
_root.deathSnd.start();
_root.coinSnd.start();
}
var _local3 = {r:255, g:255, b:255};
_root.interfaceMC.manaMeter.manaMC.fluxTint(_local3, 0, 80, 20, true, 1);
_root.interfaceMC.enemyMeter.enemyBar.fluxTint(_local3, 0, 80, 20, true, 1);
e = 0;
while (e < enemy.attackers.length) {
enemy.attackers[e].attacking = false;
if (enemy.attackers[e].name == "dragon") {
enemy.attackers[e].fireMC.removeMovieClip();
}
clearInterval(enemy["shootInt" + e]);
enemy.attackers[e].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
e++;
}
if (enemy.frozen == true) {
enemy.frozen = false;
_root.display.tiles["spellFreezeMC" + enemy.num].removeMovieClip();
}
e2 = 0;
while (e2 < _root.enemyArr.length) {
if (_root.enemyArr[e2].num == enemy.num) {
_root.enemyArr.splice(e2, 1);
}
e2++;
}
enemy.removeMovieClip();
}
function enemyFinish(enemy) {
_root.miniMap[(("miniTiles_" + enemy.prevX) + "_") + enemy.prevY].gotoAndStop(2);
_root.miniMap[(("miniTiles_" + enemy.prevX) + "_") + enemy.prevY]._alpha = 50;
e = 0;
while (e < enemy.attackers.length) {
enemy.attackers[e].attacking = false;
if (enemy.attackers[e].name == "dragon") {
enemy.attackers[e].fireMC.removeMovieClip();
}
clearInterval(enemy["shootInt" + e]);
enemy.attackers[e].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
e++;
}
e2 = 0;
while (e2 < _root.enemyArr.length) {
if (_root.enemyArr[e2].num == enemy.num) {
_root.enemyArr.splice(e2, 1);
}
e2++;
}
trace("REMOVE FINISHED: " + enemy);
enemy.removeMovieClip();
_root.enemiesDead++;
_root.health = _root.health - 10;
if (_root.soundOn == true) {
_root.damageSnd.start();
}
if (_root.health <= 0) {
_root.continues--;
if (_root.continues > 0) {
showContinue();
} else {
gameOver();
}
} else {
checkEnemiesDead();
}
}
function checkEnemiesDead() {
trace("ENEMIES DEAD: " + _root.enemiesDead);
if (_root.enemiesDead == _root["wave" + _root.curWave].waveArr.length) {
_root.interfaceMC.pauseButt._alpha = 30;
_root.curWave++;
if (_root.curWave <= map.waves) {
clearInterval(_root.timerInt);
setTimeout(showLevelInfo, 2000);
_root.timerOn = false;
} else {
if (_root.level == 12) {
_root.gameComplete();
} else {
addScore();
secondsToTime(_root.levelTime);
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(3);
_root.menuMC._alpha = 0;
_root.interfaceMC.statsBox.removeMovieClip();
_root.menuMC.fadeMC(false, 5);
}
clearInterval(_root.timerInt);
_root.timerOn = false;
}
}
}
function flattenPrompt(tile) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.display.attachMovie("flattenBox", "flattenBox", 5, {_x:tile._x + 50, _y:tile._y - 45});
_root.display.flattenBox._width = _root.display.flattenBox._width * 1.4;
_root.display.flattenBox._height = _root.display.flattenBox._height * 1.4;
_root.display.flattenBox.tile = tile;
}
function destroyTile(tile) {
_root.userGold = _root.userGold - 50;
if (tile._currentframe < 21) {
tile.gotoAndStop(1);
} else if ((tile._currentframe > 21) && (tile._currentframe < 52)) {
tile.gotoAndStop(51);
} else if (tile._currentframe > 52) {
tile.gotoAndStop(56);
}
tile.unusableTile = false;
tile.destructable = false;
tile.fluxTint(colObj, 0, 0, 0, false, 0);
}
function showLevelInfo() {
levelMC.fadeMC(true, 4);
}
function waveTimer() {
displayTime = 30;
_root.interfaceMC.attachMovie("countdownBox", "countdownBox", 6, {_x:400, _y:-223});
_root.interfaceMC.countdownBox._alpha = 0;
_root.interfaceMC.countdownBox.tipTxt.gotoAndStop(Math.floor((Math.random() * 7) + 1));
_root.interfaceMC.countdownBox.fadeMC(false, 8);
countDown = function () {
displayTime--;
if (displayTime > 0) {
if (_root.soundOn == true) {
_root.timeSnd.start();
}
}
if (displayTime < 10) {
var _local2 = {r:255, g:50, b:0};
_root.interfaceMC.countdownBox.fluxTint(_local2, 0, 80, 20, true, 1);
}
if (displayTime == -1) {
_root.startWave();
_root.interfaceMC.countdownBox.removeMovieClip();
clearInterval(_root.waveInt);
}
};
_root.waveInt = setInterval(countDown, 1000);
}
function gameOver() {
_root.interfaceMC.pauseButt._alpha = 30;
addScore(true);
_root.timerOn = false;
clearInterval(enemyInt);
e = 0;
while (e < _root.enemyArr.length) {
trace("REMOVING: " + _root.enemyArr[e]);
if (_root.enemyArr[e].attacked == true) {
trace("ATTACKED!!!");
}
h = 0;
while (h < _root.enemyArr[e].attackers.length) {
_root.enemyArr[e].attackers[h].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
clearInterval(_root.enemyArr[e]["shootInt" + h]);
if (_root.enemyArr[e].attackers[h].name == "dragon") {
_root.enemyArr[e].attackers[h].fireMC.removeMovieClip();
}
h++;
}
_root.enemyArr[e].attackers = new Array();
_root.enemyArr[e].attacked = false;
_root.enemyArr[e].removeMovieClip();
e++;
}
d = 0;
while (d < _root.defenderArr.length) {
trace("REMOVING: " + _root.defenderArr[d]);
_root.defenderArr[d].removeMovieClip();
d++;
}
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(6);
_root.menuMC._alpha = 0;
_root.menuMC.fadeMC(false, 5);
}
function showContinue() {
clearInterval(enemyInt);
e = 0;
while (e < _root.enemyArr.length) {
trace("REMOVING: " + _root.enemyArr[e]);
if (_root.enemyArr[e].attacked == true) {
trace("ATTACKED!!!");
}
h = 0;
while (h < _root.enemyArr[e].attackers.length) {
_root.enemyArr[e].attackers[h].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
clearInterval(_root.enemyArr[e]["shootInt" + h]);
if (_root.enemyArr[e].attackers[h].name == "dragon") {
_root.enemyArr[e].attackers[h].fireMC.removeMovieClip();
}
h++;
}
_root.enemyArr[e].attackers = new Array();
_root.enemyArr[e].attacked = false;
_root.enemyArr[e].removeMovieClip();
e++;
}
d = 0;
while (d < _root.defenderArr.length) {
trace("REMOVING: " + _root.defenderArr[d]);
_root.defenderArr[d].removeMovieClip();
d++;
}
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(15);
_root.menuMC._alpha = 0;
_root.menuMC.fadeMC(false, 5);
_root.timerOn = false;
_root.submitted = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.digging = false;
_root.itemDig = false;
clearInterval(_root.waveInt);
_root.selectedIcon = null;
_root.defenderArr = new Array();
_root.enemyArr = new Array();
_root.curWave = undefined;
_root.selectedDefender = null;
_root.selectedMC = null;
_root.placingEnemy = false;
}
function gameComplete() {
_root.interfaceMC.pauseButt._alpha = 30;
addScore();
_root.timerOn = false;
clearInterval(enemyInt);
e = 0;
while (e < _root.enemyArr.length) {
trace("REMOVING: " + _root.enemyArr[e]);
if (_root.enemyArr[e].attacked == true) {
trace("ATTACKED!!!");
}
h = 0;
while (h < _root.enemyArr[e].attackers.length) {
_root.enemyArr[e].attackers[h].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
clearInterval(_root.enemyArr[e]["shootInt" + h]);
if (_root.enemyArr[e].attackers[h].name == "dragon") {
_root.enemyArr[e].attackers[h].fireMC.removeMovieClip();
}
h++;
}
_root.enemyArr[e].attackers = new Array();
_root.enemyArr[e].attacked = false;
_root.enemyArr[e].removeMovieClip();
e++;
}
d = 0;
while (d < _root.defenderArr.length) {
trace("REMOVING: " + _root.defenderArr[d]);
_root.defenderArr[d].removeMovieClip();
d++;
}
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(5);
_root.menuMC._alpha = 0;
_root.menuMC.fadeMC(false, 5);
}
function increaseTime() {
levelTime = levelTime + 1;
}
function pauseGame() {
clearInterval(enemyInt);
e = 0;
while (e < _root.enemyArr.length) {
_root.enemyArr[e].enemyMC.viewMC.stop();
a = 0;
while (a < _root.enemyArr[e].attackers.length) {
_root.enemyArr[e].attackers[a].defenderMC.defenderGraphic.defenderAnim.stop();
clearInterval(_root.enemyArr[e]["shootInt" + a]);
if (_root.enemyArr[e].attackers[a].name == "dragon") {
_root.enemyArr[e].attackers[a].fireMC.removeMovieClip();
}
a++;
}
_root.enemyArr[e]._visible = false;
e++;
}
d = 0;
while (d < _root.defenderArr.length) {
_root.defenderArr[d]._visible = false;
d++;
}
_root.miniMap._visible = false;
}
function unpauseGame() {
if (_root.enemyCount > 0) {
if (_root.enemyCount < _root.enemyNum) {
enemyInt = setInterval(createEnemy, _root["wave" + _root.curWave].interval);
}
e = 0;
while (e < _root.enemyArr.length) {
_root.enemyArr[e].enemyMC.viewMC.play();
a = 0;
while (a < _root.enemyArr[e].attackers.length) {
_root.enemyArr[e].attackers[a].defenderMC.defenderGraphic.defenderAnim.gotoAndPlay(2);
intNum = _root.enemyArr[e].attackers.length - 1;
_root.enemyArr[e]["shootInt" + a] = setInterval(shootEnemy, 200, _root.enemyArr[e].attackers[a], _root.enemyArr[e]);
if (_root.enemyArr[e].attackers[a].name == "dragon") {
dragonFire(_root.enemyArr[e].attackers[a], a);
}
a++;
}
_root.enemyArr[e]._visible = true;
e++;
}
}
d = 0;
while (d < _root.defenderArr.length) {
_root.defenderArr[d]._visible = true;
d++;
}
_root.miniMap._visible = true;
}
function quitGame() {
_root.interfaceMC.removeMovieClip();
_root.levelMC.removeMovieClip();
_root.display.removeMovieClip();
_root.menuMC.removeMovieClip();
_root.miniMap.removeMovieClip();
_root.submitted = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.digging = false;
_root.itemDig = false;
clearInterval(_root.waveInt);
_root.interfaceMC._visible = false;
_root.attachMovie("interfaceMC", "interfaceMC", 3, {_x:61, _y:223});
_root.attachMovie("levelMC", "levelMC", 4);
_root.interfaceMC._alpha = 0;
_root.treasureCount = 0;
_root.archerPrice = 100;
_root.magePrice = 250;
_root.ninjaPrice = 750;
_root.knightPrice = 600;
_root.warriorPrice = 1000;
_root.dragonPrice = 1500;
_root.poisonPrice = 40;
_root.lightningPrice = 50;
_root.trapPrice = 60;
_root.freezePrice = 60;
_root.manaPotions = 0;
_root.continues = 4;
_root.defenderIcons = new Array();
_root.defenderIcons = ["archer", "mage", "ninja", "knight", "warrior", "dragon"];
_root.archerUnlocked = true;
_root.mageUnlocked = true;
_root.ninjaUnlocked = true;
_root.knightUnlocked = false;
_root.warriorUnlocked = false;
_root.dragonUnlocked = false;
_root.spellIcons = new Array();
_root.spellIcons = ["poison", "lightning", "trap", "freeze"];
_root.poisonUnlocked = true;
_root.lightningUnlocked = false;
_root.trapUnlocked = false;
_root.freezeUnlocked = false;
_root.selectedIcon = null;
_root.defenderArr = new Array();
_root.enemyArr = new Array();
_root.levelMC._alpha = 0;
_root.score = 0;
_root.health = 100;
_root.mana = 50;
_root.enemiesRemaining = 0;
_root.enemyNum = 0;
_root.interfaceMC.manaMeter.manaMC._x = (_root.mana * 1.3) - 133;
_root.interfaceMC.healthMeter.healthMC._x = (100 - _root.health) * 1.3;
_root.display._x = 250;
_root.display._y = 100;
_root.level = 1;
_root.curWave = undefined;
_root.selectedDefender = null;
_root.selectedMC = null;
_root.placingEnemy = false;
_root.userGold = 500;
_root.timerOn = false;
_root.levelTime = 0;
_root.soundOn = true;
_root.attachMovie("titleMC", "titleMC", 11);
_root.levelMusic.stop();
_root.titleMusic.start(0, 999);
}
function showWorldMap(level) {
_root.selectedDefender = null;
_root.interfaceMC.statsBox.removeMovieClip();
_root.titleMusic.stop();
if (_root.soundOn == true) {
_root.mapMusic.start(0, 999);
}
_root.display.removeMovieClip();
_root.menuMC.removeMovieClip();
_root.miniMap.removeMovieClip();
_root.interfaceMC._visible = false;
_root.attachMovie("worldMap", "worldMap", 9);
_root.worldMap.gotoAndStop(level);
_root.worldMap._alpha = 0;
_root.worldMap.fadeMC("fadeOnce", 10);
d = 0;
while (d < defenderArr.length) {
defenderArr[d].removeMovieClip();
d++;
}
defenderArr = [];
enemyArr = [];
}
function addScore(isGameover) {
if (isGameover == true) {
_root.levelScore = _root.userGold;
} else {
_root.levelScore = Math.floor((1 / _root.levelTime) * 100000) + _root.userGold;
}
e = 0;
while (e < _root.defenderArr.length) {
_root.levelScore = _root.levelScore + (_root.defenderArr[e].level * 100);
e++;
}
if (_root.health > 0) {
if (_root.soundOn == true) {
_root.endLevelSnd.start();
}
}
_root.score = _root.score + _root.levelScore;
_root.userGold = _root.userGold + map.bonus;
}
function secondsToTime(intSecondsToConvert) {
var _local2 = getRemainingMinutes(intSecondsToConvert);
_root.timeMinutes = ((_local2 == 60) ? "00" : (_local2));
_root.timeSeconds = getRemainingSeconds(intSecondsToConvert);
if (_root.timeSeconds < 10) {
_root.timeSeconds = "0" + _root.timeSeconds;
}
}
function convertMinutes(intSeconds) {
return(Math.floor(intSeconds / 60));
}
function getRemainingSeconds(intTotalSeconds) {
return(intTotalSeconds % 60);
}
function getRemainingMinutes(intSeconds) {
var _local1 = convertMinutes(intSeconds);
return(_local1 % 60);
}
function hideHealth(enemy) {
enemy._parent.healthMeter._visible = false;
enemy._parent.healthTxt._visible = false;
enemy._parent.showHealth = false;
}
function makeMiniMap() {
h = 0;
while (h < mapTiles.length) {
w = 0;
while (w < mapTiles[0].length) {
var _local2 = _root.miniMap.attachMovie("miniTiles", (("miniTiles_" + h) + "_") + w, _root.miniMap.getNextHighestDepth(), {_x:h * 3, _y:w * 3});
if (mapDir[h][w] != 0) {
_local2.gotoAndStop(2);
} else {
_local2.gotoAndStop(1);
}
_local2._alpha = 50;
w++;
}
h++;
}
_root.miniMap._xscale = -100;
_root.miniMap._x = 690;
_root.miniMap._y = 10;
}
function updateMiniMap(enemy) {
_root.miniMap[(("miniTiles_" + enemy.xTile) + "_") + enemy.yTile].gotoAndStop(3);
_root.miniMap[(("miniTiles_" + enemy.xTile) + "_") + enemy.yTile]._alpha = 100;
_root.miniMap[(("miniTiles_" + enemy.prevX) + "_") + enemy.prevY].gotoAndStop(2);
_root.miniMap[(("miniTiles_" + enemy.prevX) + "_") + enemy.prevY]._alpha = 50;
}
function poisonFunc(enemy) {
if (_root.soundOn == true) {
_root.poisonSnd.start();
}
_root.magicPoison = false;
_root.mana = _root.mana - _root.poisonPrice;
_root.defenderIconStatus();
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.spells.icons.poisonIcon.fluxTint(colObj, 0, 0, 10, false);
enemy._parent.poisoned = true;
var colObj = {r:150, g:255, b:0};
enemy.fluxTint(colObj, 0, 60, 20, true);
setTimeout(stopPoison, 4000, enemy);
}
function stopPoison(enemy) {
enemy.fluxTint($colObj, 0, 0, 10, true, 0);
enemy._parent.poisoned = false;
}
function lightningFunc(enemy) {
if (_root.soundOn == true) {
trace("PLAY LIGHTNING SOUND");
_root.lightningSnd.start();
}
_root.display.tiles.attachMovie("spellLightningMC", "spellLightningMC", enemy._parent.getDepth() + 10, {_x:enemy._parent._x - 335, _y:enemy._parent._y - 575});
setTimeout(lightningColor, 300, enemy);
_root.magicLightning = false;
_root.mana = _root.mana - _root.lightningPrice;
_root.defenderIconStatus();
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.spells.icons.lightningIcon.fluxTint(colObj, 0, 0, 10, false);
enemy._parent.health = enemy._parent.health - 150;
if (enemy._parent.health < 0) {
enemy._parent.health = 0;
}
enemy._parent.healthMeter._visible = true;
enemy._parent.healthTxt._visible = true;
enemy._parent.showHealth = true;
setTimeout(_root.hideHealth, 1500, enemy);
enemy._parent.healthTxt.text = enemy._parent.health;
enemy._parent.healthMeter.red._width = 36 * (enemy._parent.health / enemy._parent.fullHealth);
setTimeout(_root.checkForDeath, 500, enemy._parent);
}
function lightningColor(enemy) {
var _local1 = {r:178, g:232, b:255};
enemy.fluxTint(_local1, 0, 90, 100, true);
}
function trapFunc(tile) {
if (_root.soundOn == true) {
_root.trapSnd.start();
}
_root.display.tileOutline._x = -20000;
_root.display.tileOutline._y = 0;
tile.trapMC.gotoAndPlay(2);
tile.trap = true;
_root.magicTrap = false;
_root.mana = _root.mana - _root.trapPrice;
_root.defenderIconStatus();
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.spells.icons.trapIcon.fluxTint(colObj, 0, 0, 10, false);
}
function trapHit(enemy, tile) {
enemy.health = enemy.health - 200;
if (enemy.health < 0) {
enemy.health = 0;
}
enemy.healthMeter._visible = true;
enemy.healthTxt._visible = true;
enemy.showHealth = true;
setTimeout(_root.hideHealth, 1500, enemy);
enemy.healthTxt.text = enemy.health;
enemy.healthMeter.red._width = 36 * (enemy.health / enemy.fullHealth);
tile.trap = false;
tile.trapMC.gotoAndStop(1);
_root.display.attachMovie("trapExplosionMC", "trapExplosionMC", 100000, {_x:enemy._x - 20, _y:enemy._y - 20});
if (_root.soundOn == true) {
_root.trapExplodeSnd.start();
}
_root.display.trapExplosionMC._width = _root.display.trapExplosionMC._width / 1.8;
_root.display.trapExplosionMC._height = _root.display.trapExplosionMC._height / 1.8;
setTimeout(_root.checkForDeath, 100, enemy);
}
function freezeFunc(enemy) {
if (_root.soundOn == true) {
_root.poisonSnd.start();
}
_root.magicFreeze = false;
_root.mana = _root.mana - _root.freezePrice;
_root.defenderIconStatus();
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.spells.icons.freezeIcon.fluxTint(colObj, 0, 0, 10, false);
enemy._parent.frozen = true;
enemy._parent.enemyMC.viewMC.stop();
var colObj = {r:178, g:232, b:255};
enemy.fluxTint(colObj, 0, 90, 30, false);
_root.display.tiles.attachMovie("spellFreezeMC", "spellFreezeMC" + enemy._parent.num, enemy._parent.getDepth() + 1, {_x:enemy._parent._x - 40, _y:enemy._parent._y - 70});
setTimeout(unfreezeFunc, 6000, enemy);
}
function unfreezeFunc(enemy) {
enemy._parent.frozen = false;
enemy._parent.enemyMC.viewMC.play();
_root.display.tiles["spellFreezeMC" + enemy._parent.num].removeMovieClip();
enemy.fluxTint(colObj, 0, 0, 10, false);
}
function useManaPotion() {
if (_root.soundOn == true) {
_root.potionSnd.start();
}
_root.mana = 100;
_root.manaPotions--;
var _local2 = {r:255, g:255, b:255};
_root.interfaceMC.manaMeter.fluxTint(_local2, 0, 100, 40, true);
setTimeout(manaMeterColor, 1000);
_root.defenderIconStatus();
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.items.icons.manaIcon.fluxTint(_local2, 0, 0, 10, false);
}
function manaMeterColor() {
_root.interfaceMC.manaMeter.fluxTint(colObj, 0, 0, 5, false);
}
function digFunc(tile) {
if (_root.soundOn == true) {
_root.shovelSnd.start();
}
_root.digging = true;
tile.shovelMC.gotoAndPlay(2);
tile.shovelMC._visible = true;
tile.digHoleMC.gotoAndStop(2);
tile.unusableTile = true;
_root.selectedMC = null;
_root.selectedIcon = null;
_root.itemDig = false;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.interfaceMC.items.icons.digIcon.fluxTint(colObj, 0, 0, 10, false);
setTimeout(stopDig, 2700, tile);
_root.interfaceMC.icons._alpha = 30;
disableInterface(true);
}
function stopDig(tile) {
_root.digging = false;
randDigNum = Math.ceil(Math.random() * 12);
if ((((randDigNum == 5) || (randDigNum == 4)) || (randDigNum == 3)) || (randDigNum == 2)) {
tile.treasureMC.gotoAndStop(3);
} else if (randDigNum == 10) {
tile.treasureMC.gotoAndStop(2);
}
tile.shovelMC.gotoAndStop(1);
tile.shovelMC._visible = false;
trace("SHOVEL FRAME: " + tile.shovelMC._currentframe);
disableInterface(false);
}
function disableInterface(disable) {
if (disable == true) {
_root.interfaceMC.iconCover.gotoAndStop(2);
_root.interfaceMC.defenders.icons._alpha = 30;
_root.interfaceMC.spells.icons._alpha = 30;
_root.interfaceMC.items.icons._alpha = 30;
} else {
_root.interfaceMC.iconCover.gotoAndStop(1);
_root.interfaceMC.defenders.icons._alpha = 100;
_root.interfaceMC.spells.icons._alpha = 100;
_root.interfaceMC.items.icons._alpha = 100;
}
}
function addTreasure() {
if (_root.soundOn == true) {
_root.getItemSnd.start();
}
_root.treasureCount++;
}
function addPotion() {
if (_root.soundOn == true) {
_root.getItemSnd.start();
}
_root.manaPotions++;
_root.defenderIconStatus();
}
function loadMap(num) {
_root.worldMap.removeMovieClip();
map = new Object();
mapTiles = new Array();
tileHeight = new Array();
mapDir = new Array();
switch (num) {
case 1 :
map1();
break;
case 2 :
map2();
break;
case 3 :
map3();
break;
case 4 :
map4();
break;
case 5 :
map5();
break;
case 6 :
map6();
break;
case 7 :
map7();
break;
case 8 :
map8();
break;
case 9 :
map9();
break;
case 10 :
map10();
break;
case 11 :
map11();
break;
case 12 :
map12();
}
_root.bonusGoldTxt = "$" + map.bonus;
buildMap();
makeMiniMap();
}
function map1() {
map.rows = 15;
map.xtile = 0;
map.ytile = 3;
map.startPos = "top";
map.waves = 3;
map.bonus = 300;
map.mapx = 320;
map.mapy = 80;
mapTiles = [[6, 3, 1, 18, 17, 18, 1, 1, 3, 1, 6, 4, 1, 2, 1], [1, 1, 5, 19, 18, 18, 1, 7, 6, 10, 1, 1, 3, 6, 3], [1, 3, 6, 18, 17, 18, 18, 17, 18, 20, 19, 18, 1, 3, 1], [3, 4, 2, 20, 18, 17, 20, 18, 18, 17, 18, 18, 5, 1, 4], [5, 3, 9, 18, 18, 18, 18, 18, 18, 18, 18, 18, 1, 1, 1], [1, 1, 8, 1, 3, 1, 1, 1, 1, 17, 18, 18, 9, 3, 3], [1, 3, 6, 2, 1, 6, 1, 1, 1, 18, 18, 17, 10, 6, 1], [1, 4, 1, 5, 23, 22, 5, 3, 9, 18, 17, 18, 1, 1, 1], [1, 2, 1, 1, 24, 26, 1, 1, 1, 18, 18, 18, 2, 1, 3], [1, 9, 1, 6, 25, 22, 3, 1, 7, 17, 20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0, 0, 3, 3, 4, 4, 4, 4, 4, 4, 3, 0, 0, 0], [0, 0, 0, 3, 4, 4, 4, 4, 4, 4, 3, 3, 0, 0, 0], [0, 0, 0, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [1, 1, 1, 1, 2, 1, 1, 1, 1];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [2, 1, 2, 1, 2, 2, 1, 2, 1];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [3, 2, 3, 2, 3, 2, 2, 3, 3];
wave3.interval = 3000;
}
function map2() {
map.rows = 15;
map.xtile = 0;
map.ytile = 14;
map.startPos = "top";
map.waves = 3;
map.bonus = 600;
map.mapx = 150;
map.mapy = 80;
mapTiles = [[1, 12, 1, 12, 2, 6, 1, 6, 1, 2, 6, 7, 1, 1, 17, 18, 18, 1, 1, 1], [1, 1, 6, 2, 1, 1, 2, 5, 4, 5, 3, 1, 1, 1, 18, 17, 19, 1, 1, 1], [1, 12, 5, 1, 3, 1, 2, 10, 9, 1, 1, 3, 11, 2, 20, 17, 18, 2, 1, 1], [12, 6, 1, 2, 1, 18, 20, 18, 20, 18, 19, 18, 18, 17, 18, 18, 18, 12, 3, 3], [1, 8, 11, 6, 9, 18, 17, 18, 18, 18, 18, 17, 18, 20, 18, 17, 17, 1, 1, 12], [1, 12, 1, 3, 12, 18, 17, 18, 19, 17, 20, 18, 18, 17, 18, 18, 20, 1, 12, 1], [1, 1, 1, 1, 1, 18, 18, 20, 1, 1, 1, 12, 1, 1, 9, 11, 1, 2, 1, 1], [12, 1, 12, 2, 9, 17, 19, 18, 11, 12, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1], [1, 1, 1, 8, 1, 20, 18, 17, 3, 1, 1, 1, 12, 1, 12, 3, 1, 1, 2, 12], [1, 12, 12, 6, 1, 18, 17, 18, 18, 18, 18, 18, 19, 1, 1, 1, 1, 12, 3, 1], [12, 1, 1, 2, 1, 18, 18, 18, 17, 18, 18, 17, 18, 1, 3, 12, 1, 1, 1, 12], [1, 1, 1, 1, 1, 17, 18, 19, 18, 20, 18, 18, 17, 1, 1, 1, 1, 12, 2, 1], [1, 12, 1, 12, 12, 1, 1, 1, 1, 1, 18, 17, 18, 1, 12, 2, 1, 3, 1, 12], [12, 1, 1, 12, 1, 1, 1, 12, 1, 12, 18, 20, 18, 1, 2, 1, 3, 12, 1, 1], [1, 1, 12, 6, 1, 12, 1, 12, 6, 1, 19, 17, 18, 1, 12, 1, 12, 3, 1, 12]];
tileHeight = [[3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 1, 0, 0, 0, 1, 2, 2], [2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 1, 1, 2], [3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2], [3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [3, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 3, 4, 4, 4, 4, 4, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 4, 4, 4, 4, 4, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [2, 2, 7, 1, 2, 1, 7, 7, 1];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [8, 7, 3, 3, 8, 8, 2, 2, 3];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [9, 8, 3, 8, 9, 9, 9, 3, 3];
wave3.interval = 3000;
}
function map3() {
map.rows = 15;
map.xtile = 0;
map.ytile = 3;
map.startPos = "top";
map.waves = 3;
map.bonus = 600;
map.mapx = 300;
map.mapy = 100;
mapTiles = [[12, 7, 9, 20, 18, 18, 12, 8, 2, 12, 5, 1, 12, 1, 12], [7, 7, 9, 17, 17, 18, 1, 1, 1, 5, 11, 11, 1, 1, 1], [7, 7, 1, 19, 18, 18, 7, 1, 11, 24, 23, 23, 26, 1, 1], [12, 8, 1, 18, 17, 18, 17, 18, 18, 24, 22, 22, 26, 4, 12], [4, 1, 2, 19, 17, 18, 18, 19, 18, 25, 25, 25, 26, 3, 1], [1, 2, 3, 18, 18, 18, 18, 18, 18, 17, 19, 18, 18, 1, 7], [1, 3, 1, 6, 1, 1, 18, 18, 18, 18, 17, 18, 18, 1, 1], [12, 6, 6, 1, 1, 6, 18, 18, 18, 18, 18, 18, 18, 1, 12], [1, 1, 1, 7, 5, 1, 1, 8, 1, 12, 18, 18, 18, 2, 4], [4, 2, 4, 3, 1, 6, 1, 6, 12, 1, 17, 18, 18, 1, 2], [1, 1, 9, 1, 19, 18, 18, 18, 19, 17, 18, 17, 18, 1, 1], [1, 6, 1, 5, 18, 18, 18, 18, 18, 17, 18, 19, 18, 1, 12], [12, 1, 5, 1, 19, 17, 18, 18, 18, 18, 18, 18, 18, 1, 12], [1, 1, 1, 1, 18, 18, 18, 1, 1, 1, 1, 1, 4, 1, 5], [9, 8, 11, 11, 17, 17, 18, 1, 12, 5, 8, 12, 3, 1, 10]];
tileHeight = [[2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1], [3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1], [3, 3, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]];
mapDir = [[0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 3, 4, 4, 4, 3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 4, 4, 4, 3, 3, 0, 0, 0, 0, 0, 0], [0, 0, 0, 4, 4, 4, 3, 3, 4, 4, 4, 4, 3, 0, 0], [0, 0, 0, 0, 0, 0, 3, 4, 4, 4, 4, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 3, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0], [0, 0, 0, 0, 3, 2, 2, 2, 2, 2, 2, 3, 3, 0, 0], [0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 3, 0, 0], [0, 0, 0, 0, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0], [0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [13, 7, 7, 2, 2, 13, 7, 7, 13];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [14, 8, 2, 14, 14, 8, 8, 14, 3];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [15, 15, 9, 9, 3, 9, 9, 15, 3];
wave3.interval = 3000;
}
function map4() {
map.rows = 15;
map.xtile = 0;
map.ytile = 2;
map.startPos = "top";
map.waves = 3;
map.bonus = 500;
map.mapx = 300;
map.mapy = 80;
mapTiles = [[59, 56, 18, 18, 18, 56, 64, 55, 63, 55, 56, 57, 55, 61, 59], [55, 60, 18, 17, 18, 55, 56, 56, 59, 56, 55, 60, 56, 57, 55], [55, 62, 17, 18, 18, 18, 18, 18, 55, 55, 62, 55, 55, 58, 55], [56, 55, 18, 17, 18, 18, 18, 17, 55, 56, 59, 55, 57, 63, 55], [58, 55, 18, 18, 18, 17, 17, 18, 59, 63, 55, 63, 55, 56, 60], [55, 56, 57, 55, 55, 18, 18, 18, 64, 55, 55, 60, 56, 55, 64], [55, 61, 57, 60, 55, 18, 18, 18, 59, 60, 58, 55, 59, 58, 55], [55, 58, 56, 55, 63, 18, 17, 18, 55, 57, 57, 56, 55, 56, 63], [55, 56, 55, 57, 63, 18, 17, 18, 18, 18, 18, 17, 55, 62, 56], [60, 59, 63, 55, 55, 18, 18, 18, 18, 18, 18, 18, 55, 55, 57], [55, 60, 58, 57, 55, 18, 18, 18, 18, 17, 18, 18, 55, 56, 56], [55, 56, 56, 56, 55, 62, 55, 55, 57, 18, 18, 18, 55, 63, 55], [60, 58, 55, 63, 59, 55, 56, 63, 55, 18, 17, 18, 57, 56, 55], [56, 55, 61, 55, 56, 60, 56, 58, 57, 18, 18, 18, 55, 58, 55], [59, 62, 55, 58, 62, 55, 64, 55, 55, 17, 18, 17, 55, 63, 58]];
tileHeight = [[1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2], [2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2], [2, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2], [2, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [2, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 1, 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 0, 0]];
wave1 = new Object();
wave1.waveArr = [19, 1, 1, 19, 19, 19, 1, 2, 1];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [20, 19, 2, 19, 20, 20, 19, 2, 3];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [20, 21, 21, 20, 3, 2, 20, 3, 21];
wave3.interval = 3000;
}
function map5() {
map.rows = 15;
map.xtile = 3;
map.ytile = 14;
map.startPos = "side";
map.waves = 3;
map.bonus = 500;
map.mapx = 300;
map.mapy = 80;
mapTiles = [[64, 60, 64, 64, 57, 59, 57, 62, 57, 57, 57, 55, 58, 59, 57], [57, 57, 63, 57, 55, 57, 57, 56, 55, 60, 56, 57, 57, 56, 60], [64, 57, 64, 59, 63, 57, 60, 56, 64, 63, 58, 59, 60, 62, 57], [58, 60, 56, 57, 18, 17, 18, 18, 18, 18, 18, 18, 18, 18, 17], [64, 57, 55, 58, 18, 17, 18, 18, 17, 18, 18, 17, 18, 18, 18], [57, 60, 63, 62, 18, 18, 18, 18, 18, 17, 18, 18, 17, 18, 18], [57, 57, 55, 59, 18, 18, 18, 60, 57, 60, 64, 56, 57, 62, 57], [57, 59, 55, 55, 18, 17, 17, 63, 55, 57, 62, 60, 57, 56, 60], [57, 55, 60, 57, 18, 18, 18, 18, 18, 18, 18, 18, 57, 57, 56], [57, 56, 63, 56, 18, 17, 17, 18, 17, 18, 18, 17, 57, 58, 60], [57, 57, 57, 62, 17, 18, 18, 18, 18, 18, 18, 18, 60, 55, 55], [62, 58, 56, 59, 57, 55, 60, 55, 55, 18, 18, 18, 57, 57, 59], [57, 60, 55, 58, 63, 57, 55, 55, 63, 17, 18, 17, 55, 60, 56], [57, 59, 63, 57, 56, 60, 62, 59, 64, 18, 18, 18, 64, 56, 60], [17, 18, 18, 18, 18, 17, 18, 18, 17, 18, 17, 18, 57, 57, 57], [18, 17, 18, 18, 17, 18, 18, 18, 18, 18, 17, 18, 55, 56, 60], [18, 17, 18, 17, 18, 18, 17, 18, 17, 18, 18, 17, 57, 60, 57], [64, 56, 63, 63, 64, 60, 57, 62, 57, 56, 58, 55, 57, 56, 59], [57, 57, 56, 57, 60, 56, 57, 60, 57, 55, 57, 55, 57, 56, 57], [57, 59, 60, 57, 57, 55, 59, 57, 58, 56, 57, 60, 55, 55, 62]];
tileHeight = [[4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1], [3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [3, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2], [2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], [2, 2,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Arr = [22, 20, 20, 23, 22, 23, 20, 3, 23];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [23, 21, 21, 23, 23, 3, 21, 3, 21];
wave3.interval = 3000;
}
function map6() {
map.rows = 20;
map.xtile = 0;
map.ytile = 15;
map.startPos = "top";
map.waves = 3;
map.bonus = 500;
map.mapx = 0;
map.mapy = 0;
mapTiles = [[58, 57, 57, 64, 57, 55, 56, 59, 57, 63, 58, 57, 57, 59, 57, 18, 18, 17, 57, 60], [60, 57, 63, 61, 58, 58, 57, 60, 59, 57, 57, 63, 60, 57, 56, 17, 17, 18, 61, 56], [62, 56, 57, 58, 57, 57, 59, 62, 57, 59, 60, 56, 57, 57, 58, 18, 18, 18, 58, 59], [58, 57, 60, 60, 57, 58, 57, 57, 63, 57, 62, 57, 55, 56, 57, 17, 18, 18, 57, 55], [57, 64, 57, 57, 57, 57, 63, 60, 57, 63, 56, 61, 58, 57, 55, 17, 18, 18, 58, 56], [56, 60, 57, 63, 63, 57, 59, 56, 57, 18, 18, 17, 18, 17, 18, 18, 17, 17, 57, 60], [57, 59, 57, 59, 57, 62, 57, 57, 57, 17, 18, 18, 17, 18, 18, 17, 18, 18, 63, 55], [64, 58, 61, 59, 57, 60, 57, 57, 56, 18, 18, 18, 18, 18, 17, 18, 18, 17, 57, 58], [56, 60, 57, 63, 57, 64, 57, 57, 63, 17, 18, 18, 62, 56, 57, 56, 55, 57, 57, 59], [57, 62, 57, 56, 57, 57, 58, 57, 56, 18, 17, 18, 57, 60, 55, 58, 60, 56, 60, 59], [57, 57, 59, 57, 57, 57, 55, 57, 61, 18, 18, 18, 56, 56, 59, 55, 55, 56, 57, 57], [58, 57, 63, 57, 57, 60, 57, 57, 57, 18, 18, 17, 64, 58, 56, 56, 58, 56, 57, 58], [64, 60, 57, 59, 56, 57, 55, 56, 60, 18, 17, 18, 57, 56, 60, 57, 63, 56, 57, 55], [57, 57, 57, 56, 57, 64, 56, 57, 63, 18, 18, 18, 18, 18, 17, 18, 17, 17, 18, 56], [57, 57, 57, 56, 55, 60, 57, 57, 63, 18, 18, 18, 17, 18, 18, 18, 18, 18, 18, 58], [57, 63, 57, 57, 60, 57, 55, 57, 60, 17, 18, 17, 17, 18, 17, 18, 18, 17, 18, 56], [56, 60, 55, 60, 57, 57, 56, 60, 57, 62, 57, 55, 61, 55, 57, 57, 18, 18, 18, 63], [56, 57, 57, 56, 56, 59, 57, 57, 59, 57, 57, 23, 56, 55, 58, 57, 17, 18, 18, 56], [56, 59, 57, 55, 64, 57, 57, 55, 60, 55, 55, 24, 22, 57, 57, 57, 18, 18, 17, 60], [57, 57, 57, 60, 57, 55, 55, 61, 55, 63, 55, 24, 22, 55, 56, 58, 18, 18, 18, 55], [57, 64, 56, 57, 57, 56, 55, 59, 56, 57, 56, 24, 22, 55, 57, 62, 18, 17, 18, 64], [57, 55, 57, 60, 57, 56, 57, 60, 57, 56, 57, 57, 56, 59, 56, 57, 18, 18, 18, 58], [57, 63, 57, 56, 57, 57, 56, 56, 56, 56, 56, 58, 60, 55, 64, 57, 18, 18, 17, 57], [57, 60, 57, 59, 63, 60, 63, 57, 57, 56, 64, 56, 55, 56, 57, 57, 18, 17, 18, 56], [57, 57, 57, 55, 55, 57, 55, 57, 63, 57, 57, 55, 59, 55, 57, 62, 17, 18, 18, 56]];
tileHeight = [[5, 5, 6, 5, 5, 6, 6, 5, 5, 5, 4, 3, 2, 2, 1, 0, 0, 0, 1, 1], [5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 3, 2, 2, 1, 1, 0, 0, 0, 1, 1], [6, 5, 4, 3, 3, 4, 5, 4, 4, 3, 2, 2, 2, 1, 1, 0, 0, 0, 1, 1], [6, 5, 4, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 1, 1], [5, 5, 4, 3, 3, 4, 4, 3, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [6, 5, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0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, 4, 4, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0]];
wave1 = new Object();
wave1.waveArr = [21, 22, 23, 22, 14, 14, 21, 23, 3];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [8, 14, 20, 3, 23, 23, 9, 23, 23];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [24, 15, 24, 24, 23, 15, 21, 21, 24];
wave3.interval = 3000;
}
function map7() {
map.rows = 20;
map.xtile = 0;
map.ytile = 2;
map.startPos = "top";
map.waves = 3;
map.bonus = 500;
map.mapx = 250;
map.mapy = 50;
mapTiles = [[22, 26, 27, 27, 27, 24, 22, 22, 22, 1, 1, 3, 1, 13, 13], [22, 26, 27, 27, 27, 24, 22, 22, 22, 23, 1, 6, 3, 13, 3], [22, 26, 27, 27, 27, 24, 22, 22, 22, 22, 23, 23, 23, 23, 23], [22, 26, 27, 27, 27, 22, 25, 22, 22, 22, 22, 22, 22, 22, 22], [1, 1, 19, 17, 18, 2, 13, 24, 22, 22, 22, 22, 22, 22, 25], [6, 2, 17, 18, 18, 11, 2, 24, 22, 22, 1, 3, 6, 1, 1], [1, 13, 18, 20, 17, 1, 9, 24, 25, 25, 1, 2, 1, 13, 6], [2, 6, 18, 17, 18, 18, 17, 27, 27, 27, 20, 17, 17, 18, 2], [3, 1, 20, 18, 17, 17, 20, 27, 27, 27, 18, 17, 20, 18, 3], [1, 2, 18, 18, 18, 18, 18, 27, 27, 27, 18, 19, 17, 18, 2], [1, 1, 1, 1, 1, 6, 1, 24, 23, 23, 1, 18, 18, 18, 1], [13, 6, 2, 13, 3, 1, 23, 22, 22, 22, 1, 19, 17, 18, 13], [6, 3, 13, 1, 1, 23, 22, 22, 22, 1, 6, 17, 17, 18, 1], [1, 6, 1, 6, 23, 22, 22, 22, 1, 3, 2, 20, 18, 18, 1], [23, 24, 23, 23, 22, 22, 22, 22, 2, 1, 1, 17, 18, 17, 1], [22, 24, 22, 22, 22, 22, 22, 22, 23, 23, 26, 27, 27, 27, 24], [22, 24, 22, 22, 22, 22, 22, 22, 22, 22, 26, 27, 27, 27, 24], [22, 24, 22, 22, 22, 1, 6, 1, 1, 2, 1, 19, 17, 18, 1], [1, 1, 24, 22, 22, 1, 2, 1, 13, 6, 1, 18, 18, 18, 2], [2, 1, 24, 22, 22, 1, 6, 13, 2, 3, 1, 17, 20, 18, 3]];
tileHeight = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 1, 1, 0, 0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3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 0], [0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0]];
wave1 = new Object();
wave1.waveArr = [3, 3, 8, 8, 14, 14, 15, 19, 19];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [20, 21, 23, 3, 3, 9, 9, 15, 23];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [15, 15, 3, 4, 3, 24, 21, 21, 24];
wave3.interval = 3000;
}
function map8() {
map.rows = 20;
map.xtile = 0;
map.ytile = 8;
map.startPos = "top";
map.waves = 3;
map.bonus = 700;
map.mapx = 150;
map.mapy = 50;
mapTiles = [[22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 24, 22, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 24, 22, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 24, 22, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 24, 22, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 1, 25, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 6, 13, 25, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 7, 1, 6, 22, 22, 22, 22, 22, 25], [9, 24, 22, 22, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 1], [9, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 4], [24, 22, 22, 22, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 6], [24, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 1, 4, 1, 6, 1, 27, 27, 27, 1], [24, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 1, 6, 1, 23, 27, 27, 27, 24], [9, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 25, 23, 23, 23, 22, 27, 27, 27, 24], [9, 24, 22, 22, 22, 22, 22, 26, 1, 6, 7, 1, 22, 22, 22, 22, 27, 27, 27, 1], [23, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 7], [22, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 6], [22, 22, 22, 22, 22, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 1], [22, 22, 22, 22, 22, 27, 27, 27, 1, 6, 7, 23, 23, 23, 1, 6, 1, 1, 6, 1], [22, 22, 22, 22, 22, 27, 27, 27, 6, 4, 23, 22, 22, 22, 26, 1, 13, 4, 23, 23], [22, 22, 22, 22, 22, 27, 27, 27, 1, 23, 22, 22, 22, 22, 22, 26, 1, 23, 22, 22]];
tileHeight = [[3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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2, 2, 2, 2, 2, 2, 3, 3, 0], [0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0], [0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [9, 3, 3, 14, 15, 3, 3, 20, 20];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [2, 3, 8, 4, 14, 15, 14, 15, 9];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [21, 21, 24, 24, 15, 15, 9, 5, 24];
wave3.interval = 3000;
}
function map9() {
map.rows = 20;
map.xtile = 0;
map.ytile = 3;
map.startPos = "top";
map.waves = 3;
map.bonus = 700;
map.mapx = 150;
map.mapy = 50;
mapTiles = [[22, 22, 26, 18, 18, 18, 56, 56, 56, 19, 1, 13, 20, 2, 6, 1, 1, 19, 19, 1, 13, 1, 1, 1, 13], [22, 22, 26, 18, 18, 18, 56, 58, 55, 56, 57, 3, 19, 1, 1, 1, 2, 1, 1, 2, 1, 13, 1, 6, 19], [22, 22, 26, 18, 18, 18, 57, 57, 55, 57, 55, 56, 56, 57, 19, 20, 9, 19, 57, 6, 19, 1, 19, 1, 1], [22, 22, 26, 18, 18, 18, 56, 62, 55, 56, 63, 57, 55, 56, 57, 1, 13, 6, 19, 3, 3, 20, 1, 3, 3], [22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 56, 56, 19, 3, 1, 2, 20, 1, 3, 19, 2, 1], [22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 56, 60, 56, 19, 19, 19, 1, 13, 1, 1, 1, 13], [22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 56, 58, 57, 57, 55, 57, 1, 19, 1, 19, 19, 20], [22, 22, 22, 23, 23, 23, 23, 23, 9, 9, 18, 18, 18, 60, 55, 55, 55, 57, 55, 55, 58, 55, 55, 3, 20], [22, 22, 22, 22, 22, 22, 22, 22, 22, 9, 18, 18, 18, 57, 57, 58, 63, 55, 63, 55, 57, 56, 55, 55, 19], [22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 56, 55, 1], [22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 62, 57, 19], [22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 57, 55, 1], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 9, 9, 9, 23, 23, 26, 18, 18, 18, 56, 55, 56], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 22, 22, 26, 18, 18, 18, 57, 58, 56], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 56, 55, 55], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 63, 57, 56], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 56, 55, 60], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 55, 55, 56], [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 26, 18, 18, 18, 61, 58, 55], [22, 22, 22, 22, 22, 22, 22, 22, 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 = new Object();
wave1.waveArr = [2, 3, 3, 23, 2, 23, 3, 8, 14];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [3, 8, 4, 14, 20, 21, 21, 15, 9];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [21, 3, 3, 3, 24, 15, 9, 5, 24];
wave3.interval = 3000;
}
function map10() {
map.rows = 20;
map.xtile = 2;
map.ytile = 19;
map.startPos = "side";
map.waves = 3;
map.bonus = 800;
map.mapx = 100;
map.mapy = 0;
mapTiles = [[51, 51, 47, 51, 50, 51, 44, 49, 48, 48, 45, 50, 50, 50, 48, 47, 49, 51, 44, 51], [51, 46, 51, 51, 47, 46, 50, 51, 47, 50, 49, 49, 46, 51, 44, 51, 50, 47, 50, 47], [51, 51, 50, 49, 51, 50, 47, 51, 49, 50, 47, 48, 51, 38, 41, 38, 38, 39, 41, 39], [49, 44, 51, 47, 50, 45, 51, 51, 51, 47, 47, 51, 49, 39, 38, 39, 38, 41, 41, 41], [50, 51, 47, 51, 51, 48, 47, 50, 48, 46, 50, 46, 46, 38, 41, 38, 38, 39, 38, 41], [51, 50, 50, 48, 50, 51, 49, 51, 45, 49, 51, 50, 51, 41, 39, 38, 34, 35, 34, 33], [51, 51, 45, 50, 50, 49, 44, 50, 51, 50, 51, 51, 51, 41, 38, 41, 43, 34, 35, 34], [51, 49, 47, 50, 48, 50, 50, 49, 48, 49, 47, 44, 49, 38, 38, 38, 42, 42, 34, 33], [49, 50, 51, 44, 51, 47, 51, 51, 49, 46, 51, 49, 51, 41, 38, 38, 43, 42, 33, 35], [44, 51, 47, 50, 49, 46, 38, 38, 41, 39, 38, 41, 38, 38, 41, 38, 42, 35, 34, 34], [48, 51, 47, 50, 51, 51, 38, 41, 38, 41, 41, 38, 39, 41, 39, 38, 43, 34, 37, 34], [51, 51, 50, 49, 45, 50, 41, 41, 41, 38, 41, 41, 41, 41, 38, 41, 34, 34, 34, 33], [49, 44, 48, 50, 49, 48, 41, 38, 38, 34, 42, 43, 43, 42, 42, 35, 34, 33, 34, 35], [51, 51, 48, 51, 51, 44, 38, 41, 39, 35, 34, 43, 42, 43, 34, 35, 35, 34, 34, 35], [51, 50, 51, 47, 50, 47, 38, 38, 38, 35, 33, 34, 34, 35, 34, 33, 33, 34, 36, 34], [47, 49, 50, 47, 50, 50, 41, 41, 41, 34, 34, 35, 33, 34, 34, 34, 37, 34, 34, 34], [50, 51, 45, 50, 50, 45, 38, 39, 38, 35, 34, 36, 34, 35, 37, 33, 34, 33, 34, 33], [49, 50, 49, 50, 47, 48, 41, 41, 38, 33, 34, 35, 33, 34, 33, 34, 34, 34, 35, 34], [51, 45, 47, 46, 50, 51, 38, 38, 39, 37, 33, 35, 35, 34, 34, 34, 36, 34, 35, 34], [51, 51, 49, 51, 48, 46, 38, 39, 41, 34, 34, 34, 33, 34, 34, 35, 34, 34, 35, 33]];
tileHeight = [[2, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1], [3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0], [2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0], [2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0], [2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0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0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 2, 2, 2, 2, 2, 2, 2, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [25, 25, 25, 25, 26, 25, 26, 25, 25];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [26, 28, 26, 25, 25, 26, 28, 26, 26];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [27, 27, 26, 28, 28, 25, 28, 27, 28];
wave3.interval = 3000;
}
function map11() {
map.rows = 20;
map.xtile = 0;
map.ytile = 2;
map.startPos = "top";
map.waves = 3;
map.bonus = 1000;
map.mapx = 250;
map.mapy = 100;
mapTiles = [[33, 35, 40, 41, 41, 35, 34, 34, 36, 33, 34, 33, 34, 33, 36, 34, 34, 33, 35, 34], [35, 34, 40, 40, 40, 35, 36, 35, 33, 37, 35, 35, 35, 35, 35, 37, 35, 35, 35, 35], [35, 34, 40, 41, 39, 38, 38, 38, 38, 40, 39, 38, 48, 47, 49, 33, 35, 35, 36, 35], [37, 34, 38, 39, 41, 40, 40, 38, 40, 41, 40, 38, 47, 45, 48, 45, 35, 35, 37, 35], [34, 35, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 44, 50, 47, 51, 35, 35, 33, 33], [34, 35, 34, 34, 34, 49, 47, 51, 47, 38, 41, 38, 47, 47, 46, 50, 35, 35, 36, 35], [35, 36, 34, 33, 34, 47, 50, 46, 48, 39, 41, 38, 51, 48, 44, 47, 36, 35, 33, 33], [35, 34, 33, 34, 34, 48, 49, 47, 51, 41, 40, 38, 34, 35, 35, 34, 37, 34, 35, 34], [35, 35, 37, 35, 34, 51, 44, 45, 50, 38, 39, 41, 34, 34, 34, 34, 35, 34, 33, 34], [34, 35, 35, 34, 34, 50, 48, 48, 49, 38, 39, 41, 38, 40, 38, 40, 35, 35, 35, 35], [35, 36, 35, 34, 34, 47, 44, 47, 46, 40, 41, 38, 41, 38, 41, 38, 34, 33, 37, 34], [34, 33, 33, 36, 34, 50, 48, 49, 50, 40, 38, 39, 38, 41, 40, 41, 34, 35, 37, 35], [35, 34, 37, 35, 34, 47, 45, 51, 48, 46, 47, 50, 49, 40, 39, 38, 34, 34, 35, 33], [35, 34, 35, 35, 33, 51, 48, 46, 47, 44, 50, 48, 49, 38, 41, 38, 49, 50, 35, 35], [34, 34, 33, 34, 34, 45, 50, 47, 49, 48, 51, 47, 46, 39, 41, 38, 48, 50, 49, 35], [35, 33, 37, 35, 33, 48, 44, 39, 38, 40, 38, 40, 41, 40, 39, 38, 44, 46, 47, 35], [36, 35, 35, 35, 34, 51, 46, 39, 40, 41, 39, 40, 41, 39, 38, 38, 48, 45, 48, 35], [35, 37, 35, 34, 34, 34, 47, 41, 38, 38, 40, 41, 40, 38, 41, 38, 51, 47, 51, 34], [33, 35, 34, 36, 34, 34, 34, 38, 39, 41, 34, 34, 37, 34, 34, 34, 36, 34, 35, 34], [34, 34, 34, 35, 33, 35, 35, 40, 38, 39, 34, 35, 35, 36, 35, 34, 34, 35, 35, 35]];
tileHeight = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 4, 4, 4, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 2, 2, 2, 2, 2, 2, 3, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [28, 28, 25, 25, 29, 28, 29, 25, 25];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [29, 26, 26, 24, 28, 29, 29, 24, 26];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [30, 29, 31, 30, 30, 27, 31, 27, 30];
wave3.interval = 3000;
}
function map12() {
map.rows = 20;
map.xtile = 0;
map.ytile = 17;
map.startPos = "top";
map.waves = 3;
map.bonus = 0;
map.mapx = 0;
map.mapy = 0;
mapTiles = [[33, 35, 33, 33, 34, 33, 33, 37, 34, 34, 33, 33, 33, 34, 33, 33, 33, 39, 38, 40, 34, 33, 33, 35, 33], [34, 33, 34, 34, 36, 34, 34, 34, 34, 34, 33, 34, 37, 35, 34, 33, 33, 38, 40, 39, 33, 33, 33, 34, 35], [33, 34, 37, 34, 35, 33, 34, 33, 33, 34, 36, 33, 33, 33, 33, 33, 43, 40, 41, 38, 34, 35, 37, 33, 33], [33, 34, 33, 33, 37, 33, 33, 33, 33, 33, 33, 33, 33, 33, 43, 33, 33, 39, 38, 41, 33, 36, 33, 34, 33], [34, 33, 33, 33, 33, 33, 33, 42, 43, 42, 42, 33, 33, 43, 42, 42, 33, 41, 39, 39, 33, 35, 34, 35, 33], [36, 33, 37, 37, 40, 38, 39, 40, 38, 38, 41, 40, 39, 38, 38, 41, 38, 38, 40, 41, 35, 33, 34, 33, 34], [33, 34, 33, 37, 38, 39, 40, 38, 41, 39, 40, 38, 40, 38, 40, 38, 39, 38, 41, 38, 33, 35, 34, 34, 35], [33, 37, 33, 33, 38, 40, 38, 39, 40, 40, 38, 39, 41, 38, 38, 40, 38, 39, 39, 41, 35, 34, 33, 37, 33], [35, 33, 33, 33, 38, 40, 41, 34, 33, 33, 33, 43, 43, 43, 33, 33, 33, 35, 33, 34, 33, 36, 34, 34, 33], [35, 33, 33, 43, 39, 39, 38, 34, 35, 36, 33, 34, 43, 43, 33, 34, 36, 34, 33, 34, 37, 35, 34, 33, 35], [33, 33, 43, 42, 38, 40, 40, 33, 37, 35, 34, 33, 33, 33, 35, 36, 33, 33, 33, 33, 33, 33, 33, 36, 35], [37, 33, 42, 43, 39, 41, 38, 34, 33, 35, 35, 33, 33, 33, 33, 34, 33, 33, 43, 42, 33, 34, 35, 33, 33], [34, 33, 33, 42, 41, 38, 39, 33, 33, 33, 33, 33, 42, 43, 34, 33, 33, 33, 43, 43, 42, 33, 34, 33, 34], [33, 33, 33, 33, 38, 40, 39, 33, 33, 43, 33, 33, 43, 42, 43, 33, 33, 42, 42, 42, 43, 33, 33, 33, 33], [33, 35, 34, 33, 40, 38, 41, 38, 40, 38, 38, 41, 38, 40, 38, 38, 39, 38, 41, 38, 40, 38, 40, 38, 33], [34, 33, 33, 33, 40, 39, 40, 39, 41, 40, 38, 41, 39, 38, 40, 39, 38, 39, 38, 39, 38, 40, 39, 41, 33], [33, 35, 37, 35, 38, 38, 41, 41, 38, 39, 38, 40, 38, 41, 39, 38, 38, 40, 39, 38, 38, 39, 38, 38, 34], [33, 34, 33, 33, 33, 33, 33, 33, 33, 34, 33, 35, 34, 33, 34, 33, 33, 33, 33, 33, 33, 38, 41, 38, 33], [33, 34, 36, 33, 33, 43, 33, 33, 43, 33, 33, 34, 36, 34, 36, 34, 33, 33, 42, 43, 42, 38, 39, 38, 34], [33, 33, 34, 35, 33, 33, 35, 33, 33, 34, 34, 37, 35, 35, 35, 34, 37, 34, 33, 42, 43, 39, 41, 40, 33], [35, 34, 33, 35, 34, 34, 34, 34, 33, 33, 33, 35, 33, 33, 33, 33, 33, 33, 35, 33, 43, 38, 38, 38, 34], [33, 35, 33, 35, 33, 36, 33, 33, 33, 43, 42, 33, 33, 33, 43, 42, 43, 34, 33, 36, 33, 41, 40, 40, 36], [33, 33, 37, 35, 34, 33, 34, 33, 42, 33, 33, 33, 33, 42, 43, 42, 43, 33, 33, 33, 33, 40, 38, 38, 33], [33, 35, 33, 34, 35, 37, 34, 33, 43, 33, 38, 40, 38, 39, 41, 38, 40, 38, 41, 39, 38, 39, 41, 39, 34], [33, 33, 34, 34, 33, 33, 33, 33, 33, 33, 39, 38, 40, 38, 40, 38, 39, 40, 39, 38, 40, 38, 40, 38, 35], [34, 37, 34, 34, 36, 34, 35, 33, 43, 42, 40, 41, 38, 41, 38, 39, 38, 41, 38, 40, 38, 41, 38, 38, 33], [33, 33, 36, 35, 35, 34, 33, 33, 42, 43, 38, 39, 38, 33, 43, 34, 33, 33, 35, 33, 35, 33, 34, 33, 34], [35, 34, 34, 33, 34, 37, 33, 35, 33, 42, 39, 38, 40, 43, 42, 33, 35, 36, 37, 34, 34, 34, 33, 34, 33], [33, 34, 34, 35, 33, 35, 35, 33, 33, 43, 38, 40, 38, 42, 33, 33, 33, 34, 34, 33, 35, 33, 37, 35, 33], [33, 33, 33, 35, 35, 33, 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 2, 2, 2, 2, 2, 2, 3, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
wave1 = new Object();
wave1.waveArr = [31, 28, 25, 25, 31, 28, 29, 31, 25];
wave1.interval = 3000;
wave2 = new Object();
wave2.waveArr = [32, 26, 26, 29, 32, 29, 30, 21, 26];
wave2.interval = 3000;
wave3 = new Object();
wave3.waveArr = [33, 30, 27, 24, 33, 33, 30, 27, 33];
wave3.interval = 3000;
}
function buildMap() {
_root.mapMusic.stop();
if (_root.soundOn == true) {
_root.levelMusic.start(0, 999);
}
_root.interfaceMC._visible = true;
_root.createEmptyMovieClip("miniMap", 100);
_root.createEmptyMovieClip("display", 2);
_root.display.createEmptyMovieClip("tiles", 0);
_root.display.createEmptyMovieClip("enemyHolder", 1);
enemyCount = 0;
curWave = 1;
_root.manaStart = _root.mana;
_root.userGoldStart = _root.userGold;
_root.healthStart = _root.health;
_root.levelTimeStart = _root.levelTime;
_root.scoreStart = _root.score;
_root.potionsStart = _root.manaPotions;
_root.display.attachMovie("tileOutline", "tileOutline", _root.display.getNextHighestDepth());
_root.display.tileOutline._x = -20000;
_root.display.tileOutline._y = 0;
h = 0;
while (h < mapTiles.length) {
w = 0;
while (w < mapTiles[0].length) {
mapTiles[h][w] = int(mapTiles[h][w]);
mapDir[h][w] = int(mapDir[h][w]);
tileHeight[h][w] = int(tileHeight[h][w]);
d = (((((w + h) * tileSize) / 2) * 300) + ((w - h) * tileSize)) + 1;
var _local3 = _root.display.tiles.attachMovie("tiles", (("tile_" + w) + "_") + h, d);
_local3.cacheAsBitmap = true;
_local3._x = (w - h) * tileSize;
_local3._y = ((w + h) * tileSize) / 2;
_local3.defenderRange._visible = false;
_local3.x = h;
_local3.y = w;
_local3.tileCoord.text = (w + ",") + h;
_local3.tileHit.useHandCursor = false;
_local3.gotoAndStop(mapTiles[h][w]);
if (mapDir[h][w] != 0) {
_local3.unusableTile = true;
_local3.path = true;
}
if (((((((((((((mapTiles[h][w] == 7) || (mapTiles[h][w] == 8)) || (mapTiles[h][w] == 9)) || (mapTiles[h][w] == 10)) || (mapTiles[h][w] == 11)) || (mapTiles[h][w] == 12)) || (mapTiles[h][w] == 44)) || (mapTiles[h][w] == 45)) || (mapTiles[h][w] == 46)) || (mapTiles[h][w] == 61)) || (mapTiles[h][w] == 62)) || (mapTiles[h][w] == 63)) || (mapTiles[h][w] == 64)) {
_local3.unusableTile = true;
_local3.destructable = true;
}
if ((((((((((((mapTiles[h][w] == 16) || (mapTiles[h][w] == 22)) || (mapTiles[h][w] == 23)) || (mapTiles[h][w] == 24)) || (mapTiles[h][w] == 25)) || (mapTiles[h][w] == 26)) || (mapTiles[h][w] == 27)) || (mapTiles[h][w] == 33)) || (mapTiles[h][w] == 34)) || (mapTiles[h][w] == 35)) || (mapTiles[h][w] == 36)) || (mapTiles[h][w] == 37)) {
_local3.unusableTile = true;
_local3.destructable = false;
}
d++;
if (tileHeight[h][w] != 0) {
_local3.hasHeight = true;
_local3._y = _local3._y - (30 * tileHeight[h][w]);
}
_local3.tileHit.onRollOver = function () {
makeOutline(this._parent);
};
_local3.tileHit.onRollOut = function () {
if (this._parent.destructable == true) {
this._parent.fluxTint(colObj, 0, 0, 0, false, 0);
}
};
_local3.tileHit.onRelease = function () {
if ((this._parent.destructable == true) && (_root.selectedMC == null)) {
_root.flattenPrompt(this._parent);
} else if ((this._parent.path == true) && (_root.magicTrap == true)) {
trapFunc(this._parent);
} else if ((this._parent.unusableTile != true) && (_root.itemDig == true)) {
digFunc(this._parent);
} else if ((((((_root.selectedMC != null) && (this._parent.unusableTile != true)) && (_root.selectedMC != "poison")) && (_root.selectedMC != "lightning")) && (_root.selectedMC != "trap")) && (_root.selectedMC != "freeze")) {
if (_root.selectedMC == "dragon") {
if (flatTiles == true) {
addDefender(this._parent);
}
} else {
addDefender(this._parent);
}
}
};
w++;
}
h++;
}
_root.display.cacheAsBitmap = true;
_root.display.tiles.cacheAsBitmap = true;
_root.display._width = _root.display._width * 0.7;
_root.display._height = _root.display._height * 0.7;
_root.display._x = map.mapx;
_root.display._y = map.mapy;
_root.stage = 0;
_root.interfaceMC.pauseButt._alpha = 30;
_root.fadeInt = setInterval(showLevelInfo, 800);
_root.levelScore = 0;
_root.defenderIconStatus();
_root.interfaceMC._alpha = 100;
}
function makeOutline(selectedTile) {
if (_root.magicTrap == true) {
_root.display.tileOutline._visible = true;
_root.display.tileOutline._x = selectedTile._x;
_root.display.tileOutline._y = selectedTile._y - 13;
if (selectedTile.path == true) {
_root.display.tileOutline.gotoAndStop(5);
} else {
_root.display.tileOutline.gotoAndStop(6);
}
} else if (_root.itemDig == true) {
_root.display.tileOutline._visible = true;
_root.display.tileOutline._x = selectedTile._x;
_root.display.tileOutline._y = selectedTile._y - 13;
if ((selectedTile.unusableTile != true) && (selectedTile.path != true)) {
_root.display.tileOutline.gotoAndStop(7);
} else {
_root.display.tileOutline.gotoAndStop(8);
}
} else if (((((_root.selectedMC != null) && (_root.magicPoison != true)) && (_root.magicLightning != true)) && (_root.magicTrap != true)) && (_root.magicFreeze != true)) {
_root.display.tileOutline._visible = true;
hideDefenderStats();
if (_root.placingEnemy == false) {
if (_root.selectedMC != "dragon") {
_root.display.tileOutline._x = selectedTile._x;
_root.display.tileOutline._y = selectedTile._y - 13;
if (selectedTile.unusableTile == true) {
_root.display.tileOutline.gotoAndStop(2);
} else {
_root.display.tileOutline.gotoAndStop(1);
}
} else {
flatTiles = true;
tileGroupArr = [_root.display.tiles[(("tile_" + selectedTile.y) + "_") + selectedTile.x], _root.display.tiles[(("tile_" + selectedTile.y) + "_") + (selectedTile.x - 1)], _root.display.tiles[(("tile_" + (selectedTile.y - 1)) + "_") + selectedTile.x], _root.display.tiles[(("tile_" + (selectedTile.y - 1)) + "_") + (selectedTile.x - 1)]];
_root.display.tileOutline._x = selectedTile._x;
_root.display.tileOutline._y = selectedTile._y - 40;
tg = 0;
while (tg < tileGroupArr.length) {
if (tileGroupArr[tg].unusableTile == true) {
flatTiles = false;
} else {
if (tg > 0) {
if (tileHeight[tileGroupArr[tg].x][tileGroupArr[tg].y] != prevHeight) {
flatTiles = false;
}
}
prevHeight = tileHeight[tileGroupArr[tg].x][tileGroupArr[tg].y];
}
tg++;
}
if (flatTiles == true) {
_root.display.tileOutline.gotoAndStop(3);
} else {
_root.display.tileOutline.gotoAndStop(4);
}
}
}
} else if (selectedTile.destructable == true) {
var _local3 = {r:255, g:50, b:0};
selectedTile.fluxTint(_local3, 0, 60, 10, false);
}
}
function addDefender(defenderTile) {
_root.placingEnemy = true;
var defenderMC = _root.display.tiles.attachMovie("defenders", (_root.selectedMC + "_") + defenderArr.length, defenderTile.getDepth() + 1, {_x:defenderTile._x + 20, _y:defenderTile._y - 52});
defenderMC.gotoAndStop(_root.selectedMC);
defenderMC.type = _root.selectedMC;
defenderMC.cacheAsBitmap = true;
getStats(defenderMC, defenderTile);
defenderMC._alpha = 50;
defenderMC._width = defenderMC._width * 1.4;
defenderMC._height = defenderMC._height * 1.4;
if (_root.selectedMC != null) {
getZone(defenderMC, "y", 1);
}
_root.selectedMC = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
defenderMC.dir = 4;
defenderMC.axis = "y";
defenderMC.dirFront = 1;
getZone(defenderMC, defenderMC.axis, defenderMC.dirFront);
getMinMax(defenderMC, defenderMC.axis, defenderMC.dirFront);
prevDir = 0;
defenderMC.placed = false;
defenderMC.onMouseMove = function () {
adjside = this._xmouse - this.origin._x;
oppside = -1 * (this._ymouse - this.origin._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
if (angle > 0) {
this.defenderMC.gotoAndStop(2);
if (angle < 90) {
this.dir = 1;
this.axis = "x";
this.dirFront = 0;
this.defenderMC._xscale = -100;
} else {
this.dir = 2;
this.axis = "y";
this.dirFront = 0;
this.defenderMC._xscale = 100;
}
} else {
this.defenderMC.gotoAndStop(1);
if (angle < -90) {
this.dir = 3;
this.axis = "x";
this.dirFront = 1;
this.defenderMC._xscale = -100;
} else {
this.dir = 4;
this.axis = "y";
this.dirFront = 1;
this.defenderMC._xscale = 100;
}
}
if (this.dir != prevDir) {
prevDir = this.dir;
getZone(this, this.axis, this.dirFront);
getMinMax(this, this.axis, this.dirFront);
}
};
defenderMC.onMouseUp = function () {
this._alpha = 100;
this.level = 1;
this.exp = 0;
_root.userGold = _root.userGold - _root.selectedIcon.price;
r = 0;
while (r < this.zoneArray.length) {
this.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.placingEnemy = false;
defenderArr[defenderArr.length] = this;
if (this.tileSize > 1) {
t = 0;
while (t < tileGroupArr.length) {
tileGroupArr[t].unusableTile = true;
t++;
}
} else {
defenderTile.unusableTile = true;
}
_root.selectedIcon.fluxTint(colObj, 0, 0, 20, false);
_root.selectedIcon = null;
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 0, 70, 20, true, 1);
if (_root.soundOn == true) {
_root.placeDefSnd.start();
}
_root.display.tileOutline._visible = false;
_root.defenderIconStatus();
delete this.onMouseMove;
delete this.onMouseUp;
};
defenderMC.hit.onRelease = function () {
if (_root.selectedIcon == null) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (this._parent.viewStats != true) {
hideDefenderStats();
var _local4 = {r:255, g:255, b:255};
this._parent.fluxTint(_local4, 0, 60, 5, true);
this._parent.viewStats = true;
_root.interfaceMC.attachMovie("statsBox", "statsBox", 1, {_x:-58, _y:-220});
populateStats(this._parent, _root.interfaceMC.statsBox);
if (this._parent.disableRotate == true) {
_root.interfaceMC.statsBox.rotateTxt._alpha = 50;
_root.interfaceMC.statsBox.rotateButton._alpha = 50;
}
_root.selectedDefender = this._parent;
r = 0;
while (r < this._parent.zoneArray.length) {
this._parent.zoneArray[r].defenderRange._visible = true;
r++;
}
} else {
this._parent.fluxTint(_local4, 0, 0, 3, true, 0);
this._parent.viewStats = false;
_root.interfaceMC.statsBox.removeMovieClip();
_root.selectedDefender = null;
r = 0;
while (r < this._parent.zoneArray.length) {
this._parent.zoneArray[r].defenderRange._visible = false;
r++;
}
}
}
};
defenderMC.hit.onRollOver = function () {
if (this._parent.viewStats != true) {
if (_root.selectedIcon == null) {
var _local3 = {r:255, g:255, b:255};
this._parent.fluxTint(_local3, 0, 30, 10, true, 1);
}
}
};
}
function hideDefenderStats() {
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
}
function startWave() {
clearInterval(_root.startWaveInt);
enemyArr = new Array();
_root.interfaceMC.pauseButt._alpha = 100;
timerOn = true;
_root.timerInt = setInterval(increaseTime, 1000);
enemyMeter.red._width = 0;
enemiesDead = 0;
enemyCount = 0;
defenderIconStatus();
enemyNum = _root["wave" + _root.curWave].waveArr.length;
enemiesRemaining = enemyNum - enemyCount;
createEnemy();
if (enemyNum > 1) {
enemyInt = setInterval(createEnemy, _root["wave" + _root.curWave].interval);
}
}
function createEnemy() {
enemyCount++;
if (enemyCount >= enemyNum) {
clearInterval(enemyInt);
}
var _local3 = _root.display.tiles.attachMovie("enemies", "enemy" + enemyCount, _root.display.tiles.getNextHighestDepth());
_local3.gotoAndStop(_root["wave" + _root.curWave].waveArr[enemyCount - 1]);
enemyArr[enemyArr.length] = _local3;
_local3.num = enemyCount;
_local3.cacheAsBitmap = true;
_local3.arrNum = enemyArr.length;
if (map.startPos == "side") {
_local3.xTile = Math.floor(Math.random() * 3) + map.xtile;
_local3.yTile = map.ytile;
_local3._x = _root.display.tiles[(("tile_" + _local3.yTile) + "_") + _local3.xTile]._x + 60;
_local3._y = _root.display.tiles[(("tile_" + _local3.yTile) + "_") + _local3.xTile]._y + 15;
setProperty(_local3.enemyMC.viewMC, _xscale , -140);
_local3.enemyMC.gotoAndStop(2);
} else {
_local3.xTile = map.xtile;
if (_root["wave" + _root.curWave].boss == true) {
_local3.yTile = map.ytile + 1;
} else {
_local3.yTile = Math.floor(Math.random() * 3) + map.ytile;
}
_local3._x = _root.display.tiles[(("tile_" + _local3.yTile) + "_") + _local3.xTile]._x + 40;
_local3._y = _root.display.tiles[(("tile_" + _local3.yTile) + "_") + _local3.xTile]._y + 25;
}
_local3.coords.text = (_local3.xTile + ",") + _local3.yTile;
_local3.swapDepths(_root.display.tiles[(("tile_" + _local3.yTile) + "_") + (_local3.xTile + 1)].getDepth() + 1);
enemyStats(int(_root["wave" + _root.curWave].waveArr[enemyCount - 1]), _local3);
_local3.healthTxt.text = _local3.health;
_local3.fullHealth = _local3.health;
_local3.healthTxt._visible = false;
_local3.healthMeter._visible = false;
var _local5 = {x:_local3.hitMC._x, y:_local3.hitMC._y};
_local3.hitMC.localToGlobal(_local5);
var _local6 = {x:_local3._x, y:_local3._y};
_local3.localToGlobal(_local6);
_local3.hitMC._x = _local3._x;
_local3.enemyMC.onRollOver = function () {
this._parent.viewingHealth = true;
this._parent.healthMeter._visible = true;
this._parent.healthTxt._visible = true;
};
_local3.enemyMC.onRollOut = function () {
if (this._parent.showHealth != true) {
this._parent.viewingHealth = false;
this._parent.healthMeter._visible = false;
this._parent.healthTxt._visible = false;
}
};
_local3.enemyMC.onRelease = function () {
if (_root.magicPoison == true) {
poisonFunc(this);
} else if (_root.magicLightning == true) {
lightningFunc(this);
} else if (_root.magicFreeze == true) {
freezeFunc(this);
}
};
_local3.onEnterFrame = function () {
if (this.dir == "upR") {
var _local3 = ((2 * (this._y + 34)) - this._x) / 2;
var _local4 = this._x + _local3;
this.yTile = Math.round(_local4 / tileSize) - 2;
this.xTile = Math.round(_local3 / tileSize);
} else if (this.dir == "upL") {
var _local3 = ((2 * (this._y - 5)) - this._x) / 2;
var _local4 = (this._x - 20) + _local3;
this.yTile = Math.round(_local4 / tileSize);
this.xTile = Math.round(_local3 / tileSize);
} else if (this.dir == "downR") {
var _local3 = ((2 * (this._y - 5)) - this._x) / 2;
var _local4 = (this._x - 20) + _local3;
this.yTile = Math.round(_local4 / tileSize) - 1;
this.xTile = Math.round(_local3 / tileSize);
} else {
var _local3 = ((2 * (this._y - 5)) - this._x) / 2;
var _local4 = (this._x - 15) + _local3;
this.yTile = Math.round(_local4 / tileSize) - 1;
this.xTile = Math.round(_local3 / tileSize);
}
this.curTile = _root.mapDir[this.xTile][this.yTile];
if (_root.display.tiles[(("tile_" + this.yTile) + "_") + this.xTile].trap == true) {
trapHit(this, _root.display.tiles[(("tile_" + this.yTile) + "_") + this.xTile]);
}
if (this.dir == "upR") {
newDepth = _root.display.tiles[(("tile_" + this.yTile) + "_") + this.xTile].getDepth() + 1;
} else if (this.dir == "upL") {
newDepth = _root.display.tiles[(("tile_" + this.yTile) + "_") + this.xTile].getDepth() + 1;
} else if (this.dir == "downR") {
newDepth = _root.display.tiles[(("tile_" + (this.yTile + 1)) + "_") + this.xTile].getDepth() + 1;
} else if (this.dir == "downL") {
newDepth = _root.display.tiles[(("tile_" + this.yTile) + "_") + (this.xTile + 1)].getDepth() + 1;
} else {
newDepth = _root.display.tiles[(("tile_" + (this.yTile + 1)) + "_") + this.xTile].getDepth() + 1;
}
if (newDepth > 0) {
this.swapDepths(newDepth);
}
if ((this.xTile >= mapTiles.length) || (this.xTile < 0)) {
enemyFinish(this);
} else if ((this.yTile >= mapTiles[0].length) || (this.yTile < 0)) {
enemyFinish(this);
}
if ((this.prevX != this.xTile) || (this.prevY != this.yTile)) {
updateMiniMap(this);
h = 0;
while (h < this.attackers.length) {
clearInterval(this["shootInt" + h]);
this.attackers[h].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
if (this.attackers[h].name == "dragon") {
this.attackers[h].fireMC.removeMovieClip();
}
h++;
}
this.towersHit = 0;
this.attackers = new Array();
t = 0;
while (t < defenderArr.length) {
if ((this.xTile >= defenderArr[t].minX) && (this.xTile <= defenderArr[t].maxX)) {
if ((this.yTile >= defenderArr[t].minY) && (this.yTile <= defenderArr[t].maxY)) {
this.towersHit++;
this.attackers[this.attackers.length] = defenderArr[t];
defenderArr[t].defenderMC.defenderGraphic.defenderAnim.gotoAndPlay(2);
if (defenderArr[t].name == "dragon") {
dragonFire(defenderArr[t], t);
}
shootEnemy(defenderArr[t], this);
defenderArr[t].attacking = true;
intNum = this.attackers.length - 1;
this["shootInt" + intNum] = setInterval(shootEnemy, 200, defenderArr[t], this);
this.attacked = true;
var _local5 = {r:255, g:0, b:0};
this.enemyMC.fluxTint(_local5, 0, 60, 20, true);
this.healthMeter._visible = true;
this.healthTxt._visible = true;
this.healthTxt.text = this.health;
}
}
t++;
}
if (this.towersHit == 0) {
if (this.poisoned != true) {
this.enemyMC.fluxTint($colObj, 0, 0, 10, true, 0);
} else {
this.enemyMC.fluxTint($colObj, 0, 0, 10, true, 0);
var _local5 = {r:150, g:255, b:0};
this.enemyMC.fluxTint(_local5, 0, 60, 20, true);
}
h = 0;
while (h < this.attackers.length) {
this.attackers[h].defenderMC.defenderGraphic.defenderAnim.gotoAndStop(1);
clearInterval(this["shootInt" + h]);
if (this.attackers[h].name == "dragon") {
this.attackers[h].fireMC.removeMovieClip();
}
h++;
}
this.attackers = new Array();
this.attacked = false;
if (this.viewingHealth != true) {
this.healthMeter._visible = false;
this.healthTxt._visible = false;
}
}
}
if (_root.timerOn != false) {
if (this.poisoned == true) {
this.health = this.health - 1;
this.healthMeter._visible = true;
this.healthTxt._visible = true;
this.healthTxt.text = this.health;
this.healthMeter.red._width = 36 * (this.health / this.fullHealth);
checkForDeath(this);
}
if (this.attacked == true) {
h = 0;
while (h < this.attackers.length) {
this.health = this.health - this.attackers[h].power;
h++;
}
this.healthTxt.text = this.health;
this.healthMeter.red._width = 36 * (this.health / this.fullHealth);
checkForDeath(this);
}
this.prevX = this.xTile;
this.prevY = this.yTile;
if (this.frozen != true) {
moveDir(this);
}
}
};
}
function checkForDeath(thisEnemy) {
if (thisEnemy.health <= 0) {
if (thisEnemy.dying != true) {
thisEnemy.dying = true;
thisEnemy.coinCount = 0;
_root.enemiesDead++;
trace((("ENEMY DEAD COUNT: " + _root.enemiesDead) + " ENEMIES ALIVE: ") + enemyNum);
enemiesRemaining = enemyNum - _root.enemiesDead;
enemyMeter.red._width = (_root.enemiesDead / _root["wave" + _root.curWave].enemyNum) * 36;
h = 0;
while (h < thisEnemy.attackers.length) {
thisEnemy.attackers[h].exp = thisEnemy.attackers[h].exp + thisEnemy.exp;
checkLevelUp(thisEnemy.attackers[h]);
updateDefenderStats(thisEnemy.attackers[h]);
h++;
}
killEnemy(thisEnemy);
checkEnemiesDead();
}
}
}
function moveDir(thisEnemy) {
switch (thisEnemy.curTile) {
case 1 :
thisEnemy._x = thisEnemy._x + (thisEnemy.speed / 2);
thisEnemy._y = thisEnemy._y - (thisEnemy.speed / 4);
thisEnemy.dir = "upR";
setProperty(thisEnemy.enemyMC.viewMC, _xscale , 140);
thisEnemy.enemyMC.gotoAndStop(2);
break;
case 2 :
thisEnemy._x = thisEnemy._x - (thisEnemy.speed / 2);
thisEnemy._y = thisEnemy._y - (thisEnemy.speed / 4);
thisEnemy.dir = "upL";
setProperty(thisEnemy.enemyMC.viewMC, _xscale , -140);
thisEnemy.enemyMC.gotoAndStop(2);
break;
case 3 :
thisEnemy._x = thisEnemy._x - (thisEnemy.speed / 2);
thisEnemy._y = thisEnemy._y + (thisEnemy.speed / 4);
thisEnemy.dir = "downL";
setProperty(thisEnemy.enemyMC.viewMC, _xscale , 140);
thisEnemy.enemyMC.gotoAndStop(1);
break;
case 4 :
thisEnemy._x = thisEnemy._x + (thisEnemy.speed / 2);
thisEnemy._y = thisEnemy._y + (thisEnemy.speed / 4);
thisEnemy.dir = "downR";
setProperty(thisEnemy.enemyMC.viewMC, _xscale , -140);
thisEnemy.enemyMC.gotoAndStop(1);
break;
case 5 :
thisEnemy._x = thisEnemy._x - thisEnemy.speed;
thisEnemy._y = thisEnemy._y + (thisEnemy.speed / 2);
break;
case 6 :
thisEnemy._x = thisEnemy._x + thisEnemy.speed;
thisEnemy._y = thisEnemy._y - (thisEnemy.speed / 2);
}
}
keylistener = new Object();
keylistener.onKeyDown = function () {
if (Key.getCode() == 32) {
_root.spaceDown = true;
}
};
keylistener.onKeyUp = function () {
if (Key.getCode() == 32) {
_root.spaceDown = false;
}
};
Key.addListener(keylistener);
titleMusic = new Sound();
titleMusic.attachSound("titleSnd");
mapMusic = new Sound();
mapMusic.attachSound("mapSnd");
levelMusic = new Sound();
levelMusic.attachSound("levelSnd");
archerSnd = new Sound();
archerSnd.attachSound("archerSnd");
mageSnd = new Sound();
mageSnd.attachSound("mageSnd");
ninjaSnd = new Sound();
ninjaSnd.attachSound("ninjaSnd");
dragonSnd = new Sound();
dragonSnd.attachSound("dragonSnd");
swordSnd = new Sound();
swordSnd.attachSound("swordSnd");
warriorSnd = new Sound();
warriorSnd.attachSound("warriorSnd");
lightningSnd = new Sound();
lightningSnd.attachSound("lightningSnd3");
trapSnd = new Sound();
trapSnd.attachSound("trapSnd");
trapExplodeSnd = new Sound();
trapExplodeSnd.attachSound("trapExplodeSnd");
potionSnd = new Sound();
potionSnd.attachSound("potionSnd");
damageSnd = new Sound();
damageSnd.attachSound("damageSnd");
deathSnd = new Sound();
deathSnd.attachSound("deathSnd");
coinSnd = new Sound();
coinSnd.attachSound("coinSnd");
poisonSnd = new Sound();
poisonSnd.attachSound("poisonSnd");
levelupSnd = new Sound();
levelupSnd.attachSound("levelupSnd");
endLevelSnd = new Sound();
endLevelSnd.attachSound("endLevelSnd");
timeSnd = new Sound();
timeSnd.attachSound("timeSnd");
placeDefSnd = new Sound();
placeDefSnd.attachSound("placeDefSnd");
buttonSnd = new Sound();
buttonSnd.attachSound("buttonSnd");
shovelSnd = new Sound();
shovelSnd.attachSound("shovelSnd");
getItemSnd = new Sound();
getItemSnd.attachSound("getItemSnd");
foundItemSnd = new Sound();
foundItemSnd.attachSound("foundItemSnd");
var slotStartSnd = new Sound();
slotStartSnd.attachSound("slotStart");
var slotSpinningSnd = new Sound();
slotSpinningSnd.attachSound("slotSpinning");
var slotStoppingSnd = new Sound();
slotStoppingSnd.attachSound("slotStopping");
var slotWinSnd = new Sound();
slotWinSnd.attachSound("slotWin");
tileSize = 41;
scrollSpeed = 10;
_root.attachMovie("interfaceMC", "interfaceMC", 3, {_x:61, _y:223});
_root.attachMovie("levelMC", "levelMC", 4);
_root.interfaceMC._alpha = 0;
treasureCount = 0;
archerPrice = 100;
magePrice = 250;
ninjaPrice = 750;
knightPrice = 600;
warriorPrice = 1000;
dragonPrice = 1500;
poisonPrice = 40;
lightningPrice = 50;
trapPrice = 60;
freezePrice = 60;
manaPotions = 0;
defenderIcons = new Array();
defenderIcons = ["archer", "mage", "ninja", "knight", "warrior", "dragon"];
archerUnlocked = true;
mageUnlocked = true;
ninjaUnlocked = true;
knightUnlocked = false;
warriorUnlocked = false;
dragonUnlocked = false;
spellIcons = new Array();
spellIcons = ["poison", "lightning", "trap", "freeze"];
poisonUnlocked = true;
lightningUnlocked = false;
trapUnlocked = false;
freezeUnlocked = false;
selectedIcon = null;
levelMC._alpha = 0;
_root.score = 0;
_root.health = 100;
_root.enemiesRemaining = 0;
_root.enemyNum = 0;
_root.interfaceMC.manaMeter.manaMC._x = (_root.mana * 1.3) - 133;
_root.interfaceMC.healthMeter.healthMC._x = (100 - _root.health) * 1.3;
_root.display._x = 250;
_root.display._y = 100;
_root.level = 1;
_root.mana = 50;
_root.userGold = 500;
_root.continues = 4;
_root.selectedDefender = null;
_root.selectedMC = null;
_root.placingEnemy = false;
_root.digging = false;
_root.itemDig = false;
_root.timerOn = false;
_root.levelTime = 0;
_root.onEnterFrame = function () {
_root.interfaceMC.healthMeter.healthMC._x = ((100 - _root.health) * 1.3) * -1;
_root.interfaceMC.manaMeter.manaMC._x = (_root.mana * 1.3) - 130;
_root.interfaceMC.enemyMeter.enemyBar._x = ((100 - ((_root.enemiesRemaining / _root.enemyNum) * 100)) * 1.3) * -1;
};
_root.soundOn = true;
_root.attachMovie("titleMC", "titleMC", 11);
_root.titleMusic.start(0, 999);
stop();
Instance of Symbol 251 MovieClip in Frame 4
onClipEvent (mouseDown) {
if (_root.spaceDown == true) {
_root.display.startDrag();
Key.removeListener(_root.keylistener);
}
}
onClipEvent (mouseUp) {
_root.spaceDown = false;
_root.display.stopDrag();
Key.addListener(_root.keylistener);
}
Symbol 29 MovieClip [spellFreezeMC] Frame 75
gotoAndPlay (30);
Symbol 36 MovieClip [trapExplosionMC] Frame 1
play();
Symbol 36 MovieClip [trapExplosionMC] Frame 25
this.removeMovieClip();
Symbol 46 MovieClip [spellLightningMC] Frame 30
this.removeMovieClip();
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
stop();
Symbol 72 MovieClip Frame 3
stop();
Symbol 72 MovieClip Frame 4
stop();
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 2
play();
Symbol 78 MovieClip Frame 17
gotoAndPlay (2);
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
play();
Symbol 96 MovieClip Frame 20
gotoAndPlay (2);
Symbol 97 MovieClip [slotsMC] Frame 1
function createSlots() {
if (moneyAfter != null) {
_root.userGold = moneyAfter;
delete _root.onEnterFrame;
}
if (_root.soundOn == true) {
_root.slotWinSnd.stop();
_root.slotStartSnd.start(0, 1);
}
slots.slotGlow.gotoAndStop(1);
slotWinMC.gotoAndStop(1);
slotWinMC._visible = false;
slot1Num = null;
slot2Num = null;
slot3Num = null;
_root.treasureCount--;
creditTxt.text = _root.treasureCount;
spinButt.gotoAndStop(1);
spinButt.enabled = false;
spinButt._alpha = 20;
slots.blank.createEmptyMovieClip("display", 1);
slots.blank.display._visible = false;
slots.blank.display._y = -90;
col0 = [1, 2, 3, 4];
col1 = [1, 2, 3, 4];
col2 = [1, 2, 3, 4];
spinning = true;
stopNow = false;
stopNum = 0;
slotDepth = 1;
num = 4;
makeSpinners(0);
setTimeout(makeSpinners, 400, 1);
setTimeout(makeSpinners, 800, 2);
}
function makeSpinners(column) {
if (column == 2) {
slots.blank.display._visible = true;
setTimeout(stopSlots, 2000);
if (_root.soundOn == true) {
_root.slotSpinningSnd.start(0, 2);
}
slots.slotDefault._visible = false;
}
myArr = new Array();
myArr = [1, 2, 3, 4];
i = 0;
while (i < num) {
randSlot = Math.floor(Math.random() * myArr.length);
var _local3 = slots.blank.display.attachMovie(myArr[randSlot], (("slot" + column) + "_") + i, slotDepth, {_x:(column * 175) + 5, _y:200 * i});
slotDepth++;
_local3.rowNum = i;
_local3.slotNum = myArr[randSlot];
_local3.speed = 150;
_local3.blurNum = 0;
_local3.blurSpeed = 50;
_local3.column = column;
myArr.splice(randSlot, 1);
_local3.onEnterFrame = function () {
this._y = this._y + this.speed;
this.blurNum = this.blurSpeed;
var _local4 = new flash.filters.BlurFilter(1, this.blurNum, 4);
var _local3 = [_local4];
this.filters = _local3;
if (this._y >= 600) {
if (stopSpin == true) {
if (column == 0) {
if (_root.soundOn == true) {
_root.slotStoppingSnd.start(0, 1);
}
getSlotNum(this);
stopSpinning(column);
}
if ((column == 1) && (stopNum == 1)) {
stopCount++;
if (stopCount == 20) {
if (_root.soundOn == true) {
_root.slotStoppingSnd.start(0, 1);
}
getSlotNum(this);
stopSpinning(column);
}
}
if ((column == 2) && (stopNum == 2)) {
stopCount++;
stopNow = true;
if (stopCount == 20) {
getSlotNum(this);
stopSpinning(column);
spinning = false;
stopSpin = false;
if (_root.soundOn == true) {
_root.slotSpinningSnd.stop();
_root.slotStoppingSnd.start(0, 1);
}
checkSlotWin();
resetSlots();
}
}
}
this._y = 0;
this.blurNum = 0;
}
};
i++;
}
}
function stopSpinning(col) {
c = 0;
while (c < 5) {
var _local2 = new flash.filters.BlurFilter(0, 0, 4);
var _local1 = [_local2];
slots.blank.display[(("slot" + col) + "_") + c].filters = _local1;
delete slots.blank.display[(("slot" + col) + "_") + c].onEnterFrame;
c++;
}
stopNum++;
stopCount = 0;
}
function getSlotNum(slot) {
if (slot.rowNum >= 3) {
this[("slot" + (slot.column + 1)) + "Num"] = slots.blank.display[("slot" + slot.column) + "_1"].slotNum;
} else {
this[("slot" + (slot.column + 1)) + "Num"] = slots.blank.display[(("slot" + slot.column) + "_") + (slot.rowNum + 1)].slotNum;
}
}
function checkSlotWin() {
if ((slot1Num == slot2Num) && (slot2Num == slot3Num)) {
slotWinFunc();
}
}
function slotWinFunc() {
slotWin = getWinAmt(slot1Num);
slotWinMC._visible = true;
if (_root.soundOn == true) {
_root.slotWinSnd.start(0, 1000);
}
slotWinMC.gotoAndPlay(2);
slotWinMC.slotWinGFX.slotWinTxt.text = "WON $" + slotWin;
moneyAfter = _root.userGold + slotWin;
slots.slotGlow.gotoAndPlay(2);
this.onEnterFrame = function () {
if (_root.userGold < moneyAfter) {
_root.userGold++;
} else {
_root.slotWinSnd.stop();
slots.slotGlow.gotoAndStop(1);
slotWinMC.gotoAndStop(1);
slotWinMC._visible = false;
moneyAfter = null;
delete this.onEnterFrame;
}
};
}
function getWinAmt(num) {
switch (num) {
case 1 :
return(500);
case 2 :
return(300);
case 3 :
return(100);
case 4 :
return(250);
}
}
function stopSlots() {
stopSpin = true;
}
function resetSlots() {
if (_root.treasureCount > 0) {
spinButt.gotoAndStop(1);
spinButt.enabled = true;
spinButt._alpha = 100;
} else {
spinButt.gotoAndStop(3);
spinButt.enabled = true;
spinButt._alpha = 100;
}
}
moneyAfter = null;
spinning = false;
slotWinTxt._visible = false;
slots.slotDefault._visible = true;
creditTxt.text = _root.treasureCount;
if (_root.treasureCount > 0) {
spinButt.gotoAndStop(1);
} else {
spinButt.gotoAndStop(3);
}
Instance of Symbol 61 MovieClip in Symbol 97 MovieClip [slotsMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Instance of Symbol 72 MovieClip "spinButt" in Symbol 97 MovieClip [slotsMC] Frame 1
on (rollOver) {
if (_root.treasureCount > 0) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(4);
}
}
on (rollOut) {
if (_root.treasureCount > 0) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(3);
}
}
on (release) {
if (_root.treasureCount > 0) {
if (_parent.spinning == false) {
_parent.slots.blank.display.removeMovieClip();
_parent.createSlots();
}
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
_root.slotsMC.removeMovieClip();
}
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 112 MovieClip [tileOutline] Frame 1
stop();
Symbol 112 MovieClip [tileOutline] Frame 2
stop();
Symbol 112 MovieClip [tileOutline] Frame 3
stop();
Symbol 112 MovieClip [tileOutline] Frame 4
stop();
Symbol 112 MovieClip [tileOutline] Frame 5
stop();
Symbol 112 MovieClip [tileOutline] Frame 6
stop();
Symbol 112 MovieClip [tileOutline] Frame 7
stop();
Symbol 112 MovieClip [tileOutline] Frame 8
stop();
Symbol 152 MovieClip [RainDropEffectAS2] Frame 1
#initclip 8
Object.registerClass("RainDropEffectAS2", net.flashfilter.effects.E01_raindrop);
#endinitclip
news = "To purchase this effect visit http://www.flash-filter.net";
Symbol 164 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 2
play();
Instance of Symbol 163 MovieClip in Symbol 164 MovieClip Frame 2
/* no clip actions */
Symbol 164 MovieClip Frame 15
stop();
Symbol 183 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.bubblebox.com/", "_blank");
};
Symbol 1607 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1608 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1609 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1610 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 144 MovieClip [__Packages.net.flashfilter.effects.SuperEffect] Frame 0
!!!ERROR
Symbol 145 MovieClip [__Packages.net.flashfilter.effects.E01_raindrop] Frame 0
!!!ERROR
Symbol 153 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
!!!ERROR
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
play();
Symbol 205 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 2
play();
Symbol 210 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
play();
Symbol 224 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 2
play();
Symbol 229 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 2
play();
Symbol 234 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
play();
Symbol 240 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 2
stop();
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 2
play();
Symbol 260 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 2
play();
Symbol 260 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
play();
Symbol 269 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 2
play();
Symbol 278 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 2
stop();
Symbol 279 MovieClip Frame 3
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 2
play();
Symbol 288 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
play();
Symbol 297 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
play();
Symbol 306 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
stop();
Symbol 307 MovieClip Frame 3
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 2
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 2
play();
Symbol 318 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 2
play();
Symbol 327 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 2
play();
Symbol 336 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 2
stop();
Symbol 337 MovieClip Frame 3
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
play();
Symbol 346 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 2
play();
Symbol 355 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 364 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 2
play();
Symbol 364 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 2
stop();
Symbol 365 MovieClip Frame 3
stop();
Symbol 366 MovieClip Frame 1
stop();
Symbol 366 MovieClip Frame 2
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 2
play();
Symbol 375 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 2
play();
Symbol 384 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 393 MovieClip Frame 1
stop();
Symbol 393 MovieClip Frame 2
play();
Symbol 393 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 2
stop();
Symbol 394 MovieClip Frame 3
stop();
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 2
play();
Symbol 403 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
play();
Symbol 412 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 2
play();
Symbol 421 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 2
stop();
Symbol 422 MovieClip Frame 3
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 2
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 2
play();
Symbol 434 MovieClip Frame 16
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 2
play();
Symbol 445 MovieClip Frame 16
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 456 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 2
play();
Symbol 456 MovieClip Frame 16
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 457 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 2
stop();
Symbol 457 MovieClip Frame 3
stop();
Symbol 468 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 2
play();
Symbol 468 MovieClip Frame 16
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 2
play();
Symbol 479 MovieClip Frame 16
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 490 MovieClip Frame 1
stop();
Symbol 490 MovieClip Frame 2
play();
Symbol 490 MovieClip Frame 13
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 491 MovieClip Frame 1
stop();
Symbol 491 MovieClip Frame 2
stop();
Symbol 491 MovieClip Frame 3
stop();
Symbol 492 MovieClip Frame 1
stop();
Symbol 492 MovieClip Frame 2
stop();
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 2
play();
Symbol 500 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 2
play();
Symbol 507 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 514 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 2
play();
Symbol 514 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 515 MovieClip Frame 1
stop();
Symbol 515 MovieClip Frame 2
stop();
Symbol 515 MovieClip Frame 3
stop();
Symbol 522 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 2
play();
Symbol 522 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 529 MovieClip Frame 1
stop();
Symbol 529 MovieClip Frame 2
play();
Symbol 529 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 536 MovieClip Frame 1
stop();
Symbol 536 MovieClip Frame 2
play();
Symbol 536 MovieClip Frame 40
if (this._parent._parent._parent.attacking == true) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 537 MovieClip Frame 1
stop();
Symbol 537 MovieClip Frame 2
stop();
Symbol 537 MovieClip Frame 3
stop();
Symbol 538 MovieClip Frame 1
stop();
Symbol 538 MovieClip Frame 2
stop();
Symbol 539 MovieClip [defenders] Frame 1
stop();
Symbol 539 MovieClip [defenders] Frame 2
stop();
Symbol 539 MovieClip [defenders] Frame 3
stop();
Symbol 539 MovieClip [defenders] Frame 4
stop();
Symbol 539 MovieClip [defenders] Frame 5
stop();
Symbol 539 MovieClip [defenders] Frame 6
stop();
Symbol 556 MovieClip Frame 40
gotoAndPlay (2);
Symbol 568 MovieClip [magicShot] Frame 1
stop();
Symbol 568 MovieClip [magicShot] Frame 2
stop();
Symbol 568 MovieClip [magicShot] Frame 3
stop();
Symbol 568 MovieClip [magicShot] Frame 4
stop();
Symbol 600 MovieClip Frame 1
stop();
Symbol 600 MovieClip Frame 10
stop();
Symbol 601 MovieClip Frame 1
this.link.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=splash", "_blank");
};
Symbol 601 MovieClip Frame 147
_parent.gotoAndPlay(2);
Symbol 605 MovieClip Frame 1
function drop2() {
rainFilter.createDrop(160, 50);
}
function drop3() {
rainFilter.createDrop(460, 50);
}
var rainFilter = this.attachMovie("RainDropEffectAS2", "RainDropEffectAS2", 1);
rainFilter.init(myLogo, 4, 1.5, true, false);
rainFilter.createDrop(320, 130);
setTimeout(drop2, 800);
setTimeout(drop3, 1400);
Instance of Symbol 152 MovieClip [RainDropEffectAS2] in Symbol 605 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
_dropInterval = 0;
_mouseSensetive = true;
_refreshEveryFrame = false;
_waveHeight = 9;
}
Symbol 607 MovieClip Frame 1
stop();
Symbol 607 MovieClip Frame 2
play();
Instance of Symbol 602 MovieClip in Symbol 607 MovieClip Frame 2
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Symbol 607 MovieClip Frame 184
_root.nextFrame();
Symbol 642 MovieClip Frame 1
stop();
Symbol 642 MovieClip Frame 2
stop();
Symbol 661 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 2
stop();
Symbol 680 MovieClip Frame 1
stop();
Symbol 680 MovieClip Frame 2
stop();
Symbol 708 MovieClip Frame 1
stop();
Symbol 708 MovieClip Frame 2
stop();
Symbol 728 MovieClip Frame 1
stop();
Symbol 728 MovieClip Frame 2
stop();
Symbol 748 MovieClip Frame 1
stop();
Symbol 748 MovieClip Frame 2
stop();
Symbol 771 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 2
stop();
Symbol 791 MovieClip Frame 1
stop();
Symbol 791 MovieClip Frame 2
stop();
Symbol 811 MovieClip Frame 1
stop();
Symbol 811 MovieClip Frame 2
stop();
Symbol 813 MovieClip Frame 1
stop();
Symbol 813 MovieClip Frame 2
stop();
Symbol 815 MovieClip Frame 1
stop();
Symbol 815 MovieClip Frame 2
stop();
Symbol 817 MovieClip Frame 1
stop();
Symbol 817 MovieClip Frame 2
stop();
Symbol 837 MovieClip Frame 1
stop();
Symbol 837 MovieClip Frame 2
stop();
Symbol 857 MovieClip Frame 1
stop();
Symbol 857 MovieClip Frame 2
stop();
Symbol 877 MovieClip Frame 1
stop();
Symbol 877 MovieClip Frame 2
stop();
Symbol 897 MovieClip Frame 1
stop();
Symbol 897 MovieClip Frame 2
stop();
Symbol 917 MovieClip Frame 1
stop();
Symbol 917 MovieClip Frame 2
stop();
Symbol 937 MovieClip Frame 1
stop();
Symbol 937 MovieClip Frame 2
stop();
Symbol 953 MovieClip Frame 1
stop();
Symbol 953 MovieClip Frame 2
stop();
Symbol 969 MovieClip Frame 1
stop();
Symbol 969 MovieClip Frame 2
stop();
Symbol 985 MovieClip Frame 1
stop();
Symbol 985 MovieClip Frame 2
stop();
Symbol 1005 MovieClip Frame 1
stop();
Symbol 1005 MovieClip Frame 2
stop();
Symbol 1025 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 2
stop();
Symbol 1045 MovieClip Frame 1
stop();
Symbol 1045 MovieClip Frame 2
stop();
Symbol 1061 MovieClip Frame 1
stop();
Symbol 1061 MovieClip Frame 2
stop();
Symbol 1077 MovieClip Frame 1
stop();
Symbol 1077 MovieClip Frame 2
stop();
Symbol 1093 MovieClip Frame 1
stop();
Symbol 1093 MovieClip Frame 2
stop();
Symbol 1095 MovieClip [enemies] Frame 1
stop();
Symbol 1095 MovieClip [enemies] Frame 2
stop();
Symbol 1095 MovieClip [enemies] Frame 3
stop();
Symbol 1095 MovieClip [enemies] Frame 4
stop();
Symbol 1095 MovieClip [enemies] Frame 5
stop();
Symbol 1095 MovieClip [enemies] Frame 6
stop();
Symbol 1095 MovieClip [enemies] Frame 7
stop();
Symbol 1095 MovieClip [enemies] Frame 8
stop();
Symbol 1095 MovieClip [enemies] Frame 9
stop();
Symbol 1095 MovieClip [enemies] Frame 10
stop();
Symbol 1095 MovieClip [enemies] Frame 11
stop();
Symbol 1095 MovieClip [enemies] Frame 12
stop();
Symbol 1095 MovieClip [enemies] Frame 13
stop();
Symbol 1095 MovieClip [enemies] Frame 14
stop();
Symbol 1095 MovieClip [enemies] Frame 15
stop();
Symbol 1095 MovieClip [enemies] Frame 16
stop();
Symbol 1095 MovieClip [enemies] Frame 17
stop();
Symbol 1095 MovieClip [enemies] Frame 18
stop();
Symbol 1095 MovieClip [enemies] Frame 19
stop();
Symbol 1095 MovieClip [enemies] Frame 20
stop();
Symbol 1095 MovieClip [enemies] Frame 21
stop();
Symbol 1095 MovieClip [enemies] Frame 22
stop();
Symbol 1095 MovieClip [enemies] Frame 23
stop();
Symbol 1095 MovieClip [enemies] Frame 24
stop();
Symbol 1095 MovieClip [enemies] Frame 25
stop();
Symbol 1095 MovieClip [enemies] Frame 26
stop();
Symbol 1095 MovieClip [enemies] Frame 27
stop();
Symbol 1095 MovieClip [enemies] Frame 28
stop();
Symbol 1095 MovieClip [enemies] Frame 29
stop();
Symbol 1095 MovieClip [enemies] Frame 30
stop();
Symbol 1095 MovieClip [enemies] Frame 31
stop();
Symbol 1095 MovieClip [enemies] Frame 32
stop();
Symbol 1095 MovieClip [enemies] Frame 33
stop();
Symbol 1096 MovieClip Frame 1
stop();
Symbol 1096 MovieClip Frame 2
stop();
Symbol 1174 MovieClip Frame 1
stop();
Symbol 1174 MovieClip Frame 2
stop();
Symbol 1174 MovieClip Frame 3
stop();
Symbol 1174 MovieClip Frame 4
stop();
Symbol 1174 MovieClip Frame 5
stop();
Symbol 1174 MovieClip Frame 6
stop();
Symbol 1174 MovieClip Frame 7
stop();
Symbol 1179 MovieClip [countdownBox] Frame 1
beginButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
beginButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
beginButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.displayTime = 1;
_root.interfaceMC.countdownBox.removeMovieClip();
};
Symbol 1189 MovieClip [flattenBox] Frame 1
if (_root.userGold < 50) {
buttYes._alpha = 30;
}
buttNo.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
buttNo.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
buttNo.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.display.flattenBox.removeMovieClip();
};
buttYes.onRollOver = function () {
if (_root.userGold >= 50) {
this.useHandCursor = true;
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 0, 60, 10, false);
} else {
this.useHandCursor = false;
}
};
buttYes.onRollOut = function () {
if (_root.userGold >= 50) {
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
};
buttYes.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.userGold >= 50) {
_root.destroyTile(_root.display.flattenBox.tile);
_root.display.flattenBox.removeMovieClip();
}
};
Symbol 1204 Button
on (release) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
gotoAndStop (2);
}
Symbol 1209 Button
on (release) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
gotoAndStop (3);
}
Symbol 1246 MovieClip Frame 1
iconArr = new Array();
iconArr = [["archer", "archer1"], ["mage", "mage1"], ["ninja", "ninja1"], ["knight", "knight1"], ["warrior", "warrior1"], ["dragon", "dragon"]];
i = 0;
while (i < iconArr.length) {
this.icons[iconArr[i][0] + "Icon"].name = iconArr[i][1];
this.icons[iconArr[i][0] + "Icon"].price = _root[iconArr[i][0] + "Price"];
this.icons[iconArr[i][0] + "PriceTxt"].text = this.icons[iconArr[i][0] + "Icon"].price + " G";
this.icons[iconArr[i][0] + "Icon"].unlocked = _root[iconArr[i][0] + "Unlocked"];
this.icons[iconArr[i][0] + "Icon"].onRollOver = function () {
if (this.unlocked == true) {
if (_root.userGold >= this.price) {
this.useHandCursor = true;
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 0, 60, 10, false);
}
} else {
this.useHandCursor = false;
}
} else {
this.useHandCursor = false;
}
};
this.icons[iconArr[i][0] + "Icon"].onRollOut = function () {
if (this.unlocked == true) {
if (_root.userGold >= this.price) {
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
}
}
};
this.icons[iconArr[i][0] + "Icon"].onRelease = function () {
if (this.unlocked == true) {
if (_root.userGold >= this.price) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.interfaceMC.statsBox.removeMovieClip();
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.selectedDefender = null;
_root.magicPoison = false;
if ((_root.selectedIcon != null) && (_root.selectedMC != this.name)) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
}
if (_root.selectedMC == null) {
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 60, 0, 5, true);
_root.selectedIcon = this;
_root.selectedMC = this.name;
var _local3 = _root.display.tileOutline.blank.attachMovie("defenders", "outlineMC", 1);
_local3.gotoAndStop(this.name);
trace(this.name);
_local3._width = _local3._width * 1.4;
_local3._height = _local3._height * 1.4;
_local3._alpha = 50;
} else {
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
this.fluxTint(colObj, 0, 0, 10, false);
}
}
}
};
i++;
}
defPage = 1;
arrowLeft.enabled = false;
arrowLeft._alpha = 30;
arrowLeft.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
arrowLeft.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
arrowLeft.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
if (defPage > 0) {
icons._x = icons._x + 60;
defPage--;
}
if (defPage == 1) {
this._alpha = 30;
this.enabled = false;
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
if (defPage < 4) {
var _local3 = {r:255, g:50, b:0};
arrowRight._alpha = 100;
arrowRight.fluxTint(_local3, 60, 0, 10, true, 0);
arrowRight.enabled = true;
}
}
};
arrowRight.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
arrowRight.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
arrowRight.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
if (defPage <= 3) {
icons._x = icons._x - 60;
defPage++;
}
if (defPage == 3) {
this._alpha = 30;
this.enabled = false;
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
if (defPage > 1) {
var _local3 = {r:255, g:50, b:0};
arrowLeft._alpha = 100;
arrowLeft.fluxTint(_local3, 60, 0, 10, true, 0);
arrowLeft.enabled = true;
}
}
};
stop();
Symbol 1248 MovieClip Frame 1
stop();
Symbol 1248 MovieClip Frame 2
stop();
Symbol 1251 Button
on (release) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
gotoAndStop (1);
}
Symbol 1288 MovieClip Frame 1
iconArr = new Array();
iconArr = ["poison", "lightning", "trap", "freeze"];
i = 0;
while (i < iconArr.length) {
poisonPrice.text = poisonIcon.price + " M";
this.icons[iconArr[i] + "Icon"].name = iconArr[i];
this.icons[iconArr[i] + "Icon"].price = _root[iconArr[i] + "Price"];
this.icons[iconArr[i] + "PriceTxt"].text = this.icons[iconArr[i] + "Icon"].price + " M";
this.icons[iconArr[i] + "Icon"].unlocked = _root[iconArr[i] + "Unlocked"];
this.icons[iconArr[i] + "Icon"].onRollOver = function () {
if (this.unlocked == true) {
if (_root.mana >= this.price) {
this.useHandCursor = true;
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 0, 60, 10, false);
}
} else {
this.useHandCursor = false;
}
} else {
this.useHandCursor = false;
}
};
this.icons[iconArr[i] + "Icon"].onRollOut = function () {
if (this.unlocked == true) {
if (_root.mana >= this.price) {
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
}
}
};
this.icons[iconArr[i] + "Icon"].onRelease = function () {
if (this.unlocked == true) {
_root.magicTrap = false;
if (_root.mana >= this.price) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.interfaceMC.statsBox.removeMovieClip();
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.selectedDefender = null;
if ((_root.selectedIcon != null) && (_root.selectedMC != this.name)) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
}
if (_root.selectedMC == null) {
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 60, 0, 5, true);
if (this.name == "poison") {
_root.magicPoison = true;
} else if (this.name == "lightning") {
_root.magicLightning = true;
} else if (this.name == "trap") {
_root.magicTrap = true;
} else if (this.name == "freeze") {
_root.magicFreeze = true;
}
_root.selectedIcon = this;
_root.selectedMC = this.name;
} else {
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
this.fluxTint(colObj, 0, 0, 10, false);
}
}
}
};
i++;
}
arrowLeft.enabled = false;
arrowLeft._alpha = 30;
arrowRight.enabled = false;
arrowRight._alpha = 30;
stop();
Symbol 1289 Button
on (release) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
gotoAndStop (1);
}
Symbol 1318 MovieClip Frame 1
if (_root.timerOn != true) {
icons.digIcon.iconGraphic._alpha = 30;
icons.digIcon.enabled = false;
} else {
icons.digIcon.iconGraphic._alpha = 100;
icons.digIcon.enabled = true;
}
icons.digIcon.onRollOver = function () {
if (_root.timerOn == true) {
if (_root.digging != true) {
this.useHandCursor = true;
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 0, 60, 10, false);
}
} else {
this.useHandCursor = false;
}
}
};
icons.digIcon.onRollOut = function () {
if (_root.timerOn == true) {
if (_root.digging != true) {
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
}
}
};
icons.digIcon.name = "dig";
icons.digIcon.onRelease = function () {
if (_root.timerOn == true) {
if (_root.digging != true) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.interfaceMC.statsBox.removeMovieClip();
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.selectedDefender = null;
if ((_root.selectedIcon != null) && (_root.selectedMC != this.name)) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
}
if (_root.selectedMC == null) {
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 60, 0, 5, true);
_root.itemDig = true;
_root.selectedIcon = this;
_root.selectedMC = "dig";
} else {
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
this.fluxTint(colObj, 0, 0, 10, false);
}
}
}
};
icons.manaPriceTxt.text = "x " + _root.manaPotions;
icons.manaIcon.onRollOver = function () {
if (_root.manaPotions > 0) {
this.useHandCursor = true;
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 0, 60, 10, false);
}
} else {
this.useHandCursor = false;
}
};
icons.manaIcon.onRollOut = function () {
if (_root.manaPotions > 0) {
if (_root.selectedIcon != this) {
var _local3 = {r:255, g:255, b:255};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
}
};
icons.manaIcon.onRelease = function () {
if (_root.manaPotions > 0) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.interfaceMC.statsBox.removeMovieClip();
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.selectedDefender = null;
if ((_root.selectedIcon != null) && (_root.selectedMC != this.name)) {
_root.selectedIcon.fluxTint(colObj, 0, 0, 10, false);
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
}
if (_root.selectedMC == null) {
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 60, 0, 5, true);
_root.useManaPotion();
} else {
r = 0;
while (r < _root.radArray.length) {
_root.radArray[r].towerRadius._visible = false;
r++;
}
_root.selectedMC = null;
_root.selectedIcon = null;
_root.magicPoison = false;
_root.magicLightning = false;
_root.magicTrap = false;
_root.magicFreeze = false;
_root.itemDig = false;
_root.display.tileOutline.blank.outlineMC.removeMovieClip();
_root.display.tileOutline._visible = false;
this.fluxTint(colObj, 0, 0, 10, false);
}
}
};
arrowLeft.enabled = false;
arrowLeft._alpha = 30;
arrowRight.enabled = false;
arrowRight._alpha = 30;
stop();
Symbol 1319 MovieClip [interfaceMC] Frame 1
stop();
keylistener = new Object();
keylistener.onKeyDown = function () {
if (Key.getCode() == 39) {
_root.display._x = _root.display._x - _root.scrollSpeed;
}
if (Key.getCode() == 37) {
_root.display._x = _root.display._x + _root.scrollSpeed;
}
if (Key.getCode() == 38) {
_root.display._y = _root.display._y + _root.scrollSpeed;
}
if (Key.getCode() == 40) {
_root.display._y = _root.display._y - _root.scrollSpeed;
}
};
Key.addListener(keylistener);
pauseButt.onRollOver = function () {
if (_root.enemyCount <= 0) {
this.useHandCursor = false;
} else {
this.useHandCursor = true;
if (_root.timerOn != false) {
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 0, 60, 10, false);
}
}
};
pauseButt.onRollOut = function () {
if (_root.enemyCount <= 0) {
this.useHandCursor = false;
} else {
this.useHandCursor = true;
if (_root.timerOn != false) {
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
}
};
pauseButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.enemyCount <= 0) {
this.useHandCursor = false;
} else if (_root.timerOn == true) {
clearInterval(_root.timerInt);
_root.timerOn = false;
_root.pauseGame();
_root.attachMovie("menuMC", "menuMC", 10);
} else if (_root.timerOn == false) {
_root.timerInt = setInterval(_root.increaseTime, 1000);
_root.timerOn = true;
_root.unpauseGame();
}
};
menuButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
menuButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
menuButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.enemyCount <= 0) {
clearInterval(_root.waveInt);
} else {
clearInterval(_root.timerInt);
_root.timerOn = false;
}
_root.pauseGame();
_root.attachMovie("menuMC", "menuMC", 10);
_root.menuMC.gotoAndStop(2);
};
_root.defenderIconStatus();
if (_root.digging == true) {
_root.disableInterface(true);
}
if (_root.knightUnlocked == true) {
defenders.icons.knightIcon.iconLock._visible = false;
}
if (_root.warriorUnlocked == true) {
defenders.icons.warriorIcon.iconLock._visible = false;
}
if (_root.dragonUnlocked == true) {
defenders.icons.dragonIcon.iconLock._visible = false;
}
Instance of Symbol 1248 MovieClip "iconCover" in Symbol 1319 MovieClip [interfaceMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 1319 MovieClip [interfaceMC] Frame 2
_root.defenderIconStatus();
if (_root.digging == true) {
_root.disableInterface(true);
}
if (_root.lightningUnlocked == true) {
spells.icons.lightningIcon.iconLock._visible = false;
}
if (_root.trapUnlocked == true) {
spells.icons.trapIcon.iconLock._visible = false;
}
if (_root.freezeUnlocked == true) {
spells.icons.freezeIcon.iconLock._visible = false;
}
Symbol 1319 MovieClip [interfaceMC] Frame 3
_root.defenderIconStatus();
if (_root.digging == true) {
_root.disableInterface(true);
}
Symbol 1330 MovieClip [levelMC] Frame 1
stop();
Symbol 1343 MovieClip [statsBox] Frame 1
closeButton.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.selectedDefender.fluxTint(colObj, 0, 0, 3, true, 0);
_root.selectedDefender.viewStats = false;
r = 0;
while (r < _root.selectedDefender.zoneArray.length) {
_root.selectedDefender.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.selectedDefender = null;
_root.interfaceMC.statsBox.removeMovieClip();
};
rotateButton.onRollOver = function () {
if (_root.selectedDefender.disableRotate != true) {
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 0, 60, 10, false);
}
};
rotateButton.onRollOut = function () {
if (_root.selectedDefender.disableRotate != true) {
var _local3 = {r:255, g:50, b:0};
this.fluxTint(_local3, 60, 0, 10, true, 0);
}
};
rotateButton.onRelease = function () {
if (_root.selectedDefender.disableRotate != true) {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.selectedDefender._alpha = 100;
_root.selectedDefender.placed = false;
_root.selectedDefender.onMouseMove = function () {
adjside = this._xmouse - this.origin._x;
oppside = -1 * (this._ymouse - this.origin._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
if (angle > 0) {
this.defenderMC.gotoAndStop(2);
if (angle < 90) {
this.dir = 1;
this.axis = "x";
this.dirFront = 0;
this.defenderMC._xscale = -100;
} else {
this.dir = 2;
this.axis = "y";
this.dirFront = 0;
this.defenderMC._xscale = 100;
}
} else {
this.defenderMC.gotoAndStop(1);
if (angle < -90) {
this.dir = 3;
this.axis = "x";
this.dirFront = 1;
this.defenderMC._xscale = -100;
} else {
this.dir = 4;
this.axis = "y";
this.dirFront = 1;
this.defenderMC._xscale = 100;
}
}
if (this.dir != prevDir) {
_root.prevDir = this.dir;
_root.getZone(this, this.axis, this.dirFront);
_root.getMinMax(this, this.axis, this.dirFront);
}
this.defenderMC.defenderGraphic.gotoAndStop(this.level);
};
_root.selectedDefender.onMouseUp = function () {
r = 0;
while (r < this.zoneArray.length) {
this.zoneArray[r].defenderRange._visible = false;
r++;
}
_root.placingEnemy = false;
_root.defenderArr[defenderArr.length] = this;
if (this.tileSize > 1) {
t = 0;
while (t < _root.tileGroupArr.length) {
_root.tileGroupArr[t].unusableTile = true;
t++;
}
} else {
_root.defenderTile.unusableTile = true;
}
_root.selectedIcon.fluxTint(colObj, 0, 0, 20, false);
_root.selectedIcon = null;
var colObj = {r:255, g:255, b:255};
this.fluxTint(colObj, 0, 70, 20, true, 1);
_root.display.tileOutline._visible = false;
_root.defenderIconStatus();
_root.selectedDefender.disableRotate = true;
_root.interfaceMC.statsBox.rotateButton._alpha = 50;
_root.interfaceMC.statsBox.rotateTxt._alpha = 50;
delete this.onMouseMove;
delete this.onMouseUp;
};
}
};
Instance of Symbol 251 MovieClip in Symbol 1343 MovieClip [statsBox] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 1352 MovieClip [coin] Frame 1
play();
Symbol 1352 MovieClip [coin] Frame 20
this.removeMovieClip();
Symbol 1355 MovieClip [levelInfo-MC] Frame 1
levelTxt.text = "Level " + _root.level;
Symbol 1358 MovieClip [miniTiles] Frame 1
stop();
Symbol 1358 MovieClip [miniTiles] Frame 2
stop();
Symbol 1358 MovieClip [miniTiles] Frame 3
stop();
Symbol 1361 MovieClip Frame 1
stop();
Symbol 1361 MovieClip Frame 2
play();
Symbol 1361 MovieClip Frame 11
stop();
Symbol 1364 MovieClip Frame 1
stop();
Symbol 1364 MovieClip Frame 2
stop();
Symbol 1365 MovieClip Frame 1
stop();
Symbol 1365 MovieClip Frame 2
play();
Symbol 1365 MovieClip Frame 24
gotoAndPlay (2);
Symbol 1372 MovieClip Frame 1
stop();
Symbol 1372 MovieClip Frame 2
var colObj = {r:255, g:255, b:255};
potionMC.fluxTint(colObj, 0, 90, 10, true);
stop();
Instance of Symbol 1368 MovieClip "potionMC" in Symbol 1372 MovieClip Frame 2
on (release) {
_root.addPotion();
_parent.gotoAndStop(1);
}
Symbol 1372 MovieClip Frame 3
var colObj = {r:255, g:255, b:255};
chestMC.fluxTint(colObj, 0, 90, 10, true);
stop();
Instance of Symbol 1371 MovieClip "chestMC" in Symbol 1372 MovieClip Frame 3
on (release) {
_root.addTreasure();
_parent.gotoAndStop(1);
}
Symbol 1472 MovieClip [tiles] Frame 1
stop();
Instance of Symbol 1487 MovieClip in Symbol 1492 MovieClip [titleMC] Frame 65
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Instance of Symbol 183 MovieClip in Symbol 1492 MovieClip [titleMC] Frame 79
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=preloader", "_blank");
}
Symbol 1492 MovieClip [titleMC] Frame 99
startButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
startButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
startButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.titleMC.fadeMC("fadeTitle", 10);
};
moreButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
moreButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
moreButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.crazymonkeygames.com/", "_blank");
};
viewButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
viewButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
viewButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=scores&action=viewscores", "_blank");
};
stop();
Instance of Symbol 183 MovieClip in Symbol 1492 MovieClip [titleMC] Frame 99
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=titlescreen", "_blank");
}
Symbol 1515 MovieClip [worldMap] Frame 1
var colObj = {r:219, g:25, b:25};
defendButt.fluxTint(colObj, 0, 70, 6, true);
defendButt.onRollOver = function () {
levInfo = _parent.attachMovie("levelInfo-MC", "levelInfo", 1000, {_x:_root._xmouse, _y:_root._ymouse - 20});
levInfo.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse - 20;
};
};
defendButt.onRollOut = function () {
_parent.levelInfo.removeMovieClip();
};
defendButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.worldMap.fadeMC("fadeMap", 10);
_parent.levelInfo.removeMovieClip();
};
stop();
stop();
Symbol 1515 MovieClip [worldMap] Frame 2
stop();
Symbol 1515 MovieClip [worldMap] Frame 3
stop();
Symbol 1515 MovieClip [worldMap] Frame 4
stop();
Symbol 1515 MovieClip [worldMap] Frame 5
stop();
Symbol 1515 MovieClip [worldMap] Frame 6
stop();
Symbol 1515 MovieClip [worldMap] Frame 7
stop();
Symbol 1515 MovieClip [worldMap] Frame 8
stop();
Symbol 1515 MovieClip [worldMap] Frame 9
stop();
Symbol 1515 MovieClip [worldMap] Frame 10
stop();
Symbol 1515 MovieClip [worldMap] Frame 11
stop();
Symbol 1515 MovieClip [worldMap] Frame 12
stop();
Symbol 1548 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1554 MovieClip Frame 1
stop();
Symbol 1557 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1560 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 1562 MovieClip Frame 1
stop();
this.bubbleboxGameID = 1120;
scoreMc = this;
sendBubbleBoxScore = function (gameID) {
userData = new LoadVars();
userData.name = _root.bubblebox_name;
userData.score = _root.score;
userData.game = bubbleboxGameID;
var _local2 = new LoadVars();
_local2.onLoad = function (success) {
if (success) {
scoreMc.gotoAndStop("success");
} else {
scoreMc.gotoAndStop("tryagain");
}
};
userData.sendAndLoad("http://www.bubblebox.com/scripts/insertscore.php", _local2, "POST");
};
this.send_btn.onRelease = function () {
if ((_root.bubblebox_name != "YOUR NAME") && (_root.bubblebox_name.length > 0)) {
sendBubbleBoxScore(this._parent.bubbleboxGameID);
this._parent.gotoAndStop("saving");
}
};
Selection.setFocus("instertname");
Symbol 1562 MovieClip Frame 2
stop();
Symbol 1562 MovieClip Frame 3
this.bubblebox_view_score.onRelease = function () {
getURL (("http://www.bubblebox.com/highscores/" + this._parent.bubbleboxGameID) + ".htm", "_blank");
};
Symbol 1562 MovieClip Frame 4
this.try_again.onRelease = function () {
this._parent.gotoAndStop(1);
};
Symbol 1599 MovieClip [menuMC] Frame 1
blackBG.onRollOver = function () {
this.useHandCursor = false;
};
pauseButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
pauseButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
pauseButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.timerOn == false) {
_root.timerInt = setInterval(_root.increaseTime, 1000);
_root.timerOn = true;
_root.unpauseGame();
var _local2 = {r:255, g:50, b:0};
_root.interfaceMC.pauseButt.fluxTint(_local2, 60, 0, 10, true, 0);
_root.menuMC.removeMovieClip();
}
};
stop();
Instance of Symbol 1154 MovieClip "blackBG" in Symbol 1599 MovieClip [menuMC] Frame 1
on (rollOver) {
this.useHandCursor = false;
}
Symbol 1599 MovieClip [menuMC] Frame 2
blackBG.onRollOver = function () {
this.useHandCursor = false;
};
resumeButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
resumeButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
resumeButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.enemyCount <= 0) {
_root.waveInt = setInterval(_root.countDown, 1000);
} else {
_root.timerInt = setInterval(_root.increaseTime, 1000);
_root.timerOn = true;
}
_root.unpauseGame();
var _local2 = {r:255, g:50, b:0};
_root.interfaceMC.pauseButt.fluxTint(_local2, 60, 0, 10, true, 0);
_root.menuMC.removeMovieClip();
};
helpButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
helpButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
helpButt.onRelease = function () {
_root.menuMC.gotoAndStop(4);
};
soundButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
soundButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
soundButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.soundOn == true) {
_root.soundOn = false;
_root.levelMusic.stop();
} else {
_root.soundOn = true;
_root.levelMusic.start(0, 999);
}
};
quitButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
quitButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
quitButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.quitGame();
};
stop();
Instance of Symbol 1154 MovieClip in Symbol 1599 MovieClip [menuMC] Frame 2
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Symbol 1599 MovieClip [menuMC] Frame 3
function fadeStat(statName) {
statName.fadeMC(false, 5);
}
complete1._alpha = 0;
setTimeout(fadeStat, 1200, complete1);
complete2._alpha = 0;
setTimeout(fadeStat, 1600, complete2);
complete3._alpha = 0;
setTimeout(fadeStat, 2000, complete3);
complete4._alpha = 0;
setTimeout(fadeStat, 2400, complete4);
complete5._alpha = 0;
setTimeout(fadeStat, 2800, complete5);
continueButt._alpha = 0;
setTimeout(fadeStat, 3200, continueButt);
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.level == 1) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (7);
} else if (_root.level == 2) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (8);
} else if (_root.level == 3) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (9);
} else if (_root.level == 5) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (10);
} else if (_root.level == 6) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (11);
} else if (_root.level == 7) {
if (_root.soundOn == true) {
_root.levelupSnd.start();
}
gotoAndStop (12);
} else if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 4
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.menuMC.gotoAndStop(16);
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 5
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.quitGame();
};
viewButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
viewButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
viewButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=scores&action=viewscores", "_blank");
};
moreButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
moreButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
moreButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=gameCompleted", "_blank");
};
stop();
Instance of Symbol 1487 MovieClip in Symbol 1599 MovieClip [menuMC] Frame 5
on (release) {
getURL ("http://www.likwidgames.com", "_blank");
}
Symbol 1599 MovieClip [menuMC] Frame 6
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.quitGame();
};
viewButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
viewButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
viewButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=scores&action=viewscores", "_blank");
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 7
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.lightningUnlocked = true;
_root.interfaceMC.spells.icons.lightningIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(1);
_root.interfaceMC.gotoAndStop(2);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 8
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.knightUnlocked = true;
_root.interfaceMC.defenders.icons.knightIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(2);
_root.interfaceMC.gotoAndStop(1);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 9
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.trapUnlocked = true;
_root.interfaceMC.spells.icons.trapIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(1);
_root.interfaceMC.gotoAndStop(2);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 10
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.warriorUnlocked = true;
_root.interfaceMC.defenders.icons.warriorIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(2);
_root.interfaceMC.gotoAndStop(1);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 11
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.freezeUnlocked = true;
_root.interfaceMC.spells.icons.freezeIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(1);
_root.interfaceMC.gotoAndStop(2);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 12
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.dragonUnlocked = true;
_root.interfaceMC.defenders.icons.dragonIcon.iconLock._visible = false;
_root.interfaceMC.gotoAndStop(2);
_root.interfaceMC.gotoAndStop(1);
_root.defenderIconStatus();
if (_root.treasureCount > 0) {
_root.attachMovie("slotsMC", "slotsMC", 400);
_root.slotsMC._alpha = 0;
_root.slotsMC.fadeMC(false, 10);
} else {
_root.level++;
_root.treasureCount = 0;
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
}
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 15
blackBG.onRollOver = function () {
this.useHandCursor = false;
};
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
_root.mana = _root.manaStart;
_root.userGold = _root.userGoldStart;
_root.health = _root.healthStart;
_root.levelTime = _root.levelTimeStart;
_root.score = _root.scoreStart;
_root.manaPotions = _root.potionsStart;
_root.loadMap(_root.level);
_root.menuMC.removeMovieClip();
};
moreButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
moreButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
moreButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1120&subid=continueScreen", "_blank");
};
stop();
Symbol 1599 MovieClip [menuMC] Frame 16
continueButt.onRollOver = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 0, 60, 10, false);
};
continueButt.onRollOut = function () {
var _local2 = {r:255, g:50, b:0};
this.fluxTint(_local2, 60, 0, 10, true, 0);
};
continueButt.onRelease = function () {
if (_root.soundOn == true) {
_root.buttonSnd.start();
}
if (_root.curWave == undefined) {
_root.showWorldMap(_root.level);
_root.menuMC.removeMovieClip();
} else {
_root.menuMC.gotoAndStop(2);
}
};
stop();