Frame 1
fscommand ("allowscale", false);
fscommand ("trapallkeys", true);
fscommand ("DirectDraw.SetDisplayMode", "640,480,32");
fscommand ("Win.SetPosition", "0,0");
fscommand ("Win.SetSize", "640,480");
_quality = "HIGH";
stop();
bytesloaded = 0;
bytesTotal = _root.getBytesTotal();
loading.onEnterFrame = function () {
bytesLoaded = _root.getBytesLoaded();
if ((bytesLoaded / bytesTotal) < 0.98) {
this.gotoAndStop(1);
} else if (((bytesLoaded / bytesTotal) >= 0.98) && ((bytesLoaded / bytesTotal) < 1)) {
this.gotoAndStop(2);
} else {
play();
}
};
stopAllSounds();
Frame 2
Instance of Symbol 301 MovieClip in Frame 2
on (release) {
getURL ("http://www.arcadereign.com", "_blank");
}
Frame 194
_global.versionCode = "English";
Frame 327
stop();
Frame 328
stop();
this.onEnterFrame = function () {
if (_global.versionCode == "Chinese") {
introduction.gotoAndStop(1);
} else if (_global.versionCode == "English") {
introduction.gotoAndStop(2);
}
};
Frame 329
stop();
stopAllSounds();
var Gstart = 0;
stageDoor.stageDoorDown.conBtn._visible = false;
stageDoor.go_logo._visible = false;
stageDoor.stageDoor.stageNum.gotoAndStop(1);
this.onEnterFrame = function () {
if (Gstart > 0) {
Gstart--;
}
if (Gstart == 0) {
stageDoor.gotoAndPlay(13);
Gstart = 49;
}
if (Gstart == 1) {
nextFrame();
}
};
Instance of Symbol 408 MovieClip "stageDoor" in Frame 329
onClipEvent (enterFrame) {
if ((this._currentframe < 60) || (_root.timer == 25)) {
_quality = "HIGH";
} else {
_quality = "MEDIUM";
}
}
Frame 330
function drawMap(map) {
mapWidth = map[0].length;
mapHeight = map.length;
var _local2 = charBotPosY;
while (_local2 <= ((viewAreaY + 1) + charBotPosY)) {
var _local1 = charBotPosX;
while (_local1 <= ((viewAreaX + 1) + charBotPosX)) {
if (map[_local2][_local1] > 4) {
wholeMap.attachMovie("tile", (("t_" + _local2) + "_") + _local1, (_local2 * (mapWidth + 2)) + _local1);
wholeMap[(("t_" + _local2) + "_") + _local1]._x = _local1 * tileW;
wholeMap[(("t_" + _local2) + "_") + _local1]._y = _local2 * tileH;
wholeMap[(("t_" + _local2) + "_") + _local1].gotoAndStop(map[_local2][_local1] + 1);
}
_local1++;
}
_local2++;
}
wholeMap._x = (480 - (((viewAreaX + 2) + (charBotPosX * 2)) * tileW)) / 2;
wholeMap._y = (352 - (((viewAreaY + 2) + (charBotPosY * 2)) * tileH)) / 2;
}
function removeMap(map) {
var _local2 = 0;
while (_local2 <= (map.length + 1)) {
var _local1 = 0;
while (_local1 <= (map[0].length + 1)) {
removeMovieClip(wholeMap[(("t_" + _local2) + "_") + _local1]);
_local1++;
}
_local2++;
}
}
function scrollMap(dir) {
mapWidth = myMap[0].length;
mapHeight = myMap.length;
if (((dir == "left") && (rightX > (viewAreaX - 1))) && (wholemap.char.screenPos.xP <= playerRect.leftN)) {
wholemap._x = wholemap._x + scrollspeed;
scrollLeftX = scrollLeftX + scrollspeed;
if (scrollLeftX >= tileW) {
LeftX--;
i = topY;
while (i <= bottomY) {
if (myMap[i][LeftX] > 4) {
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.char.screenPos.xP >= playerRect.rightN)) {
wholemap._x = wholemap._x - scrollspeed;
scrollRightX = scrollRightX + scrollspeed;
if (scrollRightX >= tileW) {
rightX++;
i = topY;
while (i <= bottomY) {
if (myMap[i][rightX] > 4) {
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.char.screenPos.yP <= playerRect.topN)) {
wholemap._y = wholemap._y + scrollspeed;
scrollTopY = scrollTopY + scrollspeed;
if (scrollTopY >= tileH) {
TopY--;
i = LeftX;
while (i <= RightX) {
if (myMap[topY][i] > 4) {
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.char.screenPos.yP >= playerRect.bottomN)) {
wholemap._y = wholemap._y - scrollspeed;
scrollbottomY = scrollbottomY + scrollspeed;
if (scrollBottomY >= tileH) {
BottomY++;
i = LeftX;
while (i <= RightX) {
if (myMap[bottomY][i] > 4) {
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 = 16;
var notPassTile = 35;
var tileW = 32;
var tileH = 32;
var charPos = [14, 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;
var playerRect = (new SimpleType.Rect(128, 256, 128, 384));
var upK = 38;
var downK = 40;
var leftK = 37;
var rightK = 39;
var shotK = 90;
var effectK = 88;
var selectK = 67;
var bgm = new Sound();
bgm.attachSound("bgm1");
bgm.start(0, 1000);
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);
function areaLimit(ob, Limit) {
if (ob._y <= (tileH * Limit)) {
ob._y = tileH * Limit;
} else if (ob._y >= (tileH * (myMap.length - Limit))) {
ob._y = tileH * (myMap.length - Limit);
}
}
function setOurHLP() {
wholemap.attachMovie("HLPourside", "HLPourside", ((mapWidth + 2) * (mapHeight + 2)) + 151);
wholemap.HLPourside._x = wholemap.char._x;
wholemap.HLPourside._y = wholemap.char._y + 192;
se_snd.start();
wholemap.attachMovie("HLP-shot-ourside", "HLP-shot-ourside", ((mapWidth + 2) * (mapHeight + 2)) + 161);
}
function setGoldenTank() {
wholemap.attachMovie("goldenTank", "goldenTank", ((mapWidth + 2) * (mapHeight + 2)) + 80);
wholemap.goldenTank._x = wholemap.char._x;
if (wholemap.char.screenPos.yP < 192) {
wholemap.goldenTank._y = wholemap.char._y + 192;
} else if (wholemap.char.screenPos.yP >= 192) {
wholemap.goldenTank._y = wholemap.char._y - 192;
}
areaLimit(wholemap.goldenTank, 3);
se_snd.start();
wholemap.attachMovie("cShotGoldenTank", "cShotGoldenTank", ((mapWidth + 2) * (mapHeight + 2)) + 90);
}
function stageFade(pS) {
stageDoor.play();
stageDoor.stageDoor.stageNum.gotoAndStop(pS);
if (timer > 0) {
timer--;
}
if (timer == 1) {
gotoAndStop(pS + 1 +328);
}
}
function stageEnd() {
if (timer > 25) {
timer--;
} else if (timer == 25) {
if (shopT.inTimer(1)) {
shopCt.attachMovie("shop", "shop", 1000);
}
}
if (shopEnd) {
shopT.clrTimer();
stageFade(stageLabel + 1);
}
}
var CharNum = 3;
var score = 0;
var se_snd = new Sound();
se_snd.attachSound("go");
var shopT = (new SimpleType.Timer());
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 1, 1, 42, 1, 1, 39, 1, 1, 39, 1, 42, 1, 1, 1, 39, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 5, 6, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 8, 7, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 39, 39, 39, 1, 5, 6, 1, 1, 39, 39, 39, 39, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 5, 6, 1, 1, 1, 1, 1, 8, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 8, 7, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 1, 1, 23, 27, 27, 24, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 23, 27, 27, 24, 1, 1, 1, 8, 7, 1, 1, 26, 28, 28, 25, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 26, 28, 28, 25, 35, 35, 1, 1, 1, 1, 1, 42, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 1, 1, 42, 42, 42, 1, 1, 35, 48, 0], [0, 48, 1, 1, 23, 24, 1, 1, 1, 1, 1, 1, 1, 1, 26, 25, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 25, 1, 1, 23, 27, 27, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 26, 28, 28, 25, 1, 5, 6, 1, 1, 1, 42, 42, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 35, 1, 8, 7, 1, 1, 42, 42, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 1, 5, 6, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 42, 1, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 8, 7, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 5, 6, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 8, 7, 1, 1, 1, 51, 0], [0, 48, 39, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 35, 35, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 23, 24, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 25, 1, 1, 1, 35, 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, 23, 27, 27, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 39, 1, 1, 1, 1, 1, 26, 28, 28, 25, 1, 23, 24, 1, 1, 1, 1, 39, 39, 39, 48, 0], [0, 48, 39, 1, 1, 1, 5, 6, 1, 1, 1, 1, 1, 1, 1, 26, 25, 1, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 1, 8, 7, 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, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 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;
var shopEnd = false;
setChar();
getCharData.stageNum = stageLabel;
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(7);
if ((((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) && (tankEnemy != boss)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var _local2 = 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, "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 ((_local2 >= 0) && (_local2 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local2 == 2) {
dropItem(wholemap.tankMiddle, "addShotNum");
}
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.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if (wholemap.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
stageDoor.go_logo._visible = true;
bgm.stop("bgm1");
showStaff.gotoAndStop(2);
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
}
stageEnd();
};
Frame 331
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 39, 2, 2, 39, 2, 2, 39, 2, 2, 39, 2, 39, 2, 2, 2, 39, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 39, 2, 2, 39, 9, 10, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 11, 2, 36, 2, 2, 2, 2, 39, 48, 0], [0, 48, 2, 2, 2, 43, 2, 2, 36, 2, 9, 10, 2, 2, 2, 2, 2, 36, 2, 2, 9, 10, 2, 2, 48, 0], [0, 48, 2, 2, 2, 43, 2, 2, 36, 2, 12, 11, 2, 9, 10, 2, 2, 2, 2, 2, 12, 11, 2, 2, 48, 0], [0, 48, 43, 2, 2, 36, 43, 2, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 2, 2, 2, 36, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 29, 33, 33, 33, 33, 33, 33, 33, 33, 30, 2, 2, 2, 36, 48, 0], [0, 48, 43, 2, 2, 9, 10, 2, 2, 2, 32, 34, 34, 34, 34, 34, 34, 34, 34, 31, 2, 9, 10, 2, 48, 0], [0, 48, 2, 2, 2, 12, 11, 2, 2, 2, 9, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 11, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 9, 10, 2, 2, 2, 2, 2, 48, 0], [0, 48, 36, 2, 2, 2, 29, 33, 33, 33, 33, 33, 33, 33, 33, 30, 2, 12, 11, 2, 2, 2, 2, 36, 48, 0], [0, 48, 43, 43, 2, 2, 32, 34, 34, 34, 34, 34, 34, 34, 34, 31, 2, 2, 2, 2, 43, 2, 2, 2, 48, 0], [0, 48, 36, 9, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, 43, 2, 2, 2, 2, 48, 0], [0, 48, 2, 12, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 2, 9, 10, 2, 48, 0], [0, 48, 2, 2, 2, 2, 36, 36, 36, 36, 36, 36, 36, 36, 36, 2, 2, 43, 36, 2, 2, 12, 11, 2, 48, 0], [0, 48, 39, 39, 2, 2, 36, 2, 2, 36, 2, 2, 36, 2, 2, 9, 10, 2, 36, 36, 2, 2, 39, 39, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 51, 2, 2, 9, 10, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 39, 12, 11, 2, 2, 29, 33, 33, 33, 33, 33, 33, 33, 33, 30, 36, 2, 2, 2, 39, 39, 48, 0], [0, 48, 2, 2, 2, 2, 2, 2, 32, 34, 34, 34, 34, 34, 34, 34, 34, 31, 2, 36, 2, 2, 2, 2, 48, 0], [0, 48, 2, 9, 10, 2, 9, 10, 2, 2, 2, 2, 2, 2, 9, 10, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 12, 11, 2, 12, 11, 2, 2, 9, 10, 2, 2, 12, 11, 2, 2, 9, 10, 2, 2, 2, 43, 48, 0], [0, 48, 39, 39, 39, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 2, 12, 11, 2, 2, 43, 43, 48, 0], [0, 48, 39, 2, 2, 2, 2, 2, 2, 2, 39, 39, 39, 39, 39, 2, 2, 2, 2, 43, 2, 2, 2, 2, 48, 0], [0, 48, 9, 10, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 2, 9, 10, 48, 0], [0, 48, 12, 11, 2, 2, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 2, 2, 12, 11, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 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;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(7);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var _local2 = 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 ((_local2 >= 4) && (_local2 <= 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 ((_local2 >= 0) && (_local2 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local2 == 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 (_local2 == 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))) {
setOurHLP();
HLPoursideNum--;
}
if (wholemap.HLPourside.aliveAfter == false) {
removeMovieClip(wholemap.HLPourside);
}
if (wholemap.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
tankSmallNum = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
}
stageEnd();
};
Frame 332
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 13, 14, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 39, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 16, 15, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 35, 1, 1, 1, 42, 1, 1, 1, 1, 1, 1, 16, 15, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 13, 14, 35, 1, 1, 42, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 35, 23, 27, 24, 48, 0], [0, 48, 1, 1, 16, 15, 35, 13, 14, 1, 42, 1, 1, 1, 35, 1, 1, 1, 13, 14, 35, 26, 28, 25, 48, 0], [0, 48, 1, 1, 1, 35, 1, 16, 15, 1, 1, 1, 1, 1, 35, 1, 1, 1, 16, 15, 35, 1, 13, 14, 48, 0], [0, 48, 23, 24, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 35, 35, 35, 1, 16, 15, 48, 0], [0, 48, 26, 25, 1, 1, 1, 42, 1, 1, 35, 23, 27, 27, 24, 13, 14, 1, 35, 13, 14, 1, 1, 1, 48, 0], [0, 48, 13, 14, 1, 1, 42, 1, 1, 1, 35, 26, 28, 28, 25, 16, 15, 1, 35, 16, 15, 1, 1, 1, 48, 0], [0, 48, 16, 15, 1, 13, 14, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 1, 42, 42, 48, 0], [0, 48, 1, 1, 1, 16, 15, 1, 1, 1, 35, 35, 1, 1, 35, 1, 1, 1, 35, 1, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 35, 13, 14, 1, 1, 1, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 23, 27, 24, 35, 1, 1, 1, 35, 1, 1, 35, 16, 15, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 28, 25, 35, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 35, 13, 14, 35, 35, 1, 1, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 35, 35, 35, 1, 1, 1, 35, 1, 16, 15, 35, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 39, 1, 1, 1, 1, 1, 35, 1, 1, 35, 1, 1, 1, 1, 35, 1, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 1, 13, 14, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 13, 14, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 1, 42, 16, 15, 1, 35, 1, 1, 1, 35, 1, 1, 1, 1, 16, 15, 1, 1, 1, 1, 48, 0], [0, 48, 1, 23, 24, 42, 1, 1, 1, 1, 1, 13, 14, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 42, 26, 25, 1, 42, 1, 1, 1, 1, 16, 15, 1, 35, 13, 14, 35, 1, 1, 1, 42, 23, 24, 48, 0], [0, 48, 1, 42, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 16, 15, 35, 13, 14, 42, 42, 26, 25, 48, 0], [0, 48, 13, 14, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 16, 15, 1, 1, 1, 1, 48, 0], [0, 48, 16, 15, 1, 1, 42, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 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;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossB || (wholemap.shotBossB2)) || (wholemap.shotBossB3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(7);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
} else if (_local1 > 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
tankSmallNum = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
}
stageEnd();
};
Frame 333
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 3, 13, 14, 3, 3, 39, 3, 3, 39, 3, 13, 14, 3, 3, 39, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 16, 15, 3, 3, 39, 3, 3, 39, 3, 16, 15, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 13, 14, 3, 3, 3, 44, 44, 17, 18, 3, 3, 39, 48, 0], [0, 48, 3, 13, 14, 3, 3, 44, 44, 44, 3, 3, 16, 15, 3, 3, 3, 44, 3, 20, 19, 3, 13, 14, 48, 0], [0, 48, 3, 16, 15, 3, 3, 3, 3, 3, 44, 3, 3, 3, 3, 3, 44, 44, 3, 3, 3, 3, 16, 15, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 13, 14, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 48, 0], [0, 48, 3, 3, 37, 37, 3, 3, 16, 15, 3, 3, 3, 37, 37, 3, 3, 3, 3, 37, 3, 13, 14, 3, 48, 0], [0, 48, 3, 3, 17, 18, 37, 37, 3, 3, 3, 3, 37, 3, 13, 14, 3, 3, 37, 3, 3, 16, 15, 3, 48, 0], [0, 48, 3, 3, 20, 19, 3, 3, 3, 3, 3, 37, 3, 3, 16, 15, 3, 3, 37, 3, 3, 3, 3, 3, 48, 0], [0, 48, 44, 44, 13, 14, 3, 3, 3, 3, 3, 17, 21, 18, 3, 3, 3, 13, 14, 3, 3, 37, 17, 18, 48, 0], [0, 48, 3, 3, 16, 15, 3, 44, 44, 3, 3, 20, 22, 19, 3, 3, 3, 16, 15, 3, 37, 3, 20, 19, 48, 0], [0, 48, 3, 3, 3, 44, 44, 3, 3, 44, 3, 3, 3, 3, 37, 37, 3, 3, 3, 3, 37, 3, 3, 3, 48, 0], [0, 48, 3, 3, 44, 3, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 37, 3, 13, 14, 3, 3, 3, 3, 48, 0], [0, 48, 13, 14, 3, 3, 3, 44, 3, 3, 3, 37, 37, 13, 14, 3, 3, 37, 16, 15, 3, 3, 13, 14, 48, 0], [0, 48, 16, 15, 3, 3, 13, 14, 3, 3, 37, 3, 3, 16, 15, 3, 17, 18, 3, 3, 3, 3, 16, 15, 48, 0], [0, 48, 39, 39, 3, 3, 16, 15, 3, 3, 13, 14, 3, 3, 3, 3, 20, 19, 3, 3, 3, 3, 39, 39, 48, 0], [0, 48, 3, 3, 3, 37, 3, 3, 3, 3, 16, 15, 3, 3, 3, 3, 3, 44, 3, 3, 3, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 37, 37, 13, 14, 37, 37, 3, 3, 44, 44, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 39, 3, 3, 3, 37, 3, 16, 15, 3, 37, 3, 3, 3, 3, 3, 3, 44, 3, 3, 39, 39, 48, 0], [0, 48, 3, 3, 13, 14, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 3, 3, 3, 44, 3, 3, 3, 48, 0], [0, 48, 3, 3, 16, 15, 3, 3, 3, 37, 3, 3, 13, 14, 3, 3, 37, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 16, 15, 3, 3, 3, 37, 37, 3, 3, 3, 3, 44, 48, 0], [0, 48, 44, 3, 3, 37, 17, 18, 3, 3, 3, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 13, 14, 3, 20, 19, 3, 3, 37, 3, 3, 3, 3, 37, 3, 3, 3, 3, 3, 44, 3, 3, 48, 0], [0, 48, 3, 16, 15, 3, 3, 44, 3, 13, 14, 3, 3, 13, 14, 3, 3, 3, 17, 21, 18, 3, 3, 3, 48, 0], [0, 48, 44, 3, 3, 3, 3, 44, 3, 16, 15, 3, 3, 16, 15, 3, 3, 3, 20, 22, 19, 3, 3, 3, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 4;
var tankNum = 4;
var tankE1Num = 2;
var tankE2Num = 1;
var tankSmallNum = 3;
var tankMiddleNum = 3;
var tankBossBNum = 2;
var tankBossNum = 1;
var tankBossCNum = 1;
var manNum = 1;
var HLPNum = 4;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBoss || (wholemap.shotBossA2)) || (wholemap.shotBossA3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(8);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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, "addShotNum");
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
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);
}
stageEnd();
};
Frame 334
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 2, 2, 2, 2, 2, 39, 2, 2, 39, 2, 2, 2, 2, 2, 39, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 29, 30, 2, 2, 39, 2, 2, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 2, 2, 2, 2, 32, 31, 2, 2, 2, 2, 2, 2, 2, 2, 43, 43, 2, 9, 10, 2, 39, 48, 0], [0, 48, 2, 9, 10, 2, 2, 43, 43, 43, 2, 2, 9, 10, 2, 2, 2, 43, 2, 2, 12, 11, 2, 2, 48, 0], [0, 48, 2, 12, 11, 2, 2, 2, 2, 2, 43, 2, 12, 11, 2, 2, 43, 43, 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, 36, 2, 2, 2, 48, 0], [0, 48, 2, 2, 36, 36, 2, 2, 9, 10, 2, 2, 2, 36, 36, 29, 30, 2, 2, 36, 2, 9, 10, 2, 48, 0], [0, 48, 2, 2, 2, 2, 36, 36, 12, 11, 2, 2, 36, 2, 2, 32, 31, 2, 36, 2, 2, 12, 11, 2, 48, 0], [0, 48, 2, 2, 2, 2, 29, 30, 2, 2, 2, 36, 2, 9, 10, 2, 2, 2, 36, 2, 2, 2, 2, 2, 48, 0], [0, 48, 43, 43, 2, 2, 32, 31, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 2, 36, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 43, 43, 2, 2, 2, 2, 2, 2, 2, 2, 9, 10, 2, 36, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 43, 43, 2, 2, 43, 2, 2, 2, 2, 36, 36, 2, 12, 11, 2, 36, 2, 9, 10, 48, 0], [0, 48, 2, 2, 43, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 36, 2, 2, 2, 2, 2, 12, 11, 48, 0], [0, 48, 9, 10, 2, 2, 2, 43, 2, 2, 2, 36, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 12, 11, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 9, 10, 2, 2, 2, 9, 10, 2, 2, 2, 48, 0], [0, 48, 39, 39, 2, 2, 2, 9, 10, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 12, 11, 2, 39, 39, 48, 0], [0, 48, 2, 2, 2, 36, 2, 12, 11, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 36, 36, 2, 2, 36, 36, 2, 2, 43, 43, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 39, 2, 2, 2, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 43, 2, 2, 39, 39, 48, 0], [0, 48, 2, 9, 10, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 43, 2, 2, 2, 48, 0], [0, 48, 2, 12, 11, 2, 2, 2, 2, 36, 2, 2, 2, 29, 30, 2, 36, 2, 2, 2, 9, 10, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 36, 36, 36, 2, 2, 2, 2, 32, 31, 2, 2, 36, 36, 2, 12, 11, 2, 43, 48, 0], [0, 48, 43, 2, 2, 36, 2, 2, 2, 2, 2, 36, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 9, 10, 2, 2, 9, 10, 2, 36, 2, 2, 2, 2, 36, 2, 9, 10, 2, 2, 43, 2, 2, 48, 0], [0, 48, 2, 12, 11, 2, 2, 12, 11, 2, 2, 2, 2, 9, 10, 2, 2, 12, 11, 2, 43, 2, 9, 10, 48, 0], [0, 48, 43, 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, 12, 11, 2, 2, 2, 2, 2, 43, 2, 12, 11, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 5;
var tankNum = 2;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 3;
var tankBossBNum = 0;
var tankBossNum = 2;
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;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setHLP();
setHLPB();
setHLPC();
setTankBoss();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(10);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((_local1 == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((_local1 == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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 ((_local1 >= 5) && (_local1 <= 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 ((_local1 >= 6) && (_local1 <= 7)) {
dropItem(wholemap.tankBoss, "addShotNum");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
HLPNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.helicopter);
removeMovieClip(wholemap.tankMiddle);
}
stageEnd();
};
Frame 335
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 13, 14, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 39, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 16, 15, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 35, 1, 1, 1, 42, 1, 1, 1, 1, 1, 1, 16, 15, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 13, 14, 35, 1, 1, 42, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 35, 23, 27, 24, 48, 0], [0, 48, 1, 1, 16, 15, 35, 13, 14, 1, 42, 1, 1, 1, 35, 1, 1, 1, 13, 14, 35, 26, 28, 25, 48, 0], [0, 48, 1, 1, 1, 35, 1, 16, 15, 1, 1, 1, 1, 1, 35, 1, 1, 1, 16, 15, 35, 1, 13, 14, 48, 0], [0, 48, 23, 24, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 35, 35, 35, 1, 16, 15, 48, 0], [0, 48, 26, 25, 1, 1, 1, 42, 1, 1, 35, 23, 27, 27, 24, 13, 14, 1, 35, 13, 14, 1, 1, 1, 48, 0], [0, 48, 13, 14, 1, 1, 42, 1, 1, 1, 35, 26, 28, 28, 25, 16, 15, 1, 35, 16, 15, 1, 1, 1, 48, 0], [0, 48, 16, 15, 1, 13, 14, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 1, 42, 42, 48, 0], [0, 48, 1, 1, 1, 16, 15, 1, 1, 1, 35, 35, 1, 1, 35, 1, 1, 1, 35, 1, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 35, 1, 1, 1, 35, 1, 1, 35, 13, 14, 1, 1, 1, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 23, 27, 24, 35, 1, 1, 1, 35, 1, 1, 35, 16, 15, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 28, 25, 35, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 35, 13, 14, 35, 35, 1, 1, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 35, 35, 35, 1, 1, 1, 35, 1, 16, 15, 35, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 39, 1, 1, 1, 1, 1, 35, 1, 1, 35, 1, 1, 1, 1, 35, 1, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 1, 13, 14, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 13, 14, 1, 42, 1, 1, 48, 0], [0, 48, 1, 1, 1, 42, 16, 15, 1, 35, 1, 1, 1, 35, 1, 1, 1, 1, 16, 15, 1, 1, 1, 1, 48, 0], [0, 48, 1, 23, 24, 42, 1, 1, 1, 1, 1, 13, 14, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 42, 26, 25, 1, 42, 1, 1, 1, 1, 16, 15, 1, 35, 13, 14, 35, 1, 1, 1, 42, 23, 24, 48, 0], [0, 48, 1, 42, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 16, 15, 35, 13, 14, 42, 42, 26, 25, 48, 0], [0, 48, 13, 14, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 16, 15, 1, 1, 1, 1, 48, 0], [0, 48, 16, 15, 1, 1, 42, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 6;
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;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossB || (wholemap.shotBossB2)) || (wholemap.shotBossB3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(7);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 5)) {
dropItem(wholemap.tankEnemy, "addShotNum");
} else if (_local1 > 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
manNum = 0;
tankE1Num = 0;
tankE2Num = 0;
tankSmallNum = 0;
removeMovieClip(wholemap.man);
removeMovieClip(wholemap.tankE1);
removeMovieClip(wholemap.tankE2);
removeMovieClip(wholemap.tankSmall);
}
stageEnd();
};
Frame 336
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 3, 5, 6, 3, 3, 39, 3, 3, 39, 3, 5, 6, 3, 3, 39, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 8, 7, 3, 3, 39, 3, 3, 39, 3, 8, 7, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 6, 3, 3, 3, 44, 44, 17, 18, 3, 3, 39, 48, 0], [0, 48, 3, 5, 6, 3, 3, 44, 44, 44, 3, 3, 8, 7, 3, 3, 3, 44, 3, 20, 19, 3, 5, 6, 48, 0], [0, 48, 3, 8, 7, 3, 3, 3, 3, 3, 44, 3, 3, 3, 3, 3, 44, 44, 3, 3, 3, 3, 8, 7, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 5, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 48, 0], [0, 48, 3, 3, 37, 37, 3, 3, 8, 7, 3, 3, 3, 37, 37, 3, 3, 3, 3, 37, 3, 5, 6, 3, 48, 0], [0, 48, 3, 3, 17, 18, 37, 37, 3, 3, 3, 3, 37, 3, 5, 6, 3, 3, 37, 3, 3, 8, 7, 3, 48, 0], [0, 48, 3, 3, 20, 19, 3, 3, 3, 3, 3, 37, 3, 3, 8, 7, 3, 3, 37, 3, 3, 3, 3, 3, 48, 0], [0, 48, 44, 44, 5, 6, 3, 3, 3, 3, 3, 17, 21, 18, 3, 3, 3, 5, 6, 3, 3, 37, 17, 18, 48, 0], [0, 48, 3, 3, 8, 7, 3, 44, 44, 3, 3, 20, 22, 19, 3, 3, 3, 8, 7, 3, 37, 3, 20, 19, 48, 0], [0, 48, 3, 3, 3, 44, 44, 3, 3, 44, 3, 3, 3, 3, 37, 37, 3, 3, 3, 3, 37, 3, 3, 3, 48, 0], [0, 48, 3, 3, 44, 3, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 37, 3, 5, 6, 3, 3, 3, 3, 48, 0], [0, 48, 5, 6, 3, 3, 3, 44, 3, 3, 3, 37, 37, 5, 6, 3, 3, 37, 8, 7, 3, 3, 5, 6, 48, 0], [0, 48, 8, 7, 3, 3, 5, 6, 3, 3, 37, 3, 3, 8, 7, 3, 17, 18, 3, 3, 3, 3, 8, 7, 48, 0], [0, 48, 39, 39, 3, 3, 8, 7, 3, 3, 5, 6, 3, 3, 3, 3, 20, 19, 3, 3, 3, 3, 39, 39, 48, 0], [0, 48, 3, 3, 3, 37, 3, 3, 3, 3, 8, 7, 3, 3, 3, 3, 3, 44, 3, 3, 3, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 37, 37, 5, 6, 37, 37, 3, 3, 44, 44, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 39, 3, 3, 3, 37, 3, 8, 7, 3, 37, 3, 3, 3, 3, 3, 3, 44, 3, 3, 39, 39, 48, 0], [0, 48, 3, 3, 5, 6, 3, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 3, 3, 3, 44, 3, 3, 3, 48, 0], [0, 48, 3, 3, 8, 7, 3, 3, 3, 37, 3, 3, 5, 6, 3, 3, 37, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 3, 3, 3, 3, 3, 37, 3, 3, 3, 8, 7, 3, 3, 3, 37, 37, 3, 3, 3, 3, 44, 48, 0], [0, 48, 44, 3, 3, 37, 17, 18, 3, 3, 3, 37, 37, 37, 37, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 3, 5, 6, 3, 20, 19, 3, 3, 37, 3, 3, 3, 3, 37, 3, 3, 3, 3, 3, 44, 3, 3, 48, 0], [0, 48, 3, 8, 7, 3, 3, 44, 3, 5, 6, 3, 3, 5, 6, 3, 3, 3, 17, 21, 18, 3, 3, 3, 48, 0], [0, 48, 44, 3, 3, 3, 3, 44, 3, 8, 7, 3, 3, 8, 7, 3, 3, 3, 20, 22, 19, 3, 3, 3, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 7;
var tankNum = 3;
var tankE1Num = 1;
var tankE2Num = 1;
var tankSmallNum = 3;
var tankMiddleNum = 3;
var tankBossBNum = 3;
var tankBossNum = 2;
var tankBossCNum = 1;
var manNum = 1;
var HLPNum = 4;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBoss || (wholemap.shotBossA2)) || (wholemap.shotBossA3)) {
removeMovieClip(wholemap.shotBossB);
removeMovieClip(wholemap.shotBossB2);
removeMovieClip(wholemap.shotBossB3);
}
setMan();
setTankE1();
setTankE2();
setTankSmall();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(8);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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, "addShotNum");
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
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);
}
stageEnd();
};
Frame 337
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 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, 49, 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, 39, 2, 2, 2, 2, 2, 39, 2, 2, 39, 2, 2, 2, 2, 2, 39, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 29, 30, 2, 2, 39, 2, 2, 39, 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 2, 2, 2, 2, 32, 31, 2, 2, 2, 2, 2, 2, 2, 2, 43, 43, 2, 13, 14, 2, 39, 48, 0], [0, 48, 2, 13, 14, 2, 2, 43, 43, 43, 2, 2, 13, 14, 2, 2, 2, 43, 2, 2, 16, 15, 2, 2, 48, 0], [0, 48, 2, 16, 15, 2, 2, 2, 2, 2, 43, 2, 16, 15, 2, 2, 43, 43, 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, 36, 2, 2, 2, 48, 0], [0, 48, 2, 2, 36, 36, 2, 2, 13, 14, 2, 2, 2, 36, 36, 29, 30, 2, 2, 36, 2, 13, 14, 2, 48, 0], [0, 48, 2, 2, 2, 2, 36, 36, 16, 15, 2, 2, 36, 2, 2, 32, 31, 2, 36, 2, 2, 16, 15, 2, 48, 0], [0, 48, 2, 2, 2, 2, 29, 30, 2, 2, 2, 36, 2, 13, 14, 2, 2, 2, 36, 2, 2, 2, 2, 2, 48, 0], [0, 48, 43, 43, 2, 2, 32, 31, 2, 2, 2, 2, 2, 16, 15, 2, 2, 2, 2, 2, 2, 36, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 2, 43, 43, 2, 2, 2, 2, 2, 2, 2, 2, 13, 14, 2, 36, 2, 2, 2, 48, 0], [0, 48, 2, 2, 2, 43, 43, 2, 2, 43, 2, 2, 2, 2, 36, 36, 2, 16, 15, 2, 36, 2, 13, 14, 48, 0], [0, 48, 2, 2, 43, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 36, 2, 2, 2, 2, 2, 16, 15, 48, 0], [0, 48, 13, 14, 2, 2, 2, 43, 2, 2, 2, 36, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 16, 15, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 13, 14, 2, 2, 2, 13, 14, 2, 2, 2, 48, 0], [0, 48, 39, 39, 2, 2, 2, 13, 14, 2, 2, 2, 2, 2, 16, 15, 2, 2, 2, 16, 15, 2, 39, 39, 48, 0], [0, 48, 2, 2, 2, 36, 2, 16, 15, 2, 2, 2, 2, 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, 2, 48, 0], [0, 51, 2, 2, 2, 2, 2, 36, 36, 2, 2, 36, 36, 2, 2, 43, 43, 2, 2, 2, 2, 2, 2, 2, 51, 0], [0, 48, 39, 39, 2, 2, 2, 36, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 43, 2, 2, 39, 39, 48, 0], [0, 48, 2, 13, 14, 2, 2, 2, 2, 2, 2, 2, 2, 36, 2, 2, 2, 2, 2, 2, 43, 2, 2, 2, 48, 0], [0, 48, 2, 16, 15, 2, 2, 2, 2, 36, 2, 2, 2, 29, 30, 2, 36, 2, 2, 2, 13, 14, 2, 2, 48, 0], [0, 48, 2, 2, 2, 2, 36, 36, 36, 2, 2, 2, 2, 32, 31, 2, 2, 36, 36, 2, 16, 15, 2, 43, 48, 0], [0, 48, 43, 2, 2, 36, 2, 2, 2, 2, 2, 36, 36, 36, 36, 2, 2, 2, 2, 2, 2, 2, 2, 2, 48, 0], [0, 48, 2, 13, 14, 2, 2, 13, 14, 2, 36, 2, 2, 2, 2, 36, 2, 13, 14, 2, 2, 43, 2, 2, 48, 0], [0, 48, 2, 16, 15, 2, 2, 16, 15, 2, 2, 2, 2, 13, 14, 2, 2, 16, 15, 2, 43, 2, 13, 14, 48, 0], [0, 48, 43, 2, 2, 2, 2, 43, 2, 2, 2, 2, 2, 16, 15, 2, 2, 2, 2, 2, 43, 2, 16, 15, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 8;
var tankNum = 1;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 3;
var tankBossBNum = 2;
var tankBossNum = 3;
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;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setHLP();
setHLPB();
setHLPC();
setTankBoss();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(10);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((_local1 == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((_local1 == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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 ((_local1 >= 5) && (_local1 <= 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 ((_local1 >= 6) && (_local1 <= 7)) {
dropItem(wholemap.tankBoss, "addShotNum");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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 = 201;
HLPNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.helicopter);
removeMovieClip(wholemap.tankMiddle);
}
stageEnd();
};
Frame 338
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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 setTankBossD() {
wholemap.attachMovie("tankBossD", "tankBossD", ((mapWidth + 2) * (mapHeight + 2)) + 21);
wholemap.tankBossD._x = (bossPos[0] * tileW) + (tileW / 2);
wholemap.tankBossD._y = (bossPos[1] * tileH) + (tileH / 2);
wholemap.attachMovie("rShotBossD", "rShotBossD", ((mapWidth + 2) * (mapHeight + 2)) + 48);
wholemap.attachMovie("shotBossD", "shotBossD", ((mapWidth + 2) * (mapHeight + 2)) + 45);
wholemap.attachMovie("shotBossDA2", "shotBossDA2", ((mapWidth + 2) * (mapHeight + 2)) + 46);
wholemap.attachMovie("shotBossDA3", "shotBossDA3", ((mapWidth + 2) * (mapHeight + 2)) + 47);
}
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 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, 49, 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, 39, 1, 1, 42, 1, 1, 39, 1, 1, 39, 1, 42, 1, 1, 1, 39, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 1, 1, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 51, 0], [0, 48, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 13, 14, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 16, 15, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 39, 39, 39, 1, 13, 14, 1, 1, 39, 39, 39, 39, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 13, 14, 1, 1, 1, 1, 1, 16, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 16, 15, 1, 1, 1, 1, 1, 1, 1, 1, 13, 14, 1, 1, 23, 27, 27, 24, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 35, 35, 1, 1, 1, 1, 1, 16, 15, 1, 1, 26, 28, 28, 25, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 35, 35, 35, 1, 1, 1, 1, 1, 42, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 1, 1, 42, 42, 42, 1, 1, 35, 48, 0], [0, 48, 1, 1, 23, 24, 1, 1, 1, 1, 1, 1, 1, 1, 26, 25, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 25, 1, 1, 35, 35, 35, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 35, 1, 13, 14, 1, 1, 1, 42, 42, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 1, 1, 1, 1, 35, 1, 1, 35, 1, 16, 15, 1, 1, 42, 42, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 1, 13, 14, 1, 35, 1, 1, 35, 1, 1, 1, 1, 1, 42, 1, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 1, 16, 15, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 1, 13, 14, 1, 1, 1, 48, 0], [0, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 1, 16, 15, 1, 1, 1, 51, 0], [0, 48, 39, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 35, 35, 1, 1, 1, 39, 39, 48, 0], [0, 48, 1, 1, 23, 24, 1, 1, 35, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 35, 1, 1, 1, 1, 48, 0], [0, 48, 1, 1, 26, 25, 1, 1, 1, 35, 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, 39, 39, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 48, 0], [0, 48, 39, 39, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 1, 1, 1, 1, 39, 39, 39, 48, 0], [0, 48, 39, 1, 1, 1, 13, 14, 1, 1, 1, 1, 1, 1, 1, 26, 25, 1, 1, 1, 1, 1, 1, 39, 48, 0], [0, 48, 1, 1, 1, 1, 16, 15, 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, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 9;
var tankNum = 4;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 4;
var tankBossBNum = 2;
var tankBossNum = 3;
var tankBossCNum = 1;
var tankBossDNum = 1;
var manNum = 0;
var HLPNum = 0;
var HLPBNum = 0;
var HLPCNum = 5;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setTankBossB();
setTank();
setTankBoss();
setHLPC();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(10);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((_local1 == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((_local1 == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
} else if (((_local1 == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
} else if (((_local1 == 7) && (tankBossCNum > 0)) && (!wholemap.tankBossC)) {
settankBossC();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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 ((_local1 >= 5) && (_local1 <= 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 ((_local1 >= 6) && (_local1 <= 7)) {
dropItem(wholemap.tankBoss, "addShotNum");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.tankBossD.aliveAfter == false) {
if (tankBossDNum > 0) {
tankBossDNum--;
enemySpace++;
removeMovieClip(wholemap.tankBossD);
} else if (tankBossDNum == 0) {
removeMovieClip(wholemap.tankBossD);
}
}
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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
if (wholemap.char.aliveAfter == false) {
removeMovieClip(wholemap.char);
}
if ((((((tankBossNum == 0) && (tankBossBNum == 0)) && (tankBossCNum == 0)) && (!wholemap.tankBoss)) && (!wholemap.tankBossB)) && (!wholemap.tankBossC)) {
if ((!wholemap.tankBossD) && (tankBossDNum > 0)) {
setTankBossD();
}
}
if (((timer == 0) && (!wholemap.tankBossD)) && (tankBossDNum == 0)) {
timer = 201;
HLPCNum = 0;
tankMiddleNum = 0;
removeMovieClip(wholemap.helicopterC);
removeMovieClip(wholemap.tankMiddle);
}
stageEnd();
};
Frame 339
function ranPos() {
var _local1 = random(4);
if (_local1 == 0) {
Pos[0] = Pos1[0];
Pos[1] = Pos1[1];
} else if (_local1 == 1) {
Pos[0] = Pos2[0];
Pos[1] = Pos2[1];
} else if (_local1 == 2) {
Pos[0] = Pos3[0];
Pos[1] = Pos3[1];
} else if (_local1 == 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("chaseShot", "chaseShot", ((mapWidth + 2) * (mapHeight + 2)) + 25);
wholemap.attachMovie("rocketShot", "rocketShot", ((mapWidth + 2) * (mapHeight + 2)) + 26);
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("cShotBossFinal", "cShotBossFinal", ((mapWidth + 2) * (mapHeight + 2)) + 46);
wholemap.attachMovie("rShotBossFinal", "rShotBossFinal", ((mapWidth + 2) * (mapHeight + 2)) + 47);
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 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, 49, 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, 39, 3, 3, 3, 3, 3, 39, 3, 3, 39, 3, 3, 3, 3, 3, 39, 3, 3, 3, 48, 0], [0, 51, 3, 3, 3, 3, 3, 3, 3, 3, 3, 39, 3, 3, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 39, 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, 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, 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, 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, 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, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 39, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 39, 39, 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, 51, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 51, 0], [0, 48, 39, 39, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 39, 39, 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, 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, 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, 39, 39, 39, 39, 39, 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, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 48, 0], [0, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 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 stageLabel = 10;
var tankNum = 2;
var tankE1Num = 0;
var tankE2Num = 0;
var tankSmallNum = 0;
var tankMiddleNum = 3;
var tankBossBNum = 4;
var tankBossNum = 4;
var tankBossCNum = 1;
var tankBossFinalNum = 1;
var manNum = 0;
var HLPNum = 0;
var HLPBNum = 0;
var HLPCNum = 5;
var HLPoursideNum = 0;
var timer = 0;
var enemySpace = 0;
var npcAIP = 200;
var shopEnd = false;
drawMap(myMap);
setChar();
getCharData.stageNum = stageLabel;
if ((wholemap.shotBossC || (wholemap.shotBossC2)) || (wholemap.shotBossC3)) {
removeMovieClip(wholemap.shotBossC);
removeMovieClip(wholemap.shotBossC2);
removeMovieClip(wholemap.shotBossC3);
}
setTankBossB();
setTankBossC();
setTankBoss();
setHLPC();
this.onEnterFrame = function () {
function upDateCHA() {
if (enemySpace > 0) {
var _local1 = random(10);
if (((_local1 == 0) && (tankNum > 0)) && (!wholemap.tankEnemy)) {
setTank();
enemySpace--;
} else if (((_local1 == 1) && (tankSmallNum > 0)) && (!wholemap.tankSmall)) {
setTankSmall();
enemySpace--;
} else if (((_local1 == 2) && (tankMiddleNum > 0)) && (!wholemap.tankMiddle)) {
setTankMiddle();
enemySpace--;
} else if (((_local1 == 3) && (tankE1Num > 0)) && (!wholemap.tankE1)) {
setTankE1();
enemySpace--;
} else if (((_local1 == 4) && (tankE2Num > 0)) && (!wholemap.tankE2)) {
setTankE2();
enemySpace--;
} else if (((_local1 == 5) && (manNum > 0)) && (!wholemap.man)) {
setMan();
enemySpace--;
} else if (((_local1 == 6) && (HLPNum > 0)) && (!wholemap.helicopter)) {
setHLP();
enemySpace--;
} else if (((_local1 == 7) && (tankBossNum > 0)) && (!wholemap.tankBoss)) {
settankBoss();
enemySpace--;
} else if (((_local1 == 8) && (HLPBNum > 0)) && (!wholemap.helicopterB)) {
setHLPB();
enemySpace--;
} else if (((_local1 == 9) && (HLPCNum > 0)) && (!wholemap.helicopterC)) {
setHLPC();
enemySpace--;
} else if (((_local1 == 7) && (tankBossBNum > 0)) && (!wholemap.tankBossB)) {
settankBossB();
enemySpace--;
} else if (((_local1 == 7) && (tankBossCNum > 0)) && (!wholemap.tankBossC)) {
settankBossC();
enemySpace--;
}
}
}
var _local1 = 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 ((_local1 >= 4) && (_local1 <= 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 ((_local1 >= 0) && (_local1 <= 1)) {
dropItem(wholemap.tankMiddle, "medicalBox");
} else if (_local1 == 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 ((_local1 >= 3) && (_local1 <= 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 ((_local1 >= 5) && (_local1 <= 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 ((_local1 >= 6) && (_local1 <= 7)) {
dropItem(wholemap.tankBoss, "addShotNum");
}
removeMovieClip(wholemap.tankBoss);
} else if (tankBossNum == 0) {
removeMovieClip(wholemap.tankBoss);
}
} else if (wholemap.tankBossB.aliveAfter == false) {
if (tankBossBNum > 0) {
tankBossBNum--;
enemySpace++;
if ((_local1 >= 6) && (_local1 <= 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.goldenTank.aliveAfter == false) {
removeMovieClip(wholemap.goldenTank);
}
if ((!wholemap.char) && (charNum > 0)) {
setChar();
charNum--;
} else if ((!wholemap.char) && (charNum == 0)) {
stageDoor.play();
stageDoor.stageDoor.stageText.gotoAndStop("gameover");
stageDoor.stageDoor.stageNum.gotoAndStop(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
} else if (stageDoor._currentFrame == 155) {
gotoAndPlay (194);
}
}
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(11);
bgm.stop("bgm1");
if (stageDoor._currentFrame == 13) {
showScore.gotoAndStop(2);
attachMovie("conBtn", "conBtn", 100);
saveData.gotoAndStop(2);
conBtn._x = 400;
conBtn._y = 340;
} else if (stageDoor._currentFrame == 60) {
gotoAndStop (340);
}
}
};
Frame 340
_quality = "HIGH";
stop();
this.onEnterFrame = function () {
if (_global.versionCode == "Chinese") {
showStaff.gotoAndStop(1);
} else if (_global.versionCode == "English") {
showStaff.gotoAndStop(2);
}
};
Symbol 12 MovieClip [levelUp_mc] Frame 1
this.onEnterFrame = function () {
if (_currentframe == _totalframes) {
removeMovieClip("");
}
};
Symbol 12 MovieClip [levelUp_mc] Frame 36
stop();
Symbol 17 MovieClip Frame 6
stop();
Symbol 18 MovieClip [shot-form1] Frame 1
stop();
Symbol 18 MovieClip [shot-form1] Frame 2
stop();
Symbol 21 MovieClip [shot-form2] Frame 1
stop();
Symbol 21 MovieClip [shot-form2] Frame 2
stop();
Symbol 31 MovieClip Frame 9
stop();
Symbol 32 MovieClip [shot-form3] Frame 1
stop();
Symbol 32 MovieClip [shot-form3] Frame 2
stop();
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
stop();
Symbol 36 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossC, form3);
};
Symbol 36 MovieClip [shotBossC3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 36 MovieClip [shotBossC3] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 37 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossB, form2);
};
Symbol 37 MovieClip [shotBossB3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 37 MovieClip [shotBossB3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 38 MovieClip [shotBossDA3] 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossD.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.tankBossD, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossD, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossD, form3);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossD, form3);
};
Symbol 38 MovieClip [shotBossDA3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 38 MovieClip [shotBossDA3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 39 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBoss, form3);
};
Symbol 39 MovieClip [shotBossA3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 39 MovieClip [shotBossA3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 40 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 _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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 + 100;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 160;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 300;
}
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.tankBossD, _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.tankBossD, _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.tankBossD, _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.tankBossD, _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 40 MovieClip [shotA3] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 40 MovieClip [shotA3] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 40 MovieClip [shotA3] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 41 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossC, form3);
};
Symbol 41 MovieClip [shotBossC2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 41 MovieClip [shotBossC2] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 42 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossB, form2);
};
Symbol 42 MovieClip [shotBossB2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 42 MovieClip [shotBossB2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 43 MovieClip [shotBossDA2] 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossD.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.tankBossD, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossD, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossD, form3);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossD, form3);
};
Symbol 43 MovieClip [shotBossDA2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 43 MovieClip [shotBossDA2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 44 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBoss, form3);
};
Symbol 44 MovieClip [shotBossA2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 44 MovieClip [shotBossA2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 45 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 _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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();
}
}
}
_x = shotX;
_y = shotY;
if (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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 + 100;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 160;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 300;
}
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.tankBossD, _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.tankBossD, _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.tankBossD, _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.tankBossD, _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 45 MovieClip [shotA2] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 45 MovieClip [shotA2] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 45 MovieClip [shotA2] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 46 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossFinal.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossFinal, form1);
};
Symbol 46 MovieClip [shotBossFinal] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 46 MovieClip [shotBossFinal] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 47 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossC.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossC, form3);
};
Symbol 47 MovieClip [shotBossC] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 47 MovieClip [shotBossC] Frame 3
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 48 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossB.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossB, form2);
};
Symbol 48 MovieClip [shotBossB] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 48 MovieClip [shotBossB] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 49 MovieClip [shotBossD] 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBossD.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.tankBossD, form3);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossD, form3);
}
HitTank(_root.wholemap.HLPourside, _root.wholemap.tankBossD, form3);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossD, form3);
};
Symbol 49 MovieClip [shotBossD] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 49 MovieClip [shotBossD] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 50 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");
var tObj = this;
gotoAndStop("form" + _root.wholemap.tankBoss.formLevel);
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBoss, form3);
};
Symbol 50 MovieClip [shotBoss] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 50 MovieClip [shotBoss] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 2
stop();
Symbol 54 MovieClip [rShotBossFinal] Frame 1
stop();
var speed = 0;
var Power = 350;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
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");
var moveWay = (new physics.AceRun(this));
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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;
moveWay.runEnd();
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
}
if (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - moveWay.run();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + moveWay.run();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - moveWay.run();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + moveWay.run();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.tankBossFinal, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossFinal, form1);
}
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossFinal, form1);
};
Symbol 55 MovieClip [rShotBossD] Frame 1
stop();
var speed = 0;
var Power = 350;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
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");
var moveWay = (new physics.AceRun(this));
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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;
moveWay.runEnd();
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
}
if (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - moveWay.run();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + moveWay.run();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - moveWay.run();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + moveWay.run();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.tankBossD, form1);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, _root.wholemap.tankBossD, form1);
}
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossD, form1);
};
Symbol 56 MovieClip [rocketShot] Frame 1
stop();
var speed = 0;
var Power = 350;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se1_snd = new Sound();
se1_snd.attachSound("boom");
se2_snd = new Sound();
se2_snd.attachSound("dragon");
var moveWay = (new physics.AceRun(this));
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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;
moveWay.runEnd();
noHit = true;
if (seTimer == 0) {
seTimer = 12;
se2_snd.start();
}
}
}
if (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - moveWay.run();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + moveWay.run();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - moveWay.run();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + moveWay.run();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
_parent._parent.score = _parent._parent.score + 50;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.char.chaShotNum >= 0) {
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.tankBossD, _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 {
removeMovieClip(this);
}
};
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 65 MovieClip [cShotGoldenTank] Frame 1
stop();
var speed = 12;
var Power = 200;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
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");
var chaser = (new physics.ChaseRun(this));
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
tankShot(_root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankEnemy, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankE1, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankE2, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankBoss, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankBossB, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankBossC, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankBossD, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankBossFinal, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankSmall, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.tankMiddle, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.man, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.helicopter, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.helicopterB, _root.wholemap.goldenTank, form1);
HitTank(_root.wholemap.helicopterC, _root.wholemap.goldenTank, form1);
};
Symbol 66 MovieClip [cShotBossFinal] Frame 1
stop();
var speed = 12;
var Power = 200;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
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");
var chaser = (new physics.ChaseRun(this));
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run2();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run2();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run2();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run2();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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();
}
}
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankBossFinal, form1);
};
Symbol 67 MovieClip [chaseShot] Frame 1
stop();
var speed = 12;
var Power = 200;
var shotOut = false;
var noHit = true;
var shotTimer = 36;
var seTimer = 0;
var shotX = _x;
var shotY = _y;
var shotSwitch = false;
se2_snd = new Sound();
se2_snd.attachSound("se_m005");
var chaser = (new physics.ChaseRun(this));
this.onEnterFrame = function () {
function tankShot(myTank, formN) {
var _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < 47)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
chaser.run();
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= 47)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else if (noHit == false) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 36;
}
} else {
formN.gotoAndStop(1);
}
}
}
function HitTank(otherTank, myTank, formN) {
if ((formN._currentframe == 1) && (_visible == true)) {
if (hitTest(otherTank)) {
noHit = false;
_parent._parent.score = _parent._parent.score + 50;
if ((myTank.alive == true) && (otherTank.alive == true)) {
otherTank.nowBlood = otherTank.nowBlood - Power;
se1_snd.start();
}
}
}
}
if (_root.wholemap.char.chaShotNum >= 0) {
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.tankBossD, _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 {
removeMovieClip(this);
}
};
Symbol 68 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 _local4 = Math.floor(shotX / _parent._parent.tileW);
var _local5 = Math.floor(shotY / _parent._parent.tileH);
var _local6 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local8 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local7 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local9 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if ((((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if ((((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if ((((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if ((((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] < _parent._parent.notPassTile)) && (formN.xiaoshi._currentframe < 3)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local6][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local8][_local4] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local5][_local7] >= _parent._parent.notPassTile)) {
formN.gotoAndStop(2);
if (formN.xiaoshi._currentframe > 3) {
shotOut = false;
shotSwitch = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local5][_local9] >= _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 + 100;
} else if (myTank.formLevel == 3) {
_parent._parent.score = _parent._parent.score + 160;
} else if (myTank.formLevel == 4) {
_parent._parent.score = _parent._parent.score + 300;
}
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.tankBossD, _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.tankBossD, _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.tankBossD, _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.tankBossD, _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 68 MovieClip [shot] Frame 2
stop();
var shotSpeed = 18;
var Power = 50;
Symbol 68 MovieClip [shot] Frame 3
stop();
var shotSpeed = 18;
var Power = 80;
Symbol 68 MovieClip [shot] Frame 4
stop();
var shotSpeed = 18;
var Power = 150;
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 2
stop();
Symbol 133 MovieClip Frame 3
stop();
Symbol 133 MovieClip Frame 4
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 3
stop();
Symbol 138 MovieClip Frame 4
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 3
stop();
Symbol 143 MovieClip Frame 4
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 4
stop();
Symbol 149 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 = 5;
var calWidth = 28;
var calHeight = 28;
var HLPoursideNum = 0;
var goldenTankNum = 0;
var chaShotNum = 1;
var rocShotNum = 1;
var screenPos = (new SimpleType.Point(_x + _parent._x, _y + _parent._y));
formLevel = _parent._parent.getCharData.formLevelSave;
shotOnceNum = _parent._parent.getCharData.shotOnceNumSave;
HLPoursideNum = _parent._parent.getCharData.HLPoursideNum;
goldenTankNum = _parent._parent.getCharData.goldenTankNum;
chaShotNum = _parent._parent.getCharData.chaShotNum;
rocShotNum = _parent._parent.getCharData.rocShotNum;
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 = _parent._parent.getCharData.nowBlood;
Symbol 149 MovieClip [char] Frame 2
stop();
var k1 = (new SimpleType.KeyPress());
var k2 = (new SimpleType.KeyPress());
var k3 = (new SimpleType.KeyPress());
var upK = _parent._parent.upK;
var downK = _parent._parent.downK;
var leftK = _parent._parent.leftK;
var rightK = _parent._parent.rightK;
var shotK = _parent._parent.shotK;
var effectK = _parent._parent.effectK;
var selectK = _parent._parent.selectK;
var keyAvailable = true;
var se_snd = new Sound();
se_snd.attachSound("selectMagic");
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 _local7;
var noscroll = 1;
screenPos.xP = _x + _parent._x;
screenPos.yP = _y + _parent._y;
if (alive == true) {
if (Key.isDown(upK)) {
y = y - speed;
_local7 = "up";
noscroll = 0;
_rotation = 0;
} else if (Key.isDown(downK)) {
y = y + speed;
_local7 = "down";
noscroll = 0;
_rotation = 180;
} else if (Key.isDown(leftK)) {
x = x - speed;
_local7 = "left";
noscroll = 0;
_rotation = -90;
} else if (Key.isDown(rightK)) {
x = x + speed;
_local7 = "right";
noscroll = 0;
_rotation = 90;
}
if (k1.checkPress(shotK) && (keyAvailable)) {
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;
}
} else if (k2.checkPress(effectK) && (keyAvailable)) {
if (((_root.wholemap.chaseShot.shotSwitch == false) && (_root.showSP._currentframe == 3)) && (chaShotNum > 0)) {
_root.wholemap.chaseShot.shotSwitch = true;
chaShotNum--;
} else if (((_root.wholemap.rocketShot.shotSwitch == false) && (_root.showSP._currentframe == 2)) && (rocShotNum > 0)) {
_root.wholemap.rocketShot.shotSwitch = true;
rocShotNum--;
} else if (((!_root.wholemap.HLPourside) && (_root.showSP._currentframe == 1)) && (HLPoursideNum > 0)) {
_root.setOurHLP();
HLPoursideNum--;
} else if (((!_root.wholemap.goldenTank) && (_root.showSP._currentframe == 4)) && (goldenTankNum > 0)) {
_root.setGoldenTank();
goldenTankNum--;
}
} else if (k3.checkPress(selectK)) {
if (_root.showSP._currentframe < _root.showSP._totalframes) {
_root.showSP.nextFrame();
se_snd.start();
} else {
_root.showSP.gotoAndStop(1);
se_snd.start();
}
}
}
trace(chaShotNum);
var _local9 = Math.floor(x / _parent._parent.tileW);
var _local8 = Math.floor(y / _parent._parent.tileH);
var _local3 = Math.floor((y - (calHeight / 2)) / _parent._parent.tileH);
var _local5 = Math.floor(((y + (calHeight / 2)) - 1) / _parent._parent.tileH);
var _local4 = Math.floor((x - (calWidth / 2)) / _parent._parent.tileW);
var _local6 = Math.floor(((x + (calWidth / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local3][_local4] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local3][_local6] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
noscroll = 1;
}
if ((_parent._parent.myMap[_local5][_local4] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local5][_local6] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
noscroll = 1;
}
if ((_parent._parent.myMap[_local5][_local4] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local3][_local4] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
noscroll = 1;
}
if ((_parent._parent.myMap[_local5][_local6] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local3][_local6] > _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(_local7);
}
_x = x;
_y = y;
cannotHurtChar();
if (formLevel == 1) {
totalBlood = 100;
_root.lifeBar.gotoAndStop(1);
lifeBarLength = 30;
gotoAndStop ("form1");
hurtAction(form1);
} else if (formLevel == 2) {
totalBlood = 200;
_root.lifeBar.gotoAndStop(2);
lifeBarLength = 60;
gotoAndStop ("form2");
hurtAction(form2);
} else if (formLevel == 3) {
totalBlood = 300;
_root.lifeBar.gotoAndStop(3);
lifeBarLength = 90;
gotoAndStop ("form3");
hurtAction(form3);
} else if (formLevel == 4) {
totalBlood = 400;
_root.lifeBar.gotoAndStop(4);
lifeBarLength = 120;
gotoAndStop ("form4");
hurtAction(form4);
}
_root.lifeBar.lifeBar._xscale = lifeBarLength * (nowBlood / totalBlood);
};
Symbol 149 MovieClip [char] Frame 3
stop();
Symbol 149 MovieClip [char] Frame 4
stop();
Symbol 149 MovieClip [char] Frame 5
stop();
Symbol 156 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 = 4;
Symbol 156 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();
stop();
this.onEnterFrame = function () {
x = _x;
y = _y;
var _local7;
var _local10 = 0;
if (timer == 0) {
AI = random(500);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
_local7 = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
_local7 = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
_local7 = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
_local7 = "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 _local9 = Math.floor(x / _parent._parent.tileW);
var _local8 = Math.floor(y / _parent._parent.tileH);
var _local3 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local5 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local4 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local6 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local3][_local4] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local5][_local6] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local3][_local4] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local5][_local6] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 156 MovieClip [HLPourside] Frame 3
stop();
Symbol 156 MovieClip [HLPourside] Frame 4
stop();
Symbol 157 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 157 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 _local7;
var _local10 = 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;
_local7 = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
_local7 = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
_local7 = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
_local7 = "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 _local9 = Math.floor(x / _parent._parent.tileW);
var _local8 = Math.floor(y / _parent._parent.tileH);
var _local3 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local5 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local4 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local6 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local3][_local4] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local5][_local6] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local3][_local4] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local5][_local6] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 157 MovieClip [helicopterC] Frame 3
stop();
Symbol 157 MovieClip [helicopterC] Frame 4
stop();
Symbol 158 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 = 6;
Symbol 158 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 _local7;
var _local10 = 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;
_local7 = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
_local7 = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
_local7 = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
_local7 = "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 _local9 = Math.floor(x / _parent._parent.tileW);
var _local8 = Math.floor(y / _parent._parent.tileH);
var _local3 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local5 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local4 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local6 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local3][_local4] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local5][_local6] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local3][_local4] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local5][_local6] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 158 MovieClip [helicopterB] Frame 3
stop();
Symbol 158 MovieClip [helicopterB] Frame 4
stop();
Symbol 159 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 = 4;
Symbol 159 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 _local7;
var _local10 = 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;
_local7 = "up";
_rotation = 0;
} else if ((AI >= 50) && (AI < 75)) {
y = y + speed;
_local7 = "down";
_rotation = 180;
} else if ((AI >= 100) && (AI < 125)) {
x = x - speed;
_local7 = "left";
_rotation = -90;
} else if ((AI >= 150) && (AI < 175)) {
x = x + speed;
_local7 = "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 _local9 = Math.floor(x / _parent._parent.tileW);
var _local8 = Math.floor(y / _parent._parent.tileH);
var _local3 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local5 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local4 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local6 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local3][_local4] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local5][_local6] > 47)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local5][_local4] > 47) || (_parent._parent.myMap[_local3][_local4] > 47)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local5][_local6] > 47) || (_parent._parent.myMap[_local3][_local6] > 47)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
};
Symbol 159 MovieClip [helicopter] Frame 3
stop();
Symbol 159 MovieClip [helicopter] Frame 4
stop();
Symbol 162 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 162 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 162 MovieClip [tankSmall] Frame 3
stop();
Symbol 162 MovieClip [tankSmall] Frame 4
stop();
Symbol 165 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 165 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 165 MovieClip [tankE2] Frame 3
stop();
Symbol 165 MovieClip [tankE2] Frame 4
stop();
Symbol 168 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 168 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 168 MovieClip [tankE1] Frame 3
stop();
Symbol 168 MovieClip [tankE1] Frame 4
stop();
Symbol 174 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;
var calWidth = 28;
var calHeight = 28;
Symbol 174 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (calHeight / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (calHeight / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (calWidth / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (calWidth / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 174 MovieClip [tankMiddle] Frame 3
stop();
Symbol 174 MovieClip [tankMiddle] Frame 4
stop();
Symbol 177 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 177 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "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 _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
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 177 MovieClip [tankBossB] Frame 3
stop();
Symbol 177 MovieClip [tankBossB] Frame 4
stop();
Symbol 178 MovieClip [tankBossFinal] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 1600;
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 178 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();
var sT = (new SimpleType.Timer());
var sT2 = (new SimpleType.Timer());
var ran = 24;
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 _local8;
var _local11 = 0;
if (timer == 0) {
AI = random(500);
timer = 10;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 25)) {
y = y - speed;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "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;
}
if (!sT2.loTimer(96)) {
ran = (Math.random() * 97) + 12;
}
if (!sT.loTimer(ran)) {
if ((Math.floor(Math.random() * 2) == 0) && (_root.wholemap.cShotBossFinal.shotSwitch == false)) {
_root.wholemap.cShotBossFinal.shotSwitch = true;
} else if ((Math.floor(Math.random() * 2) == 1) && (_root.wholemap.rShotBossFinal.shotSwitch == false)) {
_root.wholemap.rShotBossFinal.shotSwitch = true;
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
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 178 MovieClip [tankBossFinal] Frame 3
stop();
Symbol 178 MovieClip [tankBossFinal] Frame 4
stop();
Symbol 181 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 181 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "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 _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
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 181 MovieClip [tankBossC] Frame 3
stop();
Symbol 181 MovieClip [tankBossC] Frame 4
stop();
Symbol 184 MovieClip [tankBossD] 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 184 MovieClip [tankBossD] 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();
var sT = (new SimpleType.Timer());
var sT2 = (new SimpleType.Timer());
var ran = 24;
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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (_root.wholemap.shotBossD.shotSwitch == false) {
_root.wholemap.shotBossD.shotSwitch = true;
} else if (_root.wholemap.shotBossDA2.shotSwitch == false) {
_root.wholemap.shotBossDA2.shotSwitch = true;
} else if (_root.wholemap.shotBossDA3.shotSwitch == false) {
_root.wholemap.shotBossDA3.shotSwitch = true;
}
if (!sT2.loTimer(96)) {
ran = (Math.random() * 97) + 12;
}
if (!sT.loTimer(ran)) {
if (_root.wholemap.rShotBossD.shotSwitch == false) {
_root.wholemap.rShotBossD.shotSwitch = true;
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
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 184 MovieClip [tankBossD] Frame 3
stop();
Symbol 184 MovieClip [tankBossD] Frame 4
stop();
Symbol 185 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 185 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "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 _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
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 185 MovieClip [tankBoss] Frame 3
stop();
Symbol 185 MovieClip [tankBoss] Frame 4
stop();
Symbol 191 MovieClip [goldenTank] Frame 1
var timer = 0;
var bloodTimer = 0;
var totalBlood = 200;
var nowBlood = totalBlood;
var alive = true;
var aliveAfter = true;
var shotSpeed = 18;
var Ftimer = 0;
var speed = 4;
var hitOthers = false;
Symbol 191 MovieClip [goldenTank] 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();
var sT = (new SimpleType.Timer());
var sT2 = (new SimpleType.Timer());
var ran = 24;
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 _local8;
var _local11 = 0;
if (timer == 0) {
AI = random(_parent._parent.npcAIP);
timer = 30;
}
if (timer > 0) {
timer--;
}
if (alive == true) {
if ((AI >= 0) && (AI < 40)) {
y = y - speed;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 40) && (AI < 80)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 80) && (AI < 120)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 120) && (AI < 160)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 160) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
if (!sT2.loTimer(96)) {
ran = (Math.random() * 97) + 12;
}
if (!sT.loTimer(ran)) {
if (_root.wholemap.cShotGoldenTank.shotSwitch == false) {
_root.wholemap.cShotGoldenTank.shotSwitch = true;
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 191 MovieClip [goldenTank] Frame 3
stop();
Symbol 191 MovieClip [goldenTank] Frame 4
stop();
Symbol 192 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 192 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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
x = x - speed;
_rotation = -90;
}
_x = x;
_y = y;
if (nowBlood <= 0) {
nowBlood = 0;
gotoAndStop ("Dead");
alive = false;
if (Dead._currentframe == 9) {
aliveAfter = false;
}
} else {
if ((bloodTimer > 0) && ((nowBlood - tempBlood) < 0)) {
gotoAndStop ("hurt");
bloodTimer--;
} else {
gotoAndStop ("normal");
}
if (bloodTimer == 0) {
tempBlood = nowBlood;
bloodTimer = 8;
}
}
HitTank(_root.wholemap.char);
};
Symbol 192 MovieClip [tankEnemy] Frame 3
stop();
Symbol 192 MovieClip [tankEnemy] Frame 4
stop();
Symbol 194 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankE1);
};
Symbol 194 MovieClip [slugE1] Frame 2
stop();
Symbol 195 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.man);
};
Symbol 195 MovieClip [slug] Frame 2
stop();
Symbol 198 MovieClip [HLP-shot-ourside] Frame 1
function findAim(destx, desty) {
var _local1 = 18;
if ((x - destx) > 0) {
x = x - _local1;
} else if ((x - destx) < 0) {
x = x + _local1;
}
if ((y - desty) > 0) {
y = y - _local1;
} else if ((y - desty) < 0) {
y = y + _local1;
}
_x = x;
_y = y;
}
stop();
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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] > 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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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.tankBossD, _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 198 MovieClip [HLP-shot-ourside] Frame 2
stop();
Symbol 199 MovieClip [HLP-shotC] Frame 1
function findAim(destx, desty) {
var _local1 = 6;
if ((x - destx) > 0) {
x = x - _local1;
} else if ((x - destx) < 0) {
x = x + _local1;
}
if ((y - desty) > 0) {
y = y - _local1;
} else if ((y - desty) < 0) {
y = y + _local1;
}
_x = x;
_y = y;
}
stop();
var myHLP = _root.wholemap.helicopterC;
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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] > 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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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(myHLP, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, myHLP);
}
HitTank(_root.wholemap.HLPourside, myHLP);
HitTank(_root.wholemap.goldenTank, myHLP);
};
Symbol 199 MovieClip [HLP-shotC] Frame 2
stop();
Symbol 200 MovieClip [HLP-shotB] Frame 1
function findAim(destx, desty) {
var _local1 = 6;
if ((x - destx) > 0) {
x = x - _local1;
} else if ((x - destx) < 0) {
x = x + _local1;
}
if ((y - desty) > 0) {
y = y - _local1;
} else if ((y - desty) < 0) {
y = y + _local1;
}
_x = x;
_y = y;
}
stop();
var myHLP = _root.wholemap.helicopterB;
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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] > 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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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(myHLP, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, myHLP);
}
HitTank(_root.wholemap.HLPourside, myHLP);
HitTank(_root.wholemap.goldenTank, myHLP);
};
Symbol 200 MovieClip [HLP-shotB] Frame 2
stop();
Symbol 201 MovieClip [HLP-shot] Frame 1
function findAim(destx, desty) {
var _local1 = 6;
if ((x - destx) > 0) {
x = x - _local1;
} else if ((x - destx) < 0) {
x = x + _local1;
}
if ((y - desty) > 0) {
y = y - _local1;
} else if ((y - desty) < 0) {
y = y + _local1;
}
_x = x;
_y = y;
}
stop();
var myHLP = _root.wholemap.helicopter;
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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < 48)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < 48)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < 48)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < 48)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] > 47)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 8;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] > 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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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(myHLP, true);
if (_root.wholemap.char.cannotHurt == false) {
HitTank(_root.wholemap.char, myHLP);
}
HitTank(_root.wholemap.HLPourside, myHLP);
HitTank(_root.wholemap.goldenTank, myHLP);
};
Symbol 201 MovieClip [HLP-shot] Frame 2
stop();
Symbol 203 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankE2);
};
Symbol 203 MovieClip [shot-tankE2] Frame 2
stop();
Symbol 205 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankSmall);
};
Symbol 205 MovieClip [shot-tankSmall] Frame 2
stop();
Symbol 207 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
function HitTank(otherTank, myTank) {
if (_currentframe == 1) {
if (hitTest(otherTank.hurtArea)) {
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankMiddle);
};
Symbol 207 MovieClip [shot-tankMiddle] Frame 2
stop();
Symbol 208 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");
var tObj = this;
this.onEnterFrame = function () {
function tankShot(myTank, shotSwitch) {
var _local3 = Math.floor(shotX / _parent._parent.tileW);
var _local4 = Math.floor(shotY / _parent._parent.tileH);
var _local5 = Math.floor((shotY - (_height / 2)) / _parent._parent.tileH);
var _local7 = Math.floor(((shotY + (_height / 2)) - 1) / _parent._parent.tileH);
var _local6 = Math.floor((shotX - (_width / 2)) / _parent._parent.tileW);
var _local8 = 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 (shotSwitch == true) {
if (shotTimer > 0) {
shotTimer--;
}
if (shotTimer == 0) {
noHit = false;
}
_x = shotX;
_y = shotY;
if (((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY - shotSpeed;
} else if (((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] < _parent._parent.notPassTile)) && (noHit == true)) {
shotY = shotY + shotSpeed;
} else if (((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX - shotSpeed;
} else if (((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] < _parent._parent.notPassTile)) && (noHit == true)) {
shotX = shotX + shotSpeed;
}
if ((shotDir == "up") && (_parent._parent.myMap[_local5][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "down") && (_parent._parent.myMap[_local7][_local3] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "left") && (_parent._parent.myMap[_local4][_local6] >= _parent._parent.notPassTile)) {
gotoAndStop (2);
if (xiaoshi._currentframe == 6) {
shotOut = false;
shotTimer = 24;
}
} else if ((shotDir == "right") && (_parent._parent.myMap[_local4][_local8] >= _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);
}
}
if ((!myTank) && (shotOut == false)) {
removeMovieClip(tObj);
}
}
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);
HitTank(_root.wholemap.goldenTank, _root.wholemap.tankEnemy);
};
Symbol 208 MovieClip [shot2] Frame 2
stop();
Symbol 233 MovieClip Frame 35
stop();
Symbol 234 MovieClip [man] Frame 1
function findAim(destx, desty) {
var _local1 = 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 - _local1;
_rotation = -90;
} else if (turnRight == true) {
x = x + _local1;
_rotation = 90;
} else if (turnUp == true) {
y = y - _local1;
_rotation = 0;
} else if (turnDown == true) {
y = y + _local1;
_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 _local8;
var _local11 = 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;
_local8 = "up";
_rotation = 0;
} else if ((AI >= 25) && (AI < 50)) {
y = y + speed;
_local8 = "down";
_rotation = 180;
} else if ((AI >= 50) && (AI < 75)) {
x = x - speed;
_local8 = "left";
_rotation = -90;
} else if ((AI >= 75) && (AI < 100)) {
x = x + speed;
_local8 = "right";
_rotation = 90;
} else if ((AI >= 100) && (AI < _parent._parent.npcAIP)) {
findAim(_root.wholemap.char._x, _root.wholemap.char._y);
}
}
var _local10 = Math.floor(x / _parent._parent.tileW);
var _local9 = Math.floor(y / _parent._parent.tileH);
var _local4 = Math.floor((y - (_height / 2)) / _parent._parent.tileH);
var _local6 = Math.floor(((y + (_height / 2)) - 1) / _parent._parent.tileH);
var _local5 = Math.floor((x - (_width / 2)) / _parent._parent.tileW);
var _local7 = Math.floor(((x + (_width / 2)) - 1) / _parent._parent.tileW);
if ((_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _parent._parent.canPassTile)) {
y = y + speed;
_rotation = 180;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile)) {
y = y - speed;
_rotation = 0;
}
if ((_parent._parent.myMap[_local6][_local5] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local5] > _parent._parent.canPassTile)) {
x = x + speed;
_rotation = 90;
}
if ((_parent._parent.myMap[_local6][_local7] > _parent._parent.canPassTile) || (_parent._parent.myMap[_local4][_local7] > _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 234 MovieClip [man] Frame 2
stop();
Symbol 237 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.hurtArea) && (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 240 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 242 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 245 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 251 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.wholemap.char.HLPoursideNum++;
_parent._parent.score = _parent._parent.score + 300;
se_snd.start();
hasLoaded = true;
}
}
itemLoaded(_root.wholemap.char);
if (hasLoaded == true) {
removeMovieClip(this);
}
};
Symbol 279 Button
on (release) {
_root.shopEnd = true;
_root.wholemap.char.keyAvailable = true;
delete _root.shopCt.shop.onEnterFrame;
_root.shopCt.shop.removeMovieClip();
}
Symbol 282 MovieClip Frame 1
function addLifeNum() {
if (_root.score >= 5000) {
_root.charNum++;
_root.score = _root.score - 5000;
se_snd.start();
msg.text = "YOU HAVE BOUGHT 1 LIFE!";
} else if (_root.score < 5000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function addShotNum() {
if ((_root.score >= 4000) && (_root.wholemap.char.shotOnceNum < 3)) {
_root.wholemap.char.shotOnceNum++;
_root.score = _root.score - 4000;
se_snd.start();
msg.text = " YOU HAVE INCREASED YOUR SHOT LEVEL!";
} else if (_root.score < 4000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
} else if (_root.wholemap.char.shotOnceNum >= 3) {
msg.text = " YOU CANNOT INCREASE YOUR SHOT LEVEL!";
}
}
function addHLPNum() {
if (_root.score >= 4000) {
_root.wholemap.char.HLPoursideNum++;
_root.score = _root.score - 4000;
se_snd.start();
msg.text = "YOU HAVE BOUGHT 1 HELICOPTER!";
} else if (_root.score < 4000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function addGoldTankNum() {
if (_root.score >= 6000) {
_root.wholemap.char.goldenTankNum++;
_root.score = _root.score - 6000;
se_snd.start();
msg.text = "YOU HAVE BOUGHT 1 GOLDEN TANK!";
} else if (_root.score < 6000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function addPower() {
if ((_root.score >= 6000) && (_root.wholemap.char.formLevel < 4)) {
_root.wholemap.char.formLevel++;
_root.score = _root.score - 6000;
se_snd.start();
msg.text = "YOU HAVE INCREASED YOUR POWER LEVEL!";
} else if (_root.score < 6000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
} else if (_root.wholemap.char.formLevel >= 4) {
msg.text = " YOU CANNOT INCREASE YOUR POWER LEVEL!";
}
}
function recoverHP() {
if (_root.score >= 1000) {
var _local2 = 200;
if (_root.wholemap.char.nowBlood < _root.wholemap.char.totalBlood) {
if ((_root.wholemap.char.nowBlood + _local2) >= _root.wholemap.char.totalBlood) {
_root.wholemap.char.nowBlood = _root.wholemap.char.nowBlood + (_root.wholemap.char.totalBlood - wholemap.char.nowBlood);
} else {
_root.wholemap.char.nowBlood = _root.wholemap.char.nowBlood + _local2;
}
_root.score = _root.score - 1000;
se_snd.start();
msg.text = "YOU HAVE BOUNGHT 1 MEDICAL BOX!";
} else {
msg.text = " YOUR HP IS FULL!";
}
} else if (_root.score < 1000) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function addRockNum() {
if (_root.score >= 500) {
_root.wholemap.char.rocShotNum++;
_root.score = _root.score - 500;
se_snd.start();
msg.text = "YOU HAVE BOUNGHT 1 ROCKET MISSILE!";
} else if (_root.score < 500) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function addMissNum() {
if (_root.score >= 500) {
_root.wholemap.char.chaShotNum++;
_root.score = _root.score - 500;
se_snd.start();
msg.text = "YOU HAVE BOUNGHT 1 GUIDED MISSILE!";
} else if (_root.score < 500) {
msg.text = " YOU DONNOT HAVE ENOUGH SCORE POINT!";
}
}
function hitItem() {
if (selectRc.hitTest(addS)) {
nowBuy = "addS";
addShotNum();
} else if (selectRc.hitTest(pB)) {
nowBuy = "pB";
addPower();
} else if (selectRc.hitTest(HLP)) {
nowBuy = "HLP";
addHLPNum();
} else if (selectRc.hitTest(addL)) {
nowBuy = "addL";
addLifeNum();
} else if (selectRc.hitTest(medi)) {
nowBuy = "medi";
recoverHP();
} else if (selectRc.hitTest(rock)) {
nowBuy = "rock";
addRockNum();
} else if (selectRc.hitTest(miss)) {
nowBuy = "miss";
addMissNum();
} else if (selectRc.hitTest(gold)) {
nowBuy = "gold";
addGoldTankNum();
}
}
_quality = "HIGH";
var contin = false;
var kT1 = (new SimpleType.KeyPress());
var kT2 = (new SimpleType.KeyPress());
var kT3 = (new SimpleType.KeyPress());
var kT4 = (new SimpleType.KeyPress());
var kT5 = (new SimpleType.KeyPress());
var nowBuy = "";
se_snd = new Sound();
se_snd.attachSound("se_g008");
se_snd2 = new Sound();
se_snd2.attachSound("selectMagic");
if (_root.wholemap.HLPourside) {
_root.wholemap.char.HLPoursideNum++;
removeMovieClip(_root.wholemap.HLPourside);
}
if (_root.wholemap.goldenTank) {
_root.wholemap.char.goldenTankNum++;
removeMovieClip(_root.wholemap.goldenTank);
}
_root.wholemap.char.keyAvailable = false;
this.onEnterFrame = function () {
if (kT1.checkPress(_root.upK)) {
if (selectRc._y > 80) {
selectRc._y = selectRc._y - 50;
se_snd2.start();
}
} else if (kT2.checkPress(_root.downK)) {
if (selectRc._y < 230) {
selectRc._y = selectRc._y + 50;
se_snd2.start();
}
} else if (kT3.checkPress(_root.leftK)) {
if (selectRc._x > 62) {
selectRc._x = selectRc._x - 230;
se_snd2.start();
}
} else if (kT4.checkPress(_root.rightK)) {
if (selectRc._x < 292) {
selectRc._x = selectRc._x + 230;
se_snd2.start();
}
}
if (kT5.checkPress(_root.shotK)) {
hitItem();
}
};
Symbol 283 MovieClip [shop] Frame 10
stop();
Symbol 287 Button
on (release) {
_root.gotoAndStop("stage1");
}
Symbol 289 MovieClip [saveData] Frame 1
stop();
Symbol 289 MovieClip [saveData] Frame 2
var formLevelSave = wholemap.char.formLevel;
var shotOnceNumSave = wholemap.char.shotOnceNum;
var HLPoursideNum = wholemap.char.HLPoursideNum;
var goldenTankNum = wholemap.char.goldenTankNum;
var chaShotNum = wholemap.char.chaShotNum;
var rocShotNum = wholemap.char.rocShotNum;
var nowBlood = wholemap.char.nowBlood;
var totalBlood = wholemap.char.totalBlood;
Symbol 481 MovieClip [__Packages.physics.AceRun] Frame 0
class physics.AceRun
{
var myShot, clickable, inter, sp, enemy;
function AceRun (pC) {
myShot = pC;
clickable = true;
inter = new SimpleType.Timer();
sp = myShot.speed;
trace("AceRun");
}
function onAttack() {
setInterval(run, 25);
}
function getAngle() {
if (enemy != undefined) {
var _local3 = enemy._x - myShot._x;
var _local2 = enemy._y - myShot._y;
return((((Math.atan2(_local2, _local3) * 180) / Math.PI) + 450) % 360);
}
return(myShot._rotation);
}
function turnAngle(angle) {
var _local2 = myShot._rotation;
if ((_local2 - angle) > 180) {
_local2 = _local2 - 360;
} else if ((angle - _local2) > 180) {
angle = angle - 360;
}
if (Math.abs(_local2 - angle) <= 180) {
if ((_local2 - angle) <= 0) {
_local2 = _local2 + turnSp;
} else if ((_local2 - angle) > 0) {
_local2 = _local2 - turnSp;
}
}
return(_local2);
}
function run() {
if (sp < 30) {
sp = sp + a;
}
trace("sp:" + sp);
return(sp);
}
function runEnd() {
sp = myShot.speed;
trace("runEnd");
}
function setAim() {
var _local5 = Math.floor(Math.random() * 3);
var _local3 = new Array();
for (var _local4 in _root.wholemap) {
if ((_root.wholemap[_local4]._name.substr(0, 2) == "ta") || (_root.wholemap[_local4]._name.substr(0, 2) == "he")) {
_local3.push(_root.wholemap[_local4]);
trace(_local3[_local3.length - 1]);
}
}
trace(_local3);
enemy = _local3[_local5];
trace((((("enemy:" + enemy) + ",") + _local5) + ",") + _local3[_local5]);
}
var turnSp = 45;
var a = 2;
}
Symbol 482 MovieClip [__Packages.SimpleType.Timer] Frame 0
class SimpleType.Timer
{
var timer;
function Timer () {
timer = 0;
}
function loTimer(tTop) {
if (timer >= tTop) {
timer = 0;
return(false);
}
timer++;
return(true);
}
function inTimer(tTop) {
if (timer >= tTop) {
return(false);
}
timer++;
return(true);
}
function clrTimer() {
timer = 0;
}
}
Symbol 483 MovieClip [__Packages.physics.ChaseRun] Frame 0
class physics.ChaseRun
{
var myShot, clickable, inter, sp, enemy, inter2;
function ChaseRun (pC) {
myShot = pC;
clickable = true;
inter = new SimpleType.Timer();
sp = myShot.speed;
}
function onAttack() {
setInterval(run, 25);
}
function getAngle() {
if (enemy != undefined) {
var _local3 = enemy._x - myShot._x;
var _local2 = enemy._y - myShot._y;
return((((Math.atan2(_local2, _local3) * 180) / Math.PI) + 450) % 360);
}
return(myShot._rotation);
}
function turnAngle(angle) {
var _local2 = myShot._rotation;
if ((_local2 - angle) > 180) {
_local2 = _local2 - 360;
} else if ((angle - _local2) > 180) {
angle = angle - 360;
}
if (Math.abs(_local2 - angle) <= 180) {
if ((_local2 - angle) <= 0) {
_local2 = _local2 + turnSp;
} else if ((_local2 - angle) > 0) {
_local2 = _local2 - turnSp;
}
}
return(_local2);
}
function run() {
if (!inter.loTimer(5)) {
var _local2 = getAngle();
myShot._rotation = turnAngle(_local2);
}
if (!inter2.loTimer(36)) {
setAim();
}
myShot.shotX = myShot.shotX + (sp * util.ExtMath.cosD(myShot._rotation - 90));
myShot.shotY = myShot.shotY + (sp * util.ExtMath.sinD(myShot._rotation - 90));
}
function runEnd() {
sp = myShot.speed;
}
function setAim() {
var _local3 = new Array();
for (var _local4 in _root.wholemap) {
if ((_root.wholemap[_local4]._name.substr(0, 2) == "ta") || (_root.wholemap[_local4]._name.substr(0, 2) == "he")) {
_local3.push(_root.wholemap[_local4]);
}
}
var _local5 = Math.floor(Math.random() * (_local3.length - 1));
enemy = _local3[_local5];
}
function run2() {
if (!inter.loTimer(5)) {
var _local3 = getAngle();
myShot._rotation = turnAngle(_local3);
}
if (!inter2.loTimer(36)) {
if (((Math.random() * 3) == 2) && (_root.wholemap.goldenTank)) {
enemy = _root.wholemap.goldenTank;
} else if (((Math.random() * 3) == 1) && (_root.wholemap.HLPourside)) {
enemy = _root.wholemap.HLPourside;
} else {
enemy = _root.wholemap.char;
}
}
myShot.shotX = myShot.shotX + (sp * util.ExtMath.cosD(myShot._rotation - 90));
myShot.shotY = myShot.shotY + (sp * util.ExtMath.sinD(myShot._rotation - 90));
}
var turnSp = 45;
var a = 2;
}
Symbol 484 MovieClip [__Packages.util.ExtMath] Frame 0
class util.ExtMath extends Math
{
function ExtMath () {
super();
}
static function distance(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function degreesToRadians(angle) {
return(angle * (Math.PI/180));
}
static function radiansToDegrees(angle) {
return(angle * 57.2957795130823);
}
static function sinD(angle) {
return(Math.sin((angle * Math.PI) / 180));
}
static function asinD(ratio) {
return(Math.asin(ratio) * 57.2957795130823);
}
static function cosD(angle) {
return(Math.cos((angle * Math.PI) / 180));
}
static function acosD(ratio) {
return(Math.acos(ratio) * 57.2957795130823);
}
static function tanD(angle) {
return(Math.tan((angle * Math.PI) / 180));
}
static function atan2D(y, x) {
return(Math.atan2(y, x) * 57.2957795130823);
}
static function angleOfLine(x1, y1, x2, y2) {
return(atan2D(y2 - y1, x2 - x1));
}
static function fixAngle(angle) {
angle = angle % 360;
return(((angle < 0) ? (angle + 360) : (angle)));
}
static function cartesianToFlash(o) {
o._y = o._y * -1;
o._rotation = o._rotation * -1;
}
static function flashToCartesian(o) {
return(cartesianToFlash(o));
}
static function cartesianToPolar(p) {
var _local3 = Math.sqrt((p.x * p.x) + (p.y * p.y));
var _local2 = atan2D(p.y, p.x);
return({r:_local3, t:_local2});
}
static function polarToCartesian(p) {
var _local3 = p.r * cosD(p.t);
var _local2 = p.r * sinD(p.t);
return({x:_local3, y:_local2});
}
static var __proto__ = Math;
}
Symbol 485 MovieClip [__Packages.SimpleType.Point] Frame 0
class SimpleType.Point
{
var x, y;
function Point (px, py) {
x = px;
y = py;
}
function Xplus(dx) {
x = x + dx;
}
function Yplus(dy) {
y = y + dy;
}
function XYplus(dx, dy) {
x = x + dx;
y = y + dy;
}
function set xP(px) {
x = px;
//return(xP);
}
function get xP() {
return(x);
}
function set yP(py) {
y = py;
//return(yP);
}
function get yP() {
return(y);
}
}
Symbol 486 MovieClip [__Packages.SimpleType.KeyPress] Frame 0
class SimpleType.KeyPress
{
var kT;
function KeyPress () {
kT = new SimpleType.Timer();
}
function checkPress(keyCode) {
if (Key.isDown(keyCode)) {
return(kT.inTimer(1));
}
kT.clrTimer();
}
}
Symbol 487 MovieClip [__Packages.SimpleType.Rect] Frame 0
class SimpleType.Rect
{
var top, bottom, left, right;
function Rect (pt, pb, pl, pr) {
top = pt;
bottom = pb;
left = pl;
right = pr;
}
function set topN(pt) {
top = pt;
//return(topN);
}
function get topN() {
return(top);
}
function set bottomN(pb) {
bottom = pb;
//return(bottomN);
}
function get bottomN() {
return(bottom);
}
function set leftN(pl) {
left = pl;
//return(leftN);
}
function get leftN() {
return(left);
}
function set rightN(pr) {
right = pr;
//return(rightN);
}
function get rightN() {
return(right);
}
}
Symbol 309 Button
on (release) {
getURL ("http://www.vanadu.net");
}
Symbol 321 Button
on (release) {
getURL ("http://www.arcadereign.com", "_blank");
}
Symbol 331 Button
on (release) {
gotoAndStop ("stage1");
}
Symbol 334 Button
on (release) {
gotoAndStop ("howtoplay");
}
Symbol 337 Button
on (release) {
gotoAndStop ("end");
}
Symbol 340 Button
on (release) {
getURL ("http://www.arcadereign.com", "_blank");
}
Symbol 372 Button
on (release) {
nextFrame();
}
Symbol 376 Button
on (release) {
gotoAndStop (1);
}
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
stop();
Symbol 378 MovieClip Frame 1
stop();
Symbol 381 Button
on (release) {
gotoAndStop ("start");
}
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 405 MovieClip Frame 3
stop();
_parent._parent.go_logo._visible = true;
Instance of Symbol 388 MovieClip "go_logo" in Symbol 408 MovieClip Frame 1
on (release) {
getURL ("http://www.arcadereign.com", "_blank");
}
Symbol 408 MovieClip Frame 168
stop();
Symbol 410 MovieClip Frame 1
var formLevelSave = 1;
var shotOnceNumSave = 1;
var HLPoursideNum = 0;
var goldenTankNum = 0;
var chaShotNum = 2;
var rocShotNum = 2;
var nowBlood = 100;
var totalBlood;
var stageNum = 1;
this.onEnterFrame = function () {
function getCharData(myTank) {
if (stageNum == _parent.stageLabel) {
if (myTank.alive == true) {
formLevelSave = myTank.formLevel;
shotOnceNumSave = myTank.shotOnceNum;
HLPoursideNum = myTank.HLPoursideNum;
goldenTankNum = myTank.goldenTankNum;
chaShotNum = myTank.chaShotNum;
rocShotNum = myTank.rocShotNum;
nowBlood = myTank.nowBlood;
totalBlood = myTank.totalBlood;
} else if (myTank.aliveAfter == false) {
if (formLevelSave >= 2) {
formLevelSave--;
}
if (shotOnceNumSave >= 2) {
shotOnceNumSave--;
}
if (chaShotNum < 2) {
chaShotNum = 2;
}
if (rocShotNum < 2) {
rocShotNum = 2;
}
nowBlood = formLevelSave * 100;
}
}
}
getCharData(_parent.wholemap.char);
};
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
stop();
score = _parent.score;
Symbol 424 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 2
stop();
Symbol 424 MovieClip Frame 3
stop();
Symbol 424 MovieClip Frame 4
stop();
Symbol 439 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
Num.text = _root.wholemap.char.HLPoursideNum;
};
Symbol 439 MovieClip Frame 2
stop();
this.onEnterFrame = function () {
Num.text = _root.wholemap.char.rocShotNum;
};
Symbol 439 MovieClip Frame 3
stop();
this.onEnterFrame = function () {
trace(_root.wholemap.char.chaShotNum);
Num.text = _root.wholemap.char.chaShotNum;
};
Symbol 439 MovieClip Frame 4
stop();
this.onEnterFrame = function () {
Num.text = _root.wholemap.char.goldenTankNum;
};
Symbol 472 Button
on (release) {
getURL ("http://victboy.ku.net");
}
Symbol 474 MovieClip Frame 20
stop();
Symbol 476 Button
on (release) {
getURL ("http://www.vanadu.net");
}
Symbol 478 MovieClip Frame 20
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 2
stop();
Symbol 480 Button
on (release) {
gotoAndPlay ("before");
}