Frame 1
total = getBytesTotal();
Frame 4
loaded = getBytesLoaded();
percent = 100 * (loaded / total);
this.loaderhold.loader._yscale = percent;
Frame 5
if (percent < 99) {
gotoAndPlay (4);
}
backg = 1;
landtype = 0;
Frame 35
introsound = new Sound();
introsound.attachSound("introtune");
introsound.start(0, 100);
choosesound = new Sound();
choosesound.attachSound("chooseplayers");
action = undefined;
Frame 72
stop();
Frame 73
function startgame() {
gotoAndPlay (116);
}
player1names = new Array("Bill", "Tony", "Terry", "Vaughan", "Scott", "Rick");
player2names = new Array("Warren", "Andrew", "John", "Bardia", "Nathan", "Brad");
player1head = random(22) + 1;
player2head = random(22) + 1;
player1name = player1names[random(player1names.length)];
player2name = player2names[random(player2names.length)];
this.player1h.gotoAndStop(player1head);
this.player2h.gotoAndStop(player2head);
introsound.stop();
choosesound.start(0, 100);
Frame 115
stop();
Instance of Symbol 249 MovieClip in Frame 115
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_root.startgame();
}
}
Frame 116
attachMovie("fadegamein", "fadegamein", 1000);
function jetpacing() {
var _local1 = this;
lastbx = bx;
lastby = by;
bombtrailcount++;
if (by < 0) {
_local1.misslefollow._x = bx;
} else {
_local1.misslefollow._x = -10;
}
if (xmove > 0) {
rightv = xmove;
} else {
leftv = Math.abs(xmove);
}
upv = temppower * Math.sin(radian);
adjustx = 45 * Math.cos(radian);
adjusty = 8 + (45 * Math.sin(radian));
temppower = temppower - gravity;
upv = temppower * Math.sin(radian);
if (rightv > 0) {
rightv = rightv + windamount;
if (rightv < 0) {
leftv = Math.abs(rightv);
rightv = 0;
}
}
if (leftv > 0) {
leftv = leftv - windamount;
if (leftv < 0) {
rightv = Math.abs(leftv);
leftv = 0;
}
}
bx = bx + rightv;
bx = bx - leftv;
by = by + upv;
if (bx > 780) {
bx = 779;
leftv = rightv;
rightv = 0;
}
if (bx < 20) {
bx = 21;
rightv = leftv;
leftv = 0;
}
if (by > 560) {
by = 560;
hity = 560;
lastbx = undefined;
action = "player stops jetpacing";
}
hitarraynumlow = Math.floor(bx / landdetail);
hitarraynumhigh = Math.ceil(bx / landdetail);
l1y = landarray[hitarraynumlow];
l2y = landarray[hitarraynumhigh];
l2x = hitarraynumhigh * landdetail;
l1x = hitarraynumlow * landdetail;
bombm = (by - oby) / (bx - obx);
bombb = by - (bombm * bx);
landm = (l1y - l2y) / (l1x - l2x);
landb = l1y - (landm * l1x);
hitx = (bombb - landb) / (landm - bombm);
hity = (bombm * hitx) + bombb;
x = hitx;
y = hity;
r = bx;
s = obx;
t = by;
u = oby;
hitline = -10;
if ((((hitx < Infinity) && (hitx > (-Infinity))) && (hity < Infinity)) && (hity > (-Infinity))) {
if ((((hitx >= bx) && (hitx <= obx)) || (((hitx >= obx) && (hitx <= bx)) && ((hity >= by) && (hity <= oby)))) || ((hity >= oby) && (hity <= by))) {
hitline = 1;
}
if ((((hitx >= l1x) && (hitx <= l2x)) || (((hitx >= l2x) && (hitx <= l1x)) && ((hity >= l1y) && (hity <= l2y)))) || ((hity >= l2y) && (hity <= l1y))) {
hitline++;
}
if (hitline > 1) {
action = "player stops jetpacing";
}
}
hitarraynum = Math.floor(bx / landdetail);
hitloc = landarray[hitarraynum];
if (by >= hitloc) {
hitx = hitarraynum * landdetail;
hity = hitloc - 40;
action = "player stops jetpacing";
}
_local1.jetpac._x = bx;
_local1.jetpac._y = by;
if (bx < lastbx) {
jetpac._xscale = -100;
jetd = -100;
}
if (bx > lastbx) {
jetpac._xscale = 100;
jetd = 100;
}
a = (bx - lastbx) / (by - lastby);
b = -((Math.asin(a) * 180) / Math.PI);
if (b < -30) {
b = -30;
}
if (b > 30) {
b = 30;
}
jetpac._rotation = b;
bombtrailcount++;
if (bombtrailcount > 5) {
bombtrailcount = 0;
landscape.attachMovie("jetpactrail", "b" + bombt, bombt);
bombt++;
if (bombt > 500) {
bombt = 400;
}
}
}
function startplayerjetpac() {
var _local1 = this;
leftv = 0;
rightv = 0;
temppower = power / 2.5;
radian = (rottemp * Math.PI) / 180;
xmove = temppower * Math.cos(radian);
upv = temppower * Math.sin(radian);
if (xmove > 0) {
rightv = xmove;
} else {
leftv = Math.abs(xmove);
}
attachMovie("playertype2flyer", "jetpac", 200);
adjustx = 45 * Math.cos(radian);
adjusty = 8 + (45 * Math.sin(radian));
if (turn == "player1") {
bx = p1x + adjustx;
by = p1y + adjusty;
removeMovieClip("player1");
_local1.jetpac.head.gotoAndStop(player1head);
} else {
bx = p2x + adjustx;
by = p2y + adjusty;
removeMovieClip("player2");
_local1.jetpac.head.gotoAndStop(player2head);
}
_local1.jetpac._x = bx;
_local1.jetpac._y = by;
action = "wait for jetpacing player";
}
function jetpactrailClass() {
}
jetpactrailClass.prototype = new MovieClip();
jetpactrailClass.prototype.onLoad = function () {
var _local1 = this;
_local1.life = 30;
_local1.alf = 30;
_local1.alfstep = _local1.alf / _local1.life;
_local1._x = bx;
_local1._y = by;
};
jetpactrailClass.prototype.onEnterFrame = function () {
var _local1 = this;
_local1.alf = _local1.alf - _local1.alfstep;
_local1._alpha = _local1.alf;
_local1._rotation = _local1._rotation + 20;
if (_local1.alf <= 0) {
removeMovieClip(_local1);
}
};
Object.registerClass("jetpactrail", jetpactrailClass);
function bombtrailClass() {
}
bombtrailClass.prototype = new MovieClip();
bombtrailClass.prototype.onLoad = function () {
var _local1 = this;
_local1.life = 30;
_local1.alf = 90;
_local1.alfstep = _local1.alf / _local1.life;
_local1._x = bx;
_local1._y = by;
};
bombtrailClass.prototype.onEnterFrame = function () {
var _local1 = this;
_local1.alf = _local1.alf - _local1.alfstep;
_local1._alpha = _local1.alf;
if (_local1.alf <= 0) {
removeMovieClip(_local1);
}
};
Object.registerClass("bombtrail", bombtrailClass);
function definesounds() {
gunsound = new Sound();
gunsound.attachSound("gun");
clicksound = new Sound();
clicksound.attachSound("click");
morepowersound = new Sound();
morepowersound.attachSound("morepower");
lesspowersound = new Sound();
lesspowersound.attachSound("lesspower");
windsound = new Sound();
windsound.attachSound("windwave");
windsoundplaying = 0;
shieldsound = new Sound();
shieldsound.attachSound("shieldwave");
shieldfadesound = new Sound();
shieldfadesound.attachSound("shieldfade");
}
function drawlandscape() {
_root.grass1._x = grass1x * 10;
_root.grass1._y = landarray[grass1x];
_root.grass2._x = grass2x * 10;
_root.grass2._y = landarray[grass2x];
_root.grass3._x = grass3x * 10;
_root.grass3._y = landarray[grass3x];
_root.grass1.gotoAndStop(landt);
_root.grass2.gotoAndStop(landt);
_root.grass3.gotoAndStop(landt);
_root.landscape.createEmptyMovieClip("earth", 1);
with (_root.landscape.earth) {
beginFill(landcolour, 100);
lineStyle(3, strokecol, 100);
moveTo(-10, 610);
b = 0;
steps = 400 / landdetail;
d = landarray.length;
i = 0;
while (i < d) {
c = landarray[i];
lineTo(b, c);
b = b + landdetail;
i = i + 1;
}
lineTo(810, 610);
endFill();
}
_root.landscapemask.createEmptyMovieClip("earth", 1);
with (_root.landscapemask.earth) {
beginFill(0, 100);
moveTo(-5, 601);
b = 0;
steps = 400 / landdetail;
d = landarray.length;
i = 0;
while (i < d) {
c = landarray[i];
lineTo(b, c);
b = b + landdetail;
i = i + 1;
}
lineTo(801, 601);
endFill();
}
}
_root.frameaction = function () {
var _local1 = this;
switch (action) {
case "player stops jetpacing" :
jetpac.play();
if (jetd == 100) {
p1rot = -random(90);
} else {
p1rot = random(90) + 180;
}
if (turn == "player1") {
attachMovie("playertype2", "player1", 10);
p1x = hitx;
p1y = hity;
if (jetd == 100) {
p1rot = -random(90);
} else {
p1rot = random(90) + 180;
}
} else {
attachMovie("playertype2", "player2", 11);
p2x = hitx;
p2y = hity;
p2rot = 90;
if (jetd == 100) {
p2rot = -random(90);
} else {
p2rot = random(90) + 180;
}
}
player2.gunturretindicator._visible = false;
player1.gunturretindicator._visible = false;
rotateplayers();
action = "end turn";
return;
case "jetpacing player" :
startplayerjetpac();
return;
case "wait for jetpacing player" :
jetpacing();
return;
case "announce round" :
gamemessage2 = "Round " + round;
attachMovie("tellplayeralt", "tellplayeralt", 21);
tellplayeralt._y = 300;
tellplayeralt._x = 400;
wait = 0;
action = "wait for round announce message";
return;
case "wait for round announce message" :
wait++;
if (wait > 60) {
tellplayeralt.play();
a = random(2) + 1;
if (a == 1) {
turn = "player1";
action = "tell player ones move";
} else {
turn = "player2";
action = "tell player twos move";
}
rotateplayers();
}
return;
case "test for game over" :
if (player1score >= 2) {
gotoAndStop (122);
winner = player1name;
loser = player2name;
} else if (player2score >= 2) {
gotoAndStop (122);
winner = player2name;
loser = player1name;
} else {
action = "Start new round";
}
return;
case "Start new round" :
startnewround();
action = "announce round";
return;
case "test for win" :
wait = 0;
if (player1health <= 0) {
roundwinnername = player2name;
action = "tell player they have won";
player2score++;
round++;
return;
}
if (player2health <= 0) {
roundwinnername = player1name;
action = "tell player they have won";
player1score++;
round++;
} else {
if (turn == "player1") {
turn = "player2";
action = "tell player twos move";
} else {
turn = "player1";
action = "tell player ones move";
}
return;
gamemessage = roundwinnername + " wins this round!";
attachMovie("tellplayerwin", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for round won message";
return;
wait++;
if (wait > 60) {
tellplayer.play();
turn = "player1";
action = "test for game over";
}
return;
wait++;
if (wait > 60) {
tellplayer.play();
if (turn == "player1") {
action = "player ones move";
} else {
action = "player twos move";
}
}
return;
_local1.player1healthind.playeronesmoney.gotoAndstop(1);
_local1.player2healthind.playertwosmoney.gotoAndstop(2);
attachMovie("weaponselector", "weaponselector", 16);
weaponselector._x = 400;
weaponpress(player1bombtype);
windchange();
player1.gunturretindicator._visible = true;
player2.gunturretindicator._visible = false;
player1.marker.gotoAndPlay(2);
player2.marker.gotoAndStop(1);
wait = 0;
gamemessage = player1name + "'s turn";
attachMovie("tellplayer", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for message";
return;
_local1.player1healthind.playeronesmoney.gotoAndstop(2);
_local1.player2healthind.playertwosmoney.gotoAndstop(1);
attachMovie("weaponselector", "weaponselector", 16);
weaponselector._x = 400;
weaponpress(player2bombtype);
windchange();
player2.gunturretindicator._visible = true;
player1.gunturretindicator._visible = false;
missleselector._y = 7.7;
player2.marker.gotoAndPlay(2);
player1.marker.gotoAndStop(1);
wait = 0;
gamemessage = player2name + "'s turn";
attachMovie("tellplayer", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for message";
return;
keytest();
return;
keytest();
return;
movebomb();
return;
explodebomb();
return;
animateExplosion();
return;
action = "test for win";
}
case "tell player they have won" :
gamemessage = roundwinnername + " wins this round!";
attachMovie("tellplayerwin", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for round won message";
return;
case "wait for round won message" :
wait++;
if (wait > 60) {
tellplayer.play();
turn = "player1";
action = "test for game over";
}
return;
case "wait for message" :
wait++;
if (wait > 60) {
tellplayer.play();
if (turn == "player1") {
action = "player ones move";
} else {
action = "player twos move";
}
}
return;
case "tell player ones move" :
_local1.player1healthind.playeronesmoney.gotoAndstop(1);
_local1.player2healthind.playertwosmoney.gotoAndstop(2);
attachMovie("weaponselector", "weaponselector", 16);
weaponselector._x = 400;
weaponpress(player1bombtype);
windchange();
player1.gunturretindicator._visible = true;
player2.gunturretindicator._visible = false;
player1.marker.gotoAndPlay(2);
player2.marker.gotoAndStop(1);
wait = 0;
gamemessage = player1name + "'s turn";
attachMovie("tellplayer", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for message";
return;
case "tell player twos move" :
_local1.player1healthind.playeronesmoney.gotoAndstop(2);
_local1.player2healthind.playertwosmoney.gotoAndstop(1);
attachMovie("weaponselector", "weaponselector", 16);
weaponselector._x = 400;
weaponpress(player2bombtype);
windchange();
player2.gunturretindicator._visible = true;
player1.gunturretindicator._visible = false;
missleselector._y = 7.7;
player2.marker.gotoAndPlay(2);
player1.marker.gotoAndStop(1);
wait = 0;
gamemessage = player2name + "'s turn";
attachMovie("tellplayer", "tellplayer", 20);
tellplayer._y = 300;
tellplayer._x = 400;
action = "wait for message";
return;
case "player ones move" :
keytest();
return;
case "player twos move" :
keytest();
return;
case "movebomb" :
movebomb();
return;
case "explode bomb" :
explodebomb();
return;
case "animate explosion" :
animateExplosion();
return;
case "end turn" :
action = "test for win";
}
};
function landdata() {
var _local1 = _global;
landcolours = new Array(75621, 26112, 8606209, 7864577, 17408);
strokecolours = new Array(72762, 20224, 5516801, 4260097, 109825);
if (landtype == 0) {
landt = random(5) + 1;
} else {
landt = landtype;
}
planttype = landt;
strokecol = strokecolours[landt - 1];
landcolour = landcolours[landt - 1];
if (landt == 1) {
_local1.landarray = new Array(486, 488, 491, 492, 487, 483, 481, 481, 482, 486, 491, 498, 505, 507, 507, 503, 482, 478, 477, 473, 471, 469, 471, 468, 450, 433, 388, 344, 322, 305, 274, 226, 209, 208, 205, 207, 214, 220, 221, 221, 218, 218, 229, 234, 297, 309, 335, 348, 365, 384, 423, 447, 456, 466, 474, 491, 487, 486, 479, 472, 470, 472, 472, 472, 468, 464, 465, 471, 472, 476, 479, 480, 485, 493, 501, 504, 508, 508, 501, 491, 488, 482, 476);
}
if (landt == 2) {
_local1.landarray = new Array(350, 355, 358, 362, 370, 377, 390, 397, 404, 418, 423, 429, 436, 442, 444, 441, 433, 433, 432, 432, 432, 435, 441, 443, 452, 461, 467, 466, 458, 436, 436, 417, 405, 391, 387, 368, 360, 346, 343, 342, 345, 348, 355, 375, 395, 413, 422, 425, 433, 445, 455, 458, 454, 447, 439, 430, 430, 426, 418, 415, 409, 398, 388, 383, 380, 380, 384, 384, 385, 390, 394, 406, 406, 417, 426, 426, 428, 428, 428, 428, 428, 428, 428, 428, 430, 431);
}
if (landt == 3) {
_local1.landarray = new Array(244, 242, 240, 239, 238, 238, 238, 239, 243, 257, 267, 270, 269, 267, 262, 260, 260, 270, 276, 276, 278, 279, 287, 295, 303, 312, 322, 337, 363, 394, 415, 443, 465, 492, 505, 508, 508, 505, 503, 503, 503, 503, 499, 494, 493, 487, 472, 452, 438, 407, 361, 309, 286, 274, 264, 247, 241, 237, 233, 231, 228, 232, 244, 251, 256, 256, 254, 247, 242, 238, 236, 235, 236, 236, 235, 232, 229, 227, 227, 227, 228, 229, 229, 229, 228, 223);
}
if (landt == 4) {
_local1.landarray = new Array(297, 297, 296, 296, 297, 303, 318, 346, 364, 387, 413, 437, 449, 458, 464, 470, 475, 475, 471, 466, 455, 436, 413, 379, 321, 274, 261, 250, 239, 238, 237, 243, 245, 269, 290, 347, 393, 449, 464, 471, 477, 477, 476, 473, 471, 464, 449, 425, 397, 377, 338, 303, 283, 275, 269, 264, 257, 257, 250, 248, 254, 266, 283, 308, 362, 388, 424, 429, 437, 442, 443, 447, 449, 451, 453, 453, 454, 454, 451, 450, 449, 445, 440, 440);
}
if (landt == 5) {
_local1.landarray = new Array(376, 376, 376, 376, 378, 378, 378, 379, 379, 379, 379, 379, 379, 379, 375, 369, 338, 302, 279, 281, 302, 319, 345, 375, 393, 403, 410, 410, 402, 392, 352, 276, 208, 183, 181, 189, 209, 237, 299, 338, 365, 389, 404, 415, 414, 413, 406, 394, 385, 367, 360, 286, 273, 274, 287, 299, 317, 338, 356, 368, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 374, 374, 374, 374, 373, 371, 371, 371, 370, 370, 370, 368, 368, 368, 368, 368, 367, 367);
}
trace("landtype = " + landtype);
}
function generatelandscape() {
a = 200;
b = 0;
steps = 800 / landdetail;
drawlandscape();
}
function explodebomb() {
scorchlayer++;
scorchmarks.temp.attachMovie("scorch", "scorch" + scorchlayer, scorchlayer);
with (eval ("this.scorchmarks.temp.scorch" + scorchlayer)) {
_x = bx;
_y = by;
_width = bombsize * 1.3;
_height = bombsize * 1.3;
}
eval ("this.scorchmarks.temp.scorch" + (scorchlayer - 10)).play();
lastbx = undefined;
lastby = undefined;
obx = 0;
oby = 0;
area = bombforce / (landdetail / 2);
damage = Math.floor(bombsize / 2);
i = 1;
while (i < area) {
b = hitarraynum - i;
x = hitx + (damage * Math.sin(i));
hitit = Math.floor(x / landdetail);
b = landarray[hitit];
y = hity + (damage * Math.cos(i));
if (b < y) {
landarray[hitit] = y;
}
i = i + 0.1;
}
explodesteps = 30;
explodealpha = 100;
action = "animate explosion";
c = 10 + (bombforce / 2);
bomb._x = -10;
bt = ("bomb" + (explosiontype - 1)) + "explode";
attachMovie(bt, "bombland", 17);
bombland._x = bx;
bombland._y = by;
}
scorchlayer = 300;
function firebomb() {
removeMovieClip("weaponselector");
player2.gunturretindicator._visible = false;
player1.gunturretindicator._visible = false;
if (explosiontype == 1) {
if (turn == "player1") {
player1cash = player1cash - weaponcost;
} else {
player2cash = player2cash - weaponcost;
}
action = "jetpacing player";
} else if (explosiontype == 5) {
if (turn == "player1") {
player1cash = player1cash - weaponcost;
player1shield = 3;
action = "end turn";
} else {
player2cash = player2cash - weaponcost;
player2shield = 3;
action = "end turn";
}
shieldsound.start(0, 0);
rotateplayers();
}
if ((explosiontype > 1) && (explosiontype < 5)) {
gunsound.start();
if (turn == "player1") {
this.player1.bot.gun.muzzleflash.play();
player1cash = player1cash - weaponcost;
} else {
this.player2.bot.gun.muzzleflash.play();
player2cash = player2cash - weaponcost;
}
leftv = 0;
rightv = 0;
temppower = power / 2.5;
radian = (rottemp * Math.PI) / 180;
xmove = temppower * Math.cos(radian);
if (xmove > 0) {
rightv = xmove;
} else {
leftv = Math.abs(xmove);
}
upv = temppower * Math.sin(radian);
adjustx = 45 * Math.cos(radian);
adjusty = 8 + (45 * Math.sin(radian));
if (turn == "player1") {
bx = p1x + adjustx;
by = p1y + adjusty;
} else {
bx = p2x + adjustx;
by = p2y + adjusty;
}
if (player1cash < 0) {
player1cash = 0;
}
if (player2cash < 0) {
player2cash = 0;
}
player1cashreport = "$" + player1cash;
player2cashreport = "$" + player2cash;
action = "movebomb";
}
}
function rotateplayers() {
var _local1 = this;
player1._x = p1x;
player1._y = p1y;
player2._x = p2x;
player2._y = p2y;
_local1.player1.shield.gotoAndStop(player1shield);
_local1.player1healthind._x = p1x;
_local1.player1healthind._y = p1y;
_local1.player1.bot.head.gotoAndStop(player1head);
_local1.player2.bot.head.gotoAndStop(player2head);
_local1.player1.gunturretindicator._rotation = p1rot;
_local1.player1.gunturretindicator.powermeasure._yscale = 35 + (player1power / 2);
_local1.player1.gunturretindicator.powermeasure._xscale = 35 + (player1power / 2);
if (p1rot < 0) {
botframe = Math.abs(p1rot);
_local1.player1.bot._xscale = 100;
} else {
botframe = Math.abs(p1rot - 180);
_local1.player1.bot._xscale = -100;
}
_local1.player1.bot.gotoAndStop(botframe);
_local1.player2.shield.gotoAndStop(player2shield);
_local1.player2healthind._x = p2x;
_local1.player2healthind._y = p2y;
_local1.player2.muzzleflash._rotation = p2rot;
_local1.player2.gunturretindicator._rotation = p2rot;
_local1.player2.gunturretindicator.powermeasure._yscale = 35 + (player2power / 2);
_local1.player2.gunturretindicator.powermeasure._xscale = 35 + (player2power / 2);
if (p2rot < 0) {
botframe = Math.abs(p2rot);
_local1.player2.bot._xscale = 100;
} else {
botframe = Math.abs(p2rot - 180);
_local1.player2.bot._xscale = -100;
}
_local1.player2.bot.gotoAndStop(botframe);
}
function keytest() {
if (turn == "player1") {
rottemp = p1rot;
power = player1power;
} else {
rottemp = p2rot;
power = player2power;
}
if (Key.isDown(37)) {
if ((rottemp > 180) || (rottemp < 1)) {
clicksoundcount++;
if (clicksoundcount > clicksounddelay) {
clicksoundcount = 0;
clicksound.start(0, 0);
}
rottemp--;
}
if (rottemp < -90) {
rottemp = 270;
}
rotateplayers();
}
if (Key.isDown(39)) {
if ((rottemp > 179) || (rottemp < 0)) {
clicksoundcount++;
if (clicksoundcount > clicksounddelay) {
clicksoundcount = 0;
clicksound.start(0, 0);
}
rottemp++;
}
if (rottemp > 270) {
rottemp = -90;
}
rotateplayers();
}
if (Key.isDown(38)) {
if (power < 100) {
morepowersound.start(0, 0);
power = power + 1;
rotateplayers();
}
}
if (Key.isDown(40)) {
if (power > 10) {
power = power - 1;
lesspowersound.start(0, 0);
rotateplayers();
}
}
if (Key.isDown(32)) {
firebomb();
}
if (turn == "player1") {
p1rot = rottemp;
player1power = power;
} else {
p2rot = rottemp;
player2power = power;
}
}
clicksoundcount = 0;
clicksounddelay = 3;
function movebomb() {
if (lastbx == undefined) {
obx = bx;
oby = by;
} else {
obx = lastbx;
oby = lastby;
}
bombtrailcount++;
if (bombtrailcount > bombtraildelay) {
bombtrailcount = 0;
attachMovie("bombtrail", "b" + bombt, bombt);
bombt++;
if (bombt > 500) {
bombt = 400;
}
}
if (by < 0) {
this.misslefollow._x = bx;
} else {
this.misslefollow._x = -10;
}
temppower = temppower - gravity;
upv = temppower * Math.sin(radian);
if (rightv > 0) {
rightv = rightv + windamount;
if (rightv < 0) {
leftv = Math.abs(rightv);
rightv = 0;
}
}
if (leftv > 0) {
leftv = leftv - windamount;
if (leftv < 0) {
rightv = Math.abs(leftv);
leftv = 0;
}
}
bx = bx + rightv;
bx = bx - leftv;
by = by + upv;
if (upv == 0) {
upv = upv + 5;
}
if (bx > 800) {
bx = 800;
leftv = rightv;
rightv = 0;
}
if (bx < 0) {
bx = 0;
rightv = leftv;
leftv = 0;
}
if (by > 600) {
by = 600;
hity = by;
lastbx = undefined;
action = "explode bomb";
}
hitarraynum = Math.floor(bx / landdetail);
hitloc = landarray[hitarraynum];
if (by >= hitloc) {
hitx = hitarraynum * landdetail;
hity = hitloc;
action = "explode bomb";
}
if (turn == "player2") {
a = Math.abs(p1x - bx);
b = Math.abs(p1y - by);
if ((a < 30) && (b < 30)) {
if (player1shield > 1) {
player1shield--;
if (explosiontype == 4) {
player1shield = 1;
}
shieldfadesound.start();
} else {
player1health = player1health - bombforce;
}
hitx = bx;
hity = by;
explodesteps = 10;
moveblast = bombforce / explodesteps;
blaststeps = moveblast;
moveblast = moveblast + blaststeps;
explodealpha = 100;
action = "explode bomb";
}
} else {
a = Math.abs(p2x - bx);
b = Math.abs(p2y - by);
if ((a < 30) && (b < 30)) {
if (player2shield > 1) {
player2shield--;
if (explosiontype == 4) {
player2shield = 1;
}
shieldfadesound.start();
} else {
player2health = player2health - bombforce;
}
hitx = bx;
hity = by;
explodesteps = 10;
moveblast = bombforce / explodesteps;
blaststeps = moveblast;
moveblast = moveblast + blaststeps;
explodealpha = 100;
action = "explode bomb";
}
}
bomb._x = bx;
bomb._y = by;
lastbx = bx;
lastby = by;
}
bombt = 400;
bombtraildelay = 2;
bombtrailcount = 0;
function animateExplosion() {
bombland._alpha = explodealpha;
explodealpha = explodealpha * 0.91;
explodesteps--;
if (explodesteps < 1) {
removeMovieClip(bombland);
this.player1healthind.lifebar._xscale = player1health;
this.player2healthind.lifebar2._xscale = player2health;
bombland._alpha = 0;
drawlandscape();
rotateplayers();
action = "end turn";
}
}
function windchange() {
var _local1 = this;
a = random(5);
if ((a == 1) || (wind == undefined)) {
wind = random(16) - 8;
windreport = Math.abs(wind);
if (wind == 0) {
_local1.windmarker.gotoAndStop(2);
windsoundplaying = 0;
} else {
_local1.windmarker._alpha = 100;
_local1.windmarker.gotoAndStop(1);
if (windsoundplaying == 0) {
}
}
if (wind > 0) {
_local1.windmarker.windarrow._xscale = 100;
} else {
_local1.windmarker.windarrow._xscale = -100;
}
}
windamount = wind / 50;
}
function startnewround() {
var _local1 = this;
grass1x = random(40);
grass2x = random(40) + 20;
grass3x = random(40) + 40;
landdata();
drawlandscape();
_local1.scorchmarks.createEmptyMovieClip("temp", 10);
scorchlayer = 300;
backdisp = random(2) + 1;
_local1.background.gotoAndStop(backdisp);
player1health = 100;
player2health = 100;
player1cash = 1000;
player2cash = 1000;
player1shield = 1;
player2shield = 1;
player1power = 10;
player2power = 10;
player1bombtype = 2;
player2bombtype = 2;
player1cashreport = "$" + player1cash;
player2cashreport = "$" + player2cash;
p1rot = -random(90);
p2rot = random(90) + 180;
p1x = random(200) + 50;
a = Math.floor(p1x / landdetail);
b = landarray[a];
p1y = b - 39;
p2x = random(200) + 550;
a = Math.floor(p2x / landdetail);
b = landarray[a];
p2y = b - 39;
bombcost = 0;
_local1.player1healthind.lifebar._xscale = player1health;
_local1.player2healthind.lifebar2._xscale = player2health;
rotateplayers();
player2.gunturretindicator._visible = false;
player1.gunturretindicator._visible = false;
}
function setup() {
round = 1;
player1score = 0;
player2score = 0;
choosesound.stop();
landdata();
definesounds();
wait = 0;
landdetail = 10;
bombwide = bomb._width;
bx = -10;
by = 0;
gravity = 0.8;
upv = 0;
leftv = 0;
rightv = 10;
power = 20;
attachMovie("player1healthind", "player1healthind", 14);
attachMovie("player2healthind", "player2healthind", 15);
attachMovie("playertype2", "player1", 10);
attachMovie("playertype2", "player2", 11);
action = "Start new round";
}
function weaponpress(type) {
var _local1 = type;
if (turn == "player1") {
money = player1cash;
}
if (turn == "player2") {
money = player2cash;
}
if ((money - 300) < 0) {
weaponselector.missleselectgraphic.e._alpha = 80;
} else {
weaponselector.missleselectgraphic.e._alpha = 0;
}
if ((money - 50) < 0) {
weaponselector.missleselectgraphic.a._alpha = 80;
} else {
weaponselector.missleselectgraphic.a._alpha = 0;
}
if ((money - 100) < 0) {
trace("c");
weaponselector.missleselectgraphic.c._alpha = 80;
} else {
weaponselector.missleselectgraphic.c._alpha = 0;
}
if ((money - 500) < 0) {
weaponselector.missleselectgraphic.d._alpha = 80;
} else {
weaponselector.missleselectgraphic.d._alpha = 0;
}
if ((money - 300) < 0) {
weaponselector.missleselectgraphic.e._alpha = 80;
} else {
weaponselector.missleselectgraphic.e._alpha = 0;
}
if ((turn == "player1") && (player1shield > 1)) {
weaponselector.missleselectgraphic.e._alpha = 80;
} else if ((turn == "player2") && (player2shield > 1)) {
weaponselector.missleselectgraphic.e._alpha = 80;
} else {
weaponselector.missleselectgraphic.e._alpha = 0;
}
weaponcost = weaponcostarray[_local1 - 1];
if ((turn == "player1") && ((player1cash - weaponcost) < 0)) {
_local1 = 2;
player1bombtype = _local1;
}
if ((turn == "player2") && ((player2cash - weaponcost) < 0)) {
_local1 = 2;
player2bombtype = _local1;
}
if (_local1 == 5) {
if ((turn == "player1") && (player1shield > 1)) {
_local1 = 2;
player1bombtype = _local1;
}
if ((turn == "player2") && (player2shield > 1)) {
_local1 = 2;
player2bombtype = _local1;
}
}
weaponcost = weaponcostarray[_local1 - 1];
bombcost = weaponcostarray[_local1 - 1];
bombforce = weaponbombforce[_local1 - 1];
explosiontype = _local1;
bombsize = bombeffectarea[_local1 - 1];
weaponselector.missleselectgraphic.missleindicator._x = weaponindloc[_local1 - 1];
}
weaponindloc = new Array(-124, -62, 0, 62, 124);
weaponbombforce = new Array(0, 10, 40, 70, 0);
weaponcostarray = new Array(50, 0, 100, 500, 300);
bombeffectarea = new Array(0, 20, 50, 130, 0);
Frame 120
setup();
generatelandscape();
Instance of Symbol 289 MovieClip in Frame 120
onClipEvent (enterFrame) {
_root.frameaction();
}
Frame 121
stop();
Frame 122
removeMovieClip("player1");
removeMovieClip("player2");
removeMovieClip("player1healthind");
removeMovieClip("player2healthind");
Frame 126
stop();
Frame 127
function drawoptionsland() {
if (landtype == 0) {
this.landselector.gotoAndStop(1);
} else {
this.landselector.gotoAndStop(2);
landt = landtype;
landcolours = new Array(75621, 26112, 8606209, 7864577, 17408);
landcolour = landcolours[landt - 1];
if (landt == 1) {
landarray = new Array(486, 488, 491, 492, 487, 483, 481, 481, 482, 486, 491, 498, 505, 507, 507, 503, 482, 478, 477, 473, 471, 469, 471, 468, 450, 433, 388, 344, 322, 305, 274, 226, 209, 208, 205, 207, 214, 220, 221, 221, 218, 218, 229, 234, 297, 309, 335, 348, 365, 384, 423, 447, 456, 466, 474, 491, 487, 486, 479, 472, 470, 472, 472, 472, 468, 464, 465, 471, 472, 476, 479, 480, 485, 493, 501, 504, 508, 508, 501, 491, 488, 482, 476);
}
if (landt == 2) {
landarray = new Array(350, 355, 358, 362, 370, 377, 390, 397, 404, 418, 423, 429, 436, 442, 444, 441, 433, 433, 432, 432, 432, 435, 441, 443, 452, 461, 467, 466, 458, 436, 436, 417, 405, 391, 387, 368, 360, 346, 343, 342, 345, 348, 355, 375, 395, 413, 422, 425, 433, 445, 455, 458, 454, 447, 439, 430, 430, 426, 418, 415, 409, 398, 388, 383, 380, 380, 384, 384, 385, 390, 394, 406, 406, 417, 426, 426, 428, 428, 428, 428, 428, 428, 428, 428, 430, 431);
}
if (landt == 3) {
landarray = new Array(244, 242, 240, 239, 238, 238, 238, 239, 243, 257, 267, 270, 269, 267, 262, 260, 260, 270, 276, 276, 278, 279, 287, 295, 303, 312, 322, 337, 363, 394, 415, 443, 465, 492, 505, 508, 508, 505, 503, 503, 503, 503, 499, 494, 493, 487, 472, 452, 438, 407, 361, 309, 286, 274, 264, 247, 241, 237, 233, 231, 228, 232, 244, 251, 256, 256, 254, 247, 242, 238, 236, 235, 236, 236, 235, 232, 229, 227, 227, 227, 228, 229, 229, 229, 228, 223);
}
if (landt == 4) {
landarray = new Array(297, 297, 296, 296, 297, 303, 318, 346, 364, 387, 413, 437, 449, 458, 464, 470, 475, 475, 471, 466, 455, 436, 413, 379, 321, 274, 261, 250, 239, 238, 237, 243, 245, 269, 290, 347, 393, 449, 464, 471, 477, 477, 476, 473, 471, 464, 449, 425, 397, 377, 338, 303, 283, 275, 269, 264, 257, 257, 250, 248, 254, 266, 283, 308, 362, 388, 424, 429, 437, 442, 443, 447, 449, 451, 453, 453, 454, 454, 451, 450, 449, 445, 440, 440);
}
if (landt == 5) {
landarray = new Array(376, 376, 376, 376, 378, 378, 378, 379, 379, 379, 379, 379, 379, 379, 375, 369, 338, 302, 279, 281, 302, 319, 345, 375, 393, 403, 410, 410, 402, 392, 352, 276, 208, 183, 181, 189, 209, 237, 299, 338, 365, 389, 404, 415, 414, 413, 406, 394, 385, 367, 360, 286, 273, 274, 287, 299, 317, 338, 356, 368, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 374, 374, 374, 374, 373, 371, 371, 371, 370, 370, 370, 368, 368, 368, 368, 368, 367, 367);
}
this.landselector.holdit.createEmptyMovieClip("earth", 1);
landdetail = 10;
with (_root.landselector.holdit.earth) {
beginFill(landcolour, 100);
moveTo(-1, 121);
b = 0;
d = landarray.length;
steps = 1.95121951219512;
i = 0;
while (i < 83) {
c = landarray[i];
lineTo(b, c * 0.2);
b = b + steps;
i = i + 1;
}
lineTo(161, 121);
endFill();
}
}
}
introsound.stop();
Frame 131
stop();
Frame 132
introsound.stop();
Frame 137
stop();
Symbol 5 MovieClip Frame 24
stop();
Symbol 15 MovieClip [tellplayer] Frame 30
stop();
Symbol 15 MovieClip [tellplayer] Frame 61
removeMovieClip(this);
Symbol 22 MovieClip Frame 2
stop();
Symbol 27 MovieClip Frame 2
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 53
gotoAndPlay (2);
Symbol 53 MovieClip Frame 1
stop();
Instance of Symbol 53 MovieClip in Symbol 54 MovieClip Frame 1
onClipEvent (load) {
blinkc = 0;
blinkt = random(40) + 45;
}
onClipEvent (enterFrame) {
blinkc++;
if (blinkc > blinkt) {
blinkc = 0;
blinkt = random(40) + 45;
this.play();
}
}
Symbol 112 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 136 MovieClip [playertype2flyer] Frame 1
stop();
Symbol 136 MovieClip [playertype2flyer] Frame 16
removeMovieClip(this);
Symbol 154 Button
on (press) {
_root.weaponpress(1);
}
Symbol 155 Button
on (press) {
_root.weaponpress(2);
}
Symbol 156 Button
on (press) {
_root.weaponpress(3);
}
Symbol 157 Button
on (press) {
_root.weaponpress(4);
}
Symbol 158 Button
on (press) {
_root.weaponpress(5);
}
Symbol 160 MovieClip [weaponselector] Frame 27
stop();
Symbol 184 MovieClip Frame 1
stop();
Symbol 190 MovieClip [tellplayerwin] Frame 30
stop();
Symbol 190 MovieClip [tellplayerwin] Frame 61
removeMovieClip(this);
Symbol 191 MovieClip [fadegamein] Frame 25
removeMovieClip(this);
Symbol 195 MovieClip [tellplayeralt] Frame 30
stop();
Symbol 195 MovieClip [tellplayeralt] Frame 61
removeMovieClip(this);
Symbol 197 MovieClip [scorch] Frame 36
stop();
Symbol 197 MovieClip [scorch] Frame 50
trace("yo");
removeMovieClip(this);
Symbol 203 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 38
stop();
Symbol 214 Button
on (press) {
gotoAndPlay (73);
}
Symbol 220 Button
on (press) {
gotoAndPlay (132);
}
Symbol 225 Button
on (press) {
gotoAndPlay (127);
}
Symbol 230 Button
on (press) {
_root.player1head++;
if (_root.player1head > 23) {
_root.player1head = 23;
}
_root.player1h.gotoAndStop(player1head);
}
Symbol 231 Button
on (press) {
_root.player1head--;
if (_root.player1head < 1) {
_root.player1head = 1;
}
_root.player1h.gotoAndStop(player1head);
}
Symbol 232 Button
on (press) {
_root.player2head++;
if (_root.player2head > 23) {
_root.player2head = 23;
}
_root.player2h.gotoAndStop(player2head);
}
Symbol 233 Button
on (press) {
_root.player2head--;
if (_root.player2head < 1) {
_root.player2head = 1;
}
_root.player2h.gotoAndStop(player2head);
}
Symbol 240 MovieClip Frame 30
stop();
Symbol 247 Button
on (press) {
_root.startgame();
}
Symbol 254 MovieClip Frame 1
stop();
Symbol 262 MovieClip Frame 38
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 292 Button
on (press) {
gotoAndPlay (35);
}
Symbol 308 MovieClip Frame 1
stop();
Symbol 312 Button
on (press) {
gotoAndPlay (35);
}
Symbol 313 Button
on (press) {
_root.landtype++;
if (_root.landtype > 5) {
_root.landtype = 5;
}
_root.drawoptionsland();
}
Symbol 314 Button
on (press) {
_root.landtype--;
if (_root.landtype < 1) {
_root.landtype = 0;
}
_root.drawoptionsland();
}