Frame 1
difficulty = "Medium";
stop();
loadbar.stop();
soundOn = (musicOn = true);
Stage.showMenu = false;
choice = 2;
Stage.scaleMode = "noScale";
onEnterFrame = function () {
loadbar.gotoAndStop(Math.floor((getBytesLoaded() / getBytesTotal()) * 100));
if (loadbar._currentframe == 100) {
onEnterFrame = null;
}
};
Frame 2
stop();
playB.onRelease = function () {
gotoAndStop (3);
};
howTo.onRelease = function () {
gotoAndStop (6);
};
easyButton.onRelease = function () {
choiceClip.gotoAndStop(1);
choice = 1;
difficulty = "Easy";
};
mediumButton.onRelease = function () {
choiceClip.gotoAndStop(2);
choice = 2;
difficulty = "Medium";
};
hardButton.onRelease = function () {
choiceClip.gotoAndStop(3);
choice = 3;
difficulty = "Hard";
};
gggButton.onRelease = function () {
getURL ("http://www.gamesgamesgames.co.uk", "_blank");
};
gogButton.onRelease = function () {
getURL ("http://www.armorgames.com/", "_blank");
};
choiceClip.gotoAndStop(choice);
Frame 3
function clearStage() {
for (var _local2 in _root) {
removeMovieClip(_root[_local2]);
}
onEnterFrame = null;
}
battleLength = (p1EndGold = (p1EndPop = (p1EndKills = (p1zeppelinsused = (p1lightningsused = (p1trollsused = (p1boltspreadsused = 0)))))));
p2EndGold = (p2EndPop = (p2EndKills = (p2zeppelinsused = (p2lightningsused = (p2trollsused = (p2boltspreadsused = 0))))));
trollWait = (zeppelinWait = (lightningWait = 0));
p2trollWait = (p2zeppelinWait = (p2lightningWait = 0));
trollReady = (zeppelinReady = (lightningReady = false));
p2TrollReady = (p2ZeppelinReady = (p2LightningReady = false));
shots = (shotWait = 0);
p1HP = (p1MaxHP = 200);
p2HP = (p2MaxHP = 200);
damage = 3;
sineWave = 15;
population = (p2population = 0);
popped = (p2popped = (freeze = false));
rand = Math.random;
arc = Math.atan2;
popLimit = 10;
ms = Math.sin;
mc = Math.cos;
rad = 0.017;
barracksUnits = ["goblin", "orc"];
fletcheryUnits = ["crossbowman", "eliteCrossbowman"];
workshopUnits = ["ballista", "scorpion"];
barracksUnit = "goblin";
p2BarracksUnit = "goblin";
fletcheryUnit = "crossbowman";
p2FletcheryUnit = "crossbowman";
workshopUnit = "ballista";
p2workshopUnit = "ballista";
gold = (p2gold = 0);
barracksPercentage = (fletcheryPercentage = (workshopPercentage = 0));
p2barracksPercentage = (p2fletcheryPercentage = (p2workshopPercentage = 0));
z = 0;
if (_root.musicOn) {
attachMovie("music", "music", z++);
}
createEmptyMovieClip("circles", z++);
createEmptyMovieClip("p1", z++);
createEmptyMovieClip("p2", z++);
createEmptyMovieClip("p1Bolts", z++);
createEmptyMovieClip("p2Bolts", z++);
createEmptyMovieClip("harmless", z++);
attachMovie("lightning", "lightning", z++);
attachMovie("pause", "pause", z++);
attachMovie("hud", "hud", z++);
attachMovie("siren", "siren", z++);
attachMovie("arrowSpreadCursor", "arrowSpreadCursor", z++);
createEmptyMovieClip("selectBox", z++);
hud.button1.onRelease = function () {
hud.buttonSelector.gotoAndStop(1);
hud.select.gotoAndStop("menu");
};
hud.button2.onRelease = function () {
hud.buttonSelector.gotoAndStop(2);
hud.select.gotoAndStop("buildings");
};
hud.button3.onRelease = function () {
hud.buttonSelector.gotoAndStop(3);
hud.select.gotoAndStop("options");
};
hud.icon1.onRelease = function () {
if (zeppelinReady) {
harmless.attachMovie("zeppelin", "zeppelin" + z, z++, {_x:-165, _y:70 + random(180), speed:7, unitType:"zeppelin", team:1, dropoff:60 + random(520)});
zeppelinWait = 0;
zeppelinReady = false;
p1zeppelinsused++;
}
};
hud.icon2.onRelease = function () {
if (lightningReady) {
barracksPercentage = (fletcheryPercentage = (workshopPercentage = 0));
p2barracksPercentage = (p2fletcheryPercentage = (p2workshopPercentage = 0));
lightning.play();
lightningWait = 0;
lightningReady = false;
p1lightningsused++;
}
};
hud.icon3.onRelease = function () {
if (trollReady) {
ry = 80 + random(260);
p1.attachMovie("troll", "troll" + z, z++, {noCount:true, dead:false, HP:30, dam:6, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:20, y:ry}, selected:false, _x:0, _y:ry, unitType:"infantry", _rotation:90, speed:5, team:1});
circles.attachMovie("circle", "circle" + z, z++, {_x:0, _y:ry, _xscale:150, _yscale:150});
trollWait = 0;
trollReady = false;
p1trollsused++;
}
};
hud.icon4.onRelease = function () {
if (shots > 0) {
arrowSpreadCursor.gotoAndStop(2);
p1boltspreadsused++;
}
};
hud.buttonSelector.gotoAndStop(2);
select.gotoAndStop("buildings");
onMouseMove = function () {
if (arrowSpreadCursor._currentframe == 2) {
arrowSpreadCursor._x = _xmouse;
arrowSpreadCursor._y = _ymouse;
}
};
onEnterFrame = function () {
if (!freeze) {
battleLength++;
p2zeppelinWait++;
zeppelinWait++;
if (zeppelinWait <= 300) {
zeppelinWaitPercent = Math.round(zeppelinWait / 3) + "%";
}
if (zeppelinWait >= 300) {
zeppelinReady = true;
}
if (choice == 1) {
if (p2ZeppelinWait >= 350) {
harmless.attachMovie("zeppelin", "zeppelin" + z, z++, {_xscale:-100, _x:805, _y:70 + random(180), speed:7, unitType:"zeppelin", team:2, dropoff:60 + random(520)});
p2ZeppelinWait = 0;
p2zeppelinsused++;
}
} else if (choice == 2) {
if (p2ZeppelinWait >= 300) {
harmless.attachMovie("zeppelin", "zeppelin" + z, z++, {_xscale:-100, _x:805, _y:70 + random(180), speed:7, unitType:"zeppelin", team:2, dropoff:60 + random(520)});
p2ZeppelinWait = 0;
p2zeppelinsused++;
}
} else if (choice == 3) {
if (p2ZeppelinWait >= 250) {
harmless.attachMovie("zeppelin", "zeppelin" + z, z++, {_xscale:-100, _x:805, _y:70 + random(180), speed:7, unitType:"zeppelin", team:2, dropoff:60 + random(520)});
p2ZeppelinWait = 0;
p2zeppelinsused++;
}
}
if (choice != 1) {
p2lightningWait++;
}
lightningWait++;
if (lightningWait <= 500) {
lightningWaitPercent = Math.round(lightningWait / 5) + "%";
}
if (lightningWait >= 500) {
lightningReady = true;
}
if (choice != 1) {
if (choice == 2) {
if (p2LightningWait >= 500) {
p2LightningReady = true;
}
} else if (p2LightningWait >= 450) {
p2LightningReady = true;
}
}
p2trollWait++;
trollWait++;
if (trollWait <= 200) {
trollWaitPercent = Math.round(trollWait / 2) + "%";
}
if (trollWait >= 200) {
trollReady = true;
ry = 80 + random(260);
}
if (choice == 1) {
if (p2TrollWait >= 250) {
p2.attachMovie("troll", "troll" + z, z++, {noCount:true, dead:false, HP:30, dam:6, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:180, speed:4, team:2});
p2TrollWait = 0;
p2trollsused++;
}
} else if (choice == 2) {
if (p2TrollWait >= 200) {
p2.attachMovie("troll", "troll" + z, z++, {noCount:true, dead:false, HP:30, dam:6, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:180, speed:5, team:2});
p2TrollWait = 0;
p2trollsused++;
}
} else if (choice == 3) {
if (p2TrollWait >= 150) {
p2.attachMovie("troll", "troll" + z, z++, {noCount:true, dead:false, HP:30, dam:6, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:180, speed:6, team:2});
p2TrollWait = 0;
p2trollsused++;
}
}
p2shotWait++;
shotWait++;
shotWaitPercent = Math.round(shotWait / 2.5) + "%";
if (shotWait >= 250) {
shots++;
shotWait = 0;
}
if (choice == 1) {
if (p2shotWait >= 300) {
a = 0;
x = 60 + random(240);
y = 70 + random(180);
while (a < 360) {
p2Bolts.attachMovie("bolt", "bolt" + z, z++, {_x:x, _y:y, _rotation:a, rr:(a + 5) * rad, speed:15, dam:5, team:2});
a = a + 45;
}
p2shotWait = 0;
p2boltspreadsused++;
}
} else if (choice == 2) {
if (p2shotWait >= 250) {
a = 0;
x = 60 + random(240);
y = 70 + random(180);
while (a < 360) {
p2Bolts.attachMovie("bolt", "bolt" + z, z++, {_x:x, _y:y, _rotation:a, rr:(a + 5) * rad, speed:15, dam:5, team:2});
a = a + 45;
}
p2shotWait = 0;
p2boltspreadsused++;
}
} else if (choice == 3) {
if (p2shotWait >= 200) {
a = 0;
x = 60 + random(240);
y = 70 + random(180);
while (a < 360) {
p2Bolts.attachMovie("bolt", "bolt" + z, z++, {_x:x, _y:y, _rotation:a, rr:(a + 5) * rad, speed:15, dam:5, team:2});
a = a + 45;
}
p2shotWait = 0;
p2boltspreadsused++;
}
}
if (clicking) {
selectBox.clear();
selectBox.lineStyle(1, 255, 100);
selectBox.beginFill(16777215, 10);
selectBox.moveTo(startClick.x, startClick.y);
selectBox.lineTo(_xmouse, startClick.y);
selectBox.lineTo(_xmouse, _ymouse);
selectBox.lineTo(startClick.x, _ymouse);
selectBox.lineTo(startClick.x, startClick.y);
}
sineWave = sineWave + 5;
sineWave2 = ms(sineWave * rad) * 100;
if (sineWave2 < 30) {
sineWave = 15;
}
for (var _local3 in harmless) {
h = harmless[_local3];
if (h.unitType == "zeppelin") {
if (h.team == 1) {
if (h._x >= h.dropoff) {
if (!h.dropped) {
h.play();
if (h.dropping) {
angleInc = 30;
xThing = mc(h.a * rad) * 20;
yThing = ms(h.a * rad) * 20;
p1.attachMovie("gnome", "gnome" + z, z++, {noCount:true, dead:false, HP:1, dam:1, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:h._x + xThing, y:h._y - yThing}, selected:false, _x:h._x, _y:h._y, unitType:"infantry", _rotation:h.a, speed:7, team:1});
circles.attachMovie("circle", "circle" + z, z++, {_x:h._x, _y:h._y});
h.a = h.a + angleInc;
}
}
} else {
h.a = 0;
}
h._x = h._x + h.speed;
if (h._x > 720) {
removeMovieClip(h);
}
} else {
if (h._x <= h.dropoff) {
if (!h.dropped) {
h.play();
if (h.dropping) {
angleInc = 30;
xThing = mc(h.a * rad) * 20;
yThing = ms(h.a * rad) * 20;
p2.attachMovie("gnome", "gnome" + z, z++, {noCount:true, dead:false, HP:1, dam:1, attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:h._x + xThing, y:h._y - yThing}, _x:h._x, _y:h._y, unitType:"infantry", _rotation:h.a, speed:7, team:2});
h.a = h.a + angleInc;
}
}
} else {
h.a = 0;
}
h._x = h._x - h.speed;
if (h._x < -80) {
removeMovieClip(h);
}
}
}
}
for (var _local3 in p1Bolts) {
b = p1Bolts[_local3];
if (!b.disabled) {
xs = ms(b.rr) * b.speed;
ys = mc(b.rr) * b.speed;
b._x = b._x - (-xs);
b._y = b._y - ys;
if (b._x < 0) {
removeMovieClip(b);
} else if (b._x > 640) {
removeMovieClip(b);
}
if (b._y > 400) {
removeMovieClip(b);
} else if (b._y < 0) {
removeMovieClip(b);
}
for (j in p2) {
p = p2[j];
if (p.hitTest(b)) {
if (p._alpha > 75) {
b.disabled = true;
p.HP = p.HP - b.dam;
break;
}
}
}
} else {
b._alpha = b._alpha - 20;
if (b._alpha <= 0) {
removeMovieClip(b);
}
}
}
for (var _local3 in p2Bolts) {
b = p2Bolts[_local3];
if (!b.disabled) {
xs = ms(b.rr) * b.speed;
ys = mc(b.rr) * b.speed;
b._x = b._x - (-xs);
b._y = b._y - ys;
if (b._x < 0) {
removeMovieClip(b);
} else if (b._x > 640) {
removeMovieClip(b);
}
if (b._y > 400) {
removeMovieClip(b);
} else if (b._y < 0) {
removeMovieClip(b);
}
for (j in p1) {
p = p1[j];
if (p.hitTest(b)) {
b.disabled = true;
p.HP = p.HP - b.dam;
break;
}
}
} else {
b._alpha = b._alpha - 20;
if (b._alpha <= 0) {
removeMovieClip(b);
}
}
}
for (var _local3 in p1) {
p = p1[_local3];
if (p.HP <= 0) {
if (!p.dead) {
removeMovieClip(circles["circle" + p.name]);
if (!p.noCount) {
p1HP = p1HP - 2;
p2EndKills++;
population--;
if (choice == 1) {
p2gold = p2gold + 50;
p2EndGold = p2EndGold + 50;
} else if (choice == 2) {
p2gold = p2gold + 100;
p2EndGold = p2EndGold + 100;
} else {
p2gold = p2gold + 150;
p2EndGold = p2EndGold + 150;
}
}
}
p.dead = true;
p._alpha = p._alpha - 10;
if (p._alpha <= 0) {
removeMovieClip(p);
}
} else {
pr = p._rotation * rad;
if (p.targetArea != false) {
p.gotoAndStop(1);
p.attacking = false;
p.t = null;
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
xdist = p._x - p.targetArea.x;
ydist = p._y - p.targetArea.y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.speed) {
p._x = p.targetArea.x;
p._y = p.targetArea.y;
p.targetArea = false;
} else {
p._rotation = (-arc(xdist, ydist)) / rad;
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
} else if (!p.attacking) {
p.thing = false;
p.t = null;
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
for (j in p2) {
pTwo = p2[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
}
}
}
if (p.thing != false) {
p.attacking = true;
}
} else if (p.t.HP <= 0) {
p.t = null;
p.thing = false;
p.attacking = false;
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
for (j in p2) {
pTwo = p2[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
}
}
}
} else {
xdist = p._x - p.t._x;
ydist = p._y - p.t._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (p.unitType == "infantry") {
if ((d - 15) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
if (p.t.HP > 0) {
p._rotation = (-arc(xdist, ydist)) / rad;
}
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
} else if (p.unitType == "archer") {
if ((d - 250) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
for (j in p2) {
pTwo = p2[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
}
}
}
p._rotation = (-arc(xdist, ydist)) / rad;
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
} else if (p.unitType == "siege") {
if ((d - 350) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
for (j in p2) {
pTwo = p2[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
}
}
}
p._rotation = (-arc(xdist, ydist)) / rad;
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
}
}
}
c = circles["circle" + p.name];
c._x = p._x;
c._y = p._y;
if (p.selected) {
if (selectBox.hitTest(p._x, p._y, false)) {
c.gotoAndStop(3);
} else {
c.gotoAndStop(2);
}
} else if (selectBox.hitTest(p._x, p._y, false)) {
c.gotoAndStop(3);
} else {
c.gotoAndStop(1);
}
}
for (var _local3 in p2) {
p = p2[_local3];
if (p.HP <= 0) {
if (!p.dead) {
if (!p.noCount) {
p2population--;
p1EndKills++;
p2HP = p2HP - 2;
gold = gold + 100;
p1endgold = p1endgold + 100;
}
}
p.dead = true;
p._alpha = p._alpha - 10;
if (p._alpha <= 0) {
removeMovieClip(p);
}
} else {
pr = p._rotation * 0.017;
if (p.targetArea != false) {
xdist = p._x - p.targetArea.x;
ydist = p._y - p.targetArea.y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.speed) {
p._x = p.targetArea.x;
p._y = p.targetArea.y;
p.targetArea = false;
p.thing = false;
p.t = null;
if (p.thing != false) {
p.attacking = true;
}
} else {
p._rotation = (-arc(xdist, ydist)) / rad;
var xs = (ms(pr) * p.speed);
var ys = (mc(pr) * p.speed);
p._x = p._x - (-xs);
p._y = p._y - ys;
}
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
for (j in p1) {
pTwo = p1[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.targetArea = false;
p.currentD = d;
p.t = pTwo;
p.thing = true;
p.attacking = true;
}
}
}
} else if (!p.attacking) {
p.thing = false;
p.t = null;
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
for (j in p1) {
pTwo = p1[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
}
}
}
if (p.thing != false) {
p.attacking = true;
} else {
p.targetArea = {x:20 + random(600), y:80 + random(260)};
}
} else if (p.t.HP <= 0) {
p.attacking = false;
p.thing = false;
p.t = null;
if (p.unitType == "infantry") {
p.currentD = 300;
} else if (p.unitType == "archer") {
p.currentD = 300;
} else if (p.unitType == "siege") {
p.currentD = 400;
}
for (j in p1) {
pTwo = p1[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
p.attacking = true;
}
}
}
} else {
xdist = p._x - p.t._x;
ydist = p._y - p.t._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (p.unitType == "infantry") {
if ((d - 15) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
if (p.t.HP > 0) {
p._rotation = (-arc(xdist, ydist)) / rad;
}
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
} else if (p.unitType == "archer") {
if ((d - 250) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
p._rotation = (-arc(xdist, ydist)) / rad;
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
for (j in p1) {
pTwo = p1[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
p.attacking = true;
}
}
}
}
} else if (p.unitType == "siege") {
if ((d - 350) < p.speed) {
p._rotation = (-arc(xdist, ydist)) / rad;
p.play();
} else {
for (j in p1) {
pTwo = p1[j];
if (!pTwo.dead) {
xdist = p._x - pTwo._x;
ydist = p._y - pTwo._y;
d = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (d < p.currentD) {
p.currentD = d;
p.t = pTwo;
p.thing = true;
p.attacking = true;
}
}
}
p._rotation = (-arc(xdist, ydist)) / rad;
xs = ms(pr) * p.speed;
ys = mc(pr) * p.speed;
p._x = p._x - (-xs);
p._y = p._y - ys;
}
}
}
}
}
for (var _local3 in circles) {
var c = circles[_local3];
c._rotation = c._rotation + 5;
c._alpha = sineWave2;
}
if (barracksPercentage == 100) {
if (population < popLimit) {
ry = 80 + random(260);
p1EndPop++;
p1.attachMovie(barracksUnit, barracksUnit + z, z++, {dead:false, HP:((barracksUnit == "goblin") ? 3 : 4), dam:((barracksUnit == "goblin") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:20, y:ry}, selected:false, _x:0, _y:ry, unitType:"infantry", _rotation:90, speed:7, team:1});
circles.attachMovie("circle", "circle" + z, z++, {_x:0, _y:ry});
barracksPercentage = 0;
population++;
popped = false;
} else {
popped = true;
}
}
if (barracksUnit == "goblin") {
barracksPercentage = barracksPercentage + 1.75;
} else if (barracksUnit == "orc") {
barracksPercentage = barracksPercentage + 1.25;
}
if (barracksPercentage > 100) {
barracksPercentage = 100;
}
barracksPercentageShown = Math.round(barracksPercentage);
if (fletcheryPercentage == 100) {
if (population < popLimit) {
ry = 80 + random(260);
p1EndPop++;
p1.attachMovie(fletcheryUnit, fletcheryUnit + z, z++, {dead:false, damage:((fletcheryUnit == "crossbowman") ? 1 : 2), boltSpeed:((fletcheryUnit == "crossbowman") ? 10 : 13), HP:((fletcheryUnit == "crossbowman") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:20, y:ry}, selected:false, _x:0, _y:ry, unitType:"archer", _rotation:90, speed:((fletcheryUnit == "crossbowman") ? 4 : 5), team:1});
circles.attachMovie("circle", "circle" + z, z++, {_x:0, _y:ry});
fletcheryPercentage = 0;
population++;
popped = false;
} else {
popped = true;
}
}
if (fletcheryUnit == "crossbowman") {
fletcheryPercentage = fletcheryPercentage + 1.75;
} else if (fletcheryUnit == "eliteCrossbowman") {
fletcheryPercentage = fletcheryPercentage + 1.25;
}
if (fletcheryPercentage > 100) {
fletcheryPercentage = 100;
}
fletcheryPercentageShown = Math.round(fletcheryPercentage);
if (workshopPercentage == 100) {
if (population < popLimit) {
ry = 80 + random(260);
p1EndPop++;
p1.attachMovie(workshopUnit, workshopUnit + z, z++, {dead:false, damage:((workshopUnit == "ballista") ? 2 : 3), boltSpeed:((workshopUnit == "ballista") ? 15 : 17), HP:((workshopUnit == "ballista") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:20, y:ry}, selected:false, _x:0, _y:ry, unitType:"siege", _rotation:90, speed:((workshopUnit == "ballista") ? 2 : 3), team:1});
circles.attachMovie("circle", "circle" + z, z++, {_x:0, _y:ry});
workshopPercentage = 0;
population++;
popped = false;
} else {
popped = true;
}
}
if (workshopUnit == "ballista") {
workshopPercentage = workshopPercentage + 1;
} else if (workshopUnit == "scorpion") {
workshopPercentage = workshopPercentage + 0.75;
}
if (workshopPercentage > 100) {
workshopPercentage = 100;
}
workshopPercentageShown = Math.round(workshopPercentage);
if (p2BarracksPercentage == 100) {
if (p2Population < popLimit) {
ry = 80 + random(260);
if (choice == 1) {
p2.attachMovie(p2BarracksUnit, p2BarracksUnit + z, z++, {dead:false, HP:((p2barracksUnit == "goblin") ? 3 : 4), dam:((p2barracksUnit == "goblin") ? 1 : 2), targetEnemy:false, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:270, speed:6, team:2});
} else if (choice == 2) {
p2.attachMovie(p2BarracksUnit, p2BarracksUnit + z, z++, {dead:false, HP:((p2barracksUnit == "goblin") ? 3 : 4), dam:((p2barracksUnit == "goblin") ? 1 : 2), targetEnemy:false, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:270, speed:7, team:2});
} else {
p2.attachMovie(p2BarracksUnit, p2BarracksUnit + z, z++, {dead:false, HP:((p2barracksUnit == "goblin") ? 3 : 4), dam:((p2barracksUnit == "goblin") ? 1 : 2), targetEnemy:false, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"infantry", _rotation:270, speed:8, team:2});
}
p2EndPop++;
p2BarracksPercentage = 0;
p2Population++;
p2Popped = false;
p2BarracksUnit = barracksUnits[random(barracksUnits.length)];
} else {
p2Popped = true;
}
}
if (p2BarracksUnit == "goblin") {
p2BarracksPercentage = p2BarracksPercentage + 1.75;
} else if (p2BarracksUnit == "orc") {
p2BarracksPercentage = p2BarracksPercentage + 1.25;
}
if (p2BarracksPercentage > 100) {
p2BarracksPercentage = 100;
}
if (p2fletcheryPercentage == 100) {
if (p2population < popLimit) {
ry = 80 + random(260);
if (choice == 1) {
p2.attachMovie(p2fletcheryUnit, p2fletcheryUnit + z, z++, {dead:false, damage:((p2fletcheryUnit == "crossbowman") ? 1 : 2), boltSpeed:((p2fletcheryUnit == "crossbowman") ? 10 : 13), HP:((p2fletcheryUnit == "crossbowman") ? 1 : 2), attacking:false, targetEnemy:false, targetArea:{x:620, y:ry}, selected:false, _x:640, _y:ry, unitType:"archer", _rotation:270, speed:((p2fletcheryUnit == "crossbowman") ? 3 : 4), team:2});
} else if (choice == 2) {
p2.attachMovie(p2fletcheryUnit, p2fletcheryUnit + z, z++, {dead:false, damage:((p2fletcheryUnit == "crossbowman") ? 1 : 2), boltSpeed:((p2fletcheryUnit == "crossbowman") ? 10 : 13), HP:((p2fletcheryUnit == "crossbowman") ? 1 : 2), attacking:false, targetEnemy:false, targetArea:{x:620, y:ry}, selected:false, _x:640, _y:ry, unitType:"archer", _rotation:270, speed:((p2fletcheryUnit == "crossbowman") ? 4 : 5), team:2});
} else {
p2.attachMovie(p2fletcheryUnit, p2fletcheryUnit + z, z++, {dead:false, damage:((p2fletcheryUnit == "crossbowman") ? 1 : 2), boltSpeed:((p2fletcheryUnit == "crossbowman") ? 10 : 13), HP:((p2fletcheryUnit == "crossbowman") ? 1 : 2), attacking:false, targetEnemy:false, targetArea:{x:620, y:ry}, selected:false, _x:640, _y:ry, unitType:"archer", _rotation:270, speed:((p2fletcheryUnit == "crossbowman") ? 5 : 6), team:2});
}
p2EndPop++;
p2fletcheryPercentage = 0;
p2population++;
p2popped = false;
p2FletcheryUnit = fletcheryUnits[random(barracksUnits.length)];
} else {
p2popped = true;
}
}
if (p2fletcheryUnit == "crossbowman") {
p2fletcheryPercentage = p2fletcheryPercentage + 1.75;
} else if (p2fletcheryUnit == "eliteCrossbowman") {
p2fletcheryPercentage = p2fletcheryPercentage + 1.25;
}
if (p2fletcheryPercentage > 100) {
p2fletcheryPercentage = 100;
}
if (p2workshopPercentage == 100) {
if (p2population < popLimit) {
ry = 80 + random(260);
if (choice == 1) {
p2.attachMovie(p2workshopUnit, p2workshopUnit + z, z++, {dead:false, damage:((p2workshopUnit == "ballista") ? 2 : 3), boltSpeed:((p2workshopUnit == "ballista") ? 15 : 17), HP:((p2workshopUnit == "ballista") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"siege", _rotation:90, speed:((p2workshopUnit == "ballista") ? 1 : 2), team:2});
} else if (choice == 2) {
p2.attachMovie(p2workshopUnit, p2workshopUnit + z, z++, {dead:false, damage:((p2workshopUnit == "ballista") ? 2 : 3), boltSpeed:((p2workshopUnit == "ballista") ? 15 : 17), HP:((p2workshopUnit == "ballista") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"siege", _rotation:90, speed:((p2workshopUnit == "ballista") ? 2 : 3), team:2});
} else {
p2.attachMovie(p2workshopUnit, p2workshopUnit + z, z++, {dead:false, damage:((p2workshopUnit == "ballista") ? 2 : 3), boltSpeed:((p2workshopUnit == "ballista") ? 15 : 17), HP:((p2workshopUnit == "ballista") ? 1 : 2), attacking:false, targetEnemy:false, name:z + 2, targetArea:{x:620, y:ry}, _x:640, _y:ry, unitType:"siege", _rotation:90, speed:((p2workshopUnit == "ballista") ? 3 : 4), team:2});
}
p2EndPop++;
p2workshopPercentage = 0;
p2population++;
p2popped = false;
p2WorkshopUnit = WorkshopUnits[random(WorkshopUnits.length)];
} else {
p2popped = true;
}
}
if (p2workshopUnit == "ballista") {
p2workshopPercentage = p2workshopPercentage + 1;
} else if (p2workshopUnit == "scorpion") {
p2workshopPercentage = p2workshopPercentage + 0.75;
}
if (p2workshopPercentage > 100) {
p2workshopPercentage = 100;
}
player2s = 0;
for (var _local3 in p2) {
p = p2[_local3];
if (p instanceof MovieClip) {
player2s++;
}
}
player1s = 0;
for (var _local3 in p1) {
p = p1[_local3];
if (p instanceof MovieClip) {
player1s++;
}
}
if (player1s == 0) {
if (player2s > 0) {
p1HP = p1HP - damage;
}
}
if (player2s == 0) {
if (player1s > 0) {
p2HP = p2HP - damage;
if (p2LightningReady) {
barracksPercentage = (fletcheryPercentage = (workshopPercentage = 0));
p2barracksPercentage = (p2fletcheryPercentage = (p2workshopPercentage = 0));
lightning.play();
p2lightningWait = 0;
p2lightningReady = false;
p2lightningsused++;
}
}
}
if (p2gold >= 500) {
if (p2HP <= (p2MaxHP - 50)) {
p2gold = p2gold - 500;
p2HP = p2HP + 50;
} else if (p2gold >= 1000) {
r = random(2);
if (r == 0) {
p2gold = p2gold - 1000;
p2MaxHP = p2MaxHP + 100;
} else {
p2gold = p2gold - 500;
p1HP = p1HP * 0.75;
}
} else {
p2gold = p2gold - 500;
p1HP = p1HP * 0.75;
}
}
HUD.p1HPShown._width = (p1HP / p1MaxHP) * 150;
HUD.p2HPShown._width = (p2HP / p2MaxHP) * 150;
if (p1HP <= 50) {
siren.play();
} else {
siren.gotoAndStop(1);
}
p1HP = int(p1HP);
p2HP = int(p2HP);
if (p1HP <= 0) {
gotoAndStop (4);
clearStage();
}
if (p2HP <= 0) {
gotoAndStop (5);
clearStage();
}
}
};
onMouseDown = function () {
if (!freeze) {
startClick = {x:_xmouse, y:_ymouse};
clicking = true;
}
};
onMouseUp = function () {
if (!freeze) {
p1Selected = [];
for (var _local9 in p1) {
p = p1[_local9];
if (p.selected) {
p1Selected.push(p);
}
}
p2Selected = false;
click = (startClick.x == _xmouse) && (startClick.y == _ymouse);
if (Key.isDown(16)) {
arrowSpreadCursor.gotoAndStop(1);
if (click) {
if (Key.isDown(32)) {
u = null;
for (var _local9 in p1) {
p = p1[_local9];
if (!p.dead) {
if (p.hitTest(_xmouse, _ymouse, false)) {
uT = p.unitType;
break;
}
}
}
if (uT != null) {
for (var _local9 in p1) {
p = p1[_local9];
if (p.unitType == uT) {
if (!p.dead) {
p1Selected.push(p);
p.selected = true;
}
}
}
}
} else {
for (var _local9 in p1) {
p = p1[_local9];
if (p.hitTest(_xmouse, _ymouse, false)) {
p1Selected.push(p);
p.selected = true;
}
}
}
} else {
for (var _local9 in p1) {
p = p1[_local9];
if (selectBox.hitTest(p._x, p._y, false)) {
p1Selected.push(p);
p.selected = true;
}
}
}
clicking = false;
selectBox.clear();
return(undefined);
}
if (Key.isDown(17)) {
for (var _local9 in p1) {
p1[_local9].selected = false;
}
p1Selected = [];
arrowSpreadCursor.gotoAndStop(1);
} else if (Key.isDown(32)) {
arrowSpreadCursor.gotoAndStop(1);
if (click) {
for (var _local9 in p1) {
p1[_local9].selected = false;
}
p1Selected = [];
u = null;
for (var _local9 in p1) {
p = p1[_local9];
if (!p.dead) {
if (p.hitTest(_xmouse, _ymouse, false)) {
uT = p.unitType;
break;
}
}
}
if (uT != null) {
for (var _local9 in p1) {
p = p1[_local9];
if (p.unitType == uT) {
if (!p.dead) {
p1Selected.push(p);
p.selected = true;
}
}
}
}
}
} else if (click) {
if (arrowSpreadCursor._currentframe == 2) {
if (!HUD.hitTest(_xmouse, _ymouse, true)) {
a = 0;
while (a < 360) {
p1Bolts.attachMovie("bolt", "bolt" + z, z++, {_x:_xmouse, _y:_ymouse, _rotation:a, rr:(a + 5) * rad, speed:15, dam:5, team:1});
a = a + 45;
}
shots--;
arrowSpreadCursor.gotoAndStop(1);
}
clicking = false;
selectBox.clear();
return(undefined);
}
if (!HUD.hitTest(_xmouse, _ymouse, true)) {
for (var _local1 in p2) {
pTwo = p2[_local1];
if (pTwo.dead) {
break;
}
if (pTwo.hitTest(_xmouse, _ymouse, false)) {
for (var _local9 in p1Selected) {
p = p1Selected[_local9];
p.thing = true;
p.attacking = true;
p.t = pTwo;
p.targetArea = false;
}
clicking = false;
selectBox.clear();
return(undefined);
}
}
if (p2Selected == false) {
for (var _local9 in p1) {
p = p1[_local9];
if (p.hitTest(_xmouse, _ymouse, false)) {
for (var _local1 in p1) {
p1[_local1].selected = false;
}
p1Selected = [];
p1Selected.push(p);
p.selected = true;
clicking = false;
selectBox.clear();
return(undefined);
}
}
if (p1Selected.length > 1) {
a = 0;
angleInc = 360 / p1Selected.length;
for (var _local9 in p1Selected) {
p = p1Selected[_local9];
p.targetEnemy = false;
xThing = mc(a * rad) * 20;
yThing = ms(a * rad) * 20;
p.targetArea = {x:_xmouse + xThing, y:_ymouse - yThing};
a = a + angleInc;
}
} else {
p = p1Selected[0];
p.targetEnemy = false;
p.targetArea = {x:_xmouse, y:_ymouse};
}
}
}
} else {
arrowSpreadCursor.gotoAndStop(1);
for (var _local9 in p1) {
p = p1[_local9];
if (selectBox.hitTest(p._x, p._y, false)) {
p1Selected.push(p);
p.selected = true;
} else {
p.selected = false;
}
}
}
clicking = false;
selectBox.clear();
}
};
Frame 4
stopAllSounds();
playAgain.onRelease = function () {
gotoAndStop (2);
};
gggButton.onRelease = function () {
getURL ("http://www.gamesgamesgames.co.uk", "_blank");
};
gogButton.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
Frame 5
stopAllSounds();
playAgain.onRelease = function () {
gotoAndStop (2);
};
gggButton.onRelease = function () {
getURL ("http://www.gamesgamesgames.co.uk", "_blank");
};
gogButton.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
Frame 6
back.onRelease = function () {
gotoAndStop (2);
};
next.onRelease = function () {
nextFrame();
};
Instance of Symbol 68 MovieClip "highlighter" in Frame 6
onClipEvent (load) {
gotoAndStop(_root.barracksUnit);
}
Frame 7
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
nextFrame();
};
Frame 8
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
nextFrame();
};
Frame 9
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
nextFrame();
};
Frame 10
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
nextFrame();
};
Frame 11
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
nextFrame();
};
Frame 12
back.onRelease = function () {
prevFrame();
};
next.onRelease = function () {
gotoAndStop (3);
};
Symbol 16 Button
on (release) {
gotoAndStop ("fletchery");
}
Symbol 19 Button
on (release) {
gotoAndStop ("workshop");
}
Symbol 21 Button
on (release) {
gotoAndStop ("blacksmith");
}
Symbol 22 Button
on (release) {
gotoAndStop ("barracks");
}
Symbol 28 Button
on (release) {
_root.freeze = !_root.freeze;
_root.pause.gotoAndStop((_root.freeze ? 2 : 1));
if (_root.freeze) {
for (var i in _root.p1) {
p = _root.p1[i];
p.stop();
p.anim.stop();
}
for (var i in _root.p2) {
p = _root.p2[i];
p.stop();
p.anim.stop();
}
} else {
for (var i in _root.p1) {
p = _root.p1[i];
if (p._currentframe != 1) {
p.play();
p.anim.play();
}
}
for (var i in _root.p2) {
p = _root.p2[i];
if (p._currentframe != 1) {
p.play();
p.anim.play();
}
}
}
}
Symbol 30 Button
on (release) {
stopAllSounds();
_root.gotoAndStop(4);
_root.clearStage();
}
Symbol 33 Button
on (release) {
gotoAndStop ("buildings");
}
Symbol 38 Button
on (release) {
_quality = "LOW";
}
Symbol 40 Button
on (release) {
_quality = "HIGH";
}
Symbol 46 Button
on (release) {
gotoAndStop (2);
_root.soundOn = false;
}
Symbol 49 Button
on (release) {
gotoAndStop (1);
_root.soundOn = true;
}
Symbol 52 MovieClip Frame 1
stop();
Symbol 53 Button
on (release) {
gotoAndStop (2);
_root.musicOn = false;
if (_root._currentframe == 3) {
removeMovieClip(_root.music);
}
stopAllSounds();
}
Symbol 55 Button
on (release) {
gotoAndStop (1);
_root.musicOn = true;
if (_root._currentframe == 3) {
_root.attachMovie("music", "music", _root.z++);
}
}
Symbol 57 MovieClip Frame 1
stop();
Symbol 60 Button
on (release) {
if (_root.barracksUnit != "orc") {
_root.barracksPercentage = 0;
_root.barracksUnit = "orc";
highlighter.gotoAndStop("orc");
}
}
Symbol 61 Button
on (release) {
if (_root.barracksUnit != "goblin") {
_root.barracksPercentage = 0;
_root.barracksUnit = "goblin";
highlighter.gotoAndStop("goblin");
}
}
Symbol 68 MovieClip Frame 1
stop();
Symbol 76 Button
on (release) {
if (_root.fletcheryUnit != "eliteCrossbowman") {
_root.fletcheryPercentage = 0;
_root.fletcheryUnit = "eliteCrossbowman";
highlighter.gotoAndStop("eliteCrossbowman");
}
}
Symbol 77 Button
on (release) {
if (_root.fletcheryUnit != "crossbowman") {
_root.fletcheryPercentage = 0;
_root.fletcheryUnit = "crossbowman";
highlighter.gotoAndStop("crossbowman");
}
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 90 Button
on (release) {
if (_root.gold >= 1000) {
_root.gold = _root.gold - 1000;
_root.p1maxHP = _root.p1maxHP + 100;
}
}
Symbol 91 Button
on (release) {
if (_root.gold >= 500) {
if (_root.p1HP != _root.p1MaxHP) {
_root.gold = _root.gold - 500;
if (_root.p1HP < (_root.p1MaxHP - 50)) {
_root.p1HP = _root.p1HP + 50;
} else {
_root.p1HP = _root.p1MaxHP;
}
}
}
}
Symbol 104 Button
on (release) {
if (_root.gold >= 500) {
_root.gold = _root.gold - 500;
_root.p2HP = _root.p2HP * 0.75;
}
}
Symbol 110 Button
on (release) {
if (_root.workshopUnit != "scorpion") {
_root.workshopPercentage = 0;
_root.workshopUnit = "scorpion";
highlighter.gotoAndStop("scorpion");
}
}
Symbol 111 Button
on (release) {
if (_root.workshopUnit != "ballista") {
_root.workshopPercentage = 0;
_root.workshopUnit = "ballista";
highlighter.gotoAndStop("ballista");
}
}
Symbol 118 MovieClip Frame 1
stop();
Symbol 121 MovieClip Frame 1
stop();
Instance of Symbol 52 MovieClip in Symbol 121 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop((_root.soundOn ? 1 : 2));
}
Instance of Symbol 57 MovieClip in Symbol 121 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop((_root.musicOn ? 1 : 2));
}
Instance of Symbol 68 MovieClip "highlighter" in Symbol 121 MovieClip Frame 4
onClipEvent (load) {
gotoAndStop(_root.barracksUnit);
}
Instance of Symbol 86 MovieClip "highlighter" in Symbol 121 MovieClip Frame 5
onClipEvent (load) {
gotoAndStop(_root.fletcheryUnit);
}
Instance of Symbol 118 MovieClip "highlighter" in Symbol 121 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop(_root.workshopUnit);
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 164 MovieClip [siren] Frame 1
stop();
Symbol 164 MovieClip [siren] Frame 2
if (_root.soundOn) {
alertSound = new Sound();
alertSound.attachSound("alertSound");
alertSound.start();
}
Symbol 164 MovieClip [siren] Frame 20
gotoAndPlay (2);
Symbol 174 MovieClip [orc] Frame 1
stop();
Instance of Symbol 171 MovieClip in Symbol 174 MovieClip [orc] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 171 MovieClip in Symbol 174 MovieClip [orc] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 174 MovieClip [orc] Frame 8
if (_root.soundOn) {
swordSound = new Sound();
swordSound.attachSound("swordSound");
swordSound.start();
}
Symbol 174 MovieClip [orc] Frame 12
t.HP = t.HP - dam;
Symbol 174 MovieClip [orc] Frame 18
gotoAndStop (1);
Symbol 181 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 1
_parent.point = {x:_x, y:_y};
localToGlobal(_parent.point);
Instance of Symbol 181 MovieClip in Symbol 198 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Symbol 198 MovieClip Frame 11
if (_root.soundOn) {
arrowSound = new Sound();
arrowSound.attachSound("arrowSound");
arrowSound.start();
}
Symbol 198 MovieClip Frame 17
_root[("p" + _parent.team) + "bolts"].attachMovie("bolt", "bolt" + _root.z, _root.z++, {_x:point.x, _y:point.y, _rotation:_parent._rotation, rr:(_parent._rotation - 2) * _root.rad, speed:_parent.boltSpeed, dam:_parent.damage, team:_parent.team});
_parent.gotoAndStop(1);
Symbol 199 MovieClip [eliteCrossbowman] Frame 1
stop();
Instance of Symbol 177 MovieClip in Symbol 199 MovieClip [eliteCrossbowman] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 199 MovieClip [eliteCrossbowman] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 177 MovieClip in Symbol 199 MovieClip [eliteCrossbowman] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 202 MovieClip Frame 1
stop();
Instance of Symbol 202 MovieClip in Symbol 215 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 215 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Symbol 215 MovieClip Frame 15
if (_root.soundOn) {
ballistaSound = new Sound();
ballistaSound.attachSound("ballistaSound");
ballistaSound.play();
}
Symbol 215 MovieClip Frame 17
_root[("p" + _parent.team) + "bolts"].attachMovie("ballistaBolt", "bolt" + _root.z, _root.z++, {_x:point.x, _y:point.y, _rotation:_parent._rotation, rr:(_parent._rotation - 2) * _root.rad, speed:_parent.boltSpeed, dam:_parent.damage, team:_parent.team});
_parent.gotoAndStop(1);
Symbol 216 MovieClip [scorpion] Frame 1
stop();
Instance of Symbol 202 MovieClip in Symbol 216 MovieClip [scorpion] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 216 MovieClip [scorpion] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 219 MovieClip Frame 1
stop();
Instance of Symbol 219 MovieClip in Symbol 230 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 230 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Symbol 230 MovieClip Frame 15
if (_root.soundOn) {
ballistaSound = new Sound();
ballistaSound.attachSound("ballistaSound");
ballistaSound.start();
}
Symbol 230 MovieClip Frame 17
_root[("p" + _parent.team) + "bolts"].attachMovie("ballistaBolt", "bolt" + _root.z, _root.z++, {_x:point.x, _y:point.y, _rotation:_parent._rotation, rr:(_parent._rotation - 2) * _root.rad, speed:_parent.boltSpeed, dam:_parent.damage, team:_parent.team});
_parent.gotoAndStop(1);
Symbol 231 MovieClip [ballista] Frame 1
stop();
Instance of Symbol 219 MovieClip in Symbol 231 MovieClip [ballista] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 231 MovieClip [ballista] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 247 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_parent._parent.team);
}
Symbol 247 MovieClip Frame 11
if (_root.soundOn) {
arrowSound = new Sound();
arrowSound.attachSound("arrowSound");
arrowSound.start();
}
Symbol 247 MovieClip Frame 17
_root[("p" + _parent.team) + "bolts"].attachMovie("bolt", "bolt" + _root.z, _root.z++, {_x:point.x, _y:point.y, _rotation:_parent._rotation, rr:(_parent._rotation - 2) * _root.rad, speed:_parent.boltSpeed, dam:_parent.damage, team:_parent.team});
_parent.gotoAndStop(1);
Symbol 248 MovieClip [crossbowman] Frame 1
stop();
Instance of Symbol 234 MovieClip in Symbol 248 MovieClip [crossbowman] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 248 MovieClip [crossbowman] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 234 MovieClip in Symbol 248 MovieClip [crossbowman] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 259 MovieClip [troll] Frame 1
stop();
Instance of Symbol 251 MovieClip in Symbol 259 MovieClip [troll] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 255 MovieClip in Symbol 259 MovieClip [troll] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 251 MovieClip in Symbol 259 MovieClip [troll] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 251 MovieClip in Symbol 259 MovieClip [troll] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 255 MovieClip in Symbol 259 MovieClip [troll] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 251 MovieClip in Symbol 259 MovieClip [troll] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 259 MovieClip [troll] Frame 3
if (_root.soundOn) {
trollSound = new Sound();
trollSound.attachSound("trollSound");
trollSound.start();
}
Symbol 259 MovieClip [troll] Frame 6
t.HP = t.HP - dam;
Symbol 259 MovieClip [troll] Frame 12
gotoAndStop (1);
Symbol 262 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 272 MovieClip [gnome] Frame 1
stop();
Instance of Symbol 262 MovieClip in Symbol 272 MovieClip [gnome] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 266 MovieClip in Symbol 272 MovieClip [gnome] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 269 MovieClip in Symbol 272 MovieClip [gnome] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 269 MovieClip in Symbol 272 MovieClip [gnome] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 272 MovieClip [gnome] Frame 4
if (_root.soundOn) {
stab = new Sound();
stab.attachSound("stab");
stab.start();
}
Symbol 272 MovieClip [gnome] Frame 5
t.HP = t.HP - dam;
Instance of Symbol 262 MovieClip in Symbol 272 MovieClip [gnome] Frame 5
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 272 MovieClip [gnome] Frame 11
gotoAndStop (1);
Symbol 278 MovieClip [goblin] Frame 1
stop();
Instance of Symbol 275 MovieClip in Symbol 278 MovieClip [goblin] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 275 MovieClip in Symbol 278 MovieClip [goblin] Frame 2
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 278 MovieClip [goblin] Frame 8
if (_root.soundOn) {
swordSound = new Sound();
swordSound.attachSound("swordSound");
swordSound.start();
}
Symbol 278 MovieClip [goblin] Frame 12
t.HP = t.HP - dam;
Symbol 278 MovieClip [goblin] Frame 18
gotoAndStop (1);
Symbol 281 MovieClip [circle] Frame 1
stop();
Instance of Symbol 181 MovieClip in Symbol 284 MovieClip [bolt] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Instance of Symbol 181 MovieClip in Symbol 286 MovieClip [ballistaBolt] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 289 MovieClip [pause] Frame 1
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 296 MovieClip [zeppelin] Frame 1
stop();
Instance of Symbol 294 MovieClip in Symbol 296 MovieClip [zeppelin] Frame 1
onClipEvent (load) {
gotoAndStop(_parent.team);
}
Symbol 296 MovieClip [zeppelin] Frame 4
speed = 6;
Symbol 296 MovieClip [zeppelin] Frame 5
speed = 5;
Symbol 296 MovieClip [zeppelin] Frame 6
speed = 4;
Symbol 296 MovieClip [zeppelin] Frame 7
speed = 3;
Symbol 296 MovieClip [zeppelin] Frame 8
speed = 2;
Symbol 296 MovieClip [zeppelin] Frame 9
speed = 1;
Symbol 296 MovieClip [zeppelin] Frame 10
speed = 0;
dropping = true;
Symbol 296 MovieClip [zeppelin] Frame 21
speed = 0;
Symbol 296 MovieClip [zeppelin] Frame 22
speed = 1;
dropping = false;
Symbol 296 MovieClip [zeppelin] Frame 23
speed = 2;
Symbol 296 MovieClip [zeppelin] Frame 24
speed = 3;
Symbol 296 MovieClip [zeppelin] Frame 25
speed = 4;
Symbol 296 MovieClip [zeppelin] Frame 26
speed = 5;
Symbol 296 MovieClip [zeppelin] Frame 27
speed = 6;
Symbol 296 MovieClip [zeppelin] Frame 28
speed = 7;
Symbol 296 MovieClip [zeppelin] Frame 30
dropped = true;
gotoAndStop (1);
Symbol 297 MovieClip [lightning] Frame 1
stop();
Symbol 297 MovieClip [lightning] Frame 2
for (var i in _root.p1) {
removeMovieClip(_root.p1[i]);
}
for (var i in _root.p2) {
removeMovieClip(_root.p2[i]);
}
for (var i in _root.circles) {
removeMovieClip(_root.circles[i]);
}
for (var i in _root.harmless) {
removeMovieClip(_root.harmless[i]);
}
for (var i in _root.p1bolts) {
removeMovieClip(_root.p1bolts[i]);
}
for (var i in _root.p2bolts) {
removeMovieClip(_root.p2bolts[i]);
}
_root.population = 0;
_root.p2population = 0;
if (_root.soundOn) {
thunderSound = new Sound();
thunderSound.attachSound("thunderSound");
thunderSound.start();
}
Symbol 297 MovieClip [lightning] Frame 10
gotoAndStop (1);
Symbol 305 MovieClip [arrowSpreadCursor] Frame 1
stop();
Mouse.show();
Symbol 305 MovieClip [arrowSpreadCursor] Frame 2
Mouse.hide();
Instance of Symbol 304 MovieClip in Symbol 305 MovieClip [arrowSpreadCursor] Frame 2
onClipEvent (load) {
_x = _parent._xmouse;
_y = _parent._ymouse;
Mouse.hide();
}
onClipEvent (enterFrame) {
_x = _parent._xmouse;
_y = _parent._ymouse;
}
Symbol 350 MovieClip Frame 125
if (_root.loadbar._currentframe == 100) {
play();
} else {
gotoAndPlay (124);
}
Symbol 350 MovieClip Frame 143
_root.play();
stop();
Symbol 355 MovieClip Frame 1
stop();
Symbol 487 Button
on (release) {
gotoAndStop ("buildings");
}
Symbol 518 Button
on (release) {
gotoAndStop (4);
}