Frame 1
fscommand ("showmenu", false);
fscommand ("allowscale", false);
stop();
Instance of Symbol 189 MovieClip [a] "loading" in Frame 1
onClipEvent (load) {
bytesloaded = 0;
bytesTotal = 0;
bytesTotal = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
if ((bytesLoaded / bytesTotal) < 0.97) {
gotoAndStop (1);
} else if (((bytesLoaded / bytesTotal) >= 0.97) && ((bytesLoaded / bytesTotal) < 1)) {
gotoAndStop (2);
} else {
_root.nextFrame();
}
}
Frame 2
play();
Frame 182
stop();
this.onEnterFrame = function () {
if (Key.isDown(32)) {
gotoAndStop (184);
}
};
Frame 183
stop();
_global.versionCode = "";
Frame 184
stop();
this.onEnterFrame = function () {
if (_global.versionCode == "Chinese") {
introduction.gotoAndStop(1);
} else if (_global.versionCode == "English") {
introduction.gotoAndStop(2);
}
};
Frame 185
stop();
var Gstart = 0;
stageDoor.stageDoor.stageNum.gotoAndStop(1);
this.onEnterFrame = function () {
if (Gstart > 0) {
Gstart--;
}
if (Gstart == 0) {
stageDoor.gotoAndPlay(13);
Gstart = 49;
}
if (Gstart == 1) {
nextFrame();
}
};
Frame 186
function drawMap(map) {
mapWidth = map[0].length;
mapHeight = map.length;
var i = charBotPosY;
while (i <= ((viewAreaY + 1) + charBotPosY)) {
var j = charBotPosX;
while (j <= ((viewAreaX + 1) + charBotPosX)) {
wholeMap.attachMovie("tile", (("t_" + i) + "_") + j, (i * (mapWidth + 2)) + j);
wholeMap[(("t_" + i) + "_") + j]._x = j * tileW;
wholeMap[(("t_" + i) + "_") + j]._y = i * tileH;
wholeMap[(("t_" + i) + "_") + j].gotoAndStop(map[i][j] + 1);
j++;
}
i++;
}
wholeMap._x = (533 - (((viewAreaX + 2) + (charBotPosX * 2)) * tileW)) / 2;
wholeMap._y = (400 - (((viewAreaY + 2) + (charBotPosY * 2)) * tileH)) / 2;
}
function removeMap(map) {
var i = 0;
while (i <= (map.length + 1)) {
var j = 0;
while (j <= (map[0].length + 1)) {
removeMovieClip(wholeMap[(("t_" + i) + "_") + j]);
j++;
}
i++;
}
}
function scrollMap(dir) {
mapWidth = myMap[0].length;
mapHeight = myMap.length;
if ((dir == "left") && (rightX > (viewAreaX - 1))) {
wholemap._x = wholemap._x + scrollspeed;
scrollLeftX = scrollLeftX + scrollspeed;
if (scrollLeftX >= tileW) {
LeftX--;
i = topY;
while (i <= bottomY) {
wholemap.attachMovie("tile", (("t_" + i) + "_") + LeftX, (i * (MapWidth + 2)) + LeftX);
wholemap[(("t_" + i) + "_") + LeftX]._x = LeftX * tileW;
wholemap[(("t_" + i) + "_") + LeftX]._y = i * tileH;
wholemap[(("t_" + i) + "_") + LeftX].depth = (((i + "_") + LeftX) + newline) + ((i * (MapWidth + 2)) + LeftX);
wholemap[(("t_" + i) + "_") + LeftX].gotoAndStop(myMap[i][LeftX] + 1);
removeMovieClip(wholemap[(("t_" + i) + "_") + RightX]);
i++;
}
scrollLeftX = scrollLeftX - tileW;
RightX--;
}
} else if ((dir == "right") && (leftX < (mapWidth - viewAreaX))) {
wholemap._x = wholemap._x - scrollspeed;
scrollRightX = scrollRightX + scrollspeed;
if (scrollRightX >= tileW) {
rightX++;
i = topY;
while (i <= bottomY) {
wholemap.attachMovie("tile", (("t_" + i) + "_") + rightX, (i * (MapWidth + 2)) + rightX);
wholemap[(("t_" + i) + "_") + rightX]._x = rightX * tileW;
wholemap[(("t_" + i) + "_") + rightX]._y = i * tileH;
wholemap[(("t_" + i) + "_") + rightX].depth = (((i + "_") + rightX) + newline) + ((i * (MapWidth + 2)) + rightX);
wholemap[(("t_" + i) + "_") + rightX].gotoAndStop(myMap[i][rightX] + 1);
removeMovieClip(wholemap[(("t_" + i) + "_") + leftX]);
i++;
}
scrollRightX = scrollRightX - tileW;
LeftX++;
}
} else if ((dir == "up") && (BottomY > (viewAreaY - 1))) {
wholemap._y = wholemap._y + scrollspeed;
scrollTopY = scrollTopY + scrollspeed;
if (scrollTopY >= tileH) {
TopY--;
i = LeftX;
while (i <= RightX) {
wholemap.attachMovie("tile", (("t_" + topY) + "_") + i, (topY * (MapWidth + 2)) + i);
wholemap[(("t_" + topY) + "_") + i]._x = i * tileH;
wholemap[(("t_" + topY) + "_") + i]._y = topY * tileW;
wholemap[(("t_" + topY) + "_") + i].depth = (((i + "_") + topY) + newline) + ((i * (MapWidth + 2)) + topY);
wholemap[(("t_" + topY) + "_") + i].gotoAndStop(myMap[topY][i] + 1);
removeMovieClip(wholemap[(("t_" + bottomY) + "_") + i]);
i++;
}
scrolltopY = scrolltopY - tileH;
BottomY--;
}
} else if ((dir == "down") && (topY < (mapHeight - viewAreaY))) {
wholemap._y = wholemap._y - scrollspeed;
scrollbottomY = scrollbottomY + scrollspeed;
if (scrollBottomY >= tileH) {
BottomY++;
i = LeftX;
while (i <= RightX) {
wholemap.attachMovie("tile", (("t_" + bottomY) + "_") + i, (bottomY * (MapWidth + 2)) + i);
wholemap[(("t_" + bottomY) + "_") + i]._x = i * tileH;
wholemap[(("t_" + bottomY) + "_") + i]._y = bottomY * tileW;
wholemap[(("t_" + bottomY) + "_") + i].depth = (((i + "_") + bottomY) + newline) + ((i * (MapWidth + 2)) + bottomY);
wholemap[(("t_" + bottomY) + "_") + i].gotoAndStop(myMap[bottomY][i] + 1);
removeMovieClip(wholemap[(("t_" + topY) + "_") + i]);
i++;
}
scrollbottomY = scrollbottomY - tileH;
TopY++;
}
}
}
var charBotPosX = 5;
var charBotPosY = 18;
var canPassTile = 4;
var notPassTile = 23;
var tileW = 32;
var tileH = 32;
var charPos = [13, 27];
var Pos1 = [2, 3];
var Pos2 = [23, 3];
var Pos3 = [23, 19];
var Pos4 = [2, 19];
var bossPos = [13, 3];
var Pos = [23, 3];
viewAreaX = 16;
viewAreaY = 12;
mask._x = 10.5;
mask._y = 8;
var scrollspeed = 5;
var scrollLeftX = 0;
var scrollRightX = 0;
var scrollTopY = 0;
var scrollbottomY = 0;
var leftX = charBotPosX;
var rightX = ((viewAreaX + 1) + charBotPosX);
var topY = charBotPosY;
var bottomY = ((viewAreaY + 1) + charBotPosY);
var CharNum = 3;
var HLPoursideNum = 0;
var score = 0;
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBoss() {
wholemap.attachMovie("tankBoss", "tankBoss", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBoss._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBoss._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBoss", "shotBoss", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossA2", "shotBossA2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossA3", "shotBossA3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
bossAppear == true;
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 1, 1, 1, 27, 1, 1, 30, 1, 1, 27, 1, 1, 27, 1, 30, 1, 1, 1, 27, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 1, 1, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 27, 27, 27, 1, 1, 1, 1, 1, 27, 27, 27, 27, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 15, 15, 12, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 16, 16, 13, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 23, 23, 23, 23, 1, 1, 1, 1, 1, 30, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 12, 1, 1, 30, 30, 30, 1, 1, 23, 48, 0], [0, 48, 1, 1, 11, 12, 1, 1, 1, 1, 1, 1, 1, 1, 14, 13, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 14, 13, 1, 1, 23, 23, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 23, 1, 1, 23, 1, 1, 1, 1, 1, 1, 30, 30, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 23, 1, 1, 23, 1, 1, 1, 1, 1, 30, 30, 1, 1, 1, 1, 1, 48, 0], [0, 48, 27, 27, 1, 1, 1, 1, 23, 1, 1, 23, 1, 1, 1, 1, 1, 30, 1, 1, 1, 1, 27, 27, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 27, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 23, 23, 1, 1, 1, 27, 27, 48, 0], [0, 48, 1, 1, 11, 12, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 14, 13, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 27, 27, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 12, 1, 1, 1, 1, 27, 27, 27, 48, 0], [0, 48, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 13, 1, 1, 1, 1, 1, 1, 27, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 1;
var tankNum = 1;
var tankE1Num = 4;
var tankE2Num = 4;
var tankSmallNum = 3;
var tankMiddleNum = 4;
var manNum = 4;
var HLPNum = 1;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
setChar();
getCharData.stageNum = stage;
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(7);
if ((((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) && (tankEnemy != boss)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var ranDrop = random(6);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
dropItem(wholemap.tankEnemy, "addShotNum");
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
dropItem(wholemap.helicopter, "callHLP");
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
showStaff.gotoAndStop(2);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((HLPNum == 0) && (tankMiddleNum == 0)) && (tankSmallNum == 0)) && (!wholemap.helicopter)) && (!wholemap.tankSmall)) && (!wholemap.tankMiddle)) {
if ((!wholemap.tankEnemy) && (tankNum > 0)) {
setTank();
}
}
if (((timer == 0) && (!wholemap.tankEnemy)) && (tankNum == 0)) {
timer = 121;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
}
if (timer > 0) {
timer--;
}
if (timer == 25) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(2);
}
if (timer == 1) {
nextFrame();
}
};
Frame 187
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBossB() {
wholemap.attachMovie("tankBossB", "tankBossB", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBossB._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossB._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossB", "shotBossB", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossB2", "shotBossB2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossB3", "shotBossB3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 2, 2, 2, 29, 2, 2, 31, 2, 2, 29, 2, 2, 29, 2, 31, 2, 2, 2, 29, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 29, 2, 2, 29, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 29, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 29, 48, 0], [0, 48, 2, 2, 2, 31, 2, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 31, 2, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 25, 2, 2, 31, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 17, 21, 21, 21, 21, 21, 21, 21, 21, 18, 2, 2, 2, 25, 48, 0], [0, 48, 25, 2, 2, 2, 2, 2, 2, 2, 20, 22, 22, 22, 22, 22, 22, 22, 22, 19, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 25, 2, 2, 2, 17, 21, 21, 21, 21, 21, 21, 21, 21, 18, 2, 2, 2, 2, 2, 2, 2, 25, 48, 0], [0, 48, 25, 2, 2, 2, 20, 22, 22, 22, 22, 22, 22, 22, 22, 19, 2, 2, 2, 2, 25, 2, 2, 2, 48, 0], [0, 48, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 25, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 17, 21, 21, 21, 21, 21, 21, 21, 21, 18, 2, 2, 2, 25, 25, 2, 2, 2, 2, 2, 48, 0], [0, 48, 29, 29, 20, 22, 22, 22, 22, 22, 22, 22, 22, 19, 2, 2, 2, 2, 25, 25, 2, 2, 29, 29, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 29, 29, 2, 2, 2, 2, 17, 21, 21, 21, 21, 21, 21, 21, 21, 18, 25, 2, 2, 2, 29, 29, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 20, 22, 22, 22, 22, 22, 22, 22, 22, 19, 2, 25, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 31, 48, 0], [0, 48, 31, 31, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 31, 31, 48, 0], [0, 48, 31, 2, 2, 2, 2, 2, 2, 2, 29, 29, 29, 29, 29, 2, 2, 2, 2, 25, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 25, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 2;
var tankNum = 3;
var tankE1Num = 2;
var tankE2Num = 2;
var tankSmallNum = 3;
var tankMiddleNum = 4;
var tankBossBNum = 1;
var manNum = 2;
var HLPNum = 3;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
drawMap(myMap);
setChar();
getCharData.stageNum = stage;
setMan();
setTankE1();
setTankE2();
setTankSmall();
if (wholemap.HLPourside) {
setOurHLP();
}
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(7);
if (((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var ranDrop = random(6);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
if ((ranDrop >= 4) && (ranDrop <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
}
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
if (ranDrop == 3) {
dropItem(wholemap.helicopter, "callHLP");
}
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
dropItem(wholemap.tankBossB, "powerBox");
removeMovieClip(wholemap.tankBossB);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBossB);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankMiddleNum == 0) && (tankNum == 0)) && (HLPNum == 0)) && (!wholemap.tankMiddle)) && (!wholemap.tankEnemy)) && (!wholemap.helicopter)) {
if ((!wholemap.tankBossB) && (tankBossBNum > 0)) {
setTankBossB();
}
}
if (((timer == 0) && (!wholemap.tankBossB)) && (tankBossBNum == 0)) {
timer = 121;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
}
if (timer > 0) {
timer--;
}
if (timer == 25) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(3);
}
if (timer == 1) {
nextFrame();
}
};
Frame 188
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBossB() {
wholemap.attachMovie("tankBossB", "tankBossB", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBossB._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossB._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossB", "shotBossB", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossB2", "shotBossB2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossB3", "shotBossB3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTankBoss() {
wholemap.attachMovie("tankBoss", "tankBoss", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBoss._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBoss._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBoss", "shotBoss", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossA2", "shotBossA2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossA3", "shotBossA3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 3, 3, 3, 28, 3, 3, 3, 3, 3, 28, 3, 3, 28, 3, 3, 3, 3, 3, 28, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 3, 3, 3, 3, 28, 3, 3, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 28, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 28, 48, 0], [0, 48, 3, 3, 3, 32, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 24, 24, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 24, 3, 3, 5, 9, 9, 9, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 24, 3, 3, 3, 3, 3, 8, 10, 10, 10, 7, 3, 3, 3, 24, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 24, 24, 3, 3, 48, 0], [0, 48, 3, 3, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 24, 3, 3, 48, 0], [0, 48, 3, 3, 24, 3, 3, 3, 3, 32, 32, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 24, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 3, 48, 0], [0, 48, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 32, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 5, 6, 3, 3, 32, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 5, 6, 3, 3, 48, 0], [0, 48, 3, 3, 8, 7, 3, 3, 3, 32, 32, 32, 3, 3, 3, 3, 3, 3, 3, 3, 8, 7, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 28, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 32, 32, 3, 3, 3, 3, 3, 3, 28, 28, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 28, 28, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 32, 3, 3, 32, 32, 3, 3, 3, 28, 28, 48, 0], [0, 48, 3, 3, 3, 3, 5, 6, 3, 3, 3, 3, 3, 3, 32, 3, 3, 3, 3, 32, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 8, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 28, 28, 28, 3, 3, 3, 3, 3, 3, 3, 32, 32, 48, 0], [0, 48, 32, 32, 3, 3, 3, 24, 3, 3, 3, 28, 3, 3, 3, 28, 3, 3, 3, 3, 3, 32, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 24, 3, 3, 3, 3, 3, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 3;
var tankNum = 4;
var tankE1Num = 2;
var tankE2Num = 2;
var tankSmallNum = 3;
var tankMiddleNum = 3;
var tankBossBNum = 1;
var tankBossNum = 1;
var manNum = 2;
var HLPNum = 4;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
drawMap(myMap);
setChar();
getCharData.stageNum = stage;
if ((wholemap.shotBossB || (wholemap.shotBossB2)) || (wholemap.shotBossB3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
if (wholemap.HLPourside) {
setOurHLP();
}
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(7);
if (((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var ranDrop = random(8);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
if ((ranDrop >= 4) && (ranDrop <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
} else if (ranDrop > 6) {
dropItem(wholemap.tankEnemy, "powerBox");
}
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
if ((ranDrop >= 3) && (ranDrop <= 4)) {
dropItem(wholemap.helicopter, "callHLP");
}
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
} else if (wholemap.tankBoss.aliveAfter == false) {
if (tankBossNum > 0) {
tankBossNum--;
enemySpace++;
dropItem(wholemap.tankBoss, "powerBox");
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankMiddleNum == 0) && (tankNum == 0)) && (HLPNum == 0)) && (!wholemap.tankMiddle)) && (!wholemap.tankEnemy)) && (!wholemap.helicopter)) {
if ((!wholemap.tankBoss) && (tankBossNum > 0)) {
setTankBoss();
}
}
if (((timer == 0) && (!wholemap.tankBoss)) && (tankBossNum == 0)) {
timer = 121;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
tankSmallNum = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
}
if (timer > 0) {
timer--;
}
if (timer == 25) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(4);
}
if (timer == 1) {
nextFrame();
}
};
Frame 189
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBossB() {
wholemap.attachMovie("tankBossB", "tankBossB", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBossB._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBossB._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossB", "shotBossB", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossB2", "shotBossB2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossB3", "shotBossB3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTankBossC() {
wholemap.attachMovie("tankBossC", "tankBossC", ((mapWidth + 2) * (mapHeight + 2)) + 19);
wholemap.tankBossC._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossC._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossC", "shotBossC", ((mapWidth + 2) * (mapHeight + 2)) + 39);
wholemap.attachMovie("shotBossC2", "shotBossC2", ((mapWidth + 2) * (mapHeight + 2)) + 40);
wholemap.attachMovie("shotBossC3", "shotBossC3", ((mapWidth + 2) * (mapHeight + 2)) + 41);
}
function setTankBoss() {
wholemap.attachMovie("tankBoss", "tankBoss", ((mapWidth + 2) * (mapHeight + 2)) + 20);
wholemap.tankBoss._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBoss._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBoss", "shotBoss", ((mapWidth + 2) * (mapHeight + 2)) + 42);
wholemap.attachMovie("shotBossA2", "shotBossA2", ((mapWidth + 2) * (mapHeight + 2)) + 43);
wholemap.attachMovie("shotBossA3", "shotBossA3", ((mapWidth + 2) * (mapHeight + 2)) + 44);
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 4, 4, 4, 27, 4, 4, 4, 4, 4, 27, 4, 4, 27, 4, 4, 4, 4, 4, 27, 4, 4, 4, 48, 0], [0, 51, 4, 4, 4, 4, 4, 4, 4, 4, 4, 27, 4, 4, 27, 4, 4, 4, 4, 4, 4, 4, 4, 4, 51, 0], [0, 48, 27, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 26, 26, 4, 4, 4, 4, 27, 48, 0], [0, 48, 4, 4, 4, 4, 4, 26, 26, 26, 4, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 4, 4, 26, 26, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 48, 0], [0, 48, 4, 4, 33, 33, 4, 4, 4, 4, 4, 4, 4, 33, 33, 4, 4, 4, 4, 33, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 33, 33, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 48, 0], [0, 48, 26, 26, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 26, 26, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 26, 26, 4, 4, 26, 4, 4, 4, 4, 33, 33, 4, 4, 4, 4, 33, 4, 4, 4, 48, 0], [0, 48, 4, 4, 26, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 33, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 26, 4, 4, 4, 33, 33, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 27, 27, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 27, 27, 48, 0], [0, 48, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 4, 4, 4, 48, 0], [0, 51, 4, 4, 4, 4, 4, 33, 33, 4, 4, 33, 33, 4, 4, 26, 26, 4, 4, 4, 4, 4, 4, 4, 51, 0], [0, 48, 27, 27, 4, 4, 4, 33, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 26, 4, 4, 27, 27, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 33, 33, 33, 4, 4, 4, 4, 4, 4, 4, 4, 33, 33, 4, 4, 4, 4, 26, 48, 0], [0, 48, 26, 4, 4, 33, 4, 4, 4, 4, 4, 33, 33, 33, 33, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 33, 4, 4, 4, 4, 33, 4, 4, 4, 4, 4, 26, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 48, 0], [0, 48, 26, 4, 4, 4, 4, 26, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 26, 4, 4, 4, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 4;
var tankNum = 3;
var tankE1Num = 1;
var tankE2Num = 1;
var tankSmallNum = 3;
var tankMiddleNum = 3;
var tankBossBNum = 4;
var tankBossNum = 1;
var tankBossCNum = 1;
var manNum = 1;
var HLPNum = 4;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
drawMap(myMap);
setChar();
getCharData.stageNum = stage;
if ((wholemap.shotBoss || (wholemap.shotBossA2)) || (wholemap.shotBossA3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
if (wholemap.HLPourside) {
setOurHLP();
}
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(8);
if (((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((Option == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
}
}
}
var ranDrop = random(8);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
if ((ranDrop >= 4) && (ranDrop <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
}
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
if ((ranDrop >= 3) && (ranDrop <= 4)) {
dropItem(wholemap.helicopter, "callHLP");
}
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
} else if (wholemap.tankBoss.aliveAfter == false) {
if (tankBossNum > 0) {
tankBossNum--;
enemySpace++;
dropItem(wholemap.tankBoss, "powerBox");
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((ranDrop >= 6) && (ranDrop <= 7)) {
dropItem(wholemap.tankBossB, "powerBox");
}
removeMovieClip(wholemap.tankBossB);
} else if (tankBossBNum == 0) {
removeMovieClip(wholemap.tankBossB);
}
} else if (wholemap.tankBossC.aliveAfter == false) {
if (tankBossCNum > 0) {
tankBossCNum--;
enemySpace++;
dropItem(wholemap.tankBossC, "powerBox");
removeMovieClip(wholemap.tankBossC);
} else if (tankBossCNum == 0) {
removeMovieClip(wholemap.tankBossC);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankBossBNum == 0) && (tankNum == 0)) && (HLPNum == 0)) && (!wholemap.tankBossB)) && (!wholemap.tankEnemy)) && (!wholemap.helicopter)) {
if ((!wholemap.tankBossC) && (tankBossCNum > 0)) {
setTankBossC();
}
}
if (((timer == 0) && (!wholemap.tankBossC)) && (tankBossCNum == 0)) {
timer = 121;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
tankSmallNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
removeMovieClip(wholemap.tankMiddle);
}
if (timer > 0) {
timer--;
}
if (timer == 25) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(5);
}
if (timer == 1) {
nextFrame();
}
};
Frame 190
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBossB() {
wholemap.attachMovie("tankBossB", "tankBossB", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBossB._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBossB._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossB", "shotBossB", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossB2", "shotBossB2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossB3", "shotBossB3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTankBossC() {
wholemap.attachMovie("tankBossC", "tankBossC", ((mapWidth + 2) * (mapHeight + 2)) + 19);
wholemap.tankBossC._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossC._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossC", "shotBossC", ((mapWidth + 2) * (mapHeight + 2)) + 39);
wholemap.attachMovie("shotBossC2", "shotBossC2", ((mapWidth + 2) * (mapHeight + 2)) + 40);
wholemap.attachMovie("shotBossC3", "shotBossC3", ((mapWidth + 2) * (mapHeight + 2)) + 41);
}
function setTankBoss() {
wholemap.attachMovie("tankBoss", "tankBoss", ((mapWidth + 2) * (mapHeight + 2)) + 20);
wholemap.tankBoss._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBoss._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBoss", "shotBoss", ((mapWidth + 2) * (mapHeight + 2)) + 42);
wholemap.attachMovie("shotBossA2", "shotBossA2", ((mapWidth + 2) * (mapHeight + 2)) + 43);
wholemap.attachMovie("shotBossA3", "shotBossA3", ((mapWidth + 2) * (mapHeight + 2)) + 44);
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setHLPB() {
ranPos();
wholemap.attachMovie("helicopterB", "helicopterB", ((mapWidth + 2) * (mapHeight + 2)) + 102);
wholemap.helicopterB._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopterB._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shotB", "HLP-shotB", ((mapWidth + 2) * (mapHeight + 2)) + 112);
}
function setHLPC() {
ranPos();
wholemap.attachMovie("helicopterC", "helicopterC", ((mapWidth + 2) * (mapHeight + 2)) + 103);
wholemap.helicopterC._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopterC._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shotC", "HLP-shotC", ((mapWidth + 2) * (mapHeight + 2)) + 113);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 1, 1, 1, 27, 1, 1, 1, 1, 1, 27, 1, 1, 27, 1, 1, 1, 1, 1, 27, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 1, 1, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 30, 1, 1, 1, 1, 27, 48, 0], [0, 48, 1, 1, 1, 1, 1, 30, 30, 30, 1, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 1, 1, 30, 30, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 48, 0], [0, 48, 1, 1, 23, 23, 1, 1, 1, 1, 1, 1, 1, 23, 23, 1, 1, 1, 1, 23, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 23, 23, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 48, 0], [0, 48, 30, 30, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 30, 30, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 30, 30, 1, 1, 30, 1, 1, 1, 1, 23, 23, 1, 1, 1, 1, 23, 1, 1, 1, 48, 0], [0, 48, 1, 1, 30, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 30, 1, 1, 1, 23, 23, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 27, 27, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 27, 27, 48, 0], [0, 48, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 23, 23, 1, 1, 23, 23, 1, 1, 30, 30, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 27, 27, 1, 1, 1, 23, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 30, 1, 1, 27, 27, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 23, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 23, 23, 1, 1, 1, 1, 30, 48, 0], [0, 48, 30, 1, 1, 23, 1, 1, 1, 1, 1, 23, 23, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 1, 23, 1, 1, 1, 1, 1, 30, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 48, 0], [0, 48, 30, 1, 1, 1, 1, 30, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 30, 1, 1, 1, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 5;
var tankNum = 0;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 3;
var tankBossBNum = 0;
var tankBossNum = 4;
var tankBossCNum = 1;
var manNum = 0;
var HLPNum = 3;
var HLPBNum = 5;
var HLPCNum = 5;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
drawMap(myMap);
setChar();
getCharData.stageNum = stage;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setHLP();
setHLPB();
setHLPC();
setTankBoss();
if (wholemap.HLPourside) {
setOurHLP();
}
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(10);
if (((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((Option == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((Option == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((Option == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
}
}
}
var ranDrop = random(8);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
if ((ranDrop >= 4) && (ranDrop <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
}
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
if ((ranDrop >= 3) && (ranDrop <= 4)) {
dropItem(wholemap.helicopter, "callHLP");
}
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
} else if (wholemap.helicopterB.aliveAfter == false) {
if (HLPBNum > 0) {
HLPBNum--;
enemySpace++;
if ((ranDrop >= 5) && (ranDrop <= 6)) {
dropItem(wholemap.helicopterB, "callHLP");
}
removeMovieClip(wholemap.helicopterB);
} else if (HLPBNum == 0) {
removeMovieClip(wholemap.helicopterB);
}
} else if (wholemap.helicopterC.aliveAfter == false) {
if (HLPCNum > 0) {
HLPCNum--;
enemySpace++;
removeMovieClip(wholemap.helicopterC);
} else if (HLPCNum == 0) {
removeMovieClip(wholemap.helicopterC);
}
} else if (wholemap.tankBoss.aliveAfter == false) {
if (tankBossNum > 0) {
tankBossNum--;
enemySpace++;
if ((ranDrop >= 6) && (ranDrop <= 7)) {
dropItem(wholemap.tankBoss, "powerBox");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((ranDrop >= 6) && (ranDrop <= 7)) {
dropItem(wholemap.tankBossB, "powerBox");
}
removeMovieClip(wholemap.tankBossB);
} else if (tankBossBNum == 0) {
removeMovieClip(wholemap.tankBossB);
}
} else if (wholemap.tankBossC.aliveAfter == false) {
if (tankBossCNum > 0) {
tankBossCNum--;
enemySpace++;
dropItem(wholemap.tankBossC, "powerBox");
removeMovieClip(wholemap.tankBossC);
} else if (tankBossCNum == 0) {
removeMovieClip(wholemap.tankBossC);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankBossNum == 0) && (HLPBNum == 0)) && (HLPCNum == 0)) && (!wholemap.tankBoss)) && (!wholemap.helicopterB)) && (!wholemap.helicopterC)) {
if ((!wholemap.tankBossC) && (tankBossCNum > 0)) {
setTankBossC();
}
}
if (((timer == 0) && (!wholemap.tankBossC)) && (tankBossCNum == 0)) {
timer = 121;
HLPNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.helicopter);
removeMovieClip(wholemap.tankMiddle);
}
if (timer > 0) {
timer--;
}
if (timer == 25) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(6);
}
if (timer == 1) {
nextFrame();
}
};
Frame 191
function ranPos() {
var Option = random(4);
if (Option == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (Option == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (Option == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (Option == 3) {
Pos[0] = Pos4[0];
Pos[1] = Pos4[1];
}
}
function setChar() {
leftX = charBotPosX;
rightX = (viewAreaX + 1) + charBotPosX;
topY = charBotPosY;
bottomY = (viewAreaY + 1) + charBotPosY;
removeMap(myMap);
drawMap(myMap);
wholemap.attachMovie("char", "char", ((mapWidth + 2) * (mapHeight + 2)) + 12);
wholemap.char._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.char._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot", "shot", ((mapWidth + 2) * (mapHeight + 2)) + 22);
wholemap.attachMovie("shotA2", "shotA2", ((mapWidth + 2) * (mapHeight + 2)) + 23);
wholemap.attachMovie("shotA3", "shotA3", ((mapWidth + 2) * (mapHeight + 2)) + 24);
}
function setTankBossB() {
wholemap.attachMovie("tankBossB", "tankBossB", ((mapWidth + 2) * (mapHeight + 2)) + 18);
wholemap.tankBossB._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBossB._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossB", "shotBossB", ((mapWidth + 2) * (mapHeight + 2)) + 36);
wholemap.attachMovie("shotBossB2", "shotBossB2", ((mapWidth + 2) * (mapHeight + 2)) + 37);
wholemap.attachMovie("shotBossB3", "shotBossB3", ((mapWidth + 2) * (mapHeight + 2)) + 38);
}
function setTankBossC() {
wholemap.attachMovie("tankBossC", "tankBossC", ((mapWidth + 2) * (mapHeight + 2)) + 19);
wholemap.tankBossC._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBossC._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossC", "shotBossC", ((mapWidth + 2) * (mapHeight + 2)) + 39);
wholemap.attachMovie("shotBossC2", "shotBossC2", ((mapWidth + 2) * (mapHeight + 2)) + 40);
wholemap.attachMovie("shotBossC3", "shotBossC3", ((mapWidth + 2) * (mapHeight + 2)) + 41);
}
function setTankBossFinal() {
wholemap.attachMovie("tankBossFinal", "tankBossFinal", ((mapWidth + 2) * (mapHeight + 2)) + 21);
wholemap.tankBossFinal._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossFinal._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBossFinal", "shotBossFinal", ((mapWidth + 2) * (mapHeight + 2)) + 45);
}
function setTankBoss() {
wholemap.attachMovie("tankBoss", "tankBoss", ((mapWidth + 2) * (mapHeight + 2)) + 20);
wholemap.tankBoss._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankBoss._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shotBoss", "shotBoss", ((mapWidth + 2) * (mapHeight + 2)) + 42);
wholemap.attachMovie("shotBossA2", "shotBossA2", ((mapWidth + 2) * (mapHeight + 2)) + 43);
wholemap.attachMovie("shotBossA3", "shotBossA3", ((mapWidth + 2) * (mapHeight + 2)) + 44);
}
function setTank() {
ranPos();
wholemap.attachMovie("tankEnemy", "tankEnemy", ((mapWidth + 2) * (mapHeight + 2)) + 13);
wholemap.tankEnemy._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankEnemy._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot2", "shot2", ((mapWidth + 2) * (mapHeight + 2)) + 31);
}
function setTankSmall() {
ranPos();
wholemap.attachMovie("tankSmall", "tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 14);
wholemap.tankSmall._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankSmall._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankSmall", "shot-tankSmall", ((mapWidth + 2) * (mapHeight + 2)) + 32);
}
function setTankMiddle() {
ranPos();
wholemap.attachMovie("tankMiddle", "tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 15);
wholemap.tankMiddle._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankMiddle._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankMiddle", "shot-tankMiddle", ((mapWidth + 2) * (mapHeight + 2)) + 33);
}
function setTankE1() {
ranPos();
wholemap.attachMovie("tankE1", "tankE1", ((mapWidth + 2) * (mapHeight + 2)) + 16);
wholemap.tankE1._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE1._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slugE1", "slugE1", ((mapWidth + 2) * (mapHeight + 2)) + 34);
}
function setTankE2() {
ranPos();
wholemap.attachMovie("tankE2", "tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 17);
wholemap.tankE2._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.tankE2._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("shot-tankE2", "shot-tankE2", ((mapWidth + 2) * (mapHeight + 2)) + 35);
}
function setMan() {
ranPos();
wholemap.attachMovie("man", "man", ((mapWidth + 2) * (mapHeight + 2)) + 5);
wholemap.man._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.man._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("slug", "slug", ((mapWidth + 2) * (mapHeight + 2)) + 11);
}
function setHLP() {
ranPos();
wholemap.attachMovie("helicopter", "helicopter", ((mapWidth + 2) * (mapHeight + 2)) + 101);
wholemap.helicopter._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopter._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot", "HLP-shot", ((mapWidth + 2) * (mapHeight + 2)) + 111);
}
function setHLPB() {
ranPos();
wholemap.attachMovie("helicopterB", "helicopterB", ((mapWidth + 2) * (mapHeight + 2)) + 102);
wholemap.helicopterB._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopterB._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shotB", "HLP-shotB", ((mapWidth + 2) * (mapHeight + 2)) + 112);
}
function setHLPC() {
ranPos();
wholemap.attachMovie("helicopterC", "helicopterC", ((mapWidth + 2) * (mapHeight + 2)) + 103);
wholemap.helicopterC._x = (Pos[0] * tileW) + (tileW / 2);
wholemap.helicopterC._y = (Pos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shotC", "HLP-shotC", ((mapWidth + 2) * (mapHeight + 2)) + 113);
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = (charPos[0] * tileW) + (tileW / 2);
wholemap.HLPourside._y = (charPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function dropItem(myTank, itemType) {
wholemap.attachMovie(itemType, itemType, ((mapWidth + 2) * (mapHeight + 2)) + 1);
wholemap[itemType]._x = (tileW * Math.floor(myTank._x / tileW)) + (tileW / 2);
wholemap[itemType]._y = (tileH * Math.floor(myTank._y / tileH)) + (tileH / 2);
}
myMap = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 48, 4, 4, 4, 28, 4, 4, 4, 4, 4, 28, 4, 4, 28, 4, 4, 4, 4, 4, 28, 4, 4, 4, 48, 0], [0, 51, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28, 4, 4, 28, 4, 4, 4, 4, 4, 4, 4, 4, 4, 51, 0], [0, 48, 28, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 28, 28, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28, 28, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 51, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 51, 0], [0, 48, 28, 28, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28, 28, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28, 28, 28, 28, 28, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var stage = 6;
var tankNum = 0;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 4;
var tankBossBNum = 2;
var tankBossNum = 2;
var tankBossCNum = 2;
var tankBossFinalNum = 1;
var manNum = 0;
var HLPNum = 0;
var HLPBNum = 0;
var HLPCNum = 4;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
drawMap(myMap);
setChar();
getCharData.stageNum = stage;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setTankBossB();
setTankBossC();
setTankBoss();
setHLPC();
if (wholemap.HLPourside) {
setOurHLP();
}
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var Option = random(10);
if (((Option == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((Option == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((Option == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((Option == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((Option == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((Option == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((Option == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((Option == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((Option == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((Option == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
} else if (((Option == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
} else if (((Option == 7) && (tankBossCNum > 0)) && (!wholemap.tankBossC)) {
settankBossC();
enemySpace--;
}
}
}
var ranDrop = random(8);
if (wholemap.man.aliveAfter == false) {
if (manNum > 0) {
manNum--;
enemySpace++;
removeMovieClip(wholemap.man);
} else if (manNum == 0) {
removeMovieClip(wholemap.man);
}
} else if (wholemap.tankEnemy.aliveAfter == false) {
if (tankNum > 0) {
tankNum--;
enemySpace++;
if ((ranDrop >= 4) && (ranDrop <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
}
removeMovieClip(wholemap.tankEnemy);
} else if (tankNum == 0) {
removeMovieClip(wholemap.tankEnemy);
}
} else if (wholemap.tankSmall.aliveAfter == false) {
if (tankSmallNum > 0) {
tankSmallNum--;
enemySpace++;
removeMovieClip(wholemap.tankSmall);
} else if (tankSmallNum == 0) {
removeMovieClip(wholemap.tankSmall);
}
} else if (wholemap.tankE1.aliveAfter == false) {
if (tankE1Num > 0) {
tankE1Num--;
enemySpace++;
removeMovieClip(wholemap.tankE1);
} else if (tankE1 == 0) {
removeMovieClip(wholemap.tankE1);
}
} else if (wholemap.tankE2.aliveAfter == false) {
if (tankE2Num > 0) {
tankE2Num--;
enemySpace++;
removeMovieClip(wholemap.tankE2);
} else if (tankE2 == 0) {
removeMovieClip(wholemap.tankE2);
}
} else if (wholemap.tankMiddle.aliveAfter == false) {
if (tankMiddleNum > 0) {
tankMiddleNum--;
enemySpace++;
if ((ranDrop >= 0) && (ranDrop <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (ranDrop == 2) {
dropItem(wholemap.tankMiddle, "addLifeNum");
}
removeMovieClip(wholemap.tankMiddle);
} else if (tankMiddleNum == 0) {
removeMovieClip(wholemap.tankMiddle);
}
} else if (wholemap.helicopter.aliveAfter == false) {
if (HLPNum > 0) {
HLPNum--;
enemySpace++;
if ((ranDrop >= 3) && (ranDrop <= 4)) {
dropItem(wholemap.helicopter, "callHLP");
}
removeMovieClip(wholemap.helicopter);
} else if (HLPNum == 0) {
removeMovieClip(wholemap.helicopter);
}
} else if (wholemap.helicopterB.aliveAfter == false) {
if (HLPBNum > 0) {
HLPBNum--;
enemySpace++;
removeMovieClip(wholemap.helicopterB);
} else if (HLPBNum == 0) {
removeMovieClip(wholemap.helicopterB);
}
} else if (wholemap.helicopterC.aliveAfter == false) {
if (HLPCNum > 0) {
HLPCNum--;
enemySpace++;
if ((ranDrop >= 5) && (ranDrop <= 6)) {
dropItem(wholemap.helicopterB, "callHLP");
}
removeMovieClip(wholemap.helicopterC);
} else if (HLPCNum == 0) {
removeMovieClip(wholemap.helicopterC);
}
} else if (wholemap.tankBoss.aliveAfter == false) {
if (tankBossNum > 0) {
tankBossNum--;
enemySpace++;
if ((ranDrop >= 6) && (ranDrop <= 7)) {
dropItem(wholemap.tankBoss, "powerBox");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((ranDrop >= 6) && (ranDrop <= 7)) {
dropItem(wholemap.tankBossB, "powerBox");
}
removeMovieClip(wholemap.tankBossB);
} else if (tankBossBNum == 0) {
removeMovieClip(wholemap.tankBossB);
}
} else if (wholemap.tankBossC.aliveAfter == false) {
if (tankBossCNum > 0) {
tankBossCNum--;
enemySpace++;
dropItem(wholemap.tankBossC, "powerBox");
removeMovieClip(wholemap.tankBossC);
} else if (tankBossCNum == 0) {
removeMovieClip(wholemap.tankBossC);
}
} else if (wholemap.tankBossFinal.aliveAfter == false) {
if (tankBossFinalNum > 0) {
tankBossFinalNum--;
enemySpace++;
removeMovieClip(wholemap.tankBossFinal);
} else if (tankBossFinalNum == 0) {
removeMovieClip(wholemap.tankBossFinal);
}
}
upDateCHA();
if ((((!wholemap.HLPourside) && (HLPoursideNum > 0)) && (wholemap.char.alive == true)) && (Key.isDown(75))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankBossNum == 0) && (tankBossBNum == 0)) && (tankBossCNum == 0)) && (!wholemap.tankBoss)) && (!wholemap.tankBossB)) && (!wholemap.tankBossC)) {
if ((!wholemap.tankBossFinal) && (tankBossFinalNum > 0)) {
setTankBossFinal();
}
}
if ((!wholemap.tankBossFinal) && (tankBossFinalNum == 0)) {
HLPCNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.helicopterC);
removeMovieClip(wholemap.tankMiddle);
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("congratu");
stageDoor.stageDoor.stageNum.gotoAndStop(7);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (192);
}
}
};
Frame 192
stop();
this.onEnterFrame = function () {
if (_global.versionCode == "Chinese") {
showStaff.gotoAndStop(1);
} else if (_global.versionCode == "English") {
showStaff.gotoAndStop(2);
}
};
Symbol 7 MovieClip Frame 6
stop();
Symbol 8 MovieClip [shot-form1] Frame 1
stop();
Symbol 8 MovieClip [shot-form1] Frame 2
stop();
Symbol 10 MovieClip [shot-form2] Frame 1
stop();
Symbol 10 MovieClip [shot-form2] Frame 2
stop();
Symbol 20 MovieClip Frame 9
stop();
Symbol 21 MovieClip [shot-form3] Frame 1
stop();
Symbol 21 MovieClip [shot-form3] Frame 2
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 24 MovieClip [shotBossC3] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossC.shotOnceNum >= 3) {
if (_root.wholemap.tankBossC.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form1);
} else if (_root.wholemap.tankBossC.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form2);
} else if (_root.wholemap.tankBossC.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form3);
}
} else if (!_root.wholemap.tankBossC) {
removeMovieClip(this);
}
};
Symbol 24 MovieClip [shotBossC3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 24 MovieClip [shotBossC3] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 25 MovieClip [shotBossB3] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossB.shotOnceNum >= 3) {
if (_root.wholemap.tankBossB.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form1);
} else if (_root.wholemap.tankBossB.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form2);
} else if (_root.wholemap.tankBossB.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form3);
}
} else if (!_root.wholemap.tankBossB) {
removeMovieClip(this);
}
};
Symbol 25 MovieClip [shotBossB3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 25 MovieClip [shotBossB3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 26 MovieClip [shotBossA3] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBoss.shotOnceNum >= 3) {
if (_root.wholemap.tankBoss.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form1);
} else if (_root.wholemap.tankBoss.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form2);
} else if (_root.wholemap.tankBoss.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form3);
}
} else if (!_root.wholemap.tankBoss) {
removeMovieClip(this);
}
};
Symbol 26 MovieClip [shotBossA3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 26 MovieClip [shotBossA3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 27 MovieClip [shotA3] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
se2_snd = new Sound();
se2_snd.attachSound("se_i008");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (seTimer > 0) {
seTimer--;
}
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if (myTank.formLevel == 1) {
_parent._parent.score = _parent._parent.score + 50;
} else if (myTank.formLevel == 2) {
_parent._parent.score = _parent._parent.score + 150;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 300;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 700;
}
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.char.shotOnceNum >= 3) {
if (_root.wholemap.char.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form1);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form1);
HitTank(_root.wholemap.man, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form1);
} else if (_root.wholemap.char.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form2);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form2);
HitTank(_root.wholemap.man, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form2);
} else if (_root.wholemap.char.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form3);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form3);
HitTank(_root.wholemap.man, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form3);
} else if (_root.wholemap.char.formLevel == 4) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form4);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form4);
HitTank(_root.wholemap.man, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form4);
}
}
};
Symbol 27 MovieClip [shotA3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 27 MovieClip [shotA3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 27 MovieClip [shotA3] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 28 MovieClip [shotBossC2] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossC.shotOnceNum >= 2) {
if (_root.wholemap.tankBossC.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form1);
} else if (_root.wholemap.tankBossC.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form2);
} else if (_root.wholemap.tankBossC.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form3);
}
} else if (!_root.wholemap.tankBossC) {
removeMovieClip(this);
}
};
Symbol 28 MovieClip [shotBossC2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 28 MovieClip [shotBossC2] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 29 MovieClip [shotBossB2] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossB.shotOnceNum >= 2) {
if (_root.wholemap.tankBossB.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form1);
} else if (_root.wholemap.tankBossB.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form2);
} else if (_root.wholemap.tankBossB.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form3);
}
} else if (!_root.wholemap.tankBossB) {
removeMovieClip(this);
}
};
Symbol 29 MovieClip [shotBossB2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 29 MovieClip [shotBossB2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 30 MovieClip [shotBossA2] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBoss.shotOnceNum >= 2) {
if (_root.wholemap.tankBoss.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form1);
} else if (_root.wholemap.tankBoss.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form2);
} else if (_root.wholemap.tankBoss.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form3);
}
} else if (!_root.wholemap.tankBoss) {
removeMovieClip(this);
}
};
Symbol 30 MovieClip [shotBossA2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 30 MovieClip [shotBossA2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 31 MovieClip [shotA2] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
se2_snd = new Sound();
se2_snd.attachSound("se_i008");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (seTimer > 0) {
seTimer--;
}
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if (myTank.formLevel == 1) {
_parent._parent.score = _parent._parent.score + 50;
} else if (myTank.formLevel == 2) {
_parent._parent.score = _parent._parent.score + 150;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 300;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 700;
}
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.char.shotOnceNum >= 2) {
if (_root.wholemap.char.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form1);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form1);
HitTank(_root.wholemap.man, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form1);
} else if (_root.wholemap.char.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form2);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form2);
HitTank(_root.wholemap.man, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form2);
} else if (_root.wholemap.char.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form3);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form3);
HitTank(_root.wholemap.man, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form3);
} else if (_root.wholemap.char.formLevel == 4) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form4);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form4);
HitTank(_root.wholemap.man, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form4);
}
}
};
Symbol 31 MovieClip [shotA2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 31 MovieClip [shotA2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 31 MovieClip [shotA2] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 32 MovieClip [shotBossFinal] Frame 1
stop();
var shotSpeed = 18;
var Power = 200;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossFinal.shotOnceNum >= 1) {
if (_root.wholemap.tankBossFinal.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossFinal.formLevel);
tankShot(_root.wholemap.tankBossFinal, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossFinal, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossFinal, form1);
} else if (_root.wholemap.tankBossFinal.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossFinal.formLevel);
tankShot(_root.wholemap.tankBossFinal, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossFinal, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossFinal, form2);
} else if (_root.wholemap.tankBossFinal.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossFinal.formLevel);
tankShot(_root.wholemap.tankBossFinal, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossFinal, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossFinal, form3);
}
} else if (!_root.wholemap.tankBossFinal) {
removeMovieClip(this);
}
};
Symbol 32 MovieClip [shotBossFinal] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 32 MovieClip [shotBossFinal] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 33 MovieClip [shotBossC] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossC.shotOnceNum >= 1) {
if (_root.wholemap.tankBossC.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form1);
} else if (_root.wholemap.tankBossC.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form2);
} else if (_root.wholemap.tankBossC.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
tankShot(_root.wholemap.tankBossC, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossC, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossC, form3);
}
} else if (!_root.wholemap.tankBossC) {
removeMovieClip(this);
}
};
Symbol 33 MovieClip [shotBossC] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 33 MovieClip [shotBossC] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 34 MovieClip [shotBossB] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
if (!myTank) {
removeMovieClip(this);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBossB.shotOnceNum >= 1) {
if (_root.wholemap.tankBossB.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form1);
} else if (_root.wholemap.tankBossB.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form2);
} else if (_root.wholemap.tankBossB.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
tankShot(_root.wholemap.tankBossB, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossB, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossB, form3);
}
} else if (!_root.wholemap.tankBossB) {
removeMovieClip(this);
}
};
Symbol 34 MovieClip [shotBossB] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 34 MovieClip [shotBossB] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 35 MovieClip [shotBoss] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.tankBoss.shotOnceNum >= 1) {
if (_root.wholemap.tankBoss.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form1);
} else if (_root.wholemap.tankBoss.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form2);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form2);
} else if (_root.wholemap.tankBoss.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
tankShot(_root.wholemap.tankBoss, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBoss, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBoss, form3);
}
} else if (!_root.wholemap.tankBoss) {
removeMovieClip(this);
}
};
Symbol 35 MovieClip [shotBoss] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 35 MovieClip [shotBoss] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 36 MovieClip [shot] Frame 1
stop();
var shotSpeed = 12;
var Power = 25;
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
se2_snd = new Sound();
se2_snd.attachSound("se_i008");
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (seTimer > 0) {
seTimer--;
}
if ((shotSwitch == true) && (shotOut == false)) {
shotOut = true;
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else {
formN.gotoAndStop(1);
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
if (myTank.formLevel == 1) {
_parent._parent.score = _parent._parent.score + 50;
} else if (myTank.formLevel == 2) {
_parent._parent.score = _parent._parent.score + 150;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 300;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 700;
}
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.char.shotOnceNum >= 1) {
if (_root.wholemap.char.formLevel == 1) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form1);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form1);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form1);
HitTank(_root.wholemap.man, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form1);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form1);
} else if (_root.wholemap.char.formLevel == 2) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form2);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form2);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form2);
HitTank(_root.wholemap.man, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form2);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form2);
} else if (_root.wholemap.char.formLevel == 3) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form3);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form3);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form3);
HitTank(_root.wholemap.man, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form3);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form3);
} else if (_root.wholemap.char.formLevel == 4) {
gotoAndStop("form" + _root.wholemap.char.formLevel);
tankShot(_root.wholemap.char, form4);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE1, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankE2, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBoss, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossB, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossC, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankSmall, _root.wholemap.char, form4);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.char, form4);
HitTank(_root.wholemap.man, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopter, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterB, _root.wholemap.char, form4);
HitTank(_root.wholemap.helicopterC, _root.wholemap.char, form4);
}
}
};
Symbol 36 MovieClip [shot] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 36 MovieClip [shot] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 36 MovieClip [shot] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 78 MovieClip Frame 9
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 2
stop();
Symbol 79 MovieClip Frame 3
stop();
Symbol 79 MovieClip Frame 4
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 3
stop();
Symbol 82 MovieClip Frame 4
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 3
stop();
Symbol 85 MovieClip Frame 4
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
stop();
Symbol 88 MovieClip Frame 3
stop();
Symbol 88 MovieClip Frame 4
stop();
Symbol 89 MovieClip [char] Frame 1
var timer = 0;
var bloodTimer = 0;
var AppearTimer = 72;
var cannotHurt = true;
var totalBlood = 100;
var alive = true;
var aliveAfter = true;
var formLevel = 1;
var shotOnceNum = 1;
var lifeBarLength = 30;
var speed = 6;
formLevel = _parent._parent.getCharData.formLevelSave;
shotOnceNum = _parent._parent.getCharData.shotOnceNumSave;
if (formLevel == 1) {
totalBlood = 100;
_root.lifeBar.gotoAndStop(1);
} else if (formLevel == 2) {
totalBlood = 200;
_root.lifeBar.gotoAndStop(2);
} else if (formLevel == 3) {
totalBlood = 300;
_root.lifeBar.gotoAndStop(3);
} else if (formLevel == 4) {
totalBlood = 400;
_root.lifeBar.gotoAndStop(4);
}
var nowBlood = totalBlood;
Symbol 89 MovieClip [char] Frame 2
stop();
this.onEnterFrame = function () {
function hitOtherTank(tank1, tank2, tank3, tank4, tank5, tank6, tank7, tank8) {
if (((((((((tank1.hitOthers == true) || (tank2.hitOthers == true)) || (tank3.hitOthers == true)) || (tank4.hitOthers == true)) || (tank5.hitOthers == true)) || (tank6.hitOthers == true)) || (tank7.hitOthers == true)) || (tank8.hitOthers == true)) || (tank9.hitOthers == true)) {
noscroll = 1;
}
}
function cannotHurtChar() {
if (AppearTimer > 0) {
AppearTimer--;
} else if (AppearTimer <= 0) {
cannotHurt = false;
}
}
function hurtAction(formN) {
if (nowBlood <= 0) {
nowBlood = 0;
formN.gotoAndStop("Dead");
alive = false;
if (formN.Dead._currentframe == 9) {
aliveAfter = false;
}
} else if (nowBlood >= totalBlood) {
nowBlood = totalBlood;
if (cannotHurt == true) {
formN.gotoAndStop("wuDi");
} else {
formN.gotoAndStop("normal");
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
formN.gotoAndStop("hurt");
bloodTimer--;
} else {
formN.gotoAndStop("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (alive == true) {
if (Key.isDown(87)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if (Key.isDown(83)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if (Key.isDown(65)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if (Key.isDown(68)) {
x = x + speed;
dir = "right";
_rotation = 90;
}
}
if (Key.isDown(74)) {
if (_root.wholemap.shot.shotSwitch == false) {
_root.wholemap.shot.shotSwitch = true;
} else if (_root.wholemap.shotA2.shotSwitch == false) {
_root.wholemap.shotA2.shotSwitch = true;
} else if (_root.wholemap.shotA3.shotSwitch == false) {
_root.wholemap.shotA3.shotSwitch = true;
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
noscroll = 1;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
noscroll = 1;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
noscroll = 1;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
noscroll = 1;
}
hitOtherTank(_root.wholemap.tankEnemy, _root.wholemap.tankMiddle, _root.wholemap.tankSmall, _root.wholemap.tankBoss, _root.wholemap.tankE1, _root.wholemap.tankE2, _root.wholemap.tankBossB, _root.wholemap.tankBossC, _root.wholemap.tankBossFinal);
if (noscroll == 0) {
_parent._parent.scrollMap(dir);
}
_x = x;
_y = y;
cannotHurtChar();
if (formLevel == 1) {
totalBlood = 100;
_root.lifeBar.gotoAndStop(1);
lifeBarLength = 30;
gotoAndStop (2);
hurtAction(form1);
} else if (formLevel == 2) {
totalBlood = 200;
_root.lifeBar.gotoAndStop(2);
lifeBarLength = 60;
gotoAndStop (3);
hurtAction(form2);
} else if (formLevel == 3) {
totalBlood = 300;
_root.lifeBar.gotoAndStop(3);
lifeBarLength = 90;
gotoAndStop (4);
hurtAction(form3);
} else if (formLevel == 4) {
totalBlood = 400;
_root.lifeBar.gotoAndStop(4);
lifeBarLength = 120;
gotoAndStop (5);
hurtAction(form4);
}
_root.lifeBar.lifeBar._xscale = lifeBarLength * (nowBlood / totalBlood);
};
Symbol 89 MovieClip [char] Frame 3
stop();
Symbol 89 MovieClip [char] Frame 4
stop();
Symbol 89 MovieClip [char] Frame 5
stop();
Symbol 96 MovieClip [HLPourside] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 100;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var noCorner = true;
var Ftimer = 0;
var speed = 8;
Symbol 96 MovieClip [HLPourside] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
}
if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
if ((turnLeft == true) && (turnUp == true)) {
_rotation = -45;
} else if ((turnLeft == true) && (turnDown == true)) {
_rotation = -135;
} else if ((turnRight == true) && (turnUp == true)) {
_rotation = 45;
} else if ((turnRight == true) && (turnDown == true)) {
_rotation = 135;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(500);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if (((AI >= 25) && (AI < 50)) && (noCorner == true)) {
x = x + speed;
y = y - speed;
_rotation = 45;
} else if (((AI >= 75) && (AI < 100)) && (noCorner == true)) {
x = x + speed;
y = y + speed;
_rotation = 135;
} else if (((AI >= 125) && (AI < 150)) && (noCorner == true)) {
x = x - speed;
y = y + speed;
_rotation = 225;
} else if (((AI >= 175) && (AI < 200)) && (noCorner == true)) {
x = x - speed;
y = y - speed;
_rotation = -45;
} else if ((AI >= 200) && (AI < 500)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
areaLimit(3);
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[downY][rightX] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[upY][leftX] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 96 MovieClip [HLPourside] Frame 3
stop();
Symbol 96 MovieClip [HLPourside] Frame 4
stop();
Symbol 97 MovieClip [helicopterC] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 150;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var noCorner = true;
var Ftimer = 0;
var speed = 8;
Symbol 97 MovieClip [helicopterC] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
}
if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
if ((turnLeft == true) && (turnUp == true)) {
_rotation = -45;
} else if ((turnLeft == true) && (turnDown == true)) {
_rotation = -135;
} else if ((turnRight == true) && (turnUp == true)) {
_rotation = 45;
} else if ((turnRight == true) && (turnDown == true)) {
_rotation = 135;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP * 2);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if (((AI >= 25) && (AI < 50)) && (noCorner == true)) {
x = x + speed;
y = y - speed;
_rotation = 45;
} else if (((AI >= 75) && (AI < 100)) && (noCorner == true)) {
x = x + speed;
y = y + speed;
_rotation = 135;
} else if (((AI >= 125) && (AI < 150)) && (noCorner == true)) {
x = x - speed;
y = y + speed;
_rotation = 225;
} else if (((AI >= 175) && (AI < 200)) && (noCorner == true)) {
x = x - speed;
y = y - speed;
_rotation = -45;
} else if ((AI >= 200) && (AI < (_parent._parent.npcAIP * 2))) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
areaLimit(3);
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[downY][rightX] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[upY][leftX] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 97 MovieClip [helicopterC] Frame 3
stop();
Symbol 97 MovieClip [helicopterC] Frame 4
stop();
Symbol 98 MovieClip [helicopterB] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 100;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var noCorner = true;
var Ftimer = 0;
var speed = 8;
Symbol 98 MovieClip [helicopterB] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
}
if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
if ((turnLeft == true) && (turnUp == true)) {
_rotation = -45;
} else if ((turnLeft == true) && (turnDown == true)) {
_rotation = -135;
} else if ((turnRight == true) && (turnUp == true)) {
_rotation = 45;
} else if ((turnRight == true) && (turnDown == true)) {
_rotation = 135;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP * 2);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if (((AI >= 25) && (AI < 50)) && (noCorner == true)) {
x = x + speed;
y = y - speed;
_rotation = 45;
} else if (((AI >= 75) && (AI < 100)) && (noCorner == true)) {
x = x + speed;
y = y + speed;
_rotation = 135;
} else if (((AI >= 125) && (AI < 150)) && (noCorner == true)) {
x = x - speed;
y = y + speed;
_rotation = 225;
} else if (((AI >= 175) && (AI < 200)) && (noCorner == true)) {
x = x - speed;
y = y - speed;
_rotation = -45;
} else if ((AI >= 200) && (AI < (_parent._parent.npcAIP * 2))) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
areaLimit(3);
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[downY][rightX] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[upY][leftX] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 98 MovieClip [helicopterB] Frame 3
stop();
Symbol 98 MovieClip [helicopterB] Frame 4
stop();
Symbol 99 MovieClip [helicopter] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 50;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var noCorner = true;
var Ftimer = 0;
var speed = 8;
Symbol 99 MovieClip [helicopter] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
}
if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
if ((turnLeft == true) && (turnUp == true)) {
_rotation = -45;
} else if ((turnLeft == true) && (turnDown == true)) {
_rotation = -135;
} else if ((turnRight == true) && (turnUp == true)) {
_rotation = 45;
} else if ((turnRight == true) && (turnDown == true)) {
_rotation = 135;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP * 2);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if (((AI >= 25) && (AI < 50)) && (noCorner == true)) {
x = x + speed;
y = y - speed;
_rotation = 45;
} else if (((AI >= 75) && (AI < 100)) && (noCorner == true)) {
x = x + speed;
y = y + speed;
_rotation = 135;
} else if (((AI >= 125) && (AI < 150)) && (noCorner == true)) {
x = x - speed;
y = y + speed;
_rotation = 225;
} else if (((AI >= 175) && (AI < 200)) && (noCorner == true)) {
x = x - speed;
y = y - speed;
_rotation = -45;
} else if ((AI >= 200) && (AI < (_parent._parent.npcAIP * 2))) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
areaLimit(3);
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[downY][rightX] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > 47) || (_parent._parent.myMap[upY][leftX] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > 47) || (_parent._parent.myMap[upY][rightX] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 99 MovieClip [helicopter] Frame 3
stop();
Symbol 99 MovieClip [helicopter] Frame 4
stop();
Symbol 102 MovieClip [tankSmall] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 25;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 12;
var Ftimer = 0;
var speed = 6;
var hitOthers = false;
Symbol 102 MovieClip [tankSmall] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 102 MovieClip [tankSmall] Frame 3
stop();
Symbol 102 MovieClip [tankSmall] Frame 4
stop();
Symbol 105 MovieClip [tankE2] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 25;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 3;
var hitOthers = false;
Symbol 105 MovieClip [tankE2] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
areaLimit(2);
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 105 MovieClip [tankE2] Frame 3
stop();
Symbol 105 MovieClip [tankE2] Frame 4
stop();
Symbol 108 MovieClip [tankE1] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 25;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 3;
var hitOthers = false;
Symbol 108 MovieClip [tankE1] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
areaLimit(2);
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 108 MovieClip [tankE1] Frame 3
stop();
Symbol 108 MovieClip [tankE1] Frame 4
stop();
Symbol 112 MovieClip [tankMiddle] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 50;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 3;
var hitOthers = false;
Symbol 112 MovieClip [tankMiddle] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
areaLimit(2);
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 112 MovieClip [tankMiddle] Frame 3
stop();
Symbol 112 MovieClip [tankMiddle] Frame 4
stop();
Symbol 115 MovieClip [tankBossB] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 300;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 4;
var hitOthers = false;
var formLevel = 2;
var shotOnceNum = 3;
Symbol 115 MovieClip [tankBossB] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 20;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 20;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (_root.wholemap.shotBossB.shotSwitch == false) {
_root.wholemap.shotBossB.shotSwitch = true;
} else if (_root.wholemap.shotBossB2.shotSwitch == false) {
_root.wholemap.shotBossB2.shotSwitch = true;
} else if (_root.wholemap.shotBossB3.shotSwitch == false) {
_root.wholemap.shotBossB3.shotSwitch = true;
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
if (formLevel == 1) {
totalBlood = 500;
} else if (formLevel == 2) {
totalBlood = 1000;
} else if (formLevel == 3) {
totalBlood = 1500;
}
HitTank(_root.wholemap.char);
};
Symbol 115 MovieClip [tankBossB] Frame 3
stop();
Symbol 115 MovieClip [tankBossB] Frame 4
stop();
Symbol 116 MovieClip [tankBossFinal] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 1200;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 6;
var hitOthers = false;
var formLevel = 1;
var shotOnceNum = 1;
Symbol 116 MovieClip [tankBossFinal] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 20;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(500);
timer = 10;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < 500)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (_root.wholemap.shotBossFinal.shotSwitch == false) {
_root.wholemap.shotBossFinal.shotSwitch = true;
} else if (_root.wholemap.shotBossFinal2.shotSwitch == false) {
_root.wholemap.shotBossFinal2.shotSwitch = true;
} else if (_root.wholemap.shotBossFinal3.shotSwitch == false) {
_root.wholemap.shotBossFinal3.shotSwitch = true;
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
if (formLevel == 1) {
totalBlood = 2000;
} else if (formLevel == 2) {
totalBlood = 1000;
} else if (formLevel == 3) {
totalBlood = 1500;
}
HitTank(_root.wholemap.char);
};
Symbol 116 MovieClip [tankBossFinal] Frame 3
stop();
Symbol 116 MovieClip [tankBossFinal] Frame 4
stop();
Symbol 119 MovieClip [tankBossC] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 1200;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 4;
var hitOthers = false;
var formLevel = 3;
var shotOnceNum = 3;
Symbol 119 MovieClip [tankBossC] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 20;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 20;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (_root.wholemap.shotBossC.shotSwitch == false) {
_root.wholemap.shotBossC.shotSwitch = true;
} else if (_root.wholemap.shotBossC2.shotSwitch == false) {
_root.wholemap.shotBossC2.shotSwitch = true;
} else if (_root.wholemap.shotBossC3.shotSwitch == false) {
_root.wholemap.shotBossC3.shotSwitch = true;
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
if (formLevel == 1) {
totalBlood = 500;
} else if (formLevel == 2) {
totalBlood = 1000;
} else if (formLevel == 3) {
totalBlood = 1500;
}
HitTank(_root.wholemap.char);
};
Symbol 119 MovieClip [tankBossC] Frame 3
stop();
Symbol 119 MovieClip [tankBossC] Frame 4
stop();
Symbol 122 MovieClip [tankBoss] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 600;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 4;
var hitOthers = false;
var formLevel = 3;
var shotOnceNum = 3;
Symbol 122 MovieClip [tankBoss] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 20;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 20;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (_root.wholemap.shotBoss.shotSwitch == false) {
_root.wholemap.shotBoss.shotSwitch = true;
} else if (_root.wholemap.shotBossA2.shotSwitch == false) {
_root.wholemap.shotBossA2.shotSwitch = true;
} else if (_root.wholemap.shotBossA3.shotSwitch == false) {
_root.wholemap.shotBossA3.shotSwitch = true;
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
if (formLevel == 1) {
totalBlood = 500;
} else if (formLevel == 2) {
totalBlood = 1000;
} else if (formLevel == 3) {
totalBlood = 1500;
}
HitTank(_root.wholemap.char);
};
Symbol 122 MovieClip [tankBoss] Frame 3
stop();
Symbol 122 MovieClip [tankBoss] Frame 4
stop();
Symbol 123 MovieClip [tankEnemy] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 150;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 3;
var hitOthers = false;
Symbol 123 MovieClip [tankEnemy] Frame 2
function findAim(destx, desty) {
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - speed;
_rotation = -90;
} else if (turnRight == true) {
x = x + speed;
_rotation = 90;
} else if (turnUp == true) {
y = y - speed;
_rotation = 0;
} else if (turnDown == true) {
y = y + speed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
stop();
this.onEnterFrame = function () {
function HitTank(otherTank) {
if (!hitTest(otherTank)) {
tempX = getProperty(otherTank, _x);
tempY = getProperty(otherTank, _y);
temp2X = _x;
temp2Y = _y;
hitOthers = false;
} else {
hitOthers = true;
}
otherTank._x = tempX;
otherTank._y = tempY;
_x = temp2X;
_y = temp2Y;
}
x = _x;
y = _y;
var dir;
var noscroll = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (4);
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop (3);
bloodTimer--;
} else {
gotoAndStop (2);
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 123 MovieClip [tankEnemy] Frame 3
stop();
Symbol 123 MovieClip [tankEnemy] Frame 4
stop();
Symbol 125 MovieClip [slugE1] Frame 1
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var shotX = _x;
var shotY = _y;
var shotSpeed = 12;
var Power = 10;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.tankE1, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankE1);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankE1);
};
Symbol 125 MovieClip [slugE1] Frame 2
stop();
Symbol 126 MovieClip [slug] Frame 1
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var shotX = _x;
var shotY = _y;
var shotSpeed = 12;
var Power = 10;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.man, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.man);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.man);
};
Symbol 126 MovieClip [slug] Frame 2
stop();
Symbol 129 MovieClip [HLP-shot-ourside] Frame 1
function findAim(destx, desty) {
var Fspeed = 18;
if ((x - destx) > 0) {
x = x - Fspeed;
} else if ((x - destx) < 0) {
x = x + Fspeed;
}
if ((y - desty) > 0) {
y = y - Fspeed;
} else if ((y - desty) < 0) {
y = y + Fspeed;
}
_x = x;
_y = y;
}
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 8;
var shotX = _x;
var shotY = _y;
var shotSpeed = 18;
var Power = 80;
se_snd = new Sound();
se_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if ((myTank._rotation >= -45) && (myTank._rotation < 45)) {
shotDir = "up";
_rotation = 0;
} else if ((myTank._rotation >= 135) && (myTank._rotation < 225)) {
shotDir = "down";
_rotation = 180;
} else if ((myTank._rotation >= -135) && (myTank._rotation < -45)) {
shotDir = "left";
_rotation = -90;
} else if ((myTank._rotation >= 45) && (myTank._rotation < 135)) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se_snd.start();
}
}
}
}
tankShot(_root.wholemap.HLPourside, true);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankE1, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankE2, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankBoss, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankBossB, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankBossC, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankSmall, _root.wholemap.HLPourside);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.HLPourside);
HitTank(_root.wholemap.man, _root.wholemap.HLPourside);
HitTank(_root.wholemap.helicopter, _root.wholemap.HLPourside);
HitTank(_root.wholemap.helicopterB, _root.wholemap.HLPourside);
HitTank(_root.wholemap.helicopterC, _root.wholemap.HLPourside);
};
Symbol 129 MovieClip [HLP-shot-ourside] Frame 2
stop();
Symbol 130 MovieClip [HLP-shotC] Frame 1
function findAim(destx, desty) {
var Fspeed = 6;
if ((x - destx) > 0) {
x = x - Fspeed;
} else if ((x - destx) < 0) {
x = x + Fspeed;
}
if ((y - desty) > 0) {
y = y - Fspeed;
} else if ((y - desty) < 0) {
y = y + Fspeed;
}
_x = x;
_y = y;
}
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 8;
var shotX = _x;
var shotY = _y;
var shotSpeed = 18;
var Power = 80;
se_snd = new Sound();
se_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if ((myTank._rotation >= -45) && (myTank._rotation < 45)) {
shotDir = "up";
_rotation = 0;
} else if ((myTank._rotation >= 135) && (myTank._rotation < 225)) {
shotDir = "down";
_rotation = 180;
} else if ((myTank._rotation >= -135) && (myTank._rotation < -45)) {
shotDir = "left";
_rotation = -90;
} else if ((myTank._rotation >= 45) && (myTank._rotation < 135)) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se_snd.start();
}
}
}
}
tankShot(_root.wholemap.helicopterC, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.helicopterC);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.helicopterC);
};
Symbol 130 MovieClip [HLP-shotC] Frame 2
stop();
Symbol 131 MovieClip [HLP-shotB] Frame 1
function findAim(destx, desty) {
var Fspeed = 6;
if ((x - destx) > 0) {
x = x - Fspeed;
} else if ((x - destx) < 0) {
x = x + Fspeed;
}
if ((y - desty) > 0) {
y = y - Fspeed;
} else if ((y - desty) < 0) {
y = y + Fspeed;
}
_x = x;
_y = y;
}
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 8;
var shotX = _x;
var shotY = _y;
var shotSpeed = 18;
var Power = 80;
se_snd = new Sound();
se_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if ((myTank._rotation >= -45) && (myTank._rotation < 45)) {
shotDir = "up";
_rotation = 0;
} else if ((myTank._rotation >= 135) && (myTank._rotation < 225)) {
shotDir = "down";
_rotation = 180;
} else if ((myTank._rotation >= -135) && (myTank._rotation < -45)) {
shotDir = "left";
_rotation = -90;
} else if ((myTank._rotation >= 45) && (myTank._rotation < 135)) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se_snd.start();
}
}
}
}
tankShot(_root.wholemap.helicopterB, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.helicopterB);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.helicopterB);
};
Symbol 131 MovieClip [HLP-shotB] Frame 2
stop();
Symbol 132 MovieClip [HLP-shot] Frame 1
function findAim(destx, desty) {
var Fspeed = 6;
if ((x - destx) > 0) {
x = x - Fspeed;
} else if ((x - destx) < 0) {
x = x + Fspeed;
}
if ((y - desty) > 0) {
y = y - Fspeed;
} else if ((y - desty) < 0) {
y = y + Fspeed;
}
_x = x;
_y = y;
}
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 8;
var shotX = _x;
var shotY = _y;
var shotSpeed = 18;
var Power = 80;
se_snd = new Sound();
se_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if ((myTank._rotation >= -45) && (myTank._rotation < 45)) {
shotDir = "up";
_rotation = 0;
} else if ((myTank._rotation >= 135) && (myTank._rotation < 225)) {
shotDir = "down";
_rotation = 180;
} else if ((myTank._rotation >= -135) && (myTank._rotation < -45)) {
shotDir = "left";
_rotation = -90;
} else if ((myTank._rotation >= 45) && (myTank._rotation < 135)) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se_snd.start();
}
}
}
}
tankShot(_root.wholemap.helicopter, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.helicopter);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.helicopter);
};
Symbol 132 MovieClip [HLP-shot] Frame 2
stop();
Symbol 134 MovieClip [shot-tankE2] Frame 1
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var shotSpeed = 12;
var shotX = _x;
var shotY = _y;
var Power = 20;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.tankE2, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankE2);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankE2);
};
Symbol 134 MovieClip [shot-tankE2] Frame 2
stop();
Symbol 136 MovieClip [shot-tankSmall] Frame 1
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var shotSpeed = 12;
var shotX = _x;
var shotY = _y;
var Power = 20;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.tankSmall, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankSmall);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankSmall);
};
Symbol 136 MovieClip [shot-tankSmall] Frame 2
stop();
Symbol 138 MovieClip [shot-tankMiddle] Frame 1
stop();
var shotOut = false;
var noHit = true;
var shotTimer = 24;
var shotSpeed = 12;
var shotX = _x;
var shotY = _y;
var Power = 25;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.tankMiddle, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankMiddle);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankMiddle);
};
Symbol 138 MovieClip [shot-tankMiddle] Frame 2
stop();
Symbol 139 MovieClip [shot2] Frame 1
stop();
var shotOut = false;
var noHit = true;
var seTimer = 0;
var shotTimer = 24;
var shotSpeed = 18;
var shotX = _x;
var shotY = _y;
var Power = 50;
se1_snd = new Sound();
se1_snd.attachSound("daodi");
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var shotcenterX = Math.floor(shotX / _parent._parent.tileW);
var shotcenterY = Math.floor(shotY / _parent._parent.tileH);
var shotupY = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var shotdownY = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var shotleftX = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var shotrightX = Math.floor(((shotX + (_width / 2)) - 1) / _parent._parent.tileW);
if (shotOut == true) {
_visible = true;
} else if (shotOut == false) {
_visible = false;
if (myTank._rotation == 0) {
shotDir = "up";
_rotation = 0;
} else if (myTank._rotation == 180) {
shotDir = "down";
_rotation = 180;
} else if (myTank._rotation == -90) {
shotDir = "left";
_rotation = -90;
} else if (myTank._rotation == 90) {
shotDir = "right";
_rotation = 90;
}
shotX = myTank._x;
shotY = myTank._y;
}
if (myTank.alive == true) {
if (shotSwitch && (shotOut == false)) {
shotOut = true;
noHit = true;
}
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[shotupY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[shotdownY][shotcenterX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[shotcenterY][shotleftX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[shotcenterY][shotrightX] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if (noHit == false) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else {
gotoAndStop (1);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank)) {
noHit = false;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
tankShot(_root.wholemap.tankEnemy, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankEnemy);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankEnemy);
};
Symbol 139 MovieClip [shot2] Frame 2
stop();
Symbol 164 MovieClip Frame 35
stop();
Symbol 165 MovieClip [man] Frame 1
function findAim(destx, desty) {
var Fspeed = 2;
if (Ftimer == 0) {
Ftimer = 30;
turnLeft = false;
turnRight = false;
turnUp = false;
turnDown = false;
if (Math.abs(x - destx) >= Math.abs(y - desty)) {
if ((x - destx) > 0) {
turnLeft = true;
} else if ((x - destx) < 0) {
turnRight = true;
}
} else if ((y - desty) > 0) {
turnUp = true;
} else if ((y - desty) < 0) {
turnDown = true;
}
}
if (Ftimer > 0) {
Ftimer--;
if (turnLeft == true) {
x = x - Fspeed;
_rotation = -90;
} else if (turnRight == true) {
x = x + Fspeed;
_rotation = 90;
} else if (turnUp == true) {
y = y - Fspeed;
_rotation = 0;
} else if (turnDown == true) {
y = y + Fspeed;
_rotation = 180;
}
}
_x = x;
_y = y;
}
function areaLimit(Limit) {
if (x <= (_parent._parent.tileW * Limit)) {
x = _parent._parent.tileW * Limit;
} else if (x >= (_parent._parent.tileW * (_parent._parent.myMap[0].length - Limit))) {
x = _parent._parent.tileW * (_parent._parent.myMap[0].length - Limit);
}
if (y <= (_parent._parent.tileH * Limit)) {
y = _parent._parent.tileH * Limit;
} else if (y >= (_parent._parent.tileH * (_parent._parent.myMap.length - Limit))) {
y = _parent._parent.tileH * (_parent._parent.myMap.length - Limit);
}
}
stop();
var timer = 0;
var totalBlood = 10;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var Ftimer = 0;
var speed = 2;
this.onEnterFrame = function () {
function HitPassable(otherTank) {
if (hitTest(otherTank)) {
if (otherTank.alive == true) {
nowBlood = 0;
if (alive == true) {
_parent._parent.score = _parent._parent.score + 50;
}
}
}
}
shotSpeed = 10;
x = _x;
y = _y;
var dir;
var noscroll = 0;
areaLimit(2);
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
dir = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
dir = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
dir = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
dir = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var centerX = Math.floor(x / _parent._parent.tileW);
var centerY = Math.floor(y / _parent._parent.tileH);
var upY = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var downY = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var leftX = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var rightX = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[downY][leftX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][leftX] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[downY][rightX] > _parent._parent.canPassTile) || (_parent._parent.myMap[upY][rightX] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop (2);
alive = false;
if (Dead._currentframe == 35) {
aliveAfter = false;
}
}
HitPassable(_root.wholemap.char);
};
Symbol 165 MovieClip [man] Frame 2
stop();
Symbol 168 MovieClip [medicalBox] Frame 1
var hasLoaded = false;
var Effect = 200;
se_snd = new Sound();
se_snd.attachSound("se_g008");
this.onEnterFrame = function () {
function itemLoaded(myTank) {
if (hitTest(myTank) && (hasLoaded == false)) {
if ((myTank.nowBlood + Effect) >= myTank.totalBlood) {
myTank.nowBlood = myTank.nowBlood + (myTank.totalBlood - myTank.nowBlood);
} else {
myTank.nowBlood = myTank.nowBlood + Effect;
}
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 171 MovieClip [addShotNum] Frame 1
var hasLoaded = false;
se_snd = new Sound();
se_snd.attachSound("se_g008");
this.onEnterFrame = function () {
function itemLoaded(myTank) {
if (hitTest(myTank) && (hasLoaded == false)) {
if (myTank.shotOnceNum < 3) {
myTank.shotOnceNum++;
_parent._parent.score = _parent._parent.score + 300;
}
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 173 MovieClip [addLifeNum] Frame 1
var hasLoaded = false;
se_snd = new Sound();
se_snd.attachSound("se_g008");
this.onEnterFrame = function () {
function itemLoaded(myTank) {
if (hitTest(myTank) && (hasLoaded == false)) {
_parent._parent.charNum++;
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 176 MovieClip [powerBox] Frame 1
var hasLoaded = false;
se_snd = new Sound();
se_snd.attachSound("se_g008");
this.onEnterFrame = function () {
function itemLoaded(myTank) {
if (hitTest(myTank) && (hasLoaded == false)) {
if (myTank.formLevel < 4) {
myTank.formLevel++;
}
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 181 MovieClip [callHLP] Frame 1
var hasLoaded = false;
se_snd = new Sound();
se_snd.attachSound("se_g008");
this.onEnterFrame = function () {
function itemLoaded(myTank) {
if (hitTest(myTank) && (hasLoaded == false)) {
_root.HLPoursideNum++;
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 207 Button
on (release) {
gotoAndStop (184);
}
Symbol 215 Button
on (release) {
nextFrame();
}
Symbol 220 Button
on (release) {
_global.versionCode = "Chinese";
gotoAndStop (184);
}
Symbol 225 Button
on (release) {
_global.versionCode = "English";
gotoAndStop (184);
}
Symbol 253 Button
on (release) {
nextFrame();
}
Symbol 258 Button
on (release) {
gotoAndStop (1);
}
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 2
stop();
Symbol 278 Button
on (release) {
gotoAndStop (1);
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 2
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 2
stop();
Symbol 283 Button
on (release) {
gotoAndStop (185);
}
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
stop();
Symbol 300 MovieClip Frame 3
stop();
Symbol 303 MovieClip Frame 72
stop();
Symbol 305 MovieClip Frame 1
var formLevelSave = 1;
var shotOnceNumSave = 1;
var stageNum = 1;
this.onEnterFrame = function () {
function getCharData(myTank) {
if (stageNum == _parent.stage) {
if (myTank.alive == true) {
formLevelSave = myTank.formLevel;
shotOnceNumSave = myTank.shotOnceNum;
} else {
formLevelSave = 1;
shotOnceNumSave = 1;
}
}
}
getCharData(_parent.wholemap.char);
};
Symbol 307 MovieClip Frame 1
stop();
Symbol 307 MovieClip Frame 2
stop();
score = _parent.score;
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 2
stop();
Symbol 316 MovieClip Frame 3
stop();
Symbol 316 MovieClip Frame 4
stop();
Symbol 334 Button
on (release) {
getURL ("http://victboy.yeah.net");
}
Symbol 335 MovieClip Frame 20
stop();
Symbol 342 MovieClip Frame 20
stop();
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 2
stop();
Symbol 348 Button
on (release) {
gotoAndPlay (185);
}