Frame 1
var gamestart = false;
var sendwave = false;
var land = false;
var air = false;
var deadboss = false;
var killeden = 0;
var gameover = false;
var displayup = false;
localInfo = SharedObject.getLocal("GTDUG");
var ugenlife = 0;
var ugmode = false;
var clevel = 0;
var score = 0;
var resources = 0;
var lives = 20;
var rad = 0;
var dambonus = 0;
var rangebonus = 0;
var showupgrade = false;
var upgradetower = false;
var selltower = false;
var ctlvl;
var ctdam;
var ctr;
var cts;
var ctsp;
var ctulvl;
var ctudam;
var ctur;
var ctus;
var ctuc;
_root.grid._visible = false;
var GTnum = 1;
var gtamnum = 1;
var gtx = 0;
var gty = 0;
var gtunit = 0;
var gtrange = 0;
var gtdamage = 0;
var gten = 0;
var gtd = new Array();
gtd[1] = 22;
gtd[2] = 55;
gtd[3] = 150;
gtd[4] = 510;
var gtc = new Array();
gtc[1] = 26;
gtc[2] = 67;
gtc[3] = 80;
gtc[4] = 140;
var stamnum = 1;
var stx = 0;
var sty = 0;
var stunit = 0;
var strange = 0;
var stdamage = 0;
var sten;
var std = new Array();
std[1] = 110;
std[2] = 303;
std[3] = 833;
std[4] = 2291;
var stc = new Array();
stc[1] = 63;
stc[2] = 132;
stc[3] = 277;
stc[4] = 582;
var atamnum = 1;
var atx = 0;
var aty = 0;
var atunit = 0;
var atrange = 0;
var atdamage = 0;
var aten;
var atd = new Array();
atd[1] = 193;
atd[2] = 531;
atd[3] = 1460;
atd[4] = 4015;
var atc = new Array();
atc[1] = 105;
atc[2] = 221;
atc[3] = 464;
atc[4] = 974;
var ptamnum = 1;
var ptx = 0;
var pty = 0;
var ptunit = 0;
var ptrange = 0;
var ptdamage = 0;
var pten;
var ptd = new Array();
ptd[1] = 1375;
ptd[2] = 3438;
ptd[3] = 7510;
ptd[4] = 21000;
var ptc = new Array();
ptc[1] = 550;
ptc[2] = 1050;
ptc[3] = 2000;
ptc[4] = 3000;
var mtamnum = 1;
var mtx = 0;
var mty = 0;
var mtunit = 0;
var mtrange = 0;
var mtdamage = 0;
var mten;
var mtd = new Array();
mtd[1] = 3300;
mtd[2] = 9075;
mtd[3] = 19058;
mtd[4] = 52408;
var mtc = new Array();
mtc[1] = 1100;
mtc[2] = 1800;
mtc[3] = 2200;
mtc[4] = 2800;
var btamnum = 1;
var btx = 0;
var bty = 0;
var btunit = 0;
var btrange = 0;
var btdamage = 0;
var bten;
var btd = new Array();
btd[1] = 7000;
btd[2] = 14000;
btd[3] = 28000;
btd[4] = 56000;
var btc = new Array();
btc[1] = 1000;
btc[2] = 1200;
btc[3] = 1600;
btc[4] = 2000;
var ltamnum = 1;
var ltx = 0;
var lty = 0;
var ltunit = 0;
var ltrange = 0;
var ltdamage = 0;
var lten;
var ltd = new Array();
ltd[1] = 8000;
ltd[2] = 16000;
ltd[3] = 32000;
ltd[4] = 80000 /* 0x013880 */;
var ltc = new Array();
ltc[1] = 1500;
ltc[2] = 1700;
ltc[3] = 2000;
ltc[4] = 2300;
var htamnum = 1;
var htx = 0;
var hty = 0;
var htunit = 0;
var htrange = 0;
var htdamage = 0;
var hten;
var htd = new Array();
htd[1] = 9625;
htd[2] = 26469;
htd[3] = 55584;
htd[4] = 152856 /* 0x025518 */;
var htc = new Array();
htc[1] = 1500;
htc[2] = 2100;
htc[3] = 2600;
htc[4] = 3300;
var enbarnum = 0;
var deaden = 0;
var cenlife = new Array(20);
var cenlifemax = 0;
var enreward = 0;
var rinum = 1;
var ctower;
var cprice;
var crange;
var dragging = false;
var dropok = false;
var mapp = 1;
var cmap = new Array();
var map1 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map2 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "0", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map3 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map4 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map5 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map6 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
var map7 = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
dist = function (x1, y1, x2, y2) {
xr = Math.abs(x1 - x2);
yr = Math.abs(y1 - y2);
h = Math.sqrt((xr * xr) + (yr * yr));
return(h);
};
var kenum = 1;
killexplode = function (x1, y1) {
duplicateMovieClip (killexplosion, "ke" + kenum, 2000 + kenum);
_root["ke" + kenum]._x = x1;
_root["ke" + kenum]._y = y1;
_root["ke" + kenum].gotoAndPlay(1);
kenum = kenum + 1;
if (kenum > 20) {
kenum = 1;
}
};
var henum = 1;
hitexplode = function (x1, y1) {
duplicateMovieClip (hitexplosion, "he" + henum, 2100 + henum);
_root["he" + henum]._x = x1;
_root["he" + henum]._y = y1;
_root["he" + henum].gotoAndPlay(1);
henum = henum + 1;
if (henum > 20) {
henum = 1;
}
};
boss1.gotoAndStop(1);
var artillery = new Sound();
artillery.attachSound("gtfire2");
artillery.setVolume(50);
artfire = function () {
artillery.start();
};
var mortar = new Sound();
mortar.attachSound("stfire");
mortar.setVolume(50);
mortarfire = function () {
mortar.start();
};
var missile = new Sound();
missile.attachSound("ptfire");
missile.setVolume(50);
missfire = function () {
missile.start();
};
var intro = new Sound();
intro.attachSound("peaceful");
intro.setVolume(50);
playintro = function () {
intro.start();
};
var attack = new Sound();
attack.attachSound("action1");
attack.setVolume(80);
playattack = function () {
attack.start();
};
Instance of Symbol 30 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.leveltxt.text = ("LEVEL " + String(_root.clevel)) + "/40";
_root.scoretxt.text = "Score: " + String(_root.score);
_root.lifetxt.text = "Lives: " + String(_root.lives);
_root.resourcetxt.text = "Resources: " + String(_root.resources);
_root.rdtxt.text = "R&D: " + String(_root.rad);
if (_root.dragging == true) {
_root.rangeindi._x = _root.ctower._x;
_root.rangeindi._y = _root.ctower._y;
}
if (((_root.gameover == false) and (_root.gamestart == true)) and (_root.lives <= 0)) {
_root.stdsheet._x = 900;
_root.advsheet._x = 900;
_root.radsheet._x = 900;
_root.sendwave = false;
_root.gameoversheet.gotoAndPlay(1);
_root.gameoversheet._x = 500;
_root.gameoversheet._y = 155;
_root.gameover = true;
}
}
onClipEvent (mouseDown) {
if (_root.dragging == true) {
if (_root.ctower._x > 490) {
Mouse.show();
stopDrag();
_root.ctower._y = 900;
_root.dragging = false;
_root.rangeindi._y = 900;
} else if ((((_root.ctower._x < 490) and (_root.ctower._x > 10)) and (_root.ctower._y > 10)) and (_root.ctower._y < 490)) {
h = Math.round(((_root.ctower._x - 30) / 40) + 1);
v = Math.round(((_root.ctower._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (_root.cmap[s] == 1) {
_root.cmap[s] = 2;
Mouse.show();
stopDrag();
_root.resources = _root.resources - _root.cprice;
_root.rangeindi._y = 900;
_root.ctower._x = -10 + (40 * h);
_root.ctower._y = -10 + (40 * v);
duplicateMovieClip (_root.ctower, "GT" + _root.GTnum, 30 + _root.GTnum);
_root.GTnum = _root.GTnum + 1;
_root.ctower._y = 900;
_root.dragging = false;
}
}
}
}
onClipEvent (keyDown) {
if (Key.isDown(17)) {
if (_root.grid._visible == false) {
_root.grid._visible = true;
} else {
_root.grid._visible = false;
}
}
if (Key.isDown(32)) {
_root.displayup = true;
}
}
onClipEvent (keyUp) {
if (Key.isDown(32) != true) {
_root.displayup = false;
}
}
Instance of Symbol 39 MovieClip in Frame 1
onClipEvent (load) {
ms = 0;
sec = 0;
ennum = 1;
}
onClipEvent (enterFrame) {
ms = ms + 1;
if (ms >= 15) {
ms = 0;
sec = sec + 1;
}
if (_root.sendwave == false) {
ennum = 1;
}
if ((_root.sendwave == true) and (ennum <= 20)) {
if (ms == 0) {
if (_root.clevel == 1) {
_root.air = false;
_root.land = true;
_root.informer.text = " Alien Troop [LAND]: 20HP 2R\n NEXT WAVE: [LAND]: 60HP 2R";
_root.en1._x = 70;
_root.en1._y = -20;
duplicateMovieClip (_root.en1, "enem" + ennum, 300 + ennum);
_root.en1._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 20;
_root.cenmaxlife = 20;
}
_root.cenreward = 2;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 2) {
_root.air = false;
_root.land = true;
_root.informer.text = "Alien Troop II [LAND]: 60HP 2R\nNEXT WAVE: [LAND] 100HP 4R";
_root.en1._x = 70;
_root.en1._y = -20;
duplicateMovieClip (_root.en1, "enem" + ennum, 300 + ennum);
_root.en1._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 60;
_root.cenmaxlife = 60;
}
_root.cenreward = 2;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 3) {
_root.air = false;
_root.land = true;
_root.informer.text = " Alien Troop III [LAND]: 100HP 4R\nNEXT WAVE: [LAND]: 130HP 4R";
_root.en1._x = 70;
_root.en1._y = -20;
duplicateMovieClip (_root.en1, "enem" + ennum, 300 + ennum);
_root.en1._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 100;
_root.cenmaxlife = 100;
}
_root.cenreward = 4;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 4) {
_root.air = false;
_root.land = true;
_root.informer.text = "Alien Troop IV [LAND]: 130HP 4R\nNEXT LEVEL: [AIR]: 102HP 6R";
_root.en1._x = 70;
_root.en1._y = -20;
duplicateMovieClip (_root.en1, "enem" + ennum, 300 + ennum);
_root.en1._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 130;
_root.cenmaxlife = 130;
}
_root.cenreward = 4;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 5) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Scout [AIR]: 102HP 6R\nNEXT WAVE: [LAND]: 153HP 6R";
_root.en2._x = 70;
_root.en2._y = -20;
duplicateMovieClip (_root.en2, "enem" + ennum, 300 + ennum);
_root.en2._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 102;
_root.cenmaxlife = 102;
}
_root.cenreward = 6;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 6) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Speck [LAND]: 153HP 6R\nNEXT WAVE: [LAND]: 230HP 8R";
_root.en3._x = 70;
_root.en3._y = -20;
duplicateMovieClip (_root.en3, "enem" + ennum, 300 + ennum);
_root.en3._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 153;
_root.cenmaxlife = 153;
}
_root.cenreward = 6;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 7) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Speck II [LAND]: 230HP 8R\nNEXT WAVE: [LAND]: 345HP 8R";
_root.en3._x = 70;
_root.en3._y = -20;
duplicateMovieClip (_root.en3, "enem" + ennum, 300 + ennum);
_root.en3._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 230;
_root.cenmaxlife = 230;
}
_root.cenreward = 8;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 8) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Speck III [LAND]: 345HP 8R\nNEXT WAVE: [LAND]: 468HP 10R";
_root.en3._x = 70;
_root.en3._y = -20;
duplicateMovieClip (_root.en3, "enem" + ennum, 300 + ennum);
_root.en3._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 345;
_root.cenmaxlife = 345;
}
_root.cenreward = 8;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 9) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Speck IV [LAND]: 468HP 10R\nNEXT WAVE: [AIR]: 585HP 10R";
_root.en3._x = 70;
_root.en3._y = -20;
duplicateMovieClip (_root.en3, "enem" + ennum, 300 + ennum);
_root.en3._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 468;
_root.cenmaxlife = 468;
}
_root.cenreward = 10;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 10) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Scout II [AIR]: 585HP 10R\nNEXT WAVE: [LAND]: 731HP 12R";
_root.en4._x = 70;
_root.en4._y = -20;
duplicateMovieClip (_root.en4, "enem" + ennum, 300 + ennum);
_root.en4._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 585;
_root.cenmaxlife = 585;
}
_root.cenreward = 10;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 11) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Mirth [LAND]: 731HP 12R\nNEXT WAVE: [LAND]: 914HP 12R";
_root.en5._x = 70;
_root.en5._y = -20;
duplicateMovieClip (_root.en5, "enem" + ennum, 300 + ennum);
_root.en5._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 731;
_root.cenmaxlife = 731;
}
_root.cenreward = 12;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 12) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Mirth II [LAND]: 914HP 12R\nNEXT WAVE: [LAND]: 1143HP 14R";
_root.en5._x = 70;
_root.en5._y = -20;
duplicateMovieClip (_root.en5, "enem" + ennum, 300 + ennum);
_root.en5._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 914;
_root.cenmaxlife = 914;
}
_root.cenreward = 12;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 13) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Mirth III [LAND]: 1143HP 14R\nNEXT WAVE: [LAND]: 1428HP 14R";
_root.en5._x = 70;
_root.en5._y = -20;
duplicateMovieClip (_root.en5, "enem" + ennum, 300 + ennum);
_root.en5._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 1143;
_root.cenmaxlife = 1143;
}
_root.cenreward = 14;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 14) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Mirth IV [LAND]: 1428HP 14R\nNEXT WAVE: [AIR]: 1520HP 16R";
_root.en5._x = 70;
_root.en5._y = -20;
duplicateMovieClip (_root.en5, "enem" + ennum, 300 + ennum);
_root.en5._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 1428;
_root.cenmaxlife = 1428;
}
_root.cenreward = 14;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 15) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Scout III [AIR]: 1520HP 16R\nNEXT WAVE: [LAND]: 1785HP 16R";
_root.en6._x = 70;
_root.en6._y = -20;
duplicateMovieClip (_root.en6, "enem" + ennum, 300 + ennum);
_root.en6._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 1520;
_root.cenmaxlife = 1520;
}
_root.cenreward = 16;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 16) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Leech [LAND]: 1785HP 16R\nNEXT WAVE: [LAND]: 2231HP 18R";
_root.en7._x = 70;
_root.en7._y = -20;
duplicateMovieClip (_root.en7, "enem" + ennum, 300 + ennum);
_root.en7._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 1785;
_root.cenmaxlife = 1785;
}
_root.cenreward = 16;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 17) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Leech II [LAND]: 2231HP 18R\nNEXT WAVE: [LAND]: 2789HP 18R";
_root.en7._x = 70;
_root.en7._y = -20;
duplicateMovieClip (_root.en7, "enem" + ennum, 300 + ennum);
_root.en7._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 2231;
_root.cenmaxlife = 2231;
}
_root.cenreward = 18;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 18) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Leech III [LAND]: 2789HP 14R\nNEXT WAVE: [LAND]: 3486HP 20R";
_root.en7._x = 70;
_root.en7._y = -20;
duplicateMovieClip (_root.en7, "enem" + ennum, 300 + ennum);
_root.en7._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 2789;
_root.cenmaxlife = 2789;
}
_root.cenreward = 18;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 19) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Leech IV [LAND]: 3486HP 14R\nNEXT WAVE: [BOSS]: 60,000HP 700R";
_root.en7._x = 70;
_root.en7._y = -20;
duplicateMovieClip (_root.en7, "enem" + ennum, 300 + ennum);
_root.en7._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 3486;
_root.cenmaxlife = 3486;
}
_root.cenreward = 20;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 20) {
_root.boss1.gotoAndPlay(1);
_root.land = true;
_root.air = true;
_root.informer.text = "Alien Destroyer [BOSS]: 60,000HP 700R\nNEXT WAVE: [LAND]: 4358HP 32R";
_root.boss1._x = 70;
_root.boss1._y = -20;
duplicateMovieClip (_root.boss1, "enem1", 301);
_root.boss1._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[1] = 60000;
_root.cenmaxlife = 60000;
}
_root.cenreward = 700;
_root.deaden = 19;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
ennum = 30;
} else if (_root.clevel == 21) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Globule [LAND]: 4358HP 32R\nNEXT WAVE: [LAND]: 5012HP 34R";
_root.en8._x = 70;
_root.en8._y = -20;
duplicateMovieClip (_root.en8, "enem" + ennum, 300 + ennum);
_root.en8._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 4358;
_root.cenmaxlife = 4358;
}
_root.cenreward = 32;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 22) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Globule II [LAND]: 5012HP 34R\nNEXT WAVE: [LAND]: 5764HP 36R";
_root.en8._x = 70;
_root.en8._y = -20;
duplicateMovieClip (_root.en8, "enem" + ennum, 300 + ennum);
_root.en8._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 5012;
_root.cenmaxlife = 5012;
}
_root.cenreward = 34;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 23) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Globule III [LAND]: 5764HP 36R\nNEXT WAVE: [LAND]: 6629HP 38R";
_root.en8._x = 70;
_root.en8._y = -20;
duplicateMovieClip (_root.en8, "enem" + ennum, 300 + ennum);
_root.en8._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 5764;
_root.cenmaxlife = 5764;
}
_root.cenreward = 36;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 24) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Globule IV [LAND]: 6629HP 38R\nNEXT WAVE: [AIR]: 7623HP 40R";
_root.en8._x = 70;
_root.en8._y = -20;
duplicateMovieClip (_root.en8, "enem" + ennum, 300 + ennum);
_root.en8._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 6629;
_root.cenmaxlife = 6629;
}
_root.cenreward = 38;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 25) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Seeker [AIR]: 7623HP 40R\nNEXT WAVE: [LAND]: 8766HP 42R";
_root.en9._x = 70;
_root.en9._y = -20;
duplicateMovieClip (_root.en9, "enem" + ennum, 300 + ennum);
_root.en9._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 7623;
_root.cenmaxlife = 7623;
}
_root.cenreward = 40;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 26) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Jelly [LAND]: 8766HP 42R\nNEXT WAVE: [LAND]: 10,081HP 44R";
_root.en10._x = 70;
_root.en10._y = -20;
duplicateMovieClip (_root.en10, "enem" + ennum, 300 + ennum);
_root.en10._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 8766;
_root.cenmaxlife = 8766;
}
_root.cenreward = 42;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 27) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Jelly II [LAND]: 10,081HP 44R\nNEXT WAVE: [LAND]: 11,593HP 46R";
_root.en10._x = 70;
_root.en10._y = -20;
duplicateMovieClip (_root.en10, "enem" + ennum, 300 + ennum);
_root.en10._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 10081;
_root.cenmaxlife = 10081;
}
_root.cenreward = 44;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 28) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Jelly III [LAND]: 11,593HP 46R\nNEXT WAVE: [LAND]: 13,332HP 48R";
_root.en10._x = 70;
_root.en10._y = -20;
duplicateMovieClip (_root.en10, "enem" + ennum, 300 + ennum);
_root.en10._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 11593;
_root.cenmaxlife = 11593;
}
_root.cenreward = 46;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 29) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Jelly IV [LAND]: 13,332HP 48R\nNEXT WAVE: [AIR]: 15,332HP 50R";
_root.en10._x = 70;
_root.en10._y = -20;
duplicateMovieClip (_root.en10, "enem" + ennum, 300 + ennum);
_root.en10._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 13332;
_root.cenmaxlife = 13332;
}
_root.cenreward = 48;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 30) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Seeker II [AIR]: 15,332HP 50R\nNEXT WAVE: [LAND]: 18,398HP 60R";
_root.en11._x = 70;
_root.en11._y = -20;
duplicateMovieClip (_root.en11, "enem" + ennum, 300 + ennum);
_root.en11._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 15332;
_root.cenmaxlife = 15332;
}
_root.cenreward = 50;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 31) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Eye [LAND]: 18,398HP 60R\nNEXT WAVE: [LAND]: 22,078HP 64R";
_root.en12._x = 70;
_root.en12._y = -20;
duplicateMovieClip (_root.en12, "enem" + ennum, 300 + ennum);
_root.en12._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 18398;
_root.cenmaxlife = 18398;
}
_root.cenreward = 60;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 32) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Eye II [LAND]: 22,078HP 64R\nNEXT WAVE: [LAND]: 26,494HP 70R";
_root.en12._x = 70;
_root.en12._y = -20;
duplicateMovieClip (_root.en12, "enem" + ennum, 300 + ennum);
_root.en12._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 22078;
_root.cenmaxlife = 22078;
}
_root.cenreward = 64;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 33) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Eye III [LAND]: 26,494HP 70R\nNEXT WAVE: [LAND]: 31,793HP 74R";
_root.en12._x = 70;
_root.en12._y = -20;
duplicateMovieClip (_root.en12, "enem" + ennum, 300 + ennum);
_root.en12._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 26494;
_root.cenmaxlife = 26494;
}
_root.cenreward = 70;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 34) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Eye IV [LAND]: 31,793HP 74R\nNEXT WAVE: [AIR]: 38,152HP 78R";
_root.en12._x = 70;
_root.en12._y = -20;
duplicateMovieClip (_root.en12, "enem" + ennum, 300 + ennum);
_root.en12._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 31793;
_root.cenmaxlife = 31793;
}
_root.cenreward = 74;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 35) {
_root.land = false;
_root.air = true;
_root.informer.text = "Alien Seeker III [AIR]: 38,152HP 78R\nNEXT WAVE: [LAND]: 45,782HP 82R";
_root.en13._x = 70;
_root.en13._y = -20;
duplicateMovieClip (_root.en13, "enem" + ennum, 300 + ennum);
_root.en13._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 38152;
_root.cenmaxlife = 38152;
}
_root.cenreward = 78;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 36) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Spawn [LAND]: 45,782HP 82R\nNEXT WAVE: [LAND]: 54,938HP 86R";
_root.en14._x = 70;
_root.en14._y = -20;
duplicateMovieClip (_root.en14, "enem" + ennum, 300 + ennum);
_root.en14._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 45782;
_root.cenmaxlife = 45782;
}
_root.cenreward = 82;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 37) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Spawn II [LAND]: 54,938HP 86R\nNEXT WAVE: [LAND]: 65,926HP 90R";
_root.en14._x = 70;
_root.en14._y = -20;
duplicateMovieClip (_root.en14, "enem" + ennum, 300 + ennum);
_root.en14._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 54938;
_root.cenmaxlife = 54938;
}
_root.cenreward = 86;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 38) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Spawn III [LAND]: 65,926HP 90R\nNEXT WAVE: [LAND]: 79,111HP 94R";
_root.en14._x = 70;
_root.en14._y = -20;
duplicateMovieClip (_root.en14, "enem" + ennum, 300 + ennum);
_root.en14._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 65926 /* 0x010186 */;
_root.cenmaxlife = 65926 /* 0x010186 */;
}
_root.cenreward = 90;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 39) {
_root.land = true;
_root.air = false;
_root.informer.text = "Alien Spawn IV [LAND]: 79,111HP 94R\nNEXT WAVE: [BOSS]: 2,000,000HP 3000R";
_root.en14._x = 70;
_root.en14._y = -20;
duplicateMovieClip (_root.en14, "enem" + ennum, 300 + ennum);
_root.en14._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 79111 /* 0x013507 */;
_root.cenmaxlife = 79111 /* 0x013507 */;
}
_root.cenreward = 94;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
} else if (_root.clevel == 40) {
_root.land = true;
_root.air = true;
_root.informer.text = "Alien Mother [BOSS]: 2,000,000HP 3000R";
_root.boss2._x = 70;
_root.boss2._y = -20;
duplicateMovieClip (_root.boss2, "enem" + ennum, 300 + ennum);
_root.boss2._y = -50;
if (_root.ugmode == true) {
_root.cenlife[ennum] = _root.ugenlife;
_root.cenmaxlife = _root.ugenlife;
} else {
_root.cenlife[ennum] = 2000000 /* 0x1E8480 */;
_root.cenmaxlife = 2000000 /* 0x1E8480 */;
}
_root.cenreward = 3000;
_root.deaden = 19;
_root.enbarnum = ennum;
duplicateMovieClip (_root.enbar, "enbar" + ennum, 1000 + ennum);
ennum = 30;
}
ennum = ennum + 1;
}
}
if (_root.sendwave == true) {
t = 1;
while (t <= 21) {
if (((_root.cenlife[t] <= 0) and (_root.cenlife[t] != undefined)) and (_root["enem" + t] != undefined)) {
_root.killexplode(_root["enem" + t]._x, _root["enem" + t]._y);
removeMovieClip(_root["enem" + t]);
removeMovieClip(_root["enbar" + t]);
_root.score = _root.score + (5 * _root.clevel);
_root.resources = _root.resources + _root.cenreward;
_root.deaden = _root.deaden + 1;
_root.killeden = _root.killeden + 1;
}
t = t + 1;
}
if (_root.deaden >= 20) {
ennum = 1;
_root.sendwave = false;
_root.deadboss = false;
_root.deaden = 0;
_root.resources = _root.resources + Math.round(_root.resources * 0.05);
if (_root.clevel == 40) {
_root.score = _root.score + (((_root.lives * 1000) + (_root.resources * 3)) + (_root.rad * 200));
_root.stdsheet._x = 900;
_root.advsheet._x = 900;
_root.radsheet._x = 900;
_root.gamecompletesheet.gotoAndPlay(1);
_root.gamecompletesheet._x = 500;
_root.gamecompletesheet._y = 155;
_root.localInfo.data.ug = true;
}
if (_root.killeden == 20) {
_root.rad = _root.rad + 1;
_root.resources = _root.resources + (3 * _root.clevel);
}
_root.killeden = 0;
}
}
}
Instance of Symbol 41 MovieClip "enbar" in Frame 1
onClipEvent (load) {
enemy = _root.enbarnum;
this.gotoAndStop(1);
showbar = false;
}
onClipEvent (enterFrame) {
if (showbar == true) {
this._x = _root["enem" + enemy]._x;
this._y = _root["enem" + enemy]._y - 5;
} else {
this._x = -100;
}
frame = 31 - Math.round((_root.cenlife[enemy] / _root.cenmaxlife) * 30);
this.gotoAndStop(frame);
if (_root.sendwave == false) {
removeMovieClip(this);
}
}
onClipEvent (keyDown) {
showbar = true;
}
onClipEvent (keyUp) {
showbar = false;
}
Instance of Symbol 43 MovieClip "stammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "stammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xr < 0) and (yr < 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 270 + Math.round(angle);
} else if ((xr < 0) and (yr > 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = 180 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr > 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 90 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr < 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = Math.abs(Math.round(angle));
} else if ((xr == 0) and (yr > 0)) {
this._rotation = 180;
} else if ((yr == 0) and (xr > 0)) {
this._rotation = 90;
} else if ((yr == 0) and (xr < 0)) {
this._rotation = 270;
}
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
i = 1;
while (i <= 20) {
if ((((i != t) and (Math.abs(_root["enem" + t]._x - _root["enem" + i]._x) <= 30)) and (Math.abs(_root["enem" + t]._y - _root["enem" + i]._y) <= 30)) and (_root["enem" + i] != undefined)) {
_root.cenlife[i] = _root.cenlife[i] - (damage / 2);
}
i = i + 1;
}
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 45 MovieClip "en6" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en6")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 47 MovieClip "mtammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "mtammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 51 MovieClip "en7" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en7")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 62 MovieClip "boss1" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = 20;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "boss1")) {
if (dir == 1) {
this._y = this._y - 1;
}
if (dir == 2) {
this._x = this._x + 1;
}
if (dir == 3) {
this._y = this._y + 1;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 64 MovieClip "btammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "btammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xr < 0) and (yr < 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 270 + Math.round(angle);
} else if ((xr < 0) and (yr > 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = 180 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr > 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 90 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr < 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = Math.abs(Math.round(angle));
} else if ((xr == 0) and (yr > 0)) {
this._rotation = 180;
} else if ((yr == 0) and (xr > 0)) {
this._rotation = 90;
} else if ((yr == 0) and (xr < 0)) {
this._rotation = 270;
}
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
i = 1;
while (i <= 20) {
if ((((i != t) and (Math.abs(this._x - _root["enem" + i]._x) <= 30)) and (Math.abs(this._y - _root["enem" + i]._y) <= 30)) and (_root["enem" + i] != undefined)) {
_root.cenlife[i] = _root.cenlife[i] - (damage / 2);
}
i = i + 1;
}
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 70 MovieClip "boss2" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = 20;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "boss2")) {
if (dir == 1) {
this._y = this._y - 1;
}
if (dir == 2) {
this._x = this._x + 1;
}
if (dir == 3) {
this._y = this._y + 1;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 175 MovieClip "rangeindi" in Frame 1
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 365 MovieClip "GToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 8;
range = 80;
speed = 1;
cost = 15;
upgradeclick = 0;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "GToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.gtd[_root.ctulvl] + (_root.gtd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 2) + ((range + 2) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.gtc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if (((_root.sendwave == true) and (timer >= 20)) and (this._name != "GToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t]._name != undefined)) {
_root.artfire();
duplicateMovieClip (_root.gtammo, "gtammo" + _root.gtamnum, 400 + _root.gtamnum);
_root["gtammo" + _root.gtamnum]._x = this._x;
_root["gtammo" + _root.gtamnum]._y = this._y;
_root["gtammo" + _root.gtamnum].enemy = t;
_root["gtammo" + _root.gtamnum].damage = damage;
_root["gtammo" + _root.gtamnum].xr = _root["enem" + t]._x - this._x;
_root["gtammo" + _root.gtamnum].yr = _root["enem" + t]._y - this._y;
_root["gtammo" + _root.gtamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["gtammo" + _root.gtamnum].range = range;
timer = 0;
t = 30;
_root.gtamnum = _root.gtamnum + 1;
if (_root.gtamnum >= 50) {
_root.gtamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 368 MovieClip "SToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 40;
range = 100;
speed = 3;
cost = 30;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "SToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.std[_root.ctulvl] + (_root.std[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.stc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if ((((_root.land == true) and (_root.sendwave == true)) and (timer >= 35)) and (this._name != "SToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.mortarfire();
duplicateMovieClip (_root.stammo, "stammo" + _root.stamnum, 450 + _root.stamnum);
_root["stammo" + _root.stamnum]._x = this._x;
_root["stammo" + _root.stamnum]._y = this._y;
_root["stammo" + _root.stamnum].enemy = t;
_root["stammo" + _root.stamnum].damage = damage;
_root["stammo" + _root.stamnum].xr = _root["enem" + t]._x - this._x;
_root["stammo" + _root.stamnum].yr = _root["enem" + t]._y - this._y;
_root["stammo" + _root.stamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["stammo" + _root.stamnum].range = range;
timer = 0;
t = 30;
_root.stamnum = _root.stamnum + 1;
if (_root.stamnum >= 50) {
_root.stamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 375 MovieClip "PToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 500;
range = 120;
speed = 1;
cost = 500;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "PToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.ptd[_root.ctulvl] + (_root.ptd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.ptc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if (((_root.sendwave == true) and (timer >= 20)) and (this._name != "PToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.missfire();
duplicateMovieClip (_root.ptammo, "ptammo" + _root.ptamnum, 550 + _root.ptamnum);
_root["ptammo" + _root.ptamnum]._x = this._x;
_root["ptammo" + _root.ptamnum]._y = this._y;
_root["ptammo" + _root.ptamnum].enemy = t;
_root["ptammo" + _root.ptamnum].damage = damage;
_root["ptammo" + _root.ptamnum].xr = _root["enem" + t]._x - this._x;
_root["ptammo" + _root.ptamnum].yr = _root["enem" + t]._y - this._y;
_root["ptammo" + _root.ptamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["ptammo" + _root.ptamnum].range = range;
timer = 0;
t = 30;
_root.ptamnum = _root.ptamnum + 1;
if (_root.ptamnum >= 50) {
_root.ptamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 382 MovieClip "AToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 70;
range = 80;
speed = 2;
cost = 50;
upgradeclick = 0;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "AToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.atd[_root.ctulvl] + (_root.atd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.atc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if ((((_root.air == true) and (_root.sendwave == true)) and (timer >= 35)) and (this._name != "AToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.artfire();
duplicateMovieClip (_root.atammo, "atammo" + _root.atamnum, 500 + _root.atamnum);
_root["atammo" + _root.atamnum]._x = this._x;
_root["atammo" + _root.atamnum]._y = this._y;
_root["atammo" + _root.atamnum].enemy = t;
_root["atammo" + _root.atamnum].damage = damage;
_root["atammo" + _root.atamnum].xr = _root["enem" + t]._x - this._x;
_root["atammo" + _root.atamnum].yr = _root["enem" + t]._y - this._y;
_root["atammo" + _root.atamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["atammo" + _root.atamnum].range = range;
timer = 0;
if ((_root.atx < 0) and (_root.aty < 0)) {
angle = (Math.atan((_root.aty / _root.atunit) / (_root.atx / _root.atunit)) * 180) / 3.14;
atgun._rotation = 270 + Math.round(angle);
} else if ((_root.atx < 0) and (_root.aty > 0)) {
angle = (Math.atan((_root.atx / _root.atunit) / (_root.aty / _root.atunit)) * 180) / 3.14;
atgun._rotation = 180 + Math.abs(Math.round(angle));
} else if ((_root.atx > 0) and (_root.aty > 0)) {
angle = (Math.atan((_root.aty / _root.atunit) / (_root.atx / _root.atunit)) * 180) / 3.14;
atgun._rotation = 90 + Math.abs(Math.round(angle));
} else if ((_root.atx > 0) and (_root.aty < 0)) {
angle = (Math.atan((_root.atx / _root.atunit) / (_root.aty / _root.atunit)) * 180) / 3.14;
atgun._rotation = Math.abs(Math.round(angle));
}
t = 30;
_root.atamnum = _root.atamnum + 1;
if (_root.atamnum >= 50) {
_root.atamnum = 1;
}
}
t = t + 1;
}
}
if (((_root.air == true) and (_root.sendwave == true)) and (this._name != "AToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
aimx = _root["enem" + t]._x - this._x;
aimy = _root["enem" + t]._y - this._y;
aimunit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
if ((aimx < 0) and (aimy < 0)) {
angle = (Math.atan((aimy / aimunit) / (aimx / aimunit)) * 180) / 3.14;
atgun._rotation = 270 + Math.round(angle);
} else if ((aimx < 0) and (aimy > 0)) {
angle = (Math.atan((aimx / aimunit) / (aimy / aimunit)) * 180) / 3.14;
atgun._rotation = 180 + Math.abs(Math.round(angle));
} else if ((aimx > 0) and (aimy > 0)) {
angle = (Math.atan((aimy / aimunit) / (aimx / aimunit)) * 180) / 3.14;
atgun._rotation = 90 + Math.abs(Math.round(angle));
} else if ((aimx > 0) and (aimy < 0)) {
angle = (Math.atan((aimx / aimunit) / (aimy / aimunit)) * 180) / 3.14;
atgun._rotation = Math.abs(Math.round(angle));
}
t = 30;
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 386 MovieClip "en1" in Frame 1
onClipEvent (load) {
dir = 3;
rota = 1;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en1")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 388 MovieClip "gtammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "gtammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t]._name != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 25;
} else if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
t = t + 1;
}
}
Instance of Symbol 390 MovieClip "en2" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(3);
rand2 = random(4);
if (this._y > 520) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en2")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 392 MovieClip "en4" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en4")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 396 MovieClip "en5" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en5")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 434 MovieClip "upgradesheet" in Frame 1
onClipEvent (enterFrame) {
if (_root.showupgrade == true) {
this._x = 500;
this._y = 155;
_root.stdsheet._x = 900;
_root.advsheet._x = 900;
_root.radsheet._x = 900;
ctlvltxt.text = "Level: " + String(_root.ctlvl);
ctdamtxt.text = "Damage: " + String(_root.ctdam);
ctrtxt.text = "Range: " + String(_root.ctr);
if (_root.cts == 1) {
ctstxt.text = "Speed: Fast";
} else if (_root.cts == 2) {
ctstxt.text = "Speed: Medium";
} else if (_root.cts == 3) {
ctstxt.text = "Speed: Slow";
} else {
ctstxt.text = "Unknown";
}
ctsptxt.text = "Sell Price: " + String(_root.ctsp);
if (_root.ctulvl <= 4) {
ctulvltxt.text = "Level: " + String(_root.ctulvl);
ctudamtxt.text = "Damage: " + String(_root.ctudam);
cturtxt.text = "Range: " + String(_root.ctur);
if (_root.ctus == 1) {
ctustxt.text = "Speed: Fast";
} else if (_root.ctus == 2) {
ctustxt.text = "Speed: Medium";
} else if (_root.ctus == 3) {
ctustxt.text = "Speed: Slow";
} else {
ctustxt.text = "Speed: Unknown";
}
ctuctxt.text = "Upgrade Cost: " + String(_root.ctuc);
} else if (_root.ctulvl > 4) {
ctulvltxt.text = "";
ctudamtxt.text = "";
cturtxt.text = "No More Upgrades";
ctustxt.text = "";
ctuctxt.text = "";
}
} else {
this._x = 900;
}
}
Instance of Symbol 436 MovieClip "atammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "atammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 440 MovieClip "en3" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(3);
rand2 = random(4);
if (this._y > 520) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en3")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 446 MovieClip "MToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 1200;
range = 120;
speed = 1;
cost = 1200;
upgradeclick = 0;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "MToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.mtd[_root.ctulvl] + (_root.mtd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 2) + ((range + 2) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.mtc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if (((_root.sendwave == true) and (timer >= 20)) and (this._name != "MToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.artfire();
duplicateMovieClip (_root.mtammo, "mtammo" + _root.mtamnum, 600 + _root.mtamnum);
_root["mtammo" + _root.mtamnum]._x = this._x;
_root["mtammo" + _root.mtamnum]._y = this._y;
_root["mtammo" + _root.mtamnum].enemy = t;
_root["mtammo" + _root.mtamnum].damage = damage;
_root["mtammo" + _root.mtamnum].xr = _root["enem" + t]._x - this._x;
_root["mtammo" + _root.mtamnum].yr = _root["enem" + t]._y - this._y;
_root["mtammo" + _root.mtamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["mtammo" + _root.mtamnum].range = range;
timer = 0;
if ((_root.mtx < 0) and (_root.mty < 0)) {
angle = (Math.atan((_root.mty / _root.mtunit) / (_root.mtx / _root.mtunit)) * 180) / 3.14;
mtgun._rotation = 270 + Math.round(angle);
} else if ((_root.mtx < 0) and (_root.mty > 0)) {
angle = (Math.atan((_root.mtx / _root.mtunit) / (_root.mty / _root.mtunit)) * 180) / 3.14;
mtgun._rotation = 180 + Math.abs(Math.round(angle));
} else if ((_root.mtx > 0) and (_root.mty > 0)) {
angle = (Math.atan((_root.mty / _root.mtunit) / (_root.mtx / _root.mtunit)) * 180) / 3.14;
mtgun._rotation = 90 + Math.abs(Math.round(angle));
} else if ((_root.mtx > 0) and (_root.mty < 0)) {
angle = (Math.atan((_root.mtx / _root.mtunit) / (_root.mty / _root.mtunit)) * 180) / 3.14;
mtgun._rotation = Math.abs(Math.round(angle));
}
t = 30;
_root.mtamnum = _root.mtamnum + 1;
if (_root.mtamnum >= 50) {
_root.mtamnum = 1;
}
}
t = t + 1;
}
}
if ((_root.sendwave == true) and (this._name != "MToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
aimx = _root["enem" + t]._x - this._x;
aimy = _root["enem" + t]._y - this._y;
aimunit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
if ((aimx < 0) and (aimy < 0)) {
angle = (Math.atan((aimy / aimunit) / (aimx / aimunit)) * 180) / 3.14;
mtgun._rotation = 270 + Math.round(angle);
} else if ((aimx < 0) and (aimy > 0)) {
angle = (Math.atan((aimx / aimunit) / (aimy / aimunit)) * 180) / 3.14;
mtgun._rotation = 180 + Math.abs(Math.round(angle));
} else if ((aimx > 0) and (aimy > 0)) {
angle = (Math.atan((aimy / aimunit) / (aimx / aimunit)) * 180) / 3.14;
mtgun._rotation = 90 + Math.abs(Math.round(angle));
} else if ((aimx > 0) and (aimy < 0)) {
angle = (Math.atan((aimx / aimunit) / (aimy / aimunit)) * 180) / 3.14;
mtgun._rotation = Math.abs(Math.round(angle));
}
t = 30;
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 450 MovieClip "en8" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en8")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 452 MovieClip "en9" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en9")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 485 MovieClip "LToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 4000;
range = 150;
speed = 1;
cost = 1500;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "LToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.ltd[_root.ctulvl] + (_root.ltd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.ltc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if ((((_root.air == true) and (_root.sendwave == true)) and (timer >= 20)) and (this._name != "LToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.missfire();
duplicateMovieClip (_root.ltammo, "ltammo" + _root.ltamnum, 550 + _root.ltamnum);
_root["ltammo" + _root.ltamnum]._x = this._x;
_root["ltammo" + _root.ltamnum]._y = this._y;
_root["ltammo" + _root.ltamnum].enemy = t;
_root["ltammo" + _root.ltamnum].damage = damage;
_root["ltammo" + _root.ltamnum].xr = _root["enem" + t]._x - this._x;
_root["ltammo" + _root.ltamnum].yr = _root["enem" + t]._y - this._y;
_root["ltammo" + _root.ltamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["ltammo" + _root.ltamnum].range = range;
timer = 0;
t = 30;
_root.ltamnum = _root.ltamnum + 1;
if (_root.ltamnum >= 50) {
_root.ltamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 492 MovieClip "HToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 3500;
range = 210;
speed = 2;
cost = 1800;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "HToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.htd[_root.ctulvl] + (_root.htd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.htc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if (((_root.sendwave == true) and (timer >= 35)) and (this._name != "HToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= range) and (_root["enem" + t] != undefined)) {
_root.missfire();
duplicateMovieClip (_root.htammo, "htammo" + _root.htamnum, 550 + _root.htamnum);
_root["htammo" + _root.htamnum]._x = this._x;
_root["htammo" + _root.htamnum]._y = this._y;
_root["htammo" + _root.htamnum].enemy = t;
_root["htammo" + _root.htamnum].damage = damage;
_root["htammo" + _root.htamnum].xr = _root["enem" + t]._x - this._x;
_root["htammo" + _root.htamnum].yr = _root["enem" + t]._y - this._y;
_root["htammo" + _root.htamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["htammo" + _root.htamnum].range = range;
timer = 0;
t = 30;
_root.htamnum = _root.htamnum + 1;
if (_root.htamnum >= 50) {
_root.htamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 495 MovieClip "ptammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "ptammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xr < 0) and (yr < 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 270 + Math.round(angle);
} else if ((xr < 0) and (yr > 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = 180 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr > 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 90 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr < 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = Math.abs(Math.round(angle));
} else if ((xr == 0) and (yr > 0)) {
this._rotation = 180;
} else if ((yr == 0) and (xr > 0)) {
this._rotation = 90;
} else if ((yr == 0) and (xr < 0)) {
this._rotation = 270;
}
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 495 MovieClip "ltammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "ltammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xr < 0) and (yr < 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 270 + Math.round(angle);
} else if ((xr < 0) and (yr > 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = 180 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr > 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 90 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr < 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = Math.abs(Math.round(angle));
} else if ((xr == 0) and (yr > 0)) {
this._rotation = 180;
} else if ((yr == 0) and (xr > 0)) {
this._rotation = 90;
} else if ((yr == 0) and (xr < 0)) {
this._rotation = 270;
}
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 498 MovieClip "BToriginal" in Frame 1
onClipEvent (load) {
consider = false;
ulvl = 0;
damage = 3500;
range = 200;
speed = 3;
cost = 1200;
clicked = false;
ranged = false;
rangetick = 0;
timer = 100;
}
onClipEvent (mouseDown) {
if ((((clicked == false) and (Math.abs(_root._xmouse - this._x) <= 20)) and (Math.abs(_root._ymouse - this._y) <= 20)) and (this._name != "BToriginal")) {
clicked = true;
ranged = true;
consider = true;
_root.showupgrade = true;
_root.ctlvl = ulvl;
_root.ctdam = damage;
_root.ctr = range;
_root.cts = speed;
_root.ctsp = Math.round(cost / 2);
_root.ctulvl = ulvl + 1;
_root.ctudam = Math.round(_root.btd[_root.ctulvl] + (_root.btd[_root.ctulvl] * _root.dambonus));
_root.ctur = Math.round((range + 10) + ((range + 10) * _root.rangebonus));
_root.ctus = speed;
_root.ctuc = _root.btc[_root.ctulvl];
} else if (((((((clicked == true) and ((Math.abs(_root._xmouse - this._x) > 20) or (Math.abs(_root._ymouse - this._y) > 20))) and (ranged == false)) and ((_root._xmouse < 500) or ((_root._xmouse > 500) and ((_root._ymouse < 155) or (_root._ymouse > 400))))) and (_root._ymouse > 10)) and (_root._ymouse < 490)) and (_root._xmouse < 790)) {
_root.rangeindi._y = 900;
clicked = false;
consider = false;
h = Math.round(((_root._xmouse - 30) / 40) + 1);
v = Math.round(((_root._ymouse - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
if (((_root.cmap[s] == 0) or (_root.cmap[s] == 1)) or (_root.cmap[s] == undefined)) {
_root.showupgrade = false;
}
}
}
onClipEvent (enterFrame) {
if (_root.displayup == true) {
uplvltxt.text = String(ulvl);
} else {
uplvltxt.text = "";
}
timer = timer + 1;
rangetick = rangetick + 1;
if ((rangetick == 2) and (ranged == true)) {
_root.rangeindi._x = this._x;
_root.rangeindi._y = this._y;
_root.rangeindi.gotoAndStop(range - 79);
ranged = false;
}
if (rangetick >= 2) {
rangetick = 0;
}
if ((((_root.land == true) and (_root.sendwave == true)) and (timer >= 50)) and (this._name != "BToriginal")) {
t = 1;
while (t <= 21) {
if ((_root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y) <= (range + 10)) and (_root["enem" + t] != undefined)) {
_root.mortarfire();
duplicateMovieClip (_root.btammo, "btammo" + _root.btamnum, 550 + _root.btamnum);
_root["btammo" + _root.btamnum]._x = this._x;
_root["btammo" + _root.btamnum]._y = this._y;
_root["btammo" + _root.btamnum].enemy = t;
_root["btammo" + _root.btamnum].damage = damage;
_root["btammo" + _root.btamnum].xr = _root["enem" + t]._x - this._x;
_root["btammo" + _root.btamnum].yr = _root["enem" + t]._y - this._y;
_root["btammo" + _root.btamnum].unit = _root.dist(this._x, this._y, _root["enem" + t]._x, _root["enem" + t]._y);
_root["btammo" + _root.btamnum].range = range;
timer = 0;
t = 30;
_root.btamnum = _root.btamnum + 1;
if (_root.btamnum >= 50) {
_root.btamnum = 1;
}
}
t = t + 1;
}
}
if (consider == true) {
if (_root.selltower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.selltower = false;
_root.showupgrade = false;
loc = ((this._x + 10) / 40) - 1;
loc = loc + ((((this._y + 10) / 40) - 1) * 12);
_root.cmap[loc] = "1";
removeMovieClip(this);
}
if (_root.upgradetower == true) {
consider = false;
clicked = false;
_root.rangeindi._y = 900;
_root.upgradetower = false;
_root.showupgrade = false;
ulvl = _root.ctulvl;
damage = _root.ctudam;
range = _root.ctur;
speed = _root.ctus;
cost = cost + _root.ctuc;
}
}
}
Instance of Symbol 501 MovieClip "htammo" in Frame 1
onClipEvent (load) {
travel = 0;
}
onClipEvent (enterFrame) {
xr = _root["enem" + enemy]._x - this._x;
yr = _root["enem" + enemy]._y - this._y;
unit = _root.dist(this._x, this._y, _root["enem" + enemy]._x, _root["enem" + enemy]._y);
if ((this._name != "htammo") and (this._x > -10)) {
xm = this._x;
ym = this._y;
this._x = this._x + ((xr / unit) * 5);
this._y = this._y + ((yr / unit) * 5);
if ((xr < 0) and (yr < 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 270 + Math.round(angle);
} else if ((xr < 0) and (yr > 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = 180 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr > 0)) {
angle = (Math.atan((yr / unit) / (xr / unit)) * 180) / 3.14;
this._rotation = 90 + Math.abs(Math.round(angle));
} else if ((xr > 0) and (yr < 0)) {
angle = (Math.atan((xr / unit) / (yr / unit)) * 180) / 3.14;
this._rotation = Math.abs(Math.round(angle));
} else if ((xr == 0) and (yr > 0)) {
this._rotation = 180;
} else if ((yr == 0) and (xr > 0)) {
this._rotation = 90;
} else if ((yr == 0) and (xr < 0)) {
this._rotation = 270;
}
if ((xm == this._x) and (ym == this._y)) {
_root.hitexplode(this._x, this._y);
removeMovieClip(this);
}
}
t = 1;
while (t <= 20) {
if (((Math.abs(this._x - _root["enem" + t]._x) <= 12) and (Math.abs(this._y - _root["enem" + t]._y) <= 12)) and (_root["enem" + t] != undefined)) {
_root.cenlife[t] = _root.cenlife[t] - damage;
if (_root.cenlife[t] > 0) {
_root.hitexplode(_root["enem" + t]._x, _root["enem" + t]._y);
}
removeMovieClip(this);
t = 21;
}
t = t + 1;
}
}
Instance of Symbol 503 MovieClip "en11" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en11")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 505 MovieClip "en13" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en13")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 511 MovieClip "en10" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en10")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 519 MovieClip "en12" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en12")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Instance of Symbol 527 MovieClip "en14" in Frame 1
onClipEvent (load) {
dir = 3;
}
onClipEvent (enterFrame) {
h = Math.round(((this._x - 30) / 40) + 1);
v = Math.round(((this._y - 30) / 40) + 1);
s = ((h + (v * 12)) - 12) - 1;
rand = random(2);
rand2 = random(3);
if (this._y > 510) {
removeMovieClip(this);
_root.deaden = _root.deaden + 1;
_root.lives = _root.lives - 1;
} else if ((_root.sendwave == true) and (this._name != "en14")) {
if (dir == 1) {
this._y = this._y - 2;
}
if (dir == 2) {
this._x = this._x + 2;
}
if (dir == 3) {
this._y = this._y + 2;
}
if (this._y <= 0) {
} else if (this._y >= 470) {
} else if (((dir == 1) and ((_root.cmap[s - 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 1;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 3;
}
} else if (((dir == 2) and (((_root.cmap[s + 1] != 0) or (_root.cmap[s - 12] == 0)) or (_root.cmap[s + 12] == 0))) and (((this._x + 10) % 40) == 0)) {
if (((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) and (_root.cmap[s + 1] == 0)) {
if (rand2 == 1) {
dir = 1;
} else if (rand2 == 2) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s - 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 1;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s + 1] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 2;
}
} else if ((_root.cmap[s + 12] == 0) and (_root.cmap[s - 12] == 0)) {
if (rand == 1) {
dir = 3;
} else {
dir = 1;
}
} else if (_root.cmap[s + 12] == 0) {
dir = 3;
} else if (_root.cmap[s - 12] == 0) {
dir = 1;
}
} else if (((dir == 3) and ((_root.cmap[s + 12] != 0) or (_root.cmap[s + 1] == 0))) and (((this._y + 10) % 40) == 0)) {
if ((_root.cmap[s + 1] == 0) and (_root.cmap[s + 12] == 0)) {
if (rand == 1) {
dir = 2;
} else {
dir = 3;
}
} else if (_root.cmap[s + 1] == 0) {
dir = 2;
} else {
dir = 1;
}
}
}
}
Symbol 164 Button
on (release) {
_root.gamecompletesheet._x = 900;
_root.creditsheet._x = 500;
_root.creditsheet._y = 155;
}
Symbol 165 MovieClip Frame 53
stop();
finalscore.text = "FINAL SCORE: " + _root.score;
Symbol 172 Button
on (release) {
_root.score = 0;
_root.lives = 20;
_root.resources = 0;
_root.rad = 0;
_root.clevel = 0;
_root.gamestart = false;
_root.gameover = false;
_root.rangeindi._y = 1000;
_root.deaden = 0;
_root.killeden = 0;
_root.dambonus = 0;
_root.rangebonus = 0;
_root.showupgrade = false;
_root.upgradetower = false;
_root.selltower = false;
_root.mapa._x = 10;
_root.mapa._y = 10;
_root.mapp = 1;
_root.mapb._x = -500;
_root.mapc._x = -500;
_root.mapd._x = -500;
_root.mape._x = -500;
_root.mapf._x = -500;
_root.gamecompletesheet._x = 900;
_root.creditsheet._x = 900;
_root.introsheet.gotoAndPlay(1);
_root.introsheet._x = 500;
t = 1;
while (t <= 200) {
removeMovieClip(_root["enem" + t]);
removeMovieClip(_root["GT" + t]);
t = t + 1;
}
}
Symbol 187 Button
on (release) {
if (((_root.gamestart == true) and (_root.sendwave == false)) and (_root.clevel < 40)) {
_root.sendwave = true;
_root.clevel = _root.clevel + 1;
}
}
Symbol 201 Button
on (release) {
if (gamestart == true) {
_root.advsheet._x = 900;
_root.upgradesheet._x = 900;
_root.radsheet._x = 900;
_root.stdsheet._x = 500;
_root.stdsheet._y = 155;
}
}
Symbol 208 Button
on (release) {
if (gamestart == true) {
_root.stdsheet._x = 900;
_root.upgradesheet._x = 900;
_root.radsheet._x = 900;
_root.advsheet._x = 500;
_root.advsheet._y = 155;
}
}
Symbol 215 Button
on (release) {
if (gamestart == true) {
_root.stdsheet._x = 900;
_root.advsheet._x = 900;
_root.upgradesheet._y = 900;
_root.radsheet._x = 500;
_root.radsheet._y = 155;
}
}
Symbol 261 Button
on (release) {
if (_root.mapp == 1) {
_root.mapp = 7;
_root.mapa._x = -500;
_root.mapg._x = 10;
_root.mapg._y = 10;
} else if (_root.mapp == 2) {
_root.mapp = 1;
_root.mapb._x = -500;
_root.mapa._x = 10;
_root.mapa._y = 10;
} else if (_root.mapp == 3) {
_root.mapp = 2;
_root.mapc._x = -500;
_root.mapb._x = 10;
_root.mapb._y = 10;
} else if (_root.mapp == 4) {
_root.mapp = 3;
_root.mapd._x = -500;
_root.mapc._x = 10;
_root.mapc._y = 10;
} else if (_root.mapp == 5) {
_root.mapp = 4;
_root.mape._x = -500;
_root.mapd._x = 10;
_root.mapd._y = 10;
} else if (_root.mapp == 6) {
_root.mapp = 5;
_root.mapf._x = -500;
_root.mape._x = 10;
_root.mape._y = 10;
} else if (_root.mapp == 7) {
_root.mapp = 6;
_root.mapg._x = -500;
_root.mapf._x = 10;
_root.mapf._y = 10;
}
maptxt.text = ("Map " + String(_root.mapp)) + "/7";
}
Symbol 262 Button
on (release) {
if (_root.mapp == 1) {
_root.mapp = 2;
_root.mapa._x = -500;
_root.mapb._x = 10;
_root.mapb._y = 10;
} else if (_root.mapp == 2) {
_root.mapp = 3;
_root.mapb._x = -500;
_root.mapc._x = 10;
_root.mapc._y = 10;
} else if (_root.mapp == 3) {
_root.mapp = 4;
_root.mapc._x = -500;
_root.mapd._x = 10;
_root.mapd._y = 10;
} else if (_root.mapp == 4) {
_root.mapp = 5;
_root.mapd._x = -500;
_root.mape._x = 10;
_root.mape._y = 10;
} else if (_root.mapp == 5) {
_root.mapp = 6;
_root.mape._x = -500;
_root.mapf._x = 10;
_root.mapf._y = 10;
} else if (_root.mapp == 6) {
_root.mapp = 7;
_root.mapf._x = -500;
_root.mapg._x = 10;
_root.mapg._y = 10;
} else if (_root.mapp == 7) {
_root.mapp = 1;
_root.mapg._x = -500;
_root.mapa._x = 10;
_root.mapa._y = 10;
}
maptxt.text = ("Map " + String(_root.mapp)) + "/7";
}
Symbol 270 Button
on (release) {
this.gotoAndStop(55);
_root.gamestart = true;
if (_root.mapp == 1) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 2) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "0", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 3) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 4) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 5) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 6) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 7) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
_root.ugsetlife._y = 600;
_root.ugmode = false;
}
Symbol 273 Button
on (release) {
getURL ("http://gouldgames.googlepages.com");
}
Symbol 280 Button
on (release) {
this.gotoAndStop(55);
_root.gamestart = true;
if (_root.mapp == 1) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 1000000 /* 0x0F4240 */;
}
if (_root.mapp == 2) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "0", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 3) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 4) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 5) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 6) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1", "1", "0", "0", "0", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
if (_root.mapp == 7) {
_root.cmap = new Array("1", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "1", "0", "1", "0", "1", "0", "1", "1", "0", "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "0", "1");
_root.resources = 100;
}
_root.resources = 10000000 /* 0x989680 */;
_root.rad = 10000000 /* 0x989680 */;
_root.ugsetlife._x = 500;
_root.ugsetlife._y = 445;
_root.ugmode = true;
}
Symbol 281 MovieClip Frame 54
if (_root.localInfo.data.ug == true) {
ugbutton._visible = true;
} else {
ugbutton._visible = false;
}
stop();
Symbol 294 Button
on (rollOver) {
towertxt.text = " The Guard Tower is a wooden tower. Weak artillery fire is its only defense against ground units.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 15) {
Mouse.hide();
_root.ctower = _root.GToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 15;
_root.rangeindi.gotoAndStop(1);
}
}
Symbol 303 Button
on (rollOver) {
towertxt.text = " The Stone Tower is a concrete bunker that uses mortar shells. Its rate of fire is low but the splash damage of the mortar shells more than makes up for it.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 30) {
Mouse.hide();
_root.ctower = _root.SToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 30;
_root.rangeindi.gotoAndStop(21);
}
}
Symbol 312 Button
on (rollOver) {
towertxt.text = " The Alert Tower is an anti-aircraft bunker, dealing high damage to air units.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 50) {
Mouse.hide();
_root.ctower = _root.AToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 50;
_root.rangeindi.gotoAndStop(1);
}
}
Symbol 318 Button
on (rollOver) {
towertxt.text = " The Power Tower is a small missile launching station. It deals out large amounts of damage at a quick rate, annihilating all enemies that venture too close.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 500) {
Mouse.hide();
_root.ctower = _root.PToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 500;
_root.rangeindi.gotoAndStop(41);
}
}
Symbol 333 Button
on (rollOver) {
towertxt.text = " The Main Tower is a high-grade artillery tower capable of attacking all enemy units.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 1000) {
Mouse.hide();
_root.ctower = _root.MToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 1000;
_root.rangeindi.gotoAndStop(41);
}
}
Symbol 342 Button
on (rollOver) {
towertxt.text = " The Base Tower is a high-grade concrete bunker. It uses large mortar shells to do area damage.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 1200) {
Mouse.hide();
_root.ctower = _root.BToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 1200;
_root.rangeindi.gotoAndStop(121);
}
}
Symbol 351 Button
on (rollOver) {
towertxt.text = " The Light Tower is a light missile launch facility.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 1500) {
Mouse.hide();
_root.ctower = _root.LToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 1500;
_root.rangeindi.gotoAndStop(71);
}
}
Symbol 360 Button
on (rollOver) {
towertxt.text = " The Heavy Tower is an advanced heavy missile launch facility.";
}
on (rollOut) {
towertxt.text = "";
}
on (release) {
if (_root.resources >= 1800) {
Mouse.hide();
_root.ctower = _root.HToriginal;
startDrag (_root.ctower, true);
_root.dragging = true;
_root.cprice = 1800;
_root.rangeindi.gotoAndStop(131);
}
}
Symbol 406 Button
on (release) {
_root.resources = _root.resources + _root.ctsp;
_root.selltower = true;
_root.upgradesheet._x = 900;
}
Symbol 414 Button
on (release) {
if (_root.ctulvl <= 4) {
if (_root.resources >= _root.ctuc) {
_root.resources = _root.resources - _root.ctuc;
_root.upgradetower = true;
_root.upgradesheet._x = 900;
}
}
}
Symbol 462 Button
on (release) {
if (_root.rad >= 10) {
_root.rad = _root.rad - 10;
_root.dambonus = _root.dambonus + 0.05;
}
}
Symbol 463 Button
on (release) {
if (_root.rad >= 10) {
_root.rad = _root.rad - 10;
_root.rangebonus = _root.rangebonus + 0.05;
}
}
Symbol 464 Button
on (release) {
if (_root.rad >= 18) {
_root.rad = _root.rad - 18;
_root.dambonus = _root.dambonus + 0.1;
}
}
Symbol 465 Button
on (release) {
if (_root.rad >= 18) {
_root.rad = _root.rad - 18;
_root.rangebonus = _root.rangebonus + 0.1;
}
}
Symbol 566 Button
on (release) {
_root.score = 0;
_root.lives = 20;
_root.resources = 0;
_root.rad = 0;
_root.clevel = 0;
_root.gamestart = false;
_root.gameover = false;
_root.deaden = 0;
_root.killeden = 0;
_root.rangeindi._y = 1000;
_root.dambonus = 0;
_root.rangebonus = 0;
_root.showupgrade = false;
_root.upgradetower = false;
_root.selltower = false;
_root.mapa._x = 10;
_root.mapa._y = 10;
_root.mapp = 1;
_root.mapb._x = -500;
_root.mapc._x = -500;
_root.mapd._x = -500;
_root.mape._x = -500;
_root.mapf._x = -500;
_root.gameoversheet._x = 900;
_root.introsheet.gotoAndPlay(1);
_root.introsheet._x = 500;
t = 1;
while (t <= 200) {
removeMovieClip(_root["enem" + t]);
removeMovieClip(_root["GT" + t]);
t = t + 1;
}
}
Symbol 568 MovieClip Frame 50
stop();
finalscore.text = "FINAL SCORE: " + _root.score;
Symbol 572 MovieClip Frame 11
stop();
Symbol 575 MovieClip Frame 11
stop();
Symbol 609 Button
on (release) {
_root.ugenlife = parseInt(setlifetxt.text);
}