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);
}
mochi.MochiServices.connect("78d833300663b3a2");
__com_mochibot__("97c158bc", this, 10301, true);
MochiAd.showClickAwayAd({clip:clickAwayMC, id:"78d833300663b3a2"});
_global.counting = false;
_global.saved = new sharedData();
_global.link = "";
_global.sound = true;
_global.gameMap = 0;
_global.gameMode = 0;
_global.totalWaves = 0;
_global.enemiesKilled = 0;
_global.goldPieces = 0;
_global.totalLives = 0;
stop();
if ((_url.indexOf("gamestudio.ro") == -1) && (_url.indexOf("flashgamelicense.com") == -1)) {
}
Instance of Symbol 262 MovieClip [preloaderShape_mc] in Frame 1
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
percen101 = ("" + percent) + "%";
if (loaded == total) {
if (_currentframe <= 100) {
gotoAndPlay (101);
}
} else {
gotoAndStop(percent);
}
}
Frame 10
MochiAd.showPreGameAd({id:"78d833300663b3a2", res:"800x550", background:16777161, color:14318347, outline:13994812, no_bg:true, ad_finished:function () {
_root.gotoAndPlay("preMenu");
}});
Frame 23
_root.jukeBoxMC.playLoop("menu");
play();
Frame 24
stop();
_global.points = 0;
_global.lives = 20;
_global.money = 50;
Frame 31
function disableBts() {
bt1.enabled = false;
bt2.enabled = false;
bt3.enabled = false;
bt4.enabled = false;
bt5.enabled = false;
bt6.enabled = false;
stsBt.enabled = false;
qtBt.enabled = false;
}
function enableBts() {
bt1.enabled = true;
bt2.enabled = true;
bt3.enabled = true;
bt4.enabled = true;
bt5.enabled = true;
bt6.enabled = true;
stsBt.enabled = true;
qtBt.enabled = true;
}
_global.points = 0;
_global.lives = 20;
_global.money = 50;
lock2._visible = true;
lock3._visible = true;
lock4._visible = true;
lock5._visible = true;
lock6._visible = true;
bIcon1._visible = false;
bIcon2._visible = false;
bIcon3._visible = false;
bIcon4._visible = false;
bIcon5._visible = false;
bIcon6._visible = false;
if (_global.saved.locked[0] == 0) {
bIcon1._visible = true;
path1.gotoAndStop(2);
}
if (_global.saved.locked[1] == 0) {
bIcon2._visible = true;
path2.gotoAndStop(2);
}
if (_global.saved.locked[2] == 0) {
bIcon3._visible = true;
path3.gotoAndStop(2);
}
if (_global.saved.locked[3] == 0) {
bIcon4._visible = true;
path4.gotoAndStop(2);
}
if (_global.saved.locked[4] == 0) {
bIcon5._visible = true;
path5.gotoAndStop(2);
}
if (_global.saved.locked[5] == 0) {
bIcon6._visible = true;
}
lock2._visible = !bIcon1._visible;
lock3._visible = !bIcon2._visible;
lock4._visible = !bIcon3._visible;
lock5._visible = !bIcon4._visible;
lock6._visible = !bIcon5._visible;
if (_global.saved.bdg[0] > 0) {
campaignStatsMC.bdg1._alpha = 100;
campaignStatsMC.bdg1.gotoAndStop(2);
}
if (_global.saved.bdg[1] > 0) {
campaignStatsMC.bdg2._alpha = 100;
campaignStatsMC.bdg2.gotoAndStop(2);
}
if (_global.saved.bdg[2] > 0) {
campaignStatsMC.bdg3._alpha = 100;
campaignStatsMC.bdg3.gotoAndStop(2);
}
if (_global.saved.bdg[3] > 0) {
campaignStatsMC.bdg4._alpha = 100;
campaignStatsMC.bdg4.gotoAndStop(2);
}
if (_global.saved.bdg[4] > 0) {
campaignStatsMC.bdg5._alpha = 100;
campaignStatsMC.bdg5.gotoAndStop(2);
}
if (_global.saved.bdg[5] > 0) {
campaignStatsMC.bdg6._alpha = 100;
campaignStatsMC.bdg6.gotoAndStop(2);
}
if (_global.saved.bdg[6] > 0) {
campaignStatsMC.bdg7._alpha = 100;
campaignStatsMC.bdg7.gotoAndStop(2);
}
if (_global.saved.bdg[7] > 0) {
campaignStatsMC.bdg8._alpha = 100;
campaignStatsMC.bdg8.gotoAndStop(2);
}
if (_global.saved.bdg[8] > 0) {
campaignStatsMC.bdg9._alpha = 100;
campaignStatsMC.bdg9.gotoAndStop(2);
}
Frame 46
stop();
_root.menuLoop.stop();
trace("gameScreen");
var i = 0;
while (i < 6) {
trace(" - " + _global.saved.score[i]);
i++;
}
this.onEnterFrame = function () {
money = _global.money;
lives = _global.lives;
points = _global.points;
};
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
rainMC.onEnterFrame = function () {
rainMC.attachMovie("rainDrop", "rainDropMC", rainMC.getNextHighestDepth(), {_x:randRange(10, 690), _y:0});
};
snowMC.onEnterFrame = function () {
snowMC.attachMovie("snowFlake", "snowFlakeMC", snowMC.getNextHighestDepth(), {_x:randRange(10, 690), _y:0});
};
Frame 54
stop();
quitMap.enabled = false;
MochiAd.showClickAwayAd({clip:clickAwayMC, id:"78d833300663b3a2"});
_root.jukeBoxMC.playLoop("defeat");
sc = _global.points;
Frame 62
function getTotalScore() {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < 6) {
_local4[_local2] = _global.saved.score[_local2];
_local2++;
}
var _local5 = (((_global.totalWaves * 100) + (_global.enemiesKilled * 10)) + (_global.goldPieces * 5)) + (_global.totalLives * 250);
_local5 = _local5 * _global.gameMode;
if (_local4[_global.gameMap - 1] < _local5) {
_local4[_global.gameMap - 1] = _local5;
}
var _local3 = 0;
_local2 = 0;
while (_local2 < 6) {
_local3 = _local3 + _local4[_local2];
_local2++;
}
if (_global.saved.bdg[0] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[1] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[2] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[3] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[4] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[5] > 0) {
_local3 = _local3 + 50000;
}
if (_global.saved.bdg[6] > 0) {
_local3 = _local3 + 75000;
}
if (_global.saved.bdg[7] > 0) {
_local3 = _local3 + 100000;
}
if (_global.saved.bdg[8] > 0) {
_local3 = _local3 + 200000;
}
return(_local3);
}
function winGame1() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < 6) {
_local3[_local2] = _global.saved.score[_local2];
_local2++;
}
_local3[_global.gameMap - 1] = 1000;
var _local4 = true;
_local2 = 0;
while (_local2 < 6) {
if (_local3[_local2] <= 0) {
_local4 = false;
}
_local2++;
}
return(_local4);
}
function winGame2() {
if (_global.gameMode != 3) {
return(false);
}
var _local4 = new Array();
var _local3 = new Array();
var _local2 = 0;
while (_local2 < 6) {
_local4[_local2] = _global.saved.score[_local2];
_local3[_local2] = _global.saved.gameMode[_local2];
_local2++;
}
_local4[_global.gameMap - 1] = 1000;
_local3[_global.gameMap - 1] = "hard";
var _local5 = true;
_local2 = 0;
while (_local2 < 6) {
if ((_local4[_local2] < 0) || (_local3[_local2] != "hard")) {
_local5 = false;
}
_local2++;
}
return(_local5);
}
stop();
_global.counting = true;
_root.jukeBoxMC.playLoop("victory");
sc = _global.points;
trace("victoryScreen.....................................................................");
var i = 0;
while (i < 6) {
trace(" - " + _global.saved.score[i]);
i++;
}
if ((_global.gameMap == 1) && (_global.gameMode > 1)) {
_global.saved.setBadge(0);
}
if ((_global.gameMap == 2) && (_global.gameMode > 1)) {
_global.saved.setBadge(1);
}
if ((_global.gameMap == 3) && (_global.gameMode > 1)) {
_global.saved.setBadge(2);
}
if ((_global.gameMap == 4) && (_global.gameMode > 1)) {
_global.saved.setBadge(3);
}
if ((_global.gameMap == 5) && (_global.gameMode > 1)) {
_global.saved.setBadge(4);
}
if ((_global.gameMap == 6) && (_global.gameMode > 1)) {
_global.saved.setBadge(5);
}
if (winGame1()) {
_global.saved.setBadge(6);
}
if (getTotalScore() > 600000) {
_global.saved.setBadge(7);
}
if (winGame2()) {
_global.saved.setBadge(8);
}
if (_global.saved.bdg[0] > 0) {
bdg1.gotoAndStop(2);
}
if (_global.saved.bdg[1] > 0) {
bdg2.gotoAndStop(2);
}
if (_global.saved.bdg[2] > 0) {
bdg3.gotoAndStop(2);
}
if (_global.saved.bdg[3] > 0) {
bdg4.gotoAndStop(2);
}
if (_global.saved.bdg[4] > 0) {
bdg5.gotoAndStop(2);
}
if (_global.saved.bdg[5] > 0) {
bdg6.gotoAndStop(2);
}
if (_global.saved.bdg[6] > 0) {
bdg7.gotoAndStop(2);
}
if (_global.saved.bdg[7] > 0) {
bdg8.gotoAndStop(2);
}
if (_global.saved.bdg[8] > 0) {
bdg9.gotoAndStop(2);
}
MochiAd.showClickAwayAd({clip:clickAwayMC, id:"78d833300663b3a2"});
Instance of Symbol 882 MovieClip "bdg1" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 890 MovieClip "bdg2" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 898 MovieClip "bdg3" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 906 MovieClip "bdg4" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 914 MovieClip "bdg5" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 922 MovieClip "bdg6" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 930 MovieClip "bdg7" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 938 MovieClip "bdg8" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 946 MovieClip "bdg9" in Frame 62
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Frame 70
stop();
mochi.MochiScores.showLeaderboard({boardID:"c922e55980b990e6", score:_global.points, name:_global.playerName, onClose:function () {
_root.submitLoop.stop();
_global.link = "menu";
_root.faderMC.play();
}});
Frame 79
stop();
mochi.MochiScores.showLeaderboard({boardID:"c922e55980b990e6", onClose:function () {
_root.hsLoop.stop();
_global.link = "menu";
_root.faderMC.play();
}});
Symbol 37 MovieClip [snowFlake] Frame 95
stop();
this.removeMovieClip();
Symbol 41 MovieClip [rainDrop] Frame 20
stop();
this.removeMovieClip();
Symbol 77 MovieClip [battlegoreCreep] Frame 1
#initclip 26
Object.registerClass("battlegoreCreep", creepsMC);
#endinitclip
stop();
Symbol 77 MovieClip [battlegoreCreep] Frame 5
this._alpha = 80;
Symbol 77 MovieClip [battlegoreCreep] Frame 9
this._alpha = 60;
Symbol 77 MovieClip [battlegoreCreep] Frame 13
this._alpha = 40;
Symbol 77 MovieClip [battlegoreCreep] Frame 17
this._alpha = 20;
Symbol 77 MovieClip [battlegoreCreep] Frame 21
this._alpha = 1;
Symbol 77 MovieClip [battlegoreCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 77 MovieClip [battlegoreCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 131 MovieClip Frame 90
stop();
this._visible = false;
this.gotoAndStop(1);
_parent._parent.upgrading = false;
Symbol 132 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 36
stop();
_parent.gotoAndStop("die");
Symbol 206 MovieClip [tower6] Frame 1
#initclip 18
Object.registerClass("tower6", tower6);
#endinitclip
stop();
Symbol 206 MovieClip [tower6] Frame 5
stop();
Symbol 206 MovieClip [tower6] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 210 MovieClip [tower5] Frame 1
#initclip 19
Object.registerClass("tower5", tower5);
#endinitclip
stop();
Symbol 210 MovieClip [tower5] Frame 5
stop();
Symbol 210 MovieClip [tower5] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 214 MovieClip [tower4] Frame 1
#initclip 20
Object.registerClass("tower4", tower4);
#endinitclip
stop();
Symbol 214 MovieClip [tower4] Frame 5
stop();
Symbol 214 MovieClip [tower4] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 218 MovieClip [tower3] Frame 1
#initclip 21
Object.registerClass("tower3", tower3);
#endinitclip
stop();
Symbol 218 MovieClip [tower3] Frame 5
stop();
Symbol 218 MovieClip [tower3] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 222 MovieClip [tower2] Frame 1
#initclip 22
Object.registerClass("tower2", tower2);
#endinitclip
stop();
Symbol 222 MovieClip [tower2] Frame 5
stop();
Symbol 222 MovieClip [tower2] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 241 MovieClip Frame 19
stop();
_parent.gotoAndStop("die");
Symbol 242 MovieClip [towerBulletMC] Frame 1
#initclip 23
Object.registerClass("towerBulletMC", towerBulletMC);
#endinitclip
stop();
Symbol 242 MovieClip [towerBulletMC] Frame 10
stop();
Symbol 242 MovieClip [towerBulletMC] Frame 20
stop();
_parent._parent.removeBulletID(ID);
Symbol 246 MovieClip [tower1] Frame 1
#initclip 24
Object.registerClass("tower1", tower1);
#endinitclip
stop();
Symbol 246 MovieClip [tower1] Frame 5
stop();
Symbol 246 MovieClip [tower1] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 249 MovieClip [jukeboxMC] Frame 1
#initclip 25
Object.registerClass("jukeboxMC", jukeboxMC);
#endinitclip
Symbol 260 Button
on (release) {
_global.link = "preMenu1";
_root.faderMC.play();
}
Symbol 262 MovieClip [preloaderShape_mc] Frame 160
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 16
_root.gotoAndStop(_global.link);
Symbol 1094 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 1095 MovieClip [__Packages.sharedData] Frame 0
class sharedData
{
var locked, score, bdg, gameMode, sd, playerName;
function sharedData () {
locked = new Array();
var _local2 = 1;
while (_local2 < 6) {
locked[_local2] = 1;
_local2++;
}
score = new Array();
_local2 = 0;
while (_local2 < 6) {
score[_local2] = 0;
_local2++;
}
bdg = new Array();
_local2 = 0;
while (_local2 < 9) {
bdg[_local2] = -1;
_local2++;
}
gameMode = new Array();
_local2 = 0;
while (_local2 < 6) {
gameMode[_local2] = "";
_local2++;
}
sd = SharedObject.getLocal("lordOfWar2");
if (sd.data.playerName == undefined) {
sd.data.playerName = "War Lord";
playerName = "War Lord";
} else {
playerName = sd.data.playerName;
}
if (sd.data.locked == undefined) {
sd.data.locked = locked;
} else {
locked = sd.data.locked;
}
if (sd.data.score == undefined) {
sd.data.score = score;
} else {
score = sd.data.score;
}
if (sd.data.bdg == undefined) {
sd.data.bdg = bdg;
} else {
bdg = sd.data.bdg;
}
if (sd.data.gameMode == undefined) {
sd.data.gameMode = gameMode;
} else {
gameMode = sd.data.gameMode;
}
sd.flush();
}
function setScore(indice, scor, mod) {
trace("SETTING SCORE.......................................");
trace("Saved_Scor = " + score[indice]);
trace("New Scor = " + scor);
if (score[indice] < scor) {
score[indice] = scor;
sd.data.score = score;
switch (mod) {
case 1 :
sd.data.gameMode[indice] = "easy";
gameMode[indice] = "easy";
break;
case 2 :
sd.data.gameMode[indice] = "normal";
gameMode[indice] = "normal";
break;
case 3 :
sd.data.gameMode[indice] = "hard";
gameMode[indice] = "hard";
}
sd.flush();
}
}
function setLocked(indice, nn) {
sd.data.locked[indice] = (locked[indice] = nn);
sd.flush();
}
function setBadge(n) {
bdg[n] = 1;
sd.data.bdg[n] = 1;
sd.flush();
}
function setPlayerName(nume) {
playerName = nume;
sd.data.playerName = nume;
sd.flush();
}
}
Symbol 1096 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 1097 MovieClip [__Packages.tower6] Frame 0
class tower6 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower6 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 5, 5];
speedUpgradeCost = [35, 65, 100, 100];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [50, 100, 180, 180];
damageUpgradeCost = [40, 75, 130, 130];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 20, 25, 25];
rangeUpgradeCost = [35, 65, 100, 100];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 6, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("tower6Shot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 35;
var damage = 200;
var range = 100;
var life = 500;
var maxLife = 500;
var valor = 250;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1098 MovieClip [__Packages.tower5] Frame 0
class tower5 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower5 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 2, 4, 4];
speedUpgradeCost = [30, 55, 80, 80];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [30, 60, 100, 100];
damageUpgradeCost = [45, 70, 100, 100];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 25, 25];
rangeUpgradeCost = [25, 45, 70, 70];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 5, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("tower5Shot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 30;
var damage = 130;
var range = 140;
var life = 350;
var maxLife = 350;
var valor = 175;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1099 MovieClip [__Packages.tower4] Frame 0
class tower4 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower4 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 4, 4];
speedUpgradeCost = [20, 40, 65, 65];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [21, 38, 70, 70];
damageUpgradeCost = [25, 45, 75, 75];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 25, 25];
rangeUpgradeCost = [20, 35, 65, 65];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 4, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("crystalShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 75;
var range = 125;
var life = 250;
var maxLife = 250;
var valor = 110;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1100 MovieClip [__Packages.tower3] Frame 0
class tower3 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower3 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 4, 4];
speedUpgradeCost = [15, 30, 40, 40];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [10, 15, 35, 35];
damageUpgradeCost = [15, 30, 55, 55];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 15, 15];
rangeUpgradeCost = [15, 25, 40, 40];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 3, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("fireShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 22;
var damage = 30;
var range = 120;
var life = 150;
var maxLife = 150;
var valor = 75;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1101 MovieClip [__Packages.tower2] Frame 0
class tower2 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower2 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 5, 5];
speedUpgradeCost = [5, 20, 30, 30];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [4, 6, 11, 11];
damageUpgradeCost = [10, 20, 30, 30];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 10, 10, 10];
rangeUpgradeCost = [5, 18, 28, 28];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 2, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("canonTowerShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 20;
var damage = 15;
var range = 130;
var life = 100;
var maxLife = 100;
var valor = 40;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1102 MovieClip [__Packages.towerBulletMC] Frame 0
class towerBulletMC extends MovieClip
{
var speed, gotoAndStop, type, enemyIndex, _parent, enemyID, ID, angle, _y, _x, hitTest, damage;
function towerBulletMC () {
super();
}
function onLoad() {
getIndex();
speed = 7;
(gotoAndStop(type));// not popped
}
function getIndex() {
var _local3 = false;
enemyIndex = -1;
var _local2 = 0;
while (_local2 < _parent._parent.nc) {
if (_parent._parent.creepVec[_local2].ID == enemyID) {
_local3 = true;
enemyIndex = _local2;
break;
}
_local2++;
}
if (!_local3) {
_parent._parent.removeBulletID(ID);
}
}
function animate() {
angle = Math.atan2(_parent._parent.creepVec[enemyIndex]._y - _y, _parent._parent.creepVec[enemyIndex]._x - _x);
var _local2 = 0;
while (_local2 < speed) {
_x = _x + (2 * Math.cos(angle));
_y = _y + (2 * Math.sin(angle));
_local2++;
}
}
function onEnterFrame() {
if (_parent._parent.creepVec[enemyIndex].ID != enemyID) {
getIndex();
}
if (_parent._parent.creepVec[enemyIndex].dead && (!dead)) {
_parent._parent.removeBulletID(ID);
return(undefined);
}
if (enemyIndex < 0) {
return(undefined);
}
if (!dead) {
animate();
} else {
_x = _parent._parent.creepVec[enemyIndex]._x;
_y = _parent._parent.creepVec[enemyIndex]._y;
return(undefined);
}
if (hitTest(_parent._parent.creepVec[enemyIndex].hitMC)) {
dead = true;
(gotoAndStop("explode"));// not popped
_parent._parent.creepVec[enemyIndex].hitFunction(damage);
}
}
var dead = false;
var once = false;
}
Symbol 1103 MovieClip [__Packages.tower1] Frame 0
class tower1 extends MovieClip
{
var hitMC, arrowMC, rangeMC, stat, _x, _y, lifeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower1 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
rangeMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 5, 5];
speedUpgradeCost = [5, 15, 25, 25];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [3, 5, 10, 10];
damageUpgradeCost = [5, 15, 20, 20];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 10, 10, 10];
rangeUpgradeCost = [5, 15, 25, 25];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 40 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 1, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("canonTowerShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 20;
var damage = 9;
var range = 130;
var life = 100;
var maxLife = 100;
var valor = 25;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 1104 MovieClip [__Packages.jukeboxMC] Frame 0
class jukeboxMC extends MovieClip
{
var sndArray;
function jukeboxMC () {
super();
}
function onLoad() {
sndArray = new Array();
sndArray[0] = new Sound();
sndArray[0].attachSound("canonShot");
sndArray[1] = new Sound();
sndArray[1].attachSound("creepShot");
sndArray[2] = new Sound();
sndArray[2].attachSound("noMoney");
sndArray[3] = new Sound();
sndArray[3].attachSound("coin.wav");
sndArray[4] = new Sound();
sndArray[4].attachSound("buttonPress");
sndArray[5] = new Sound();
sndArray[5].attachSound("errorLocked");
sndArray[10] = new Sound();
sndArray[10].attachSound("towerExplode");
sndArray[10].setVolume(50);
sndArray[20] = new Sound();
sndArray[20].attachSound("ratDie");
sndArray[20].setVolume(150);
sndArray[21] = new Sound();
sndArray[21].attachSound("goblinDie");
sndArray[21].setVolume(150);
sndArray[22] = new Sound();
sndArray[22].attachSound("menDie");
sndArray[22].setVolume(150);
sndArray[23] = new Sound();
sndArray[23].attachSound("goblinArcherDie");
sndArray[23].setVolume(150);
sndArray[24] = new Sound();
sndArray[24].attachSound("demonDie");
sndArray[24].setVolume(150);
sndArray[25] = new Sound();
sndArray[25].attachSound("lionmenDie");
sndArray[25].setVolume(150);
sndArray[26] = new Sound();
sndArray[26].attachSound("lizardmenDie");
sndArray[26].setVolume(150);
sndArray[27] = new Sound();
sndArray[27].attachSound("trollDie");
sndArray[27].setVolume(150);
sndArray[28] = new Sound();
sndArray[28].attachSound("battlegoreDie");
sndArray[28].setVolume(150);
sndArray[29] = new Sound();
sndArray[29].attachSound("wizardDie");
sndArray[29].setVolume(150);
sndArray[30] = new Sound();
sndArray[30].attachSound("crystalShot");
sndArray[31] = new Sound();
sndArray[31].attachSound("fireShot");
sndArray[32] = new Sound();
sndArray[32].attachSound("tower5Shot");
sndArray[33] = new Sound();
sndArray[33].attachSound("tower6Shot");
sndArray[40] = new Sound();
sndArray[40].attachSound("voice1.wav");
sndArray[41] = new Sound();
sndArray[41].attachSound("voice2.wav");
sndArray[42] = new Sound();
sndArray[42].attachSound("voice3.wav");
sndArray[43] = new Sound();
sndArray[43].attachSound("voice4.wav");
sndArray[44] = new Sound();
sndArray[44].attachSound("voice5.wav");
sndArray[45] = new Sound();
sndArray[45].attachSound("voice6.wav");
sndArray[46] = new Sound();
sndArray[46].attachSound("voice7.wav");
sndArray[50] = new Sound();
sndArray[50].attachSound("orchestraLoop.wav");
sndArray[51] = new Sound();
sndArray[51].attachSound("Darabuka.wav");
sndArray[52] = new Sound();
sndArray[52].attachSound("victory.wav");
sndArray[53] = new Sound();
sndArray[53].attachSound("defeat.wav");
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function playNextLevel() {
if (!_global.sound) {
return(undefined);
}
var _local3 = randRange(0, 6);
sndArray[40 + _local3].start();
}
function playDeamonDie(s) {
if (!_global.sound) {
return(undefined);
}
switch (s) {
case 0 :
sndArray[20].start();
break;
case 1 :
sndArray[21].start();
break;
case 2 :
sndArray[22].start();
break;
case 3 :
sndArray[23].start();
break;
case 4 :
sndArray[24].start();
break;
case 5 :
sndArray[25].start();
break;
case 6 :
sndArray[26].start();
break;
case 7 :
sndArray[27].start();
break;
case 8 :
sndArray[28].start();
break;
case 9 :
sndArray[29].start();
}
}
function playCoinLoop() {
if (!_global.sound) {
return(undefined);
}
sndArray[3].start(0, 1000);
}
function stopCoinLoop() {
sndArray[3].stop("coin.wav");
}
function playSound(sunet) {
if (!_global.sound) {
return(undefined);
}
switch (sunet) {
case "canonTowerShot" :
sndArray[0].start();
break;
case "noMoney" :
sndArray[2].start();
break;
case "buttonPress" :
sndArray[4].start();
break;
case "errorLocked" :
sndArray[5].start();
break;
case "crystalShot" :
sndArray[30].start();
break;
case "fireShot" :
sndArray[31].start();
break;
case "tower5Shot" :
sndArray[32].start();
break;
case "tower6Shot" :
sndArray[33].start();
break;
case "creepShot" :
sndArray[1].start();
break;
case "towerExplode" :
sndArray[10].start();
}
}
function stopSounds() {
sndArray[50].stop("orchestraLoop.wav");
sndArray[51].stop("Darabuka.wav");
sndArray[52].stop("victory.wav");
sndArray[53].stop("defeat.wav");
}
function playLoop(str) {
if (!_global.sound) {
return(undefined);
}
sndArray[50].stop("orchestraLoop.wav");
sndArray[51].stop("Darabuka.wav");
sndArray[52].stop("victory.wav");
sndArray[53].stop("defeat.wav");
switch (str) {
case "menu" :
sndArray[50].start(0, 10000);
break;
case "inGame" :
sndArray[51].start(0, 10000);
break;
case "victory" :
sndArray[52].start(0, 10000);
break;
case "defeat" :
sndArray[53].start(0, 10000);
}
}
}
Symbol 1105 MovieClip [__Packages.creepsMC] Frame 0
class creepsMC extends MovieClip
{
var index, creepMC, life, hitMC, type, gotoAndPlay, dx, _parent, _x, dy, _y, temp, lifeMC, shootingCreep, range, enemyTowerID;
function creepsMC () {
super();
}
function onLoad() {
index = 0;
creepMC._rotation = 105;
life = max_life;
hitMC._visible = false;
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function hitFunction(d) {
life = life - d;
if ((life <= 0) && (!dead)) {
dead = true;
_root.jukeBoxMC.playDeamonDie(type);
_global.money = _global.money + value;
_global.points = _global.points + value;
_global.enemiesKilled++;
(gotoAndPlay("explode"));// not popped
}
}
function onEnterFrame() {
dx = Math.abs(_x - _parent._parent.mapMC.points[index][0]);
dy = Math.abs(_y - _parent._parent.mapMC.points[index][1]);
if (dx >= dy) {
dy = speed * (dy / dx);
dx = speed;
} else {
dx = speed * (dx / dy);
dy = speed;
}
if (_x > _parent._parent.mapMC.points[index][0]) {
_x = _x - dx;
} else {
_x = _x + dx;
}
if (_y > _parent._parent.mapMC.points[index][1]) {
_y = _y - dy;
} else {
_y = _y + dy;
}
if ((Math.abs(_x - _parent._parent.mapMC.points[index][0]) <= speed) && (Math.abs(_y - _parent._parent.mapMC.points[index][1]) <= speed)) {
index++;
if (index > 1) {
temp = Math.atan2(_parent._parent.mapMC.points[index][1] - _parent._parent.mapMC.points[index - 1][1], _parent._parent.mapMC.points[index][0] - _parent._parent.mapMC.points[index - 1][0]);
temp = (temp * 180) / 3.14;
creepMC._rotation = temp + 90;
}
}
if (index > _parent._parent.mapMC.nPoints) {
_x = _parent._parent.mapMC.points[0][0];
_y = _parent._parent.mapMC.points[0][1];
creepMC._rotation = 105;
index = 0;
_global.lives--;
}
lifeMC._width = (life * 30) / max_life;
if (dead || (!shootingCreep)) {
return(undefined);
}
shotDelay++;
if ((shotDelay > 60) && (!shooting)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if ((dist(_x, _y, _parent._parent.towerVec[_local3]._x, _parent._parent.towerVec[_local3]._y) < range) && (!_parent._parent.towerVec[_local3].dead)) {
shotDelay = 0;
(gotoAndPlay("fire"));// not popped
enemyTowerID = _parent._parent.towerVec[_local3].ID;
shooting = true;
break;
}
_local3++;
}
}
}
var speed = 1.5;
var max_life = 20;
var damage = 10;
var value = 10;
var dead = false;
var shooting = false;
var shotDelay = 0;
}
Symbol 1106 MovieClip [__Packages.toolBarMC] Frame 0
class toolBarMC extends MovieClip
{
var stat, t1Bt, t2Bt, t3Bt, t4Bt, t5Bt, t6Bt;
function toolBarMC () {
super();
}
function onLoad() {
var b = this;
stat = 0;
t1Bt.onRelease = function () {
b.stat = 1;
b._parent.pointer.setState(1);
};
t2Bt.onRelease = function () {
b.stat = 2;
b._parent.pointer.setState(2);
};
t3Bt.onRelease = function () {
b.stat = 3;
b._parent.pointer.setState(3);
};
t4Bt.onRelease = function () {
b.stat = 4;
b._parent.pointer.setState(4);
};
t5Bt.onRelease = function () {
b.stat = 5;
b._parent.pointer.setState(5);
};
t6Bt.onRelease = function () {
b.stat = 6;
b._parent.pointer.setState(6);
};
var _local2 = new Object();
_local2.onKeyDown = function () {
trace("...pressed...");
if (Key.isDown(27)) {
trace("Escape");
b.stat = 0;
b._parent.pointer.setState(0);
}
};
Key.addListener(_local2);
}
function onEnterFrame() {
}
}
Symbol 1107 MovieClip [__Packages.creepBulletMC] Frame 0
class creepBulletMC extends MovieClip
{
var speed, enemyIndex, _parent, enemyID, ID, angle, _y, _x, hitTest, gotoAndStop, damage;
function creepBulletMC () {
super();
}
function onLoad() {
getIndex();
speed = 7;
}
function getIndex() {
var _local3 = false;
enemyIndex = -1;
var _local2 = 0;
while (_local2 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local2].ID == enemyID) {
_local3 = true;
enemyIndex = _local2;
break;
}
_local2++;
}
if (!_local3) {
trace("........not found...............");
_parent._parent.removeBulletID(ID);
}
}
function animate() {
angle = Math.atan2(_parent._parent.towerVec[enemyIndex]._y - _y, _parent._parent.towerVec[enemyIndex]._x - _x);
var _local2 = 0;
while (_local2 < speed) {
_x = _x + Math.cos(angle);
_y = _y + Math.sin(angle);
_local2++;
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (_parent._parent.towerVec[enemyIndex].dead) {
_parent._parent.removeBulletID(ID);
}
if (_parent._parent.towerVec[enemyIndex].ID != enemyID) {
getIndex();
}
if (enemyIndex < 0) {
return(undefined);
}
animate();
if (hitTest(_parent._parent.towerVec[enemyIndex].hitMC)) {
dead = true;
(gotoAndStop("explode"));// not popped
_parent._parent.towerVec[enemyIndex].hitFunction(damage);
}
}
var dead = false;
}
Symbol 1108 MovieClip [__Packages.pointerMC] Frame 0
class pointerMC extends MovieClip
{
var stat, startDrag, hitPoints, gotoAndStop, lineStyle;
function pointerMC () {
super();
}
function onLoad() {
stat = 0;
Mouse.hide();
startDrag(true);
hitPoints = new Array();
var _local2 = 0;
while (_local2 < 12) {
hitPoints[_local2] = new Array();
_local2++;
}
nHP = 0;
}
function setState(st) {
stat = st;
switch (st) {
case 0 :
gotoAndStop("idle");
break;
case 1 :
gotoAndStop("tower1");
break;
case 2 :
gotoAndStop("tower2");
break;
case 3 :
gotoAndStop("tower3");
break;
case 4 :
gotoAndStop("tower4");
break;
case 5 :
gotoAndStop("tower5");
break;
case 6 :
gotoAndStop("tower6");
}
}
function getState() {
return(stat);
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
lineStyle(1, 16777215, 50, true, "none", "round", "miter", 1);
drawCircle(this, hitPoints[0][0], hitPoints[0][1], 2);
drawCircle(this, hitPoints[1][0], hitPoints[1][1], 2);
drawCircle(this, hitPoints[2][0], hitPoints[2][1], 2);
drawCircle(this, hitPoints[3][0], hitPoints[3][1], 2);
}
function onEnterFrame() {
}
var nHP = 0;
}
Symbol 1109 MovieClip [__Packages.Director] Frame 0
class Director extends MovieClip
{
var lifeAdj, map1MC, map2MC, map3MC, map4MC, map5MC, map6MC, mapMC, creepsDeployed, creepsToDeploy, level, creepVec, nc, towerVec, nt, bulletVec, nb, nextWaveBt, messageMC, fpsField, pointer, towerLayer, noMoney, creepLayer;
function Director () {
super();
}
function onLoad() {
_global.enemiesKilled = 0;
switch (_global.gameMode) {
case 1 :
lifeAdj = 0.8;
break;
case 2 :
lifeAdj = 1;
break;
case 3 :
lifeAdj = 1.07;
}
map1MC._visible = false;
map2MC._visible = false;
map3MC._visible = false;
map4MC._visible = false;
map5MC._visible = false;
map6MC._visible = false;
switch (_global.gameMap) {
case 1 :
mapMC = map1MC;
map1MC._visible = true;
break;
case 2 :
mapMC = map2MC;
map2MC._visible = true;
break;
case 3 :
mapMC = map3MC;
map3MC._visible = true;
break;
case 4 :
mapMC = map4MC;
map4MC._visible = true;
break;
case 5 :
mapMC = map5MC;
map5MC._visible = true;
break;
case 6 :
mapMC = map6MC;
map6MC._visible = true;
}
_global.money = mapMC.money;
if (mapMC.meteo == 0) {
_root.rainMC._visible = false;
_root.snowMC._visible = false;
} else if (mapMC.meteo == 1) {
_root.rainMC._visible = true;
_root.snowMC._visible = false;
} else if (mapMC.meteo == 2) {
_root.rainMC._visible = false;
_root.snowMC._visible = true;
}
var b = this;
setInterval(this, "FPS", 1000);
creepsDeployed = 0;
creepsToDeploy = 0;
level = -1;
creepVec = new Array();
nc = 0;
towerVec = new Array();
nt = 0;
bulletVec = new Array();
nb = 0;
_root.jukeBoxMC.playLoop("inGame");
nextWaveBt.onRelease = function () {
b.gotoNextLevel();
};
}
function gotoNextLevel() {
if ((creepsDeployed == creepsToDeploy) && (nc == 0)) {
if (messageMC._currentframe != 1) {
messageMC.gotoAndStop(15);
messageMC.play();
}
level++;
_root.jukeBoxMC.playNextLevel();
if (level < mapMC.nLevels) {
creepsDeployed = 0;
creepsToDeploy = mapMC.levels[level].creeps.length;
}
messShown = false;
}
}
function FPS() {
fpsField.text = String(fpsCounter);
fpsCounter = 0;
}
function pointerHitTest() {
var _local5 = true;
var _local4 = 0;
while (_local4 < pointer.nHP) {
if (mapMC.road.hitTest(_root._xmouse + pointer.hitPoints[_local4][0], _root._ymouse + pointer.hitPoints[_local4][1], true)) {
_local5 = false;
break;
}
var _local3 = 0;
while (_local3 < nt) {
if (towerVec[_local3].tg.hitTest(_root._xmouse + pointer.hitPoints[_local4][0], _root._ymouse + pointer.hitPoints[_local4][1], true)) {
_local5 = false;
break;
}
_local3++;
}
_local4++;
}
return(_local5);
}
function onMouseDown() {
if (pointerHitTest() && (pointer.getState() > 0)) {
if (_root._xmouse > 740) {
return(undefined);
}
switch (pointer.getState()) {
case 1 :
if (_global.money >= 25) {
towerVec[nt] = towerLayer.attachMovie("tower1", "tower1" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 25;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 2 :
if (_global.money >= 40) {
towerVec[nt] = towerLayer.attachMovie("tower2", "tower2" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 40;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 3 :
if (_global.money >= 75) {
towerVec[nt] = towerLayer.attachMovie("tower3", "tower3" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 75;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 4 :
if (_global.money >= 110) {
towerVec[nt] = towerLayer.attachMovie("tower4", "tower4" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 110;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 5 :
if (_global.money >= 175) {
towerVec[nt] = towerLayer.attachMovie("tower5", "tower5" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 175;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 6 :
if (_global.money >= 250) {
towerVec[nt] = towerLayer.attachMovie("tower6", "tower6" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 250;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
}
nt++;
IDs++;
pointer.setState(0);
}
}
function onMouseMove() {
var _local2;
if (pointer.getState() > 0) {
switch (pointer.getState()) {
case 1 :
_local2 = pointer.towerMask1;
break;
case 2 :
_local2 = pointer.towerMask2;
break;
case 3 :
_local2 = pointer.towerMask3;
break;
case 4 :
_local2 = pointer.towerMask4;
break;
case 5 :
_local2 = pointer.towerMask5;
break;
case 6 :
_local2 = pointer.towerMask6;
}
if (pointerHitTest()) {
_local2._visible = false;
} else {
_local2._visible = true;
}
}
}
function addTowerDebris(xp, yp) {
creepLayer.attachMovie("towerDebrisMC", "towerDebrisMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xp, _y:yp + 5});
IDs++;
}
function addTowerBullet(xi, yi, type, dmg, ids) {
bulletVec[nb] = creepLayer.attachMovie("towerBulletMC", "towerBulletMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xi, _y:yi, type:type, enemyID:ids, ID:IDs, speed:5, damage:dmg});
nb++;
IDs++;
}
function addCreepBullet(xi, yi, dmg, ids) {
bulletVec[nb] = creepLayer.attachMovie("creepBulletMC", "creepBulletMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xi, _y:yi, enemyID:ids, ID:IDs, damage:dmg});
nb++;
IDs++;
}
function removeBulletID(id) {
var _local2 = 0;
var _local3 = false;
_local2 = 0;
while (_local2 < nb) {
if (bulletVec[_local2].ID == id) {
bulletVec[_local2].removeMovieClip();
bulletVec[_local2] = null;
_local3 = true;
break;
}
_local2++;
}
if ((_local2 < nb) && (_local3)) {
while (_local2 < (nb - 1)) {
bulletVec[_local2] = bulletVec[_local2 + 1];
_local2++;
}
nb--;
}
}
function removeTowerID(id) {
var _local2 = 0;
var _local3 = false;
_local2 = 0;
while (_local2 < nt) {
if (towerVec[_local2].ID == id) {
towerVec[_local2].removeMovieClip();
towerVec[_local2] = null;
_local3 = true;
break;
}
_local2++;
}
if ((_local2 < nt) && (_local3)) {
while (_local2 < (nt - 1)) {
towerVec[_local2] = towerVec[_local2 + 1];
_local2++;
}
nt--;
}
}
function removeCreepID(id) {
var _local3 = 0;
while (creepVec[_local3].ID != id) {
_local3++;
}
creepVec[_local3].removeMovieClip();
creepVec[_local3] = null;
var _local2 = _local3;
while (_local2 < (nc - 1)) {
creepVec[_local2] = creepVec[_local2 + 1];
_local2++;
}
nc--;
}
function onEnterFrame() {
fpsCounter++;
if (delay_interval < 50) {
delay_interval++;
}
if (_global.lives <= 0) {
_global.totalWaves = level + 1;
_global.goldPieces = _global.money;
_global.totalLives = _global.lives;
Mouse.show();
pointer._visible = false;
_global.link = "defeat";
_root.faderMC.play();
}
if (((creepsDeployed == creepsToDeploy) && (nc == 0)) && ((level + 1) >= mapMC.nLevels)) {
_global.totalWaves = level + 1;
_global.goldPieces = _global.money;
_global.totalLives = _global.lives;
Mouse.show();
pointer._visible = false;
_global.link = "victory";
_root.faderMC.play();
}
if (((creepsDeployed == creepsToDeploy) && (nc == 0)) && (!messShown)) {
if ((level + 1) < mapMC.nLevels) {
if (level >= 0) {
_global.points = _global.points + Math.floor(_global.money * 0.15);
}
messageMC.statMC.levelField.text = level + 2;
messageMC.statMC.descriptionField.text = mapMC.levels[level + 1].desc + newline;
messageMC.statMC.descriptionField.text = messageMC.statMC.descriptionField.text + ((String(mapMC.levels[level + 1].creeps.length) + " creeps HP:") + String(Math.floor(mapMC.levels[level + 1].life[0] * lifeAdj)));
messageMC.play();
messShown = true;
}
}
if ((creepsDeployed < creepsToDeploy) && (delay_interval >= 30)) {
var _local4 = "";
switch (mapMC.levels[level].creeps[creepsDeployed]) {
case 0 :
_local4 = "ratCreep";
break;
case 1 :
_local4 = "goblinCreep";
break;
case 2 :
_local4 = "menCreep";
break;
case 3 :
_local4 = "goblinArcherCreep";
break;
case 4 :
_local4 = "deamonCreep";
break;
case 5 :
_local4 = "lionmenCreep";
break;
case 6 :
_local4 = "lizardmenCreep";
break;
case 7 :
_local4 = "trollCreep";
break;
case 8 :
_local4 = "battlegoreCreep";
break;
case 9 :
_local4 = "wizardCreep";
}
creepVec[nc] = creepLayer.attachMovie(_local4, "creep" + String(IDs), creepLayer.getNextHighestDepth(), {_x:-100, _y:5, ID:IDs, type:mapMC.levels[level].creeps[creepsDeployed], speed:mapMC.levels[level].speed[creepsDeployed], max_life:Math.floor(mapMC.levels[level].life[creepsDeployed] * lifeAdj), damage:mapMC.levels[level].damage[creepsDeployed], range:mapMC.levels[level].range[creepsDeployed], value:mapMC.levels[level].val[creepsDeployed], shootingCreep:mapMC.levels[level].shooting[creepsDeployed]});
nc++;
creepsDeployed++;
IDs++;
delay_interval = 0;
}
}
var messShown = false;
var fpsCounter = 0;
var IDs = 0;
var delay_interval = 0;
}
Symbol 1110 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 311 MovieClip [deamonCreep] Frame 1
#initclip 39
Object.registerClass("deamonCreep", creepsMC);
#endinitclip
stop();
Symbol 311 MovieClip [deamonCreep] Frame 5
this._alpha = 80;
Symbol 311 MovieClip [deamonCreep] Frame 9
this._alpha = 60;
Symbol 311 MovieClip [deamonCreep] Frame 13
this._alpha = 40;
Symbol 311 MovieClip [deamonCreep] Frame 17
this._alpha = 20;
Symbol 311 MovieClip [deamonCreep] Frame 21
this._alpha = 1;
Symbol 311 MovieClip [deamonCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 311 MovieClip [deamonCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 333 MovieClip [goblinArcherCreep] Frame 1
#initclip 27
Object.registerClass("goblinArcherCreep", creepsMC);
#endinitclip
stop();
Symbol 333 MovieClip [goblinArcherCreep] Frame 5
this._alpha = 80;
Symbol 333 MovieClip [goblinArcherCreep] Frame 9
this._alpha = 60;
Symbol 333 MovieClip [goblinArcherCreep] Frame 13
this._alpha = 40;
Symbol 333 MovieClip [goblinArcherCreep] Frame 17
this._alpha = 20;
Symbol 333 MovieClip [goblinArcherCreep] Frame 21
this._alpha = 1;
Symbol 333 MovieClip [goblinArcherCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 333 MovieClip [goblinArcherCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 375 MovieClip [goblinCreep] Frame 1
#initclip 28
Object.registerClass("goblinCreep", creepsMC);
#endinitclip
stop();
Symbol 375 MovieClip [goblinCreep] Frame 5
this._alpha = 80;
Symbol 375 MovieClip [goblinCreep] Frame 9
this._alpha = 60;
Symbol 375 MovieClip [goblinCreep] Frame 13
this._alpha = 40;
Symbol 375 MovieClip [goblinCreep] Frame 17
this._alpha = 20;
Symbol 375 MovieClip [goblinCreep] Frame 21
this._alpha = 1;
Symbol 375 MovieClip [goblinCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 375 MovieClip [goblinCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 417 MovieClip [lionmenCreep] Frame 1
#initclip 29
Object.registerClass("lionmenCreep", creepsMC);
#endinitclip
stop();
Symbol 417 MovieClip [lionmenCreep] Frame 5
this._alpha = 80;
Symbol 417 MovieClip [lionmenCreep] Frame 9
this._alpha = 60;
Symbol 417 MovieClip [lionmenCreep] Frame 13
this._alpha = 40;
Symbol 417 MovieClip [lionmenCreep] Frame 17
this._alpha = 20;
Symbol 417 MovieClip [lionmenCreep] Frame 21
this._alpha = 1;
Symbol 417 MovieClip [lionmenCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 417 MovieClip [lionmenCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 439 MovieClip [lizardMenCreep] Frame 1
#initclip 30
Object.registerClass("lizardMenCreep", creepsMC);
#endinitclip
stop();
Symbol 439 MovieClip [lizardMenCreep] Frame 5
this._alpha = 80;
Symbol 439 MovieClip [lizardMenCreep] Frame 9
this._alpha = 60;
Symbol 439 MovieClip [lizardMenCreep] Frame 13
this._alpha = 40;
Symbol 439 MovieClip [lizardMenCreep] Frame 17
this._alpha = 20;
Symbol 439 MovieClip [lizardMenCreep] Frame 21
this._alpha = 1;
Symbol 439 MovieClip [lizardMenCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 439 MovieClip [lizardMenCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 461 MovieClip [menCreep] Frame 1
#initclip 31
Object.registerClass("menCreep", creepsMC);
#endinitclip
stop();
Symbol 461 MovieClip [menCreep] Frame 5
this._alpha = 80;
Symbol 461 MovieClip [menCreep] Frame 9
this._alpha = 60;
Symbol 461 MovieClip [menCreep] Frame 13
this._alpha = 40;
Symbol 461 MovieClip [menCreep] Frame 17
this._alpha = 20;
Symbol 461 MovieClip [menCreep] Frame 21
this._alpha = 1;
Symbol 461 MovieClip [menCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 461 MovieClip [menCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 479 MovieClip [ratCreep] Frame 1
#initclip 32
Object.registerClass("ratCreep", creepsMC);
#endinitclip
stop();
Symbol 479 MovieClip [ratCreep] Frame 5
this._alpha = 80;
Symbol 479 MovieClip [ratCreep] Frame 9
this._alpha = 60;
Symbol 479 MovieClip [ratCreep] Frame 13
this._alpha = 40;
Symbol 479 MovieClip [ratCreep] Frame 17
this._alpha = 20;
Symbol 479 MovieClip [ratCreep] Frame 21
this._alpha = 1;
Symbol 479 MovieClip [ratCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 479 MovieClip [ratCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 511 MovieClip [trollCreep] Frame 1
#initclip 33
Object.registerClass("trollCreep", creepsMC);
#endinitclip
stop();
Symbol 511 MovieClip [trollCreep] Frame 5
this._alpha = 80;
Symbol 511 MovieClip [trollCreep] Frame 9
this._alpha = 60;
Symbol 511 MovieClip [trollCreep] Frame 13
this._alpha = 40;
Symbol 511 MovieClip [trollCreep] Frame 17
this._alpha = 20;
Symbol 511 MovieClip [trollCreep] Frame 21
this._alpha = 1;
Symbol 511 MovieClip [trollCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 511 MovieClip [trollCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 551 MovieClip [wizardCreep] Frame 1
#initclip 34
Object.registerClass("wizardCreep", creepsMC);
#endinitclip
stop();
Symbol 551 MovieClip [wizardCreep] Frame 5
this._alpha = 80;
Symbol 551 MovieClip [wizardCreep] Frame 9
this._alpha = 60;
Symbol 551 MovieClip [wizardCreep] Frame 13
this._alpha = 40;
Symbol 551 MovieClip [wizardCreep] Frame 17
this._alpha = 20;
Symbol 551 MovieClip [wizardCreep] Frame 21
this._alpha = 1;
Symbol 551 MovieClip [wizardCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 551 MovieClip [wizardCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 571 MovieClip [map1] Frame 1
var meteo = 1;
var money = 100;
var points = new Array();
var nPoints = 23;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = 0;
points[0][1] = 32.5;
points[1][0] = 110;
points[1][1] = 69;
points[2][0] = 160;
points[2][1] = 155;
points[3][0] = 187;
points[3][1] = 215;
points[4][0] = 175;
points[4][1] = 273;
points[5][0] = 95;
points[5][1] = 295;
points[6][0] = 70;
points[6][1] = 370;
points[7][0] = 180;
points[7][1] = 442;
points[8][0] = 250;
points[8][1] = 450;
points[9][0] = 320;
points[9][1] = 440;
points[10][0] = 410;
points[10][1] = 450;
points[11][0] = 495;
points[11][1] = 470;
points[12][0] = 595;
points[12][1] = 420;
points[13][0] = 575;
points[13][1] = 370;
points[14][0] = 475;
points[14][1] = 280;
points[15][0] = 405;
points[15][1] = 240;
points[16][0] = 385;
points[16][1] = 170;
points[17][0] = 455;
points[17][1] = 135;
points[18][0] = 540;
points[18][1] = 190;
points[19][0] = 610;
points[19][1] = 188;
points[20][0] = 630;
points[20][1] = 110;
points[21][0] = 565;
points[21][1] = 45;
points[22][0] = 515;
points[22][1] = -20;
var levels = new Array();
var nLevels = 30;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [25, 25, 25, 25, 25, 25, 25, 25, 25, 25];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Rat scouts ans goblins leading the way. Be careful.";
levels[1].creeps = [1, 2, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 0, 0, 0, 1, 1, 2, 2];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "Goblin wave, first battalion.";
levels[2].creeps = [2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Human assassins have joined in and attacking...";
levels[3].creeps = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = " Rats and Goblins fighting together.";
levels[4].creeps = [0, 0, 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Rats leading the way fallowed by battalions of Human Assassins and Goblins...";
levels[5].creeps = [1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 2, 2, 0, 0, 2, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "Goblin army and Humans have teamed up. They are determined to break your defense.";
levels[6].creeps = [0, 3, 0, 1, 1, 2, 3, 3, 2, 1, 3, 3, 2, 3, 2, 1, 1, 3, 0, 0];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "All the armies are against you. They think you are weak and are after your head Prove them wrong!";
levels[7].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Well done, you have manage to survive the plot... but the war is far from over... some goblins refuse defeat.";
levels[8].creeps = [2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "Assassins refuse also...";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [1500];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [60];
levels[9].shooting = [0];
levels[9].desc = "The leader... !";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... Some of them are armed. Beware.";
levels[11].creeps = [1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "A great goblin army is on the horizon. They are attacking your settlement. Defend your self.";
levels[12].creeps = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340, 340];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "The enemies have invoked every possible forces. The dark side has joined the enemy. Demons... tough demons...";
levels[13].creeps = [4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0];
levels[13].desc = "Goblin archers and demons... they are the toughest enemies yet. Prepare your self!";
levels[14].creeps = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460];
levels[14].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[14].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[14].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[14].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[14].desc = "Beasts from hell... Lion Men creeps are attacking...";
levels[15].creeps = [5, 5, 6, 6, 5, 5, 5, 6, 6, 5, 5, 5, 5, 6, 6, 6, 5, 5, 6, 6];
levels[15].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[15].life = [530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530];
levels[15].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[15].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[15].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[15].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[15].desc = "Lion man and Lizard men are being invoked. They're attacking. Stand Up!";
levels[16].creeps = [6, 6, 5, 5, 5, 5, 4, 4, 4, 6, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6];
levels[16].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[16].life = [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600];
levels[16].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[16].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[16].val = [6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6];
levels[16].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[16].desc = "Destroy those creeps. Kill them all.";
levels[17].creeps = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[17].life = [680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680];
levels[17].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[17].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[17].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[17].desc = "Lizard attack... is it magic?";
levels[18].creeps = [4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 6, 5, 4, 5, 6, 5, 4];
levels[18].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[18].life = [790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790, 790];
levels[18].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[18].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[18].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[18].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[18].desc = "Demons, Lizard Mens and Lion Mens";
levels[19].creeps = [9];
levels[19].speed = [2.5];
levels[19].life = [10000];
levels[19].damage = [10];
levels[19].range = [150];
levels[19].val = [200];
levels[19].shooting = [1];
levels[19].desc = "T'Paw, leader of the insurgents armies is attacking.";
levels[20].creeps = [3, 2, 4, 5, 6, 3, 4, 2, 5, 6, 3, 4, 5, 6, 1, 3, 2, 4, 5, 6];
levels[20].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[20].life = [810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810, 810];
levels[20].damage = [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0];
levels[20].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[20].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[20].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[20].desc = "Several armies together. Take care of those archers!";
levels[21].creeps = [0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5];
levels[21].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[21].life = [840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840];
levels[21].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[21].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[21].val = [6, 16, 6, 6, 6, 16, 6, 6, 6, 6, 6, 16, 6, 6, 6, 6, 6, 6, 16, 6];
levels[21].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[21].desc = "Rat scouts escorting Lion Men and Lizard Men leaders to safety. Show them who's boss!";
levels[22].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[22].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[22].life = [900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900];
levels[22].damage = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[22].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[22].shooting = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0];
levels[22].desc = "Creeps are fallowing the plan exactly, they're only purpose is to destroy your defense... Archers!!!";
levels[23].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[23].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[23].life = [960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960];
levels[23].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[23].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[23].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[23].shooting = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1];
levels[23].desc = "The second wave of destruction... Defend your self.";
levels[24].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[24].life = [1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020];
levels[24].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[24].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[24].shooting = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1];
levels[24].desc = "Our scouts are predicting another wave of demolitions... Are they right?";
levels[25].creeps = [2, 2, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 2, 2, 1, 1, 0, 0, 2, 2];
levels[25].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[25].life = [1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080];
levels[25].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[25].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[25].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[25].shooting = [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0];
levels[25].desc = "Good job soldier. So far so good. Creeps believe you're finished. Group together and prove them wrong.";
levels[26].creeps = [5, 2, 3, 4, 6, 5, 6, 1, 0, 2, 6, 3, 4, 2, 0, 1, 4, 3, 5, 6];
levels[26].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[26].life = [1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150];
levels[26].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[26].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[26].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[26].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[26].desc = "Fight till the last men standing. We must not go down...";
levels[27].creeps = [0, 3, 5, 1, 4, 5, 0, 2, 3, 6, 1, 0, 4, 5, 2, 3, 0, 2, 1, 4];
levels[27].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[27].life = [1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250];
levels[27].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[27].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[27].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[27].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[27].desc = "Rumors are saying we will face a secret alliance soon... Anything but the trolls! We'll be doomed!";
levels[28].creeps = [7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6];
levels[28].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[28].life = [1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1400];
levels[28].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[28].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[28].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[28].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[28].desc = "Our biggest fear has come true, the trolls have joined the alliance. They're scouts are preparing they're path.";
levels[29].creeps = [9];
levels[29].speed = [2.5];
levels[29].life = [15000];
levels[29].damage = [10];
levels[29].range = [130];
levels[29].val = [300];
levels[29].shooting = [1];
levels[29].desc = "Cugi'r, wizard is attacking...";
Symbol 635 MovieClip [toolBarMC] Frame 1
#initclip 35
Object.registerClass("toolBarMC", toolBarMC);
#endinitclip
Symbol 636 MovieClip [creepBulletMC] Frame 1
#initclip 36
Object.registerClass("creepBulletMC", creepBulletMC);
#endinitclip
stop();
Symbol 636 MovieClip [creepBulletMC] Frame 5
stop();
Symbol 636 MovieClip [creepBulletMC] Frame 15
stop();
_parent._parent.removeBulletID(ID);
Symbol 641 MovieClip [pointerMC] Frame 1
#initclip 37
Object.registerClass("pointerMC", pointerMC);
#endinitclip
stop();
Symbol 641 MovieClip [pointerMC] Frame 10
this.nHP = 4;
this.hitPoints[0][0] = -13;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -20;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 13;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 20;
this.hitPoints[3][1] = 23;
Symbol 641 MovieClip [pointerMC] Frame 20
this.nHP = 4;
this.hitPoints[0][0] = -12;
this.hitPoints[0][1] = -15;
this.hitPoints[1][0] = -16;
this.hitPoints[1][1] = 30;
this.hitPoints[2][0] = 12;
this.hitPoints[2][1] = -15;
this.hitPoints[3][0] = 16;
this.hitPoints[3][1] = 30;
Symbol 641 MovieClip [pointerMC] Frame 30
this.nHP = 4;
this.hitPoints[0][0] = -13;
this.hitPoints[0][1] = -20;
this.hitPoints[1][0] = -14;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 13;
this.hitPoints[2][1] = -20;
this.hitPoints[3][0] = 14;
this.hitPoints[3][1] = 23;
Symbol 641 MovieClip [pointerMC] Frame 40
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 641 MovieClip [pointerMC] Frame 50
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 641 MovieClip [pointerMC] Frame 60
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -30;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -30;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 646 MovieClip Frame 1
var meteo = 1;
var money = 1000;
var points = new Array();
var nPoints = 32;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = -28;
points[0][1] = 196;
points[1][0] = -16;
points[1][1] = 182;
points[2][0] = 30;
points[2][1] = 141;
points[3][0] = 92;
points[3][1] = 109;
points[4][0] = 161;
points[4][1] = 104;
points[5][0] = 239;
points[5][1] = 128;
points[6][0] = 245;
points[6][1] = 196;
points[7][0] = 229;
points[7][1] = 263;
points[8][0] = 184;
points[8][1] = 316;
points[9][0] = 113;
points[9][1] = 362;
points[10][0] = 60;
points[10][1] = 400;
points[11][0] = 61;
points[11][1] = 475;
points[12][0] = 99;
points[12][1] = 508;
points[13][0] = 252;
points[13][1] = 498;
points[14][0] = 389;
points[14][1] = 428;
points[15][0] = 521;
points[15][1] = 482;
points[16][0] = 601;
points[16][1] = 515;
points[17][0] = 649;
points[17][1] = 515;
points[18][0] = 679;
points[18][1] = 502;
points[19][0] = 691;
points[19][1] = 460;
points[20][0] = 689;
points[20][1] = 397;
points[21][0] = 673;
points[21][1] = 325;
points[22][0] = 638;
points[22][1] = 303;
points[23][0] = 570;
points[23][1] = 273;
points[24][0] = 501;
points[24][1] = 251;
points[25][0] = 441;
points[25][1] = 209;
points[26][0] = 431;
points[26][1] = 159;
points[27][0] = 454;
points[27][1] = 97;
points[28][0] = 497;
points[28][1] = 66;
points[29][0] = 583;
points[29][1] = 40;
points[30][0] = 645;
points[30][1] = 17;
points[31][0] = 672;
points[31][1] = -22;
var levels = new Array();
var nLevels = 15;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [4, 5, 4, 5, 4, 5, 4, 5, 4, 5];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [300, 300, 300, 300, 300, 300, 300, 300, 300, 300];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Deamons and lions are though from the begining.";
levels[1].creeps = [6, 6, 5, 4, 5, 6, 6, 5, 4, 5, 6, 6, 5, 4, 5, 6, 6, 5, 4, 5];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "Second wave of destruction...";
levels[2].creeps = [6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Lizard and trols are attacking...";
levels[3].creeps = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = "Trols...";
levels[4].creeps = [8, 7, 8, 8, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 8, 8, 7];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Battlegors are attacking...";
levels[5].creeps = [1, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 2, 2, 0, 0, 2, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "All armies are attacking as a last effort together.";
levels[6].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[6].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[6].desc = "Archers, ohhh no, not archers...";
levels[7].creeps = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300, 1300];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Well done! But it's not over yet. Batlegors.";
levels[8].creeps = [5, 7, 8, 6, 6, 5, 8, 7, 5, 5, 6, 8, 7, 6, 5, 7, 8, 6, 5, 8];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500, 1500];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "All together again just like one big happy...";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [15000];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [400];
levels[9].shooting = [0];
levels[9].desc = "The leader... BOSS!";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750];
levels[10].damage = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... Some of them are armed. Beware.";
levels[11].creeps = [8, 8, 3, 8, 8, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 8, 8, 3, 8];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000];
levels[11].damage = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "Goblins and Battlegores. Defend your self.";
levels[12].creeps = [6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7, 6, 7, 8, 7];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "Almost there...";
levels[13].creeps = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
levels[13].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[13].desc = "Battlegors!!! Prepare your self!";
levels[14].creeps = [9, 9, 9, 9, 9, 9];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [12000, 12000, 12000, 12000, 12000, 12000];
levels[14].damage = [3, 3, 3, 3, 3, 3];
levels[14].range = [120, 120, 120, 120, 120, 120];
levels[14].val = [150, 150, 150, 150, 150, 150];
levels[14].shooting = [0, 1, 0, 1, 0, 1];
levels[14].desc = "LAST LEVEL YOU ARE GOOD... REALY GOOD!!!!!";
Symbol 657 MovieClip Frame 1
var meteo = 2;
var money = 400;
var points = new Array();
var nPoints = 16;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = -50;
points[0][1] = 121;
points[1][0] = -15;
points[1][1] = 140;
points[2][0] = 86;
points[2][1] = 200;
points[3][0] = 194;
points[3][1] = 182;
points[4][0] = 304;
points[4][1] = 95;
points[5][0] = 457;
points[5][1] = 101;
points[6][0] = 584;
points[6][1] = 107;
points[7][0] = 664;
points[7][1] = 215;
points[8][0] = 662;
points[8][1] = 370;
points[9][0] = 634;
points[9][1] = 449;
points[10][0] = 578;
points[10][1] = 444;
points[11][0] = 468;
points[11][1] = 375;
points[12][0] = 355;
points[12][1] = 377;
points[13][0] = 265;
points[13][1] = 427;
points[14][0] = 231;
points[14][1] = 535;
points[15][0] = 230;
points[15][1] = 581;
var levels = new Array();
var nLevels = 30;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [1, 1, 2, 1, 2, 1, 2, 1, 2, 1];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [200, 200, 200, 200, 200, 200, 200, 200, 200, 200];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Men and goblins... They are tough from the begining... Be careful.";
levels[1].creeps = [1, 2, 3, 0, 2, 3, 0, 2, 3, 1, 0, 1, 3, 0, 2, 1, 4, 2, 3, 0];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "New enemy wave...";
levels[2].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Goblin Archers...";
levels[3].creeps = [3, 2, 1, 3, 3, 0, 1, 4, 2, 4, 3, 0, 1, 4, 2, 2, 3, 4, 2, 4];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = "Creeps fighting together.";
levels[4].creeps = [4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Deamons and Lions are testing you defense...";
levels[5].creeps = [2, 3, 4, 5, 3, 2, 1, 3, 5, 4, 3, 2, 1, 5, 3, 5, 4, 2, 1, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "Creeps have teamed up. They are determined to break your defense.";
levels[6].creeps = [0, 0, 4, 4, 5, 5, 5, 5, 4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 3, 3];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "All against you...";
levels[7].creeps = [3, 4, 5, 2, 3, 1, 4, 3, 0, 5, 0, 3, 0, 5, 0, 3, 1, 1, 1, 0];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "The battle is far from over...";
levels[8].creeps = [2, 3, 5, 6, 4, 3, 2, 1, 0, 3, 2, 4, 5, 6, 6, 6, 5, 3, 2, 1];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "You're good...";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [3500];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [200];
levels[9].shooting = [0];
levels[9].desc = "THE BOSS...";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... armed...";
levels[11].creeps = [1, 0, 3, 2, 4, 1, 3, 1, 3, 1, 3, 6, 3, 5, 3, 1, 2, 1, 3, 4];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "A great is attacking you. War is the word of the day...";
levels[12].creeps = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "Demons... tough demons...";
levels[13].creeps = [4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920, 920];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0];
levels[13].desc = "They are tough... how are you going to defeat them?";
levels[14].creeps = [5, 5, 3, 5, 2, 5, 1, 5, 0, 5, 4, 5, 2, 1, 5, 2, 5, 4, 4, 5];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000];
levels[14].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[14].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[14].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[14].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[14].desc = "Beasts from hell are attacking...";
levels[15].creeps = [6, 5, 6, 3, 2, 1, 4, 1, 3, 5, 4, 5, 1, 6, 1, 3, 0, 2, 5, 6];
levels[15].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[15].life = [1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075, 1075];
levels[15].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[15].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[15].val = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[15].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[15].desc = "More creeps... Stand Up!";
levels[16].creeps = [6, 6, 5, 5, 5, 5, 4, 4, 4, 6, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6];
levels[16].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[16].life = [1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150];
levels[16].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[16].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[16].val = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[16].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[16].desc = "Destroy those creeps. Kill them all.";
levels[17].creeps = [5, 6, 6, 5, 5, 6, 6, 5, 6, 5, 6, 5, 5, 5, 6, 5, 6, 5, 6, 5];
levels[17].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[17].life = [1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280, 1280];
levels[17].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[17].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[17].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[17].desc = "Lizard and Lion attack... is it magic?";
levels[18].creeps = [4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 6, 5, 4, 5, 6, 5, 4];
levels[18].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[18].life = [1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370];
levels[18].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[18].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[18].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[18].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[18].desc = "Demons, Lizard Mens and Lion Mens";
levels[19].creeps = [9];
levels[19].speed = [2.5];
levels[19].life = [10000];
levels[19].damage = [10];
levels[19].range = [150];
levels[19].val = [200];
levels[19].shooting = [1];
levels[19].desc = "Wizard attack...";
levels[20].creeps = [3, 2, 4, 5, 6, 3, 4, 2, 5, 6, 3, 4, 5, 6, 1, 3, 2, 4, 5, 6];
levels[20].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[20].life = [1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450];
levels[20].damage = [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0];
levels[20].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[20].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[20].shooting = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0];
levels[20].desc = "Several armies together...";
levels[21].creeps = [0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5];
levels[21].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[21].life = [1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1550];
levels[21].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[21].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[21].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[21].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[21].desc = "Rat scouts escorting Lion Men and Lizard Men leaders to safety. Show them who's boss!";
levels[22].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[22].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[22].life = [1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700, 1700];
levels[22].damage = [11, 1, 1, 1, 1, 1, 11, 1, 1, 1, 11, 1, 1, 1, 11, 1, 1, 1, 11, 1];
levels[22].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[22].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[22].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].desc = "Archer's attack... Archers!!!";
levels[23].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[23].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[23].life = [1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800, 1800];
levels[23].damage = [2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 2, 12, 2, 2, 12, 2, 2, 2];
levels[23].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[23].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[23].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[23].desc = "Defend your self...!";
levels[24].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[24].life = [1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950, 1950];
levels[24].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[24].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[24].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[24].shooting = [1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0];
levels[24].desc = "Survive this, I dare you!";
levels[25].creeps = [2, 2, 8, 4, 8, 5, 7, 6, 7, 5, 7, 4, 8, 2, 8, 1, 7, 0, 2, 2];
levels[25].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[25].life = [2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100];
levels[25].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[25].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[25].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[25].shooting = [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0];
levels[25].desc = "Good job soldier. So far so good. Creeps believe you're finished. Group together and prove them wrong.";
levels[26].creeps = [5, 7, 3, 4, 8, 5, 6, 1, 0, 2, 6, 3, 7, 2, 0, 1, 8, 3, 5, 6];
levels[26].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[26].life = [2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250, 2250];
levels[26].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[26].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[26].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[26].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[26].desc = "Fight till the last men standing. We must not go down...";
levels[27].creeps = [0, 3, 7, 1, 4, 5, 0, 2, 7, 6, 1, 0, 4, 5, 7, 3, 0, 8, 1, 4];
levels[27].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[27].life = [2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350];
levels[27].damage = [2, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[27].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[27].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[27].shooting = [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[27].desc = "Rumors are saying we will face a secret alliance soon... Anything but the trolls! We'll be doomed!";
levels[28].creeps = [7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6];
levels[28].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[28].life = [2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500, 2500];
levels[28].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[28].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[28].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[28].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[28].desc = "Our biggest fear has come true, the trolls have joined the alliance. They're scouts are preparing they're path.";
levels[29].creeps = [9];
levels[29].speed = [2.5];
levels[29].life = [17000];
levels[29].damage = [10];
levels[29].range = [130];
levels[29].val = [300];
levels[29].shooting = [1];
levels[29].desc = "Tolt'o, Wizard ... the leader of the army...";
Symbol 665 MovieClip Frame 1
var meteo = 0;
var money = 250;
var points = new Array();
var nPoints = 24;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = -55;
points[0][1] = 50;
points[1][0] = -17;
points[1][1] = 67;
points[2][0] = 47;
points[2][1] = 110;
points[3][0] = 92;
points[3][1] = 177;
points[4][0] = 138;
points[4][1] = 182;
points[5][0] = 182;
points[5][1] = 104;
points[6][0] = 297;
points[6][1] = 79;
points[7][0] = 354;
points[7][1] = 115;
points[8][0] = 394;
points[8][1] = 230;
points[9][0] = 384;
points[9][1] = 277;
points[10][0] = 332;
points[10][1] = 313;
points[11][0] = 217;
points[11][1] = 361;
points[12][0] = 188;
points[12][1] = 411;
points[13][0] = 234;
points[13][1] = 441;
points[14][0] = 319;
points[14][1] = 453;
points[15][0] = 391;
points[15][1] = 454;
points[16][0] = 472;
points[16][1] = 469;
points[17][0] = 541;
points[17][1] = 460;
points[18][0] = 590;
points[18][1] = 402;
points[19][0] = 612;
points[19][1] = 264;
points[20][0] = 645;
points[20][1] = 201;
points[21][0] = 712;
points[21][1] = 170;
points[22][0] = 789;
points[22][1] = 164;
points[23][0] = 834;
points[23][1] = 164;
var levels = new Array();
var nLevels = 25;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [150, 150, 150, 150, 150, 150, 150, 150, 150, 150];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Rat scouts and goblins... Be careful.";
levels[1].creeps = [1, 2, 3, 0, 2, 3, 0, 2, 3, 1, 0, 1, 3, 0, 2, 1, 4, 2, 3, 0];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, 190];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "A new enemy wave, first battalion.";
levels[2].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Goblin Archers...";
levels[3].creeps = [3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = "Rats and Goblins fighting together.";
levels[4].creeps = [4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Deamons and Lions are attaching you defense...";
levels[5].creeps = [2, 3, 4, 5, 3, 2, 1, 3, 5, 4, 3, 2, 1, 5, 3, 5, 4, 2, 1, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "Creeps have teamed up. They are determined to break your defense.";
levels[6].creeps = [0, 0, 4, 4, 5, 5, 5, 5, 4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 3, 3];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "All the armies are against you...";
levels[7].creeps = [3, 4, 5, 4, 3, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Well done, you have manage to survive the plot... but the war is far from over...";
levels[8].creeps = [2, 3, 5, 6, 4, 3, 2, 1, 0, 3, 2, 4, 5, 6, 6, 6, 5, 3, 2, 1];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, 335];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "Survive this and you're good...";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [2500];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [200];
levels[9].shooting = [0];
levels[9].desc = "THE BOSS wave... give it a go!";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... Some of them are armed. Beware.";
levels[11].creeps = [1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 410];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "A great goblin army is on the horizon. They are attacking your settlement. Defend your self.";
levels[12].creeps = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "Demons... tough demons...";
levels[13].creeps = [4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0];
levels[13].desc = "Goblin archers and demons... they are the toughest enemies yet. Prepare your self!";
levels[14].creeps = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600];
levels[14].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[14].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[14].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[14].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[14].desc = "Beasts from hell... Lion Men creeps are attacking...";
levels[15].creeps = [5, 5, 6, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 6, 6, 3, 4, 2, 5, 6];
levels[15].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[15].life = [680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680];
levels[15].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[15].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[15].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[15].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[15].desc = "More creeps are being invoked. Stand Up!";
levels[16].creeps = [6, 6, 5, 5, 5, 5, 4, 4, 4, 6, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6];
levels[16].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[16].life = [750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750];
levels[16].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[16].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[16].val = [6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6];
levels[16].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[16].desc = "Destroy those creeps. Kill them all.";
levels[17].creeps = [5, 6, 6, 5, 5, 6, 6, 5, 6, 5, 6, 5, 5, 5, 6, 5, 6, 5, 6, 5];
levels[17].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[17].life = [830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, 830];
levels[17].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[17].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[17].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[17].desc = "Lizard and Lion attack... is it magic?";
levels[18].creeps = [4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 6, 5, 4, 5, 6, 5, 4];
levels[18].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[18].life = [900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900];
levels[18].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[18].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[18].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[18].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[18].desc = "Demons, Lizard Mens and Lion Mens";
levels[19].creeps = [9];
levels[19].speed = [2.5];
levels[19].life = [7500];
levels[19].damage = [10];
levels[19].range = [150];
levels[19].val = [200];
levels[19].shooting = [1];
levels[19].desc = "Wizard attack...";
levels[20].creeps = [3, 2, 4, 5, 6, 3, 4, 2, 5, 6, 3, 4, 5, 6, 1, 3, 2, 4, 5, 6];
levels[20].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[20].life = [950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, 950];
levels[20].damage = [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0];
levels[20].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[20].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[20].shooting = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0];
levels[20].desc = "Several armies together...";
levels[21].creeps = [0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5];
levels[21].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[21].life = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000];
levels[21].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[21].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[21].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[21].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[21].desc = "Rat scouts escorting Lion Men and Lizard Men leaders to safety. Show them who's boss!";
levels[22].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[22].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[22].life = [1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100];
levels[22].damage = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[22].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[22].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].desc = "Archer's attack... Archers!!!";
levels[23].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[23].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[23].life = [1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150];
levels[23].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[23].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[23].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[23].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[23].desc = "Defend your self...!";
levels[24].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[24].life = [1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250];
levels[24].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[24].val = [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18];
levels[24].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[24].desc = "Last wave... Survive this and you are clear!";
Symbol 670 MovieClip Frame 1
var meteo = 1;
var money = 50;
var points = new Array();
var nPoints = 16;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = -30;
points[0][1] = 160;
points[1][0] = -20;
points[1][1] = 160;
points[2][0] = 550;
points[2][1] = 160;
points[3][0] = 630;
points[3][1] = 180;
points[4][0] = 650;
points[4][1] = 250;
points[5][0] = 600;
points[5][1] = 280;
points[6][0] = 400;
points[6][1] = 300;
points[7][0] = 130;
points[7][1] = 310;
points[8][0] = 75;
points[8][1] = 390;
points[9][0] = 120;
points[9][1] = 450;
points[10][0] = 280;
points[10][1] = 450;
points[11][0] = 355;
points[11][1] = 430;
points[12][0] = 490;
points[12][1] = 440;
points[13][0] = 565;
points[13][1] = 440;
points[14][0] = 615;
points[14][1] = 460;
points[15][0] = 690;
points[15][1] = 540;
points[16][0] = 690;
points[16][1] = 580;
var levels = new Array();
var nLevels = 25;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [16, 16, 16, 16, 16, 16, 16, 16, 16, 16];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Goblinss fallowing the path. Be careful.";
levels[1].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "Goblin wave, first battalion.";
levels[2].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Human assassins have joined in and attacking...";
levels[3].creeps = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = " Rats and Goblins fighting together.";
levels[4].creeps = [0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Rats leading the way fallowed by battalions of Human Assassins...";
levels[5].creeps = [1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "Goblin army and Humans have teamed up. They are determined to break your defense.";
levels[6].creeps = [0, 0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "All the armies are against you. They think you are weak and are after your head Prove them wrong!";
levels[7].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Well done, you have manage to survive the plot... but the war is far from over... some goblins refuse defeat.";
levels[8].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "Assassins refuse also...";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [1800];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [60];
levels[9].shooting = [0];
levels[9].desc = "THE BOSS... team up!";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... Some of them are armed. Beware.";
levels[11].creeps = [1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "A great goblin army is on the horizon. They are attacking your settlement. Defend your self.";
levels[12].creeps = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "The enemies have invoked every possible forces. The dark side has joined the enemy. Demons... tough demons...";
levels[13].creeps = [4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0];
levels[13].desc = "Goblin archers and demons... they are the toughest enemies yet. Prepare your self!";
levels[14].creeps = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350];
levels[14].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[14].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[14].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[14].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[14].desc = "Beasts from hell... Lion Men creeps are attacking...";
levels[15].creeps = [5, 5, 6, 6, 5, 5, 5, 6, 6, 5, 5, 5, 5, 6, 6, 6, 5, 5, 6, 6];
levels[15].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[15].life = [360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360];
levels[15].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[15].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[15].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[15].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[15].desc = "Lion man and Lizard men are being invoked. They're attacking. Stand Up!";
levels[16].creeps = [6, 6, 5, 5, 5, 5, 4, 4, 4, 6, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6];
levels[16].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[16].life = [420, 420, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 420, 420];
levels[16].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[16].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[16].val = [6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6];
levels[16].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[16].desc = "Destroy those creeps. Kill them all.";
levels[17].creeps = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[17].life = [420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420];
levels[17].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[17].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[17].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[17].desc = "Lizard attack... is it magic?";
levels[18].creeps = [4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 6, 5, 4, 5, 6, 5, 4];
levels[18].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[18].life = [550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550];
levels[18].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[18].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[18].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[18].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[18].desc = "Demons, Lizard Mens and Lion Mens";
levels[19].creeps = [9];
levels[19].speed = [2.5];
levels[19].life = [6900];
levels[19].damage = [10];
levels[19].range = [150];
levels[19].val = [200];
levels[19].shooting = [1];
levels[19].desc = "T'Paw, leader of the insurgents armies is attacking.";
levels[20].creeps = [3, 2, 4, 5, 6, 3, 4, 2, 5, 6, 3, 4, 5, 6, 1, 3, 2, 4, 5, 6];
levels[20].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[20].life = [600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600];
levels[20].damage = [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0];
levels[20].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[20].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[20].shooting = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0];
levels[20].desc = "Several armies together. Take care of those archers!";
levels[21].creeps = [0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5];
levels[21].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[21].life = [660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660];
levels[21].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[21].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[21].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[21].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[21].desc = "Rat scouts escorting Lion Men and Lizard Men leaders to safety. Show them who's boss!";
levels[22].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[22].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[22].life = [680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680];
levels[22].damage = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[22].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[22].shooting = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0];
levels[22].desc = "Creeps are fallowing the plan exactly, they're only purpose is to destroy your defense... Archers!!!";
levels[23].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[23].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[23].life = [680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680];
levels[23].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[23].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[23].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[23].shooting = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0];
levels[23].desc = "The second wave of destruction... Defend your self.";
levels[24].creeps = [9];
levels[24].speed = [2.5];
levels[24].life = [8000];
levels[24].damage = [10];
levels[24].range = [130];
levels[24].val = [300];
levels[24].shooting = [1];
levels[24].desc = "Tiso'o, almighty saucer is attacking your settlement. Defend him and you win...";
Symbol 675 MovieClip Frame 1
var meteo = 0;
var money = 50;
var points = new Array();
var nPoints = 15;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = -30;
points[0][1] = 120;
points[1][0] = 90;
points[1][1] = 130;
points[2][0] = 170;
points[2][1] = 170;
points[3][0] = 170;
points[3][1] = 250;
points[4][0] = 80;
points[4][1] = 360;
points[5][0] = 80;
points[5][1] = 440;
points[6][0] = 180;
points[6][1] = 480;
points[7][0] = 320;
points[7][1] = 452;
points[8][0] = 440;
points[8][1] = 320;
points[9][0] = 480;
points[9][1] = 125;
points[10][0] = 560;
points[10][1] = 100;
points[11][0] = 620;
points[11][1] = 150;
points[12][0] = 650;
points[12][1] = 400;
points[13][0] = 685;
points[13][1] = 510;
points[14][0] = 660;
points[14][1] = 600;
var levels = new Array();
var nLevels = 15;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Men zombies are attacking.";
levels[1].creeps = [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "Rats and Goblins come in wave, first battalion.";
levels[2].creeps = [2, 2, 1, 2, 2, 1, 2, 2, 0, 2, 2, 0, 2, 2, 1, 2, 2, 1, 2, 2];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Human assassins have joined in. Kill them...";
levels[3].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = "Just Goblins. It shouldn't be that hard.";
levels[4].creeps = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Oh my God, where all these Rats come from?";
levels[5].creeps = [1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 56, 65, 65, 65, 65, 65, 65, 65, 65, 65];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "A new wave has arrived...";
levels[6].creeps = [0, 1, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "Can't keep up? You can upgrade your towers at any time by clicking on it. All you need is money!";
levels[7].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Hint: To earn more gold pieces, sell your towers. You'll 75% of it's value on the black market!";
levels[8].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "Well well well... you seem to be getting the hang of this!";
levels[9].creeps = [9];
levels[9].speed = [3];
levels[9].life = [800];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [70];
levels[9].shooting = [0];
levels[9].desc = "THE BOSS LEVEL ... you'll get these kind of levels once in a while ... team up!";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[10].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[10].desc = "Goblin archers... A new type of creep is in town...";
levels[11].creeps = [1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[11].desc = "The great goblin army...";
levels[12].creeps = [1, 2, 3, 0, 3, 2, 0, 1, 2, 3, 2, 3, 1, 0, 2, 3, 1, 0, 0, 0];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "We're almost there... Just hold on...";
levels[13].creeps = [1, 0, 2, 3, 1, 0, 2, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[13].desc = "A hard one... Prepare your self!";
levels[14].creeps = [9];
levels[14].speed = [3];
levels[14].life = [4000];
levels[14].damage = [10];
levels[14].range = [150];
levels[14].val = [200];
levels[14].shooting = [0];
levels[14].desc = "The final level. defeat this guy and you are done... For now!";
Symbol 693 Button
on (release) {
_parent.play();
}
Symbol 698 MovieClip Frame 1
stop();
Symbol 698 MovieClip Frame 15
stop();
Symbol 702 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
Mouse.show();
_global.link = "menu";
_root.faderMC.play();
_root.jukeBoxMC.playLoop("menu");
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 704 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
getURL ("http://www.coolbuddy.com/?cid=155", "_blank");
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 710 MovieClip Frame 1
stop();
if (!_global.sound) {
gotoAndStop (2);
}
Instance of Symbol 708 MovieClip in Symbol 710 MovieClip Frame 1
on (release) {
_global.sound = false;
_root.jukeBoxMC.stopSounds();
_parent.gotoAndStop(2);
}
Symbol 710 MovieClip Frame 2
stop();
Instance of Symbol 708 MovieClip in Symbol 710 MovieClip Frame 2
on (release) {
_global.sound = true;
_root.jukeBoxMC.playLoop("inGame");
_parent.gotoAndStop(1);
}
Symbol 714 MovieClip Frame 1
stop();
Symbol 715 MovieClip [Director] Frame 1
#initclip 38
Object.registerClass("Director", Director);
#endinitclip
Symbol 719 MovieClip Frame 1
stop();
if (!_global.sound) {
gotoAndStop (2);
}
Instance of Symbol 708 MovieClip in Symbol 719 MovieClip Frame 1
on (release) {
_global.sound = false;
_root.jukeBoxMC.stopSounds();
_parent.gotoAndStop(2);
}
Symbol 719 MovieClip Frame 2
stop();
Instance of Symbol 708 MovieClip in Symbol 719 MovieClip Frame 2
on (release) {
_global.sound = true;
_root.jukeBoxMC.playLoop("menu");
_parent.gotoAndStop(1);
}
Symbol 720 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "wallFame";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
iconsMC.gotoAndStop(6);
}
on (rollOut) {
iconsMC.gotoAndStop(1);
}
Symbol 721 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "instructions";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
iconsMC.gotoAndStop(3);
}
on (rollOut) {
iconsMC.gotoAndStop(1);
}
Symbol 722 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
getURL ("http://www.coolbuddy.com/?cid=155", "_blank");
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
iconsMC.gotoAndStop(4);
}
on (rollOut) {
iconsMC.gotoAndStop(1);
}
Symbol 726 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "mapSelection";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
iconsMC.gotoAndStop(2);
}
on (rollOut) {
iconsMC.gotoAndStop(1);
}
Symbol 728 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "credits";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
iconsMC.gotoAndStop(5);
}
on (rollOut) {
iconsMC.gotoAndStop(1);
}
Symbol 750 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 2
stop();
Symbol 760 MovieClip Frame 1
stop();
Symbol 760 MovieClip Frame 2
stop();
Symbol 763 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 2
stop();
Symbol 766 MovieClip Frame 1
stop();
Symbol 766 MovieClip Frame 2
stop();
Symbol 769 MovieClip Frame 1
stop();
Symbol 769 MovieClip Frame 2
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 2
stop();
Symbol 776 Button
on (release) {
if (_root.lock6._visible) {
_root.lockedErrorMC.gotoAndPlay(2);
_root.jukeBoxMC.playSound("errorLocked");
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 6;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 690;
battleDetailsMC._y = 340;
battleDetailsMC.battleNameField.text = "Raider's Evil Nest";
battleDetailsMC.battleDetailField.text = "15 waves of hard scary creeps... Don't underestimate them. The final barrier between your freedom...";
if (_global.saved.score[5] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[5];
battleDetailsMC.modeField.text = _global.saved.gameMode[5] + " mode";
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 780 Button
on (release) {
if (_root.lock5._visible) {
_root.lockedErrorMC.gotoAndPlay(2);
_root.jukeBoxMC.playSound("errorLocked");
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 5;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 540;
battleDetailsMC._y = 210;
battleDetailsMC.battleNameField.text = "Lakan's Snowline";
battleDetailsMC.battleDetailField.text = "30 waves of incomming enemy creeps attacking your settlement. This will be a hell of a fight...";
if (_global.saved.score[4] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[4];
battleDetailsMC.modeField.text = _global.saved.gameMode[4] + " mode";
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 784 Button
on (release) {
if (_root.lock4._visible) {
_root.lockedErrorMC.gotoAndPlay(2);
_root.jukeBoxMC.playSound("errorLocked");
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 4;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 645;
battleDetailsMC._y = 325;
battleDetailsMC.battleNameField.text = "Dragon Fields";
battleDetailsMC.battleDetailField.text = "30 waves of incomming enemy creeps looking to repeal your offensive. Be on a look out for them. Fight with currage and you will be rewarded.";
if (_global.saved.score[3] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[3];
battleDetailsMC.modeField.text = _global.saved.gameMode[3] + " mode";
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 788 Button
on (release) {
if (_root.lock3._visible) {
_root.lockedErrorMC.gotoAndPlay(2);
_root.jukeBoxMC.playSound("errorLocked");
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 3;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 535;
battleDetailsMC._y = 160;
battleDetailsMC.battleNameField.text = "Twilight Temple";
battleDetailsMC.battleDetailField.text = "25 waves of incomming enemy creeps looking to repeal your offensive. Be on a look out for them. Fight with currage and you will be rewarded.";
if (_global.saved.score[2] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[2];
battleDetailsMC.modeField.text = _global.saved.gameMode[2] + " mode";
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 792 Button
on (release) {
if (_root.lock2._visible) {
_root.lockedErrorMC.gotoAndPlay(2);
_root.jukeBoxMC.playSound("errorLocked");
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 2;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 320;
battleDetailsMC._y = 260;
battleDetailsMC.battleNameField.text = "Broken Wing";
battleDetailsMC.battleDetailField.text = "25 waves of creeps looking to victory. Here's where the hard part begins and time to prove yourself. Fight with currage and you will be rewarded.";
if (_global.saved.score[1] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[1];
battleDetailsMC.modeField.text = _global.saved.gameMode[1] + " mode";
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 796 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
selectModeMC._x = 400;
_global.gameMap = 1;
_root.disableBts();
}
on (rollOver) {
battleDetailsMC._x = 360;
battleDetailsMC._y = 360;
battleDetailsMC.battleNameField.text = "Azra's Crossing";
battleDetailsMC.battleDetailField.text = "15 waves of incomming enemy creeps looking to repeal your offensive. It's a good opportunity to get the hang of things. Be on a look out for them.";
if (_global.saved.score[0] > 0) {
battleDetailsMC.battleScoreField.text = _global.saved.score[0];
battleDetailsMC.modeField.text = _global.saved.gameMode[0] + " mode";
trace(",,,,,,,,,,,,,,,,,,,,,," + _global.saved.gameMode[0]);
} else {
battleDetailsMC.battleScoreField.text = "not completed";
battleDetailsMC.modeField.text = "";
}
}
on (rollOut) {
battleDetailsMC._x = 1000;
}
Symbol 797 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
campaignStatsMC._x = 563;
campaignStatsMC.gotoAndStop(1);
campaignStatsMC.play();
_root.disableBts();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 799 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "menu";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 816 MovieClip Frame 1
stop();
Symbol 822 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.gameMode = 1;
_global.link = "game";
_root.faderMC.play();
}
Symbol 823 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.gameMode = 2;
_global.link = "game";
_root.faderMC.play();
}
Symbol 824 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.gameMode = 3;
_global.link = "game";
_root.faderMC.play();
}
Symbol 825 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_root.selectModeMC._x = -1000;
_global.gameMode = 0;
_global.gameMap = 0;
_root.enableBts();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 858 Button
on (release) {
_root.jukeBoxMC.stopCoinLoop();
_root.jukeBoxMC.playSound("buttonPress");
_root.campaignStatsMC._x = 2000;
_root.campaignStatsMC.gotoAndStop(1);
_root.enableBts();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 859 Button
on (release) {
if (inputNameField.text == "") {
return(undefined);
}
if (Number(totalScoreField.text) <= 0) {
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
setPlayerName(inputNameField.text);
_global.points = Number(totalScoreField.text);
_global.playerName = inputNameField.text;
_global.link = "submitHS";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 882 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 882 MovieClip Frame 2
stop();
Symbol 890 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 890 MovieClip Frame 2
stop();
Symbol 898 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 898 MovieClip Frame 2
stop();
Symbol 906 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 906 MovieClip Frame 2
stop();
Symbol 914 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 914 MovieClip Frame 2
stop();
Symbol 922 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 922 MovieClip Frame 2
stop();
Symbol 930 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 930 MovieClip Frame 2
stop();
Symbol 938 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 938 MovieClip Frame 2
stop();
Symbol 946 MovieClip Frame 1
stop();
badgeText._visible = false;
Symbol 946 MovieClip Frame 2
stop();
Symbol 947 MovieClip Frame 1
stop();
submitBt.enabled = false;
inputNameField.text = _global.saved.playerName;
totalScoreField.text = "0";
s1.text = "0";
s2.text = "0";
s3.text = "0";
s4.text = "0";
s5.text = "0";
s6.text = "0";
s7.text = "0";
s8.text = "0";
s9.text = "0";
Instance of Symbol 882 MovieClip "bdg1" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 890 MovieClip "bdg2" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 898 MovieClip "bdg3" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 906 MovieClip "bdg4" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 914 MovieClip "bdg5" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 922 MovieClip "bdg6" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 930 MovieClip "bdg7" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 938 MovieClip "bdg8" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Instance of Symbol 946 MovieClip "bdg9" in Symbol 947 MovieClip Frame 1
on (rollOver) {
badgeText._visible = true;
}
on (rollOut) {
badgeText._visible = false;
}
Symbol 947 MovieClip Frame 2
_root.jukeBoxMC.playCoinLoop();
MochiAd.showClickAwayAd({clip:clickAwayMC, id:"78d833300663b3a2"});
Symbol 947 MovieClip Frame 3
if (_global.saved.score[0] < 0) {
s1.text = "0";
gotoAndStop ("score2");
}
if (Number(s1.text) < _global.saved.score[0]) {
s1.text = String(Number(s1.text) + Math.round(_global.saved.score[0] / 25));
if (Number(s1.text) > _global.saved.score[0]) {
s1.text = String(_global.saved.score[0]);
}
play();
} else {
gotoAndStop ("score2");
}
Symbol 947 MovieClip Frame 4
gotoAndStop ("score1");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
Symbol 947 MovieClip Frame 7
if (_global.saved.score[1] < 0) {
s2.text = "0";
gotoAndStop ("score3");
}
if (Number(s2.text) < _global.saved.score[1]) {
s2.text = String(Number(s2.text) + Math.round(_global.saved.score[1] / 25));
if (Number(s2.text) > _global.saved.score[1]) {
s2.text = String(_global.saved.score[1]);
}
play();
} else {
gotoAndStop ("score3");
}
Symbol 947 MovieClip Frame 8
gotoAndStop ("score2");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
_root.jukeBoxMC.playSound("coin");
Symbol 947 MovieClip Frame 12
if (_global.saved.score[2] < 0) {
s3.text = "0";
gotoAndStop ("score4");
}
if (Number(s3.text) < _global.saved.score[2]) {
s3.text = String(Number(s3.text) + Math.round(_global.saved.score[2] / 25));
if (Number(s3.text) > _global.saved.score[2]) {
s3.text = String(_global.saved.score[2]);
}
play();
} else {
gotoAndStop ("score4");
}
Symbol 947 MovieClip Frame 13
gotoAndStop ("score3");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
_root.jukeBoxMC.playSound("coin");
Symbol 947 MovieClip Frame 17
if (_global.saved.score[3] < 0) {
s4.text = "0";
gotoAndStop ("score5");
}
if (Number(s4.text) < _global.saved.score[3]) {
s4.text = String(Number(s4.text) + Math.round(_global.saved.score[3] / 25));
if (Number(s4.text) > _global.saved.score[3]) {
s4.text = String(_global.saved.score[3]);
}
play();
} else {
gotoAndStop ("score5");
}
Symbol 947 MovieClip Frame 18
gotoAndStop ("score4");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
_root.jukeBoxMC.playSound("coin");
Symbol 947 MovieClip Frame 22
if (_global.saved.score[4] < 0) {
s5.text = "0";
gotoAndStop ("score6");
}
if (Number(s5.text) < _global.saved.score[4]) {
s5.text = String(Number(s5.text) + Math.round(_global.saved.score[4] / 25));
if (Number(s5.text) > _global.saved.score[4]) {
s5.text = String(_global.saved.score[4]);
}
play();
} else {
gotoAndStop ("score6");
}
Symbol 947 MovieClip Frame 23
gotoAndStop ("score5");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
_root.jukeBoxMC.playSound("coin");
Symbol 947 MovieClip Frame 27
if (_global.saved.score[5] < 0) {
s6.text = "0";
gotoAndPlay ("badge1");
}
if (Number(s6.text) < _global.saved.score[5]) {
s6.text = String(Number(s6.text) + Math.round(_global.saved.score[5] / 25));
if (Number(s6.text) > _global.saved.score[5]) {
s6.text = String(_global.saved.score[5]);
}
play();
} else {
gotoAndPlay ("badge1");
}
Symbol 947 MovieClip Frame 28
gotoAndStop ("score6");
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
_root.jukeBoxMC.playSound("coin");
Symbol 947 MovieClip Frame 33
if (_global.saved.bdg[0] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 34
if (_global.saved.bdg[1] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 35
if (_global.saved.bdg[2] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 36
if (_global.saved.bdg[3] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 37
if (_global.saved.bdg[5] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 38
if (_global.saved.bdg[5] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 39
if (_global.saved.bdg[6] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 75000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 40
if (_global.saved.bdg[7] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 100000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 41
if (_global.saved.bdg[8] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 200000);
_root.jukeBoxMC.playSound("coin");
}
Symbol 947 MovieClip Frame 42
gotoAndStop ("end");
Symbol 947 MovieClip Frame 60
stop();
submitBt.enabled = true;
totalScoreField.text = String(((((Number(s1.text) + Number(s2.text)) + Number(s3.text)) + Number(s4.text)) + Number(s5.text)) + Number(s6.text));
if (_global.saved.bdg[0] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[1] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[2] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[3] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[4] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[5] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 50000);
}
if (_global.saved.bdg[6] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 75000);
}
if (_global.saved.bdg[7] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 100000);
}
if (_global.saved.bdg[8] > 0) {
totalScoreField.text = String(Number(totalScoreField.text) + 200000);
}
_root.jukeBoxMC.stopCoinLoop();
Symbol 976 MovieClip Frame 1
var adjust = 0;
switch (_global.gameMode) {
case 1 :
adjust = 1;
break;
case 2 :
adjust = 2;
break;
case 3 :
adjust = 3;
}
Symbol 976 MovieClip Frame 2
_root.jukeBoxMC.playCoinLoop();
Symbol 976 MovieClip Frame 3
if (Number(totalWaves.text) < _global.totalWaves) {
totalWaves.text = String(Number(totalWaves.text) + 1);
play();
} else {
gotoAndStop ("doi");
}
Symbol 976 MovieClip Frame 7
gotoAndStop ("unu");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 976 MovieClip Frame 12
if (Number(enemiesKilled.text) < _global.enemiesKilled) {
enemiesKilled.text = String(Number(enemiesKilled.text) + 25);
if (Number(enemiesKilled.text) > _global.enemiesKilled) {
enemiesKilled.text = String(_global.enemiesKilled);
}
play();
} else {
gotoAndStop ("trei");
}
Symbol 976 MovieClip Frame 16
gotoAndStop ("doi");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 976 MovieClip Frame 20
if (Number(goldPieces.text) < _global.goldPieces) {
goldPieces.text = String(Number(goldPieces.text) + 10);
if (Number(goldPieces.text) > _global.goldPieces) {
goldPieces.text = String(_global.goldPieces);
}
play();
} else {
gotoAndStop ("patru");
}
Symbol 976 MovieClip Frame 24
gotoAndStop ("trei");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 976 MovieClip Frame 28
if (Number(totalLives.text) < _global.totalLives) {
totalLives.text = String(Number(totalLives.text) + 1);
play();
} else {
gotoAndStop ("end");
}
Symbol 976 MovieClip Frame 32
gotoAndStop ("patru");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 976 MovieClip Frame 46
stop();
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_global.saved.setScore(_global.gameMap - 1, Number(totalPoints.text), _global.gameMode);
_root.jukeBoxMC.stopCoinLoop();
_root.quitMap.enabled = true;
Symbol 987 Button
on (release) {
_global.link = "menu";
_root.faderMC.play();
}
Symbol 992 Button
on (release) {
if (nameField.text != "") {
_global.playerName = nameField.text;
_global.link = "submitHS";
_root.faderMC.play();
}
}
Symbol 997 Button
on (release) {
getURL ("http://www.gamestudio.ro", "_blank");
}
Symbol 999 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_root.jukeBoxMC.playLoop("menu");
_global.link = "mapSelection";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 1000 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
getURL ("http://www.coolbuddy.com/?cid=155", "_blank");
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 1005 Button
on (release) {
if (_global.counting) {
return(undefined);
}
_root.jukeBoxMC.playSound("buttonPress");
_root.jukeBoxMC.playLoop("menu");
_global.link = "mapSelection";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}
Symbol 1021 MovieClip Frame 1
var adjust = 0;
switch (_global.gameMode) {
case 1 :
adjust = 1;
break;
case 2 :
adjust = 2;
break;
case 3 :
adjust = 3;
}
Symbol 1021 MovieClip Frame 2
_root.jukeBoxMC.playCoinLoop();
trace("INAINTE de TOATEvictoryScreen.....................................................................");
var i = 0;
while (i < 6) {
trace(" - " + _global.saved.score[i]);
i++;
}
Symbol 1021 MovieClip Frame 3
if (Number(totalWaves.text) < _global.totalWaves) {
totalWaves.text = String(Number(totalWaves.text) + 1);
play();
} else {
gotoAndStop ("doi");
}
Symbol 1021 MovieClip Frame 7
gotoAndStop ("unu");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 1021 MovieClip Frame 12
if (Number(enemiesKilled.text) < _global.enemiesKilled) {
enemiesKilled.text = String(Number(enemiesKilled.text) + 25);
if (Number(enemiesKilled.text) > _global.enemiesKilled) {
enemiesKilled.text = String(_global.enemiesKilled);
}
play();
} else {
gotoAndStop ("trei");
}
Symbol 1021 MovieClip Frame 16
gotoAndStop ("doi");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 1021 MovieClip Frame 20
if (Number(goldPieces.text) < _global.goldPieces) {
goldPieces.text = String(Number(goldPieces.text) + 10);
if (Number(goldPieces.text) > _global.goldPieces) {
goldPieces.text = String(_global.goldPieces);
}
play();
} else {
gotoAndStop ("patru");
}
Symbol 1021 MovieClip Frame 24
gotoAndStop ("trei");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 1021 MovieClip Frame 28
if (Number(totalLives.text) < _global.totalLives) {
totalLives.text = String(Number(totalLives.text) + 1);
play();
} else {
gotoAndStop ("end");
}
Symbol 1021 MovieClip Frame 32
gotoAndStop ("patru");
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
_root.jukeBoxMC.playSound("coin");
Symbol 1021 MovieClip Frame 46
stop();
totalPoints.text = String(((((Number(totalWaves.text) * 100) + (Number(enemiesKilled.text) * 10)) + (Number(goldPieces.text) * 5)) + (Number(totalLives.text) * 250)) * adjust);
trace("BEFORE victoryScreen.....................................................................");
var i = 0;
while (i < 6) {
trace(" - " + _global.saved.score[i]);
i++;
}
_global.saved.setScore(_global.gameMap - 1, Number(totalPoints.text), _global.gameMode);
trace("AFTER victoryScreen.....................................................................");
var i = 0;
while (i < 6) {
trace(" - " + _global.saved.score[i]);
i++;
}
_root.jukeBoxMC.playSound("coin");
_global.saved.setLocked(_global.gameMap - 1, 0);
_root.jukeBoxMC.stopCoinLoop();
_global.counting = false;
Symbol 1037 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
nextFrame();
}
Symbol 1048 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
prevFrame();
}
Symbol 1086 MovieClip Frame 1
stop();
Symbol 1086 MovieClip Frame 2
stop();
Symbol 1086 MovieClip Frame 3
stop();
Symbol 1086 MovieClip Frame 4
stop();
Symbol 1086 MovieClip Frame 5
stop();
Symbol 1087 Button
on (release) {
_root.jukeBoxMC.playSound("buttonPress");
_global.link = "menu";
_root.faderMC.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("buttonOver");
}