Frame 2
function initGame1() {
newGameContent();
newBg();
newFootAndPrint();
stage[stageNum]();
newUI();
_root.playMusic("music4");
_quality = quality;
}
function pauseGame() {
_root.gamePause = true;
for (var _local2 in _root.game) {
if (_root.game[_local2].mc._currentframe != 1) {
_root.game[_local2].mc.stop();
}
}
}
function continueGame() {
_root.gamePause = false;
for (var _local2 in _root.game) {
if (_root.game[_local2].mc._currentframe != 1) {
_root.game[_local2].mc.play();
}
}
}
function newBg() {
_root.game.attachMovie("bg", "bg", game.getNextHighestDepth());
_root.game.createEmptyMovieClip("body", game.getNextHighestDepth());
_root.game.bg.gotoAndStop(_root.stageNum);
_root.realScale = Math.round(60000 / _root.game.bg._width);
_root.realScalePercent = _root.realScale * 0.01;
_root.stageHeight = 45000 / _root.realScale;
_root.stageWidth = 60000 / _root.realScale;
_root.game._xscale = (_root.game._yscale = _root.realScale);
}
function delayEvent(func, count) {
if (!_root.delayMc) {
_root.createEmptyMovieClip("delayMc", _root.getNextHighestDepth());
}
_root.delayMc.func = func;
_root.delayMc.count = count;
_root.delayMc.onEnterFrame = function () {
if ((--this.count) < 0) {
this.func();
this.removeMovieClip();
}
};
}
function resetSavaData() {
saveData.data.faster = 1;
saveData.data.bigger = 1;
saveData.data.stronger = 1;
saveData.data.stageUnlocked = 1;
saveData.data.stageClear = [];
saveData.data.stageClear[1] = {states:"unlocked", bestTime:999, bestPoints:0, timeRank:"D", pointsRank:"D"};
saveData.data.stageClear[2] = {states:"notBigEnough", bestTime:999, bestPoints:0, timeRank:"D", pointsRank:"D"};
var _local1 = 3;
while (_local1 < 16) {
saveData.data.stageClear[_local1] = {states:"tooFaraway", bestTime:999, bestPoints:0, timeRank:"D", pointsRank:"D"};
_local1++;
}
saveData.data.points = 0;
saveData.data.totalKills = 0;
saveData.data.totalPerfectTrampling = 0;
saveData.data.ach = [0, false, false, false, false, false, false, false, false];
}
function initSavaData() {
saveData = SharedObject.getLocal("IAmGozilla");
if (saveData.data.faster == undefined) {
resetSavaData();
}
if (saveData.flush(1000) != true) {
resetSavaData();
}
faster = saveData.data.faster;
bigger = saveData.data.bigger;
stronger = saveData.data.stronger;
}
function initCommon() {
fasterPts = [0, 0, 10, 30, 100, 300, 500, 750, 1000, 2500];
biggerPts = [0, 0, 10, 30, 100, 500, 1000, 2500];
strongerPts = [0, 0, 10, 45, 150, 550, 1500];
timeRank = [];
timeRank[1] = [3, 8, 20, 30];
timeRank[2] = [6, 20, 30, 50];
timeRank[3] = [8, 20, 30, 50];
timeRank[4] = [10, 20, 30, 50];
timeRank[5] = [28, 40, 60, 80];
timeRank[6] = [30, 40, 60, 80];
timeRank[7] = [30, 40, 60, 80];
timeRank[8] = [400, 450, 500, 600];
timeRank[9] = [10, 20, 30, 50];
timeRank[10] = [12, 20, 30, 50];
timeRank[11] = [30, 40, 60, 80];
timeRank[12] = [35, 50, 80, 120];
timeRank[13] = [500, 550, 600, 650];
timeRank[14] = [120, 160, 200, 250];
pointsRank = [];
pointsRank[1] = [25, 17, 13, 9];
pointsRank[2] = [170, 100, 60, 20];
pointsRank[3] = [360, 240, 120, 50];
pointsRank[4] = [500, 360, 180, 50];
pointsRank[5] = [900, 500, 200, 80];
pointsRank[6] = [1200, 900, 400, 100];
pointsRank[7] = [1900, 1500, 800, 300];
pointsRank[8] = [35, 33, 31, 30];
pointsRank[9] = [50, 40, 25, 15];
pointsRank[10] = [40, 33, 21, 12];
pointsRank[11] = [100, 80, 60, 45];
pointsRank[12] = [70, 60, 50, 40];
pointsRank[13] = [60, 53, 46, 40];
pointsRank[14] = [900, 600, 400, 300];
quality = "MEDIUM";
_quality = "BEST";
}
function initGameData() {
gamePause = false;
fric = 0.95;
men = [];
faster = saveData.data.faster;
bigger = saveData.data.bigger;
stronger = saveData.data.stronger;
hold = 100 * stronger;
currentPoints = 0;
totalPoints = _root.saveData.data.points;
startTime = getTimer();
endTime = 0;
if (!_root.saveData.data.ach[4]) {
perfectTrampling = 0;
}
speed = [[0.1, 10], [0.3, 15], [0.5, 18], [0.7, 20], [1, 25], [1.3, 30], [1.5, 35], [1.7, 40], [2, 45], [2.5, 50]];
trampleAcl = [0, 1.1, 1.11, 1.12, 1.14, 1.15, 1.16, 1.17, 1.18, 1.2];
}
function beatLevel() {
_root.gamePause = true;
_root.attachMovie("finishMc", "finishMc", _root.getNextHighestDepth());
_root.saveData.data.stageClear[_root.stageNum].states = "finished";
var _local6 = 0;
while (_local6 <= (_root.bigger + 1)) {
if ((_root.saveData.data.stageClear[_local6].states == "notBigEnough") && (_root.saveData.data.stageClear[_local6 - 1].states == "finished")) {
_root.saveData.data.stageClear[_local6].states = "unlocked";
if (_local6 < 8) {
_root.saveData.data.stageClear[_local6 + 1].states = "notBigEnough";
}
break;
}
_local6++;
}
switch (_root.stageNum) {
case 3 :
if (_root.saveData.data.stageClear[9].states != "finished") {
_root.saveData.data.stageClear[9].states = "unlocked";
}
break;
case 4 :
if (_root.saveData.data.stageClear[10].states != "finished") {
_root.saveData.data.stageClear[10].states = "unlocked";
}
break;
case 5 :
if (_root.saveData.data.stageClear[11].states != "finished") {
_root.saveData.data.stageClear[11].states = "unlocked";
}
break;
case 6 :
if (_root.saveData.data.stageClear[12].states != "finished") {
_root.saveData.data.stageClear[12].states = "unlocked";
}
break;
case 8 :
if (_root.saveData.data.stageClear[13].states != "finished") {
_root.saveData.data.stageClear[13].states = "unlocked";
}
if (_root.saveData.data.stageClear[14].states == "finished") {
break;
}
_root.saveData.data.stageClear[14].states = "unlocked";
}
var _local5 = Math.round((getTimer() - _root.startTime) / 1000);
if (_root.saveData.data.stageClear[_root.stageNum].bestTime > _local5) {
_root.saveData.data.stageClear[_root.stageNum].bestTime = _local5;
var _local3 = 0;
while (_local3 <= 3) {
if (_local5 <= _root.timeRank[_root.stageNum][_local3]) {
break;
}
_local3++;
}
switch (_local3) {
case 0 :
_root.saveData.data.stageClear[_root.stageNum].timeRank = "S";
break;
case 1 :
_root.saveData.data.stageClear[_root.stageNum].timeRank = "A";
break;
case 2 :
_root.saveData.data.stageClear[_root.stageNum].timeRank = "B";
break;
case 3 :
_root.saveData.data.stageClear[_root.stageNum].timeRank = "C";
break;
default :
_root.saveData.data.stageClear[_root.stageNum].timeRank = "D";
}
}
if (_root.saveData.data.stageClear[_root.stageNum].bestPoints < _root.currentPoints) {
_root.saveData.data.stageClear[_root.stageNum].bestPoints = _root.currentPoints;
var _local3 = 0;
while (_local3 <= 3) {
if (_root.currentPoints >= _root.pointsRank[_root.stageNum][_local3]) {
break;
}
_local3++;
}
switch (_local3) {
case 0 :
_root.saveData.data.stageClear[_root.stageNum].pointsRank = "S";
break;
case 1 :
_root.saveData.data.stageClear[_root.stageNum].pointsRank = "A";
break;
case 2 :
_root.saveData.data.stageClear[_root.stageNum].pointsRank = "B";
break;
case 3 :
_root.saveData.data.stageClear[_root.stageNum].pointsRank = "C";
break;
default :
_root.saveData.data.stageClear[_root.stageNum].pointsRank = "D";
}
}
if (!_root.saveData.data.stageClear[_root.stageNum].doubleS) {
if (_root.saveData.data.stageClear[_root.stageNum].timeRank == "S") {
if (_root.saveData.data.stageClear[_root.stageNum].pointsRank == "S") {
_root.saveData.data.stageClear[_root.stageNum].doubleS = true;
}
}
}
if (!_root.saveData.data.ach[8]) {
var _local4 = false;
_local6 = 1;
while (_local6 < 15) {
if (!_root.saveData.data.stageClear[_local6].doubleS) {
_local4 = true;
}
_local6++;
}
if (!_local4) {
_root.newAchievement(8);
}
}
if (!_root.saveData.data.ach[7]) {
var _local4 = false;
_local6 = 1;
while (_local6 < 15) {
if (_root.saveData.data.stageClear[_local6].states != "finished") {
_local4 = true;
}
_local6++;
}
if (!_local4) {
_root.newAchievement(7);
}
}
if (!_root.saveData.data.ach[6]) {
if (_root.saveData.data.stageClear[8].states == "finished") {
_root.newAchievement(6);
}
}
_root.saveData.data.points = _root.saveData.data.points + _root.currentPoints;
_root.finishMc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
if (_root.mouseControl) {
Mouse.removeListener(_root.game.mouseListener);
}
for (var _local3 in _root) {
_root[_local3].removeMovieClip();
}
if (_root.stageNum == 8) {
_root.gotoAndStop("gameClean");
} else {
_root.gotoAndStop("whereTo");
}
}
};
}
function newGameContent() {
var _local3 = _root.createEmptyMovieClip("game", _root.getNextHighestDepth());
if (_root.mouseControl) {
game.mouseListener = new Object();
game.mouseListener.onMouseDown = function () {
mouseD = true;
};
game.mouseListener.onMouseUp = function () {
mouseD = false;
};
Mouse.addListener(game.mouseListener);
}
_local3.func = [];
_local3.boss = [];
_local3.sound = [];
_local3.soundRegister = [];
_local3.counter = 0;
_local3.onEnterFrame = function () {
if (Key.isDown(80)) {
if (!kpDown) {
kpDown = true;
if (!_root.game2._x) {
if (!_root.pauseMc) {
_root.attachMovie("pauseMc", "pauseMc", _root.getNextHighestDepth());
pauseGame();
} else {
continueGame();
_root.pauseMc.removeMovieClip();
}
}
}
} else {
kpDown = false;
}
if (!gamePause) {
for (var _local3 in this.func) {
this.func[_local3].enterframe();
}
for (var _local3 in this.sound) {
this.sound[_local3].start();
}
this.soundRegister = [];
this.sound = [];
}
};
}
function newFootAndPrint() {
newFootprint();
newFoot();
}
function getRotation(pointAx, pointAy, pointBx, pointBy) {
var _local2 = pointBx - pointAx;
var _local3 = pointBy - pointAy;
var _local1 = Math.round(Math.atan2(_local3, _local2) * 57.33);
return(_local1);
}
function actionBlur(mc, xspeed, yspeed) {
var _local2 = new flash.filters.BlurFilter(xspeed, yspeed, 1);
var _local1 = new Array();
_local1.push(_local2);
mc.filters = _local1;
}
function shake(mc, t, r) {
var _local4 = _root.getNextHighestDepth();
var _local3 = _root.createEmptyMovieClip("shake" + _local4, _local4);
_local3.t = t;
_local3.mc = mc;
_local3.r = r;
_local3.counter = 0;
_local3.onEnterFrame = function () {
if ((++this.counter) < this.t) {
if ((this.counter % 2) == 0) {
this.oldX = this.mc._x;
this.oldY = this.mc._y;
this.mc._x = this.mc._x + (((2 * random(2)) * r) - r);
this.mc._y = this.mc._y + (((2 * random(2)) * r) - r);
} else {
this.mc._x = this.oldX;
this.mc._y = this.oldY;
}
} else {
this.mc._x = this.oldX;
this.mc._y = this.oldY;
this.removeMovieClip();
}
};
}
function shakeRoot(t, r) {
var _local4 = _root.getNextHighestDepth();
var _local3 = _root.createEmptyMovieClip("shake" + _local4, _local4);
_local3.t = t;
_local3.r = r;
_local3.counter = 0;
_local3.onEnterFrame = function () {
if ((++this.counter) < this.t) {
if ((this.counter % 2) == 0) {
_root._x = _root._x + (((2 * random(2)) * r) - r);
_root._y = _root._y + (((2 * random(2)) * r) - r);
} else {
_root._x = 0;
_root._y = 0;
}
} else {
_root._x = 0;
_root._y = 0;
this.removeMovieClip();
}
};
}
function initColor() {
shine_Transform_normal = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
shine_Transform_white = {ra:0, rb:255, ga:0, gb:255, ba:0, bb:255, aa:100, ab:0};
shine_Transform_red = {ra:50, rb:185, ga:50, gb:-50, ba:50, bb:-255, aa:100, ab:0};
shine_Transform_blue = {ra:60, rb:0, ga:80, gb:0, ba:100, bb:128, aa:100, ab:0};
shine_Transform_yellow = {ra:0, rb:255, ga:0, gb:255, ba:0, bb:0, aa:100, ab:0};
shine_Transform_black = {ra:45, rb:0, ga:45, gb:0, ba:45, bb:0, aa:100, ab:0};
}
function shotShine(who, shine, shineTimes) {
if (!who.no_shine) {
who.shineMc.removeMovieClip();
who.createEmptyMovieClip("shineMc", who.getNextHighestDepth());
var _local3 = new Color(who);
_local3.setTransform(this["shine_Transform_" + shine]);
who.shineMc.count = 0;
who.shineMc.shineTimes = shineTimes;
who.shineMc.onEnterFrame = function () {
if ((++this.count) == this.shineTimes) {
var _local2 = new Color(this._parent);
_local2.setTransform(shine_Transform_normal);
this.removeMovieClip();
}
};
}
}
function initGame2() {
_root.godzillaHp = _root.game.footprint.hp;
_root.game.footprint.tmpHitAction = _root.game.footprint.hitAction;
_root.game.footprint.hitAction = undefined;
_root.attachMovie("bg2", "bg2", _root.getNextHighestDepth());
_root.attachMovie("game2", "game2", _root.getNextHighestDepth());
game2.godzillaSpeed = 55;
game2.godzilla.stop();
game2.counter = 0;
game2._x = 400 - game2.godzilla._x;
game2.lastKey = "left";
game2.onEnterFrame = function () {
var _local3 = false;
if (Key.isDown(37)) {
if (!keyLeftDown) {
keyLeftDown = true;
if (this.lastKey == "down") {
_local3 = true;
this.lastKey = "left";
}
}
} else {
keyLeftDown = false;
}
if (Key.isDown(40)) {
if (!keyDownDown) {
keyDownDown = true;
if (this.lastKey == "right") {
_local3 = true;
this.lastKey = "down";
}
}
} else {
keyDownDown = false;
}
if (Key.isDown(39)) {
if (!keyRightDown) {
keyRightDown = true;
if (this.lastKey == "left") {
_local3 = true;
this.lastKey = "right";
}
}
} else {
keyRightDown = false;
}
if (_root.mouseControl) {
if ((this.oldy - _ymouse) > 10) {
if (this.oldDir != 1) {
_local3 = true;
}
this.oldDir = 1;
} else if ((this.oldy - _ymouse) < 10) {
if (this.oldDir != -1) {
_local3 = true;
}
this.oldDir = -1;
}
this.oldy = _ymouse;
}
if (_local3) {
if (this.godzillaSpeed < 55) {
this.godzillaSpeed = this.godzillaSpeed + 1;
} else if (this.godzillaSpeed < 57) {
this.godzillaSpeed = this.godzillaSpeed + 0.1;
} else if (this.godzillaSpeed < 58) {
this.godzillaSpeed = this.godzillaSpeed + 0.06;
} else if (this.godzillaSpeed < 59) {
this.godzillaSpeed = this.godzillaSpeed + 0.04;
} else if (this.godzillaSpeed < 60) {
this.godzillaSpeed = this.godzillaSpeed + 0.03;
}
}
if ((--this.counter) <= 0) {
if (this.godzilla._currentframe != this.godzilla._totalframes) {
this.godzilla.nextFrame();
} else {
this.godzilla.gotoAndStop(1);
}
this.counter = Math.round(60 - this.godzillaSpeed);
}
var _local5 = 60 - this.godzillaSpeed;
_local5 = ((_local5 <= 0) ? 0.5 : (_local5));
var _local4 = 20 / _local5;
this.godzilla._x = this.godzilla._x - _local4;
if (_local4 > 100) {
_root.ui2.speed.mask._x = 100;
} else {
_root.ui2.speed.mask._x = _local4;
}
if ((_root.godzillaHp + _local4) < 100) {
_root.ui2.hp.mask._x = _root.godzillaHp + _local4;
} else {
_root.ui2.hp.mask._x = 100;
}
if (this.godzilla._x > -50) {
_root.ui2.map.mc._x = (300 * this.godzilla._x) / this.map._width;
}
if (this._x < 0) {
this._x = this._x + _local4;
this._x = this._x + (((400 - this.godzilla._x) - this._x) / 10);
} else {
this._x = 0;
_root.playMusic("music4");
_root.game._x = (_root.game._y = 0);
_root.ui._x = (_root.ui._y = 0);
_root.game.footprint.runawayReset();
_root.game.footprint.hitAction = _root.game.footprint.tmpHitAction;
_root.game.footprint.hp = _root.ui2.hp.mask._x;
_root.ui.info.hp.mask._x = _root.ui2.hp.mask._x;
if (_root.ui2.hp.mask._x > 20) {
_root.game.footprint.lowLife = false;
}
continueGame();
for (var _local6 in _root.men) {
_root.men[_local6].go();
}
_root.ui2.removeMovieClip();
_root.bg2.removeMovieClip();
_root.game2.removeMovieClip();
}
};
_root.newUI2();
_root.ui2._y = (_root.bg2._y = (_root.game2._y = 1000));
_root.bg2._x = 1000;
_root.attachMovie("cutScene", "cutScene", _root.getNextHighestDepth());
_root.cutScene.onEnterFrame = function () {
if (this._currentframe == 20) {
_root.game._x = (_root.game._y = 1000);
_root.ui._x = (_root.ui._y = 1000);
_root.ui2._y = (_root.bg2._y = (_root.game2._y = 0));
_root.bg2._x = 0;
} else if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
}
function newDust(x, y) {
var _local3 = game2.getNextHighestDepth();
var _local2 = game2.attachMovie("game2dust", "dust" + _local3, _local3, {_x:x, _y:y});
_local2.counter = 30;
_local2._xscale = (_local2._yscale = 100 + random(30));
_local2.ys = Math.random();
_local2.onEnterFrame = function () {
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
this._alpha = this._alpha - 3;
this._y = this._y - this.ys;
if ((--this.counter) < 0) {
this.removeMovieClip();
}
};
}
function newSpecialUnit(man, damage, hp, speed, sp, expl) {
_root.men.push(man);
man.eyeType = random(man.mc.eye._totalframes) + 1;
man.expl = expl;
man.mc.stop();
man.emo = "normal";
man.counter = 0;
man.counter1 = 0;
man.damage = damage;
man.hp = (man.totalHp = hp);
man.moveSpeed = speed;
man.sp = sp;
game.func.push(man);
game.boss.push(man);
man.fearOrMad = function () {
var _local3 = _root.ui.fearMad.mc.mc._x;
if (_local3 > 100) {
if (!random(((190 - _local3) * (190 - _local3)) * 0.5)) {
this.mad();
}
} else if (!random((_local3 - 10) * (_local3 - 10))) {
this.run();
}
};
man.hitAction = function () {
this.hpMc._visible = true;
this.hpMc.mc._xscale = (this.hp / this.totalHp) * 100;
_root.newEmo(this, "coma");
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
this.counter = 100;
this.enterframe = function () {
if ((--this.counter) < 0) {
this.run();
}
if ((this.counter % 3) == 0) {
this._x++;
} else if ((this.counter % 3) == 1) {
this._x--;
}
};
};
man.die = function () {
if ((--this.hp) > 0) {
this.hitAction();
return("boss");
}
if (this.expl) {
var _local4 = _root.game.getNextHighestDepth();
_root.game.attachMovie("expl1", "ex" + _local4, _local4, {_x:this._x, _y:this._y - (this._height / 2)});
}
this.hpMc._visible = false;
delete this.enterframe;
this.gotoAndStop("die");
newEmo(this, "die");
this.body.eye.gotoAndStop(this.eyeType);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
for (var _local3 in _root.game.boss) {
if (_root.game.boss[_local3] == this) {
_root.game.boss.splice(_local3, 1);
}
}
};
man.die2 = function (dir1) {
if ((--this.hp) > 0) {
this.hitAction();
return("boss");
}
if (this.expl) {
var _local4 = _root.game.getNextHighestDepth();
_root.game.attachMovie("expl1", "ex" + _local4, _local4, {_x:this._x, _y:this._y - (this._height / 2)});
}
this.hpMc._visible = false;
delete this.enterframe;
this.gotoAndStop("die2");
this.body.gotoAndStop(random(5) + 1);
var _local5 = ((dir1 < 0) ? 1 : -1);
this._xscale = _local5 * 100;
this.emoMc.counter = 0;
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
for (var _local3 in _root.game.boss) {
if (_root.game.boss[_local3] == this) {
_root.game.boss.splice(_local3, 1);
}
}
};
man.spAction = function () {
};
man.stopMoving = function () {
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.enterframe = function () {
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (!random(200)) {
this.go();
} else if (!random(500)) {
newEmo(this, "idle");
}
if (_root.game.footprint.hitTest(this)) {
if (!random(300)) {
this.confused();
}
}
this.fearOrMad();
};
};
man.go = function () {
this.gotoAndStop("run");
this.mc.play();
this.speed = random(this.moveSpeed) + 1;
var _local5 = random(360);
this.xs = this.speed * Math.cos(_local5 * 0.0173);
this.ys = this.speed * Math.sin(_local5 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
var _local4 = this._x + this.xs;
var _local3 = this._y + this.ys;
if (_root.game.footprint.hitTest(this)) {
if (!random(300)) {
this.confused();
}
if (_root.game.footprint.hitTest(_local4 * _root.realScalePercent, _local3 * _root.realScalePercent, true)) {
var _local5 = true;
}
}
if ((!_root.game.footprint.land) || (!_local5)) {
this._x = _local4;
this._y = _local3;
this.checkTurn();
} else {
this.xs = this.xs * -1;
this.ys = this.ys * -1;
this._xscale = this._xscale * -1;
this.hpMc._xscale = this._xscale;
}
if (!random(200)) {
this.stopMoving();
}
this.fearOrMad();
if (!random(this.sp)) {
this.spAction();
}
};
};
man.coma = function (time) {
this.gotoAndStop("run");
_root.newEmo(this, "coma");
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
this.counter = 60;
this.enterframe = function () {
if ((--this.counter) < 0) {
this.confused();
}
if ((this.counter % 3) == 0) {
this._x++;
} else if ((this.counter % 3) == 1) {
this._x--;
}
};
};
man.confused = function () {
this.gotoAndStop("run");
_root.newEmo(this, "confused");
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
this.enterframe = function () {
if (!random(200)) {
newEmo(this, "idle");
this.go();
}
if (_root.game.footprint.hitTest(this)) {
if (!random(200)) {
this.run();
}
if (_root.game.foot.dy > 1) {
this.run();
}
}
if (!random(this.sp)) {
this.spAction();
}
this.fearOrMad();
};
};
man.run = function () {
this.gotoAndStop("run");
_root.newEmo(this, "panic");
this.mc.play();
this.speed = this.moveSpeed * 2;
var _local3 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local3 = _local3 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local3 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local3 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
this.counter = random(60) + 10;
this.checkTurn();
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
var _local4 = this._x + this.xs;
var _local3 = this._y + this.ys;
if (_root.game.footprint.hitTest(_local4 * _root.realScalePercent, _local3 * _root.realScalePercent, true)) {
var _local5 = true;
}
if ((!_root.game.footprint.land) || (!_local5)) {
this._x = _local4;
this._y = _local3;
} else {
this.xs = this.xs * -1;
this.ys = this.ys * -1;
this._xscale = this._xscale * -1;
this.hpMc._xscale = this._xscale;
}
this.checkTurn();
if (!random(200)) {
this.stopMoving();
}
this.fearOrMad();
if ((--this.counter) < 0) {
if (_root.game.footprint.hitTest(this)) {
this.run();
}
} else if (!random(this.sp)) {
this.spAction();
}
};
};
man.mad = function () {
this.gotoAndStop("run");
_root.newEmo(this, "mad");
this.mc.play();
this.speed = this.moveSpeed * 2;
var _local6 = random(360);
this.xs = this.speed * Math.cos(_local6 * 0.0173);
this.ys = this.speed * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
this.counter = random(60) + 120;
this.counter1 = 0;
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (!_root.game.footprint.land) {
if (!random(10)) {
if (_root.game.footprint.hitTest(this)) {
this.speed = this.moveSpeed * 2;
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local6 = _local6 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local6 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
}
}
} else {
if (this.counter1 == 1) {
if (_root.game.footprint.hitTest((this._x + this.xs) * _root.realScalePercent, (this._y + this.ys) * _root.realScalePercent, true)) {
var _local3 = _root.game.getNextHighestDepth();
_root.game.attachMovie("attackFx1", "fx" + _local3, _local3, {_x:this._x, _y:this._y - 20});
_root.game.footprint.hitAction(this.damage);
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local6 = _local6 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local6 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local6 * 0.0173);
this.counter1 = (-random(30)) - 10;
}
}
if (this.counter1 < 0) {
this.counter1++;
} else if (this.counter1 == 0) {
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
this.xs = this.speed * Math.cos(_local6 * 0.0173);
this.ys = this.speed * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
this.counter1 = 1;
}
}
if (!random(120)) {
_root.newEmo(this, "mad");
}
var _local5 = this._x + this.xs;
var _local4 = this._y + this.ys;
if (_root.game.footprint.hitTest(_local5 * _root.realScalePercent, _local4 * _root.realScalePercent, true)) {
var _local7 = true;
}
if ((!_root.game.footprint.land) || (!_local7)) {
this._x = _local5;
this._y = _local4;
}
this.checkTurn();
if ((--this.counter) < 0) {
_root.newEmo(this, "idle");
this.go();
} else if (!random(this.sp)) {
this.spAction();
}
};
};
man.checkTurn = function () {
if (this._x < 30) {
if (this.xs < 0) {
this.xs = this.xs * -1;
this._xscale = this._xscale * -1;
this.hpMc._xscale = this._xscale;
}
} else if (this._x > (_root.stageWidth - 30)) {
if (this.xs > 0) {
this.xs = this.xs * -1;
this._xscale = this._xscale * -1;
this.hpMc._xscale = this._xscale;
}
}
if (this._y < 50) {
if (this.ys < 0) {
this.ys = this.ys * -1;
}
} else if (this._y > (_root.stageHeight - 10)) {
if (this.ys > 0) {
this.ys = this.ys * -1;
}
}
};
man.go();
}
function newDoctor() {
var _local4 = _root.game.getNextHighestDepth();
var _local6 = _root.game.attachMovie("doctor", "man" + _local4, _local4, {_x:random(_root.stageWidth - 60) + 31, _y:random(_root.stageHeight - 50) + 51});
_root.newSpecialUnit(_local6, 2, 3, _root.manSpeed + 1, 30);
_local6.spAction = function () {
this.patience = undefined;
for (var _local3 in _root.game.boss) {
if (_root.game.boss[_local3] == this) {
continue;
}
if (_root.game.boss[_local3].hp < _root.game.boss[_local3].totalHp) {
this.patience = _root.game.boss[_local3];
break;
}
}
if (this.patience) {
_root.newEmo(this, "panic");
this.mc.play();
this.speed = this.moveSpeed * 2;
this.counter = random(60) + 10;
this.checkTurn();
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
var _local5 = getRotation(this._x, this._y, this.patience._x, this.patience._y);
this.xs = this.speed * Math.cos(_local5 * 0.0173);
this.ys = this.speed * Math.sin(_local5 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.hpMc._xscale = this._xscale;
var _local4 = this._x + this.xs;
var _local3 = this._y + this.ys;
if (_root.game.footprint.hitTest(_local4 * _root.realScalePercent, _local3 * _root.realScalePercent, true)) {
var _local6 = true;
}
if ((!_root.game.footprint.land) || (!_local6)) {
this._x = _local4;
this._y = _local3;
} else {
this.xs = this.xs * -1;
this.ys = this.ys * -1;
this._xscale = this._xscale * -1;
this.hpMc._xscale = this._xscale;
}
if (_root.game.footprint.hitTest(this)) {
if (!random(150)) {
this.run();
}
}
if ((Math.abs(this._x - this.patience._x) < 10) && (Math.abs(this._y - this.patience._y) < 10)) {
if (this.patience.hp < this.patience.totalHp) {
if ((++this.patience.hp) == this.patience.totalHp) {
this.patience.hpMc._visible = false;
} else {
this.patience.hpMc.mc._xscale = (this.patience.hp / this.patience.totalHp) * 100;
}
_root.newHpUp(this.patience, 0, (-this.patience._height) / 2);
}
this.run();
}
this.checkTurn();
};
}
};
}
function newSoldier() {
var _local3 = _root.game.getNextHighestDepth();
var _local4 = _root.game.attachMovie("solider", "man" + _local3, _local3, {_x:random(_root.stageWidth - 60) + 31, _y:random(_root.stageHeight - 50) + 51});
_root.newSpecialUnit(_local4, 5, 5, _root.manSpeed + 2, 50);
_local4.spAction = function () {
_root.newEmo(this, "panic");
this.mc.play();
this.speed = this.moveSpeed * 2;
this.counter = random(50) + 20;
this.checkTurn();
this.gotoAndStop("attack");
this.mc.eye.gotoAndStop(this.eyeType);
this._xscale = 100;
this.hpMc._xscale = this._xscale;
this.enterframe = function () {
if ((--this.counter) < 0) {
if (this.mc._currentframe == 1) {
this.mc.play();
this.counter = random(50) + 30;
}
} else if (this.counter > 10) {
if (_root.game.footprint.hitTest(this)) {
if (!random(20)) {
this.run();
}
} else if (!random(120)) {
this.run();
}
}
};
};
}
function newSpider() {
var _local3 = _root.game.getNextHighestDepth();
var _local4 = _root.game.attachMovie("spider", "man" + _local3, _local3, {_x:random(_root.stageWidth - 60) + 31, _y:random(_root.stageHeight - 50) + 51});
_root.newSpecialUnit(_local4, 1, 15, _root.manSpeed + 5, 50, true);
_local4.spAction = function () {
_root.newEmo(this, "panic");
this.mc.play();
this.speed = this.moveSpeed * 2;
this.counter = random(10);
this.checkTurn();
this.gotoAndStop("attack");
this.mc.eye.gotoAndStop(this.eyeType);
this._xscale = 100;
this.hpMc._xscale = this._xscale;
this.enterframe = function () {
if ((--this.counter) < 0) {
if (this.mc._currentframe == 1) {
this.mc.play();
this.counter = random(10);
}
}
if (_root.game.footprint.hitTest(this)) {
if (!random(20)) {
this.run();
}
}
};
};
}
function invisibleMen() {
var _local3 = _root.newMan();
var _local5 = _root.game.getNextHighestDepth();
var mask = _root.game.attachMovie("\u811A\u5370", "manMask" + _local5, _local5);
mask.gotoAndStop(_root.game.footprint._currentframe);
mask.enterframe = function () {
this._x = _root.game.footprint._x;
this._y = _root.game.footprint._y;
};
_root.game.func.push(mask);
_local3.mask = mask;
_local3.setMask(mask);
_local3.removeMask = function () {
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this.mask) {
_root.game.func.splice(_local3, 1);
}
}
this.setMask(null);
this.mask.removeMovieClip();
};
_local3.die = function () {
delete this.enterframe;
this.removeMask();
this.gotoAndStop("die");
_root.newEmo(this, "die");
this.body.gotoAndStop(random(4) + 1);
this.body.eye.gotoAndStop(this.eyeType);
this.body.wear.gotoAndStop(this.wearType);
this.body.hair.gotoAndStop(this.hairType);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
_local3.die2 = function (dir1) {
delete this.enterframe;
this.removeMask();
this.gotoAndStop("die2");
this.body.gotoAndStop(random(5) + 1);
var _local4 = ((dir1 < 0) ? 1 : -1);
this._xscale = _local4 * 100;
this.emoMc.counter = 0;
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
}
function invisibleMen2() {
var _local3 = _root.newMan();
_local3._visible = false;
_local3.removeMask = function () {
this._visible = true;
};
_local3.die = function () {
delete this.enterframe;
this.removeMask();
this.gotoAndStop("die");
newEmo(this, "die");
this.body.gotoAndStop(random(4) + 1);
this.body.eye.gotoAndStop(this.eyeType);
this.body.wear.gotoAndStop(this.wearType);
this.body.hair.gotoAndStop(this.hairType);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
_local3.die2 = function (dir1) {
delete this.enterframe;
this.removeMask();
this.gotoAndStop("die2");
this.body.gotoAndStop(random(5) + 1);
var _local4 = ((dir1 < 0) ? 1 : -1);
this._xscale = _local4 * 100;
this.emoMc.counter = 0;
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
}
function newHeli() {
var _local5 = _root.game.getNextHighestDepth();
var _local3 = _root.game.attachMovie("heli", "heli" + _local5, _local5);
_root.men.push(_local3);
_local3.acl = 0.5;
_local3.counter = 0;
_local3.counter1 = 0;
_local3.damage = damage;
_local3._y = -1000;
_local3.hp = (_local3.totalHp = 1);
game.func.push(_local3);
_local3.die = function () {
_root.totalHeli--;
var _local4 = _root.game.getNextHighestDepth();
_root.game.attachMovie("expl1", "ex" + _local4, _local4, {_x:this._x, _y:this._y - 100});
this.hpMc._visible = false;
delete this.enterframe;
this.gotoAndStop("die");
newEmo(this, "die");
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
_local3.die2 = function () {
return("boss");
};
_local3.go = function () {
if (this._y != -1000) {
_root.totalHeli--;
}
this._y = -1000;
this.waitToSend();
};
_local3.waitToSend = function () {
this.gotoAndStop("empty");
this.counter = random(60);
this.enterframe = function () {
if ((--this.counter) < 0) {
if (_root.totalHeli < _root.maxHeli) {
_root.totalHeli++;
this.sendOut();
}
}
};
};
_local3.sendOut = function () {
this._x = random(_root.stageWidth - 100) + 50;
this._y = -100;
this.gotoAndStop("move1");
this.dy = 0;
this.speed = random(10) + 10;
this.end = random(_root.stageHeight / 2) + (_root.stageHeight / 3);
_root.playSound("heliSound");
this.enterframe = function () {
if (this.dy < this.speed) {
this.dy = this.dy + this.acl;
}
this._y = this._y + this.dy;
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (this._y > this.end) {
this.startAttack();
}
};
};
_local3.startAttack = function () {
this.gotoAndStop("move2");
this.speed = -10;
this.counte = random(200);
this.enterframe = function () {
if (this.dy > this.speed) {
this.dy = this.dy - this.acl;
}
this._y = this._y + this.dy;
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (this._y < -100) {
this.go();
} else if (this._y < 250) {
this.mc.gotoAndStop(1);
this.speed = -20;
}
};
};
_local3.go();
}
function newUI() {
_root.attachMovie("ui", "ui", _root.getNextHighestDepth());
_root.ui.fearMad.madSpeed = 101 - _root.madSpeed;
_root.ui.fearMad.counter = 10;
_root.ui.fearMad.enterframe = function () {
if ((++this.counter) > this.madSpeed) {
this.mc.mc._x++;
this.counter = 0;
}
if (this.mc.mc._x > 190) {
this.mc.mc._x = 190;
} else if (this.mc.mc._x < 10) {
this.mc.mc._x = 10;
}
};
_root.ui.btnQuality.onRelease = function () {
if (_quality == "LOW") {
_quality = ((_root.quality = "MEDIUM"));
} else if (_quality == "MEDIUM") {
_quality = ((_root.quality = "HIGH"));
} else if (_quality == "HIGH") {
_quality = ((_root.quality = "LOW"));
}
};
_root.game.func.push(_root.ui.fearMad);
_root.ui.info.hp.mask._x = _root.game.footprint.hp;
_root.ui.pts.text = 0;
}
function newRunOrContinue() {
_root.playMusic("music3");
var _local4 = _root.ui.getNextHighestDepth();
var _local3 = _root.ui.attachMovie("hintRunOrContinue", "hintRunOrContinue", _local4);
if (_root.stageNum < 9) {
_local3.counter = (8 - _root.stageNum) * (8 - _root.stageNum);
} else {
_local3.counter = 0;
}
key82Down = false;
key82Down = true;
_local3.onEnterFrame = function () {
if ((this._currentframe > 6) && (this._currentframe < 18)) {
if (Key.isDown(82)) {
if (!key82Down) {
key82Down = true;
this.run = true;
_root.pauseGame();
this.gotoAndPlay(18);
}
} else {
key82Down = false;
}
if (Key.isDown(67)) {
this.run = false;
this.gotoAndPlay(18);
}
}
if (this._currentframe == 10) {
this.stop();
if (!_root.gamePause) {
if ((--this.counter) < 0) {
this.play();
}
}
} else if (this._currentframe == this._totalframes) {
_root.gamePause = false;
if (this.run) {
_root.pauseGame();
_root.initGame2();
}
this.removeMovieClip();
}
};
}
function newUI2() {
if (!_root.godzillaHp) {
_root.godzillaHp = 50;
}
_root.attachMovie("ui2", "ui2", _root.getNextHighestDepth());
if (_root.mouseControl) {
_root.ui2.gotoAndStop(2);
}
_root.ui2.hp.mask._x = _root.godzillaHp;
_root.ui2.speed.mask._x = 0;
}
function setUIWhereTo() {
var _local7 = false;
if (_root.bigger < 6) {
var _local6 = _root.bigger;
while (_local6 < 8) {
var _local5 = 0;
var _local4 = _root.bigger + 1;
while (_local4 <= _local6) {
_local5 = _local5 + _root.biggerPts[_local4];
_local4++;
}
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
_local7 = true;
}
_local6++;
}
}
if (_root.faster < 8) {
var _local6 = _root.faster;
while (_local6 < 10) {
var _local5 = 0;
var _local4 = _root.faster + 1;
while (_local4 <= _local6) {
_local5 = _local5 + _root.fasterPts[_local4];
_local4++;
}
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
_local7 = true;
}
_local6++;
}
}
if (_root.stronger < 5) {
var _local6 = _root.stronger;
while (_local6 < 7) {
var _local5 = 0;
var _local4 = _root.stronger + 1;
while (_local4 <= _local6) {
_local5 = _local5 + _root.strongerPts[_local4];
_local4++;
}
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
_local7 = true;
}
_local6++;
}
}
if (_local7) {
_root.whereToMc.btnGoBigger.gotoAndStop(2);
} else {
_root.whereToMc.btnGoBigger.gotoAndStop(1);
}
_root.whereToMc.btnGoBigger.onRelease = function () {
_root.whereToMc.gotoAndStop(2);
_root.whereToMc.btnGoBigger.gotoAndStop(1);
};
_root.whereToMc.btnMove.onRelease = function () {
_root.gotoAndStop("gaming");
};
var _local3 = 8;
while (_local3 > 0) {
if ((_root.saveData.data.stageClear[_local3].states == "unlocked") || (_root.saveData.data.stageClear[_local3].states == "finished")) {
_root.whereToMc.godzilla._x = _root.whereToMc["lv" + _local3]._x;
_root.whereToMc.godzilla._y = _root.whereToMc["lv" + _local3]._y;
_root.stageNum = _local3;
break;
}
_local3--;
}
_local3 = 1;
while (_local3 < 15) {
_root.whereToMc["lv" + _local3].num = _local3;
if (_root.saveData.data.stageClear[_local3].states == "finished") {
if (_root.saveData.data.stageClear[_local3].doubleS) {
_root.whereToMc["lv" + _local3].gotoAndStop(5);
} else {
_root.whereToMc["lv" + _local3].gotoAndStop(1);
}
_root.whereToMc["lv" + _local3].onRollOver = function () {
_root.whereToMc.info.startDrag();
_root.whereToMc.info.gotoAndStop(1);
_root.whereToMc.info.bestTime.text = _root.saveData.data.stageClear[this.num].bestTime;
_root.whereToMc.info.bestPoints.text = _root.saveData.data.stageClear[this.num].bestPoints;
_root.whereToMc.info.timeRank.text = _root.saveData.data.stageClear[this.num].timeRank;
_root.whereToMc.info.pointsRank.text = _root.saveData.data.stageClear[this.num].pointsRank;
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
};
_root.whereToMc["lv" + _local3].onRollOut = (_root.whereToMc["lv" + _local3].onReleaseOutside = function () {
_root.whereToMc.info.stopDrag();
_root.whereToMc.info._x = (_root.whereToMc.info._y = -100);
});
_root.whereToMc["lv" + _local3].onRelease = function () {
_root.whereToMc.godzilla._x = this._x;
_root.whereToMc.godzilla._y = this._y;
_root.stageNum = this.num;
};
} else if (_root.saveData.data.stageClear[_local3].states == "unlocked") {
_root.whereToMc["lv" + _local3].gotoAndStop(2);
_root.whereToMc["lv" + _local3].onRollOver = function () {
_root.whereToMc.info.startDrag();
_root.whereToMc.info.gotoAndStop(2);
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
};
_root.whereToMc["lv" + _local3].onRollOut = (_root.whereToMc["lv" + _local3].onReleaseOutside = function () {
_root.whereToMc.info.stopDrag();
_root.whereToMc.info._x = (_root.whereToMc.info._y = -100);
});
_root.whereToMc["lv" + _local3].onRelease = function () {
_root.whereToMc.godzilla._x = this._x;
_root.whereToMc.godzilla._y = this._y;
_root.stageNum = this.num;
};
} else if (_root.saveData.data.stageClear[_local3].states == "notBigEnough") {
_root.whereToMc["lv" + _local3].gotoAndStop(3);
_root.whereToMc["lv" + _local3].onRollOver = function () {
_root.whereToMc.info.gotoAndStop(3);
_root.whereToMc.info.startDrag();
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
};
_root.whereToMc["lv" + _local3].onRollOut = (_root.whereToMc["lv" + _local3].onReleaseOutside = function () {
_root.whereToMc.info.stopDrag();
_root.whereToMc.info._x = (_root.whereToMc.info._y = -100);
});
} else if (_root.saveData.data.stageClear[_local3].states == "tooFaraway") {
_root.whereToMc["lv" + _local3].gotoAndStop(4);
_root.whereToMc["lv" + _local3].onRollOver = function () {
_root.whereToMc.info.gotoAndStop(4);
_root.whereToMc.info.startDrag();
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
};
_root.whereToMc["lv" + _local3].onRollOut = (_root.whereToMc["lv" + _local3].onReleaseOutside = function () {
_root.whereToMc.info.stopDrag();
_root.whereToMc.info._x = (_root.whereToMc.info._y = -100);
});
}
_local3++;
}
_root.showNum(_root.whereToMc.pointsLeft, _root.saveData.data.points);
}
function setUIGoBigger() {
_root.whereToMc.btnMove.onRelease = function () {
_root.gotoAndStop("gaming");
};
_root.whereToMc.btnWhereTo.onRelease = function () {
_root.whereToMc.gotoAndStop(1);
};
_root.showNum(_root.whereToMc.pointsLeft, _root.saveData.data.points);
var _local3 = _root.bigger;
while (_local3 < 8) {
var _local5 = 0;
var _local4 = _root.bigger + 1;
while (_local4 <= _local3) {
_local5 = _local5 + _root.biggerPts[_local4];
_local4++;
}
_root.whereToMc["b" + _local3].pts = _local5;
_root.whereToMc["b" + _local3].level = _local3;
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
var _local6 = true;
} else {
var _local6 = false;
}
if (_local6) {
_root.whereToMc["b" + _local3].gotoAndStop(2);
_root.whereToMc["b" + _local3].onRollOver = function () {
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
_root.whereToMc.info.startDrag();
_root.whereToMc.info.pts.text = this.pts;
};
_root.whereToMc["b" + _local3].onRollOut = (_root.whereToMc["b" + _local3].onReleaseOutside = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
});
_root.whereToMc["b" + _local3].onRelease = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
_root.saveData.data.points = _root.saveData.data.points - this.pts;
_root.bigger = (_root.saveData.data.bigger = this.level);
var _local3 = 0;
while (_local3 <= (_root.bigger + 1)) {
if ((_root.saveData.data.stageClear[_local3].states == "notBigEnough") && (_root.saveData.data.stageClear[_local3 - 1].states == "finished")) {
_root.saveData.data.stageClear[_local3].states = "unlocked";
if (_local3 < 9) {
_root.saveData.data.stageClear[_local3 + 1].states = "notBigEnough";
}
break;
}
_local3++;
}
_root.setUIGoBigger();
};
} else {
_root.whereToMc["b" + _local3].gotoAndStop(1);
_root.whereToMc["b" + _local3].onRelease = undefined;
_root.whereToMc["b" + _local3].onRollOver = function () {
_root.whereToMc.info2._x = _xmouse;
_root.whereToMc.info2._y = _ymouse;
_root.whereToMc.info2.startDrag();
_root.whereToMc.info2.pts.text = this.pts;
};
_root.whereToMc["b" + _local3].onRollOut = (_root.whereToMc["b" + _local3].onReleaseOutside = function () {
_root.whereToMc.info2._x = -100;
_root.whereToMc.info2._y = -100;
_root.whereToMc.info2.stopDrag();
});
}
_local3++;
}
_local3 = _root.faster;
while (_local3 < 10) {
var _local5 = 0;
var _local4 = _root.faster + 1;
while (_local4 <= _local3) {
_local5 = _local5 + _root.fasterPts[_local4];
_local4++;
}
_root.whereToMc["f" + _local3].pts = _local5;
_root.whereToMc["f" + _local3].level = _local3;
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
var _local6 = true;
} else {
var _local6 = false;
}
if (_local6) {
_root.whereToMc["f" + _local3].gotoAndStop(2);
_root.whereToMc["f" + _local3].onRollOver = function () {
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
_root.whereToMc.info.startDrag();
_root.whereToMc.info.pts.text = this.pts;
};
_root.whereToMc["f" + _local3].onRollOut = (_root.whereToMc["f" + _local3].onReleaseOutside = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
});
_root.whereToMc["f" + _local3].onRelease = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
_root.saveData.data.points = _root.saveData.data.points - this.pts;
_root.faster = (_root.saveData.data.faster = this.level);
_root.setUIGoBigger();
};
} else {
_root.whereToMc["f" + _local3].gotoAndStop(1);
_root.whereToMc["f" + _local3].onRelease = undefined;
_root.whereToMc["f" + _local3].onRollOver = function () {
_root.whereToMc.info2._x = _xmouse;
_root.whereToMc.info2._y = _ymouse;
_root.whereToMc.info2.startDrag();
_root.whereToMc.info2.pts.text = this.pts;
};
_root.whereToMc["f" + _local3].onRollOut = (_root.whereToMc["f" + _local3].onReleaseOutside = function () {
_root.whereToMc.info2._x = -100;
_root.whereToMc.info2._y = -100;
_root.whereToMc.info2.stopDrag();
});
}
_local3++;
}
_local3 = _root.stronger;
while (_local3 < 7) {
var _local5 = 0;
var _local4 = _root.stronger + 1;
while (_local4 <= _local3) {
_local5 = _local5 + _root.strongerPts[_local4];
_local4++;
}
_root.whereToMc["s" + _local3].pts = _local5;
_root.whereToMc["s" + _local3].level = _local3;
if ((_local5 <= _root.saveData.data.points) && (_local5 != 0)) {
var _local6 = true;
} else {
var _local6 = false;
}
if (_local6) {
_root.whereToMc["s" + _local3].gotoAndStop(2);
_root.whereToMc["s" + _local3].onRollOver = function () {
_root.whereToMc.info._x = _xmouse;
_root.whereToMc.info._y = _ymouse;
_root.whereToMc.info.startDrag();
_root.whereToMc.info.pts.text = this.pts;
};
_root.whereToMc["s" + _local3].onRollOut = (_root.whereToMc["s" + _local3].onReleaseOutside = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
});
_root.whereToMc["s" + _local3].onRelease = function () {
_root.whereToMc.info._x = -100;
_root.whereToMc.info._y = -100;
_root.whereToMc.info.stopDrag();
_root.saveData.data.points = _root.saveData.data.points - this.pts;
_root.stronger = (_root.saveData.data.stronger = this.level);
_root.setUIGoBigger();
};
} else {
_root.whereToMc["s" + _local3].gotoAndStop(1);
_root.whereToMc["s" + _local3].onRelease = undefined;
_root.whereToMc["s" + _local3].onRollOver = function () {
_root.whereToMc.info2._x = _xmouse;
_root.whereToMc.info2._y = _ymouse;
_root.whereToMc.info2.startDrag();
_root.whereToMc.info2.pts.text = this.pts;
};
_root.whereToMc["s" + _local3].onRollOut = (_root.whereToMc["s" + _local3].onReleaseOutside = function () {
_root.whereToMc.info2._x = -100;
_root.whereToMc.info2._y = -100;
_root.whereToMc.info2.stopDrag();
});
}
_local3++;
}
i = _root.bigger;
while (i > 1) {
_root.whereToMc["b" + i].gotoAndStop(3);
_root.whereToMc["b" + i].onRelease = (_root.whereToMc["b" + i].onRollOver = (_root.whereToMc["b" + i].onRollOut = undefined));
i--;
}
i = _root.stronger;
while (i > 1) {
_root.whereToMc["s" + i].gotoAndStop(3);
_root.whereToMc["s" + i].onRelease = (_root.whereToMc["s" + i].onRollOver = (_root.whereToMc["s" + i].onRollOut = undefined));
i--;
}
i = _root.faster;
while (i > 1) {
_root.whereToMc["f" + i].gotoAndStop(3);
_root.whereToMc["f" + i].onRelease = (_root.whereToMc["f" + i].onRollOver = (_root.whereToMc["f" + i].onRollOut = undefined));
i--;
}
}
function setUIAchievements() {
var _local2 = 1;
while (_local2 < 9) {
if (_root.saveData.data.ach[_local2]) {
_root["achmc" + _local2].gotoAndStop(_local2 + 1);
}
_local2++;
}
}
function newHpUp(mc, px, py) {
var _local1 = mc.getNextHighestDepth();
var _local2 = mc.attachMovie("hpUp", "hpUp" + _local1, _local1);
_local2._x = px;
_local2._y = py;
}
function showCombo(combo) {
var _local3 = _root.ui.getNextHighestDepth();
var _local2 = _root.ui.attachMovie("showCombo", "combo" + _local3, _local3);
if (combo < 0) {
_local2.mc.gotoAndStop(4);
_local2.gotoAndPlay(22);
} else if (combo > 99) {
_local2.mc.gotoAndStop(3);
} else if (combo > 9) {
_local2.mc.gotoAndStop(2);
} else {
_local2.mc.gotoAndStop(1);
}
_root.showNum(_local2.mc, combo);
}
function showNum(mc, num) {
var _local1 = 1000000000 + num;
var _local11 = Number(_local1.toString().slice(9, 10)) + 1;
var _local10 = Number(_local1.toString().slice(8, 9)) + 1;
var _local9 = Number(_local1.toString().slice(7, 8)) + 1;
var _local8 = Number(_local1.toString().slice(6, 7)) + 1;
var _local7 = Number(_local1.toString().slice(5, 6)) + 1;
var _local6 = Number(_local1.toString().slice(4, 5)) + 1;
var _local5 = Number(_local1.toString().slice(3, 4)) + 1;
var _local4 = Number(_local1.toString().slice(2, 3)) + 1;
var _local3 = Number(_local1.toString().slice(1, 2)) + 1;
mc.num1.gotoAndStop(_local11);
mc.num2.gotoAndStop(_local10);
mc.num3.gotoAndStop(_local9);
mc.num4.gotoAndStop(_local8);
mc.num5.gotoAndStop(_local7);
mc.num6.gotoAndStop(_local6);
mc.num7.gotoAndStop(_local5);
mc.num8.gotoAndStop(_local4);
mc.num9.gotoAndStop(_local3);
}
function newAchievement(num) {
_root.saveData.data.ach[num] = true;
var _local4 = _root.getNextHighestDepth();
var _local3 = _root.attachMovie("achmntUnlocked", "au" + _local4, _local4);
_local3.counter = 60;
_local3.onEnterFrame = function () {
if ((--this.counter) < 0) {
this._alpha = this._alpha - 5;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
};
}
function newFootprint() {
var _local3 = _root.game.attachMovie("\u811A\u5370", "footprint", _root.game.getNextHighestDepth());
_local3.gotoAndStop(_root.bigger);
_local3._x = _root.stageWidth / 2;
_local3._y = _root.stageHeight;
_local3.dx = 0;
_local3.dy = 0;
_local3.acl = _root.speed[_root.faster][0];
_local3.speed = _root.speed[_root.faster][1];
_local3.counter = 0;
_local3.hold = _root.hold;
_local3.rage = 0;
_local3.hp = 100;
_root.game.func.push(_local3);
_local3.runawayReset = function () {
_root.mouseD = false;
this._x = _root.stageWidth / 2;
this._y = _root.stageHeight;
this.hold = _root.hold;
this.land = false;
this.filters = null;
this.moveFoot();
_root.ui.qt.removeMovieClip();
_root.ui.hintInputDir.removeMovieClip();
_root.ui.hintPressUp.removeMovieClip();
};
_local3.hitAction = function (damage) {
var _local4 = _root.ui.getNextHighestDepth();
var _local6 = _root.ui.attachMovie("footHitRed", "fx" + _local4, _local4);
_local6.mc._alpha = damage * 5;
this.hp = this.hp - damage;
_root.ui.info.hp.mask._x = this.hp;
this.rage = this.rage + (damage / 2);
_root.ui.info.rage.mask._x = this.rage;
this.adjustRage();
if (this.hp <= 0) {
if (_root.mouseControl) {
Mouse.removeListener(_root.game.mouseListener);
}
for (var _local3 in _root) {
_root[_local3].removeMovieClip();
}
_root.gotoAndStop("gameOver");
} else if ((this.hp < 20) && (!this.lowLife)) {
this.lowLife = true;
_root.newRunOrContinue();
}
};
_local3.inputDir = function () {
if (_root.mouseControl) {
var _local8 = true;
var _local9 = (this._y - (this._height / 2)) - (_ymouse / _root.realScalePercent);
var _local10 = this._x - (_xmouse / _root.realScalePercent);
var _local7 = Math.atan2(_local9, _local10);
var _local4 = (-this.speed) * Math.cos(_local7);
var _local3 = (-this.speed) * Math.sin(_local7);
var _local5 = (((_ymouse / _root.realScalePercent) - this._y) + (this._height / 2)) / 10;
var _local6 = ((_xmouse / _root.realScalePercent) - this._x) / 10;
if (Math.sqrt((_local6 * _local6) + (_local5 * _local5)) < this.speed) {
_local4 = _local6;
_local3 = _local5;
}
if (_local4 < 0) {
if (this.dx > _local4) {
this.dx = this.dx - this.acl;
} else {
this.dx = _local4;
}
} else if (this.dx < _local4) {
this.dx = this.dx + this.acl;
} else {
this.dx = _local4;
}
if (_local3 < 0) {
if (this.dy > _local3) {
this.dy = this.dy - this.acl;
} else {
this.dy = _local3;
}
} else if (this.dy < _local3) {
this.dy = this.dy + this.acl;
} else {
this.dy = _local3;
}
}
if (Key.isDown(37)) {
if (this.dx > (-this.speed)) {
this.dx = this.dx - this.acl;
} else {
this.dx = -this.speed;
}
} else if (Key.isDown(39)) {
if (this.dx < this.speed) {
this.dx = this.dx + this.acl;
} else {
this.dx = this.speed;
}
} else if (!_local8) {
this.dx = this.dx * _root.fric;
}
if (Key.isDown(38)) {
if (this.dy > (-this.speed)) {
this.dy = this.dy - this.acl;
} else {
this.dy = -this.speed;
}
} else if (Key.isDown(40)) {
if (this.dy < this.speed) {
this.dy = this.dy + this.acl;
} else {
this.dy = this.speed;
}
} else if (!_local8) {
this.dy = this.dy * _root.fric;
}
};
_local3.moveFoot = function () {
this.dx = 0;
this.dy = 0;
this.acl = _root.speed[_root.faster][0];
this.speed = _root.speed[_root.faster][1];
this.enterframe = function () {
if (_root.mouseControl) {
if (_root.mouseD) {
_root.mouseD = false;
this.startTrampling();
return(undefined);
}
}
if (Key.isDown(32)) {
if (!keySpaceDown) {
keySpaceDown = true;
this.startTrampling();
return(undefined);
}
} else {
keySpaceDown = false;
}
this.inputDir();
this._x = this._x + this.dx;
this._y = this._y + this.dy;
_root.game.foot._x = this._x;
_root.game.foot._y = this._y - 600;
if ((--this.hold) < 0) {
this.startTrampling();
} else {
var _local3 = Math.round((this.hold / _root.hold) * 100);
if (_local3 < 35) {
_root.game.foot.startShake();
}
_root.ui.info.hold.mask._x = _local3;
}
this.moveRange();
};
};
_local3.checkAgain = function () {
_root.ui.qt.done = true;
if ((_root.ui.qt._currentframe >= 20) && (_root.ui.qt._currentframe <= 25)) {
_root.game.foot.dy = _root.game.foot.dy + 100;
_root.game.foot.strong = true;
if (!_root.saveData.data.ach[4]) {
if ((++_root.perfectTrampling) >= 10) {
_root.newAchievement(4);
}
}
if (!_root.saveData.data.ach[3]) {
if ((++saveData.data.totalPerfectTrampling) >= 100) {
_root.newAchievement(3);
}
}
var _local2 = new Color(_root.ui.qt);
_local2.setTransform(_root.shine_Transform_white);
_root.playSound("\u6210\u529F", _root.ui.qt);
_root.showCombo(-1);
_root.ui.qt.fadeOut();
} else if ((_root.ui.qt._currentframe >= 17) && (_root.ui.qt._currentframe <= 32)) {
_root.game.foot.dy = _root.game.foot.dy + 100;
_root.perfectTrampling = 0;
_root.playSound("\u6210\u529F", _root.ui.qt);
_root.ui.qt.fadeOut();
} else {
var _local2 = new Color(_root.ui.qt);
_local2.setTransform(_root.shine_Transform_red);
_root.perfectTrampling = 0;
_root.playSound("\u5931\u8D25", _root.ui.qt);
_root.ui.qt.fadeOut();
}
};
_local3.startTrampling = function () {
_root.game.foot.startTrampling();
_root.newQt();
this.hold = _root.hold;
this.enterframe = function () {
if (!_root.ui.qt.done) {
_root.ui.qt.gotoAndStop(int((_root.game.foot.moveY / 600) * 300));
if (_root.ui.qt._currentframe == 100) {
_root.ui.qt.done = true;
_root.ui.qt.fadeOut();
}
if (_root.mouseControl) {
if (_root.mouseD) {
_root.mouseD = false;
this.checkAgain();
}
}
if (Key.isDown(32)) {
if (!keySpaceDown) {
keySpaceDown = true;
this.checkAgain();
}
} else {
keySpaceDown = false;
}
}
this.dx = this.dx * _root.fric;
this.dy = this.dy * _root.fric;
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.moveRange();
};
};
_local3.hit = function () {
_root.playSound("\u51FB\u5730", this);
var _local3 = 0;
for (var _local4 in _root.men) {
if (this.hitTest(_root.men[_local4]._x * _root.realScalePercent, _root.men[_local4]._y * _root.realScalePercent, true)) {
if (_root.men[_local4].die() != "boss") {
_local3++;
}
}
}
if (_local3 > 1) {
_root.showCombo(_local3);
if (!_root.saveData.data.ach[5]) {
if (_local3 >= 40) {
_root.newAchievement(5);
}
}
}
if (!_root.saveData.data.ach[2]) {
_root.saveData.data.totalKills = _root.saveData.data.totalKills + _local3;
if (!_root.saveData.data.ach[1]) {
if (_root.saveData.data.totalKills >= 500) {
_root.newAchievement(1);
}
}
if (_root.saveData.data.totalKills >= 5000) {
_root.newAchievement(2);
}
}
_root.currentPoints = _root.currentPoints + (_local3 * _local3);
_root.ui.pts.text = _root.currentPoints;
this.land = true;
_root.ui.fearMad.mc.mc._x = _root.ui.fearMad.mc.mc._x - ((_local3 / _root.remainNum) * 120);
_root.remainNum = _root.remainNum - _local3;
var _local5 = _root.totalNum / (_root.remainNum + 1);
if (_root.remainNum <= 0) {
delete this.enterframe;
_root.delayEvent(_root.beatLevel, 30);
return(undefined);
}
var _local6 = ((_local5 > 3) ? 3 : (((_local5 > 3) ? 2 : (((_local5 > 1) ? 1 : 0)))));
_root.game.foot.blood.gotoAndStop(_local6);
_root.ui.fearMad.mc.mc._x = _root.ui.fearMad.mc.mc._x - (((_local3 / _root.remainNum) - 0.5) * 50);
if (this.rage >= 100) {
this.rageFull();
return(undefined);
}
if (_root.game.foot.strong) {
_root.ui.fearMad.mc.mc._x = _root.ui.fearMad.mc.mc._x - 10;
this.rage = this.rage + 5;
}
this.rage = this.rage + 5;
this.rage = this.rage + (_local3 * _local3);
_root.ui.info.rage.mask._x = this.rage;
this.adjustRage();
this.counter = 20;
this.enterframe = function () {
if ((--this.counter) < 0) {
this.startUp();
}
};
};
_local3.adjustRage = function () {
if (this.rage >= 100) {
this.rage = 100;
_root.ui.info.rage.gotoAndStop(2);
}
};
_local3.rageFull = function () {
var _local3 = _root.ui.getNextHighestDepth();
_root.ui.attachMovie("hintInputDir", "hintInputDir", _local3, {_x:300, _y:200});
if (_root.mouseControl) {
_root.ui.hintInputDir.btnLeft.onPress = function () {
_root.ui.hintInputDir.removeMovieClip();
_root.game.footprint.swapAttack(-1);
};
_root.ui.hintInputDir.btnRight.onPress = function () {
_root.ui.hintInputDir.removeMovieClip();
_root.game.footprint.swapAttack(1);
};
}
this.rage = 0;
_root.ui.info.rage.gotoAndStop(1);
_root.ui.info.rage.mask._x = this.rage;
this.enterframe = function () {
if (Key.isDown(37)) {
_root.ui.hintInputDir.removeMovieClip();
this.swapAttack(-1);
} else if (Key.isDown(39)) {
_root.ui.hintInputDir.removeMovieClip();
this.swapAttack(1);
}
};
};
_local3.swapAttack = function (dir) {
this.xs = dir * 1.5;
this.dx = 0;
this.land = false;
_root.shakeRoot(40, 3);
_root.playSound("\u62D6\u52A8", _root.game.foot);
this.enterframe = function () {
if ((--this.counter) < 0) {
this.dx = this.dx + (Math.abs(this.xs) * this.xs);
this._x = this._x + this.dx;
if ((this.counter % 5) == 0) {
_root.actionBlur(_root.game.foot, Math.abs(this.dx) * _root.realScalePercent, 0);
}
_root.game.foot._x = this._x;
var _local3 = 0;
var _local4 = ((this.xs > 0) ? 1 : -1);
for (var _local5 in _root.men) {
if ((_root.men[_local5]._y < this._y) && (_root.men[_local5]._y > (this._y - this._height))) {
if (_local4 > 0) {
if ((_root.men[_local5]._x < this._x) && (_root.men[_local5]._x > (this._x - (this._width / 2)))) {
if (_root.men[_local5].die2(this.xs) != "boss") {
_local3++;
}
}
} else if ((_root.men[_local5]._x > this._x) && (_root.men[_local5]._x < (this._x + (this._width / 2)))) {
if (_root.men[_local5].die2(this.xs) != "boss") {
_local3++;
}
}
}
}
if (!_root.saveData.data.ach[1]) {
_root.saveData.data.totalKills = _root.saveData.data.totalKills + _local3;
if (_root.saveData.data.totalKills >= 5000) {
_root.newAchievement(1);
}
if (!_root.saveData.data.ach[2]) {
if (_root.saveData.data.totalKills >= 500) {
_root.newAchievement(2);
}
}
}
_root.currentPoints = _root.currentPoints + (_local3 * _local3);
_root.ui.pts.text = _root.currentPoints;
_root.ui.fearMad.mc.mc._x = _root.ui.fearMad.mc.mc._x - ((_local3 / _root.remainNum) * 40);
_root.remainNum = _root.remainNum - _local3;
if (_root.remainNum <= 0) {
_root.delayEvent(_root.beatLevel, 30);
this.enterframe = undefined;
return(undefined);
}
this.rage = this.rage + (_local3 * _local3);
this.rage = ((this.rage > 100) ? 100 : (this.rage));
_root.ui.info.rage.mask._x = this.rage;
if ((this._x < -200) || (this._x > (_root.stageWidth + 200))) {
this._x = _root.stageWidth / 2;
_root.game.foot._x = this._x;
this._y = 0;
_root.game.foot._y = this._y - 600;
_root.game.foot.filters = undefined;
this.enterframe = function () {
this._y = this._y + 10;
_root.game.foot._y = this._y - 600;
if (this._y > _root.stageHeight) {
this.moveFoot();
}
};
}
}
};
};
_local3.checkAgain2 = function () {
_root.ui.qt.done = true;
if ((_root.ui.qt._currentframe >= 20) && (_root.ui.qt._currentframe <= 25)) {
this.reset(50);
var _local3 = new Color(_root.ui.qt);
_local3.setTransform(_root.shine_Transform_white);
_root.showCombo(-1);
if (!_root.saveData.data.ach[4]) {
if ((++_root.perfectTrampling) >= 10) {
_root.newAchievement(4);
}
}
if (!_root.saveData.data.ach[3]) {
if ((++saveData.data.totalPerfectTrampling) >= 100) {
_root.newAchievement(3);
}
}
_root.playSound("\u6210\u529F", _root.ui.qt);
_root.ui.qt.fadeOut();
} else if ((_root.ui.qt._currentframe >= 17) && (_root.ui.qt._currentframe <= 32)) {
this.reset(15);
_root.perfectTrampling = 0;
_root.playSound("\u6210\u529F", _root.ui.qt);
_root.ui.qt.fadeOut();
} else {
_root.perfectTrampling = 0;
var _local3 = new Color(_root.ui.qt);
_local3.setTransform(_root.shine_Transform_red);
_root.playSound("\u5931\u8D25", _root.ui.qt);
_root.ui.qt.fadeOut();
_root.ui.attachMovie("hintPressUp", "hintPressUp", _root.ui.getNextHighestDepth(), {_x:300, _y:200});
}
};
_local3.startUp = function () {
_root.newQt();
_root.ui.qt.startRolling();
this.enterframe = function () {
if (_root.ui.qt._x) {
if (!_root.ui.qt.done) {
if (_root.ui.qt._currentframe == 100) {
_root.ui.qt.done = true;
_root.ui.qt.fadeOut();
_root.ui.attachMovie("hintPressUp", "hintPressUp", _root.ui.getNextHighestDepth(), {_x:300, _y:200});
}
if (_root.mouseControl) {
if (_root.mouseD) {
_root.mouseD = false;
this.checkAgain2();
}
}
if (Key.isDown(32)) {
if (!keySpaceDown) {
keySpaceDown = true;
this.checkAgain2();
}
} else {
keySpaceDown = false;
}
}
}
if (_root.mouseControl) {
if (_root.mouseD) {
_root.mouseD = false;
_root.game.foot._y = _root.game.foot._y - 5;
if (_root.game.foot._y < (this._y - 40)) {
_root.ui.hintPressUp.removeMovieClip();
this.reset();
return(undefined);
}
}
}
if (Key.isDown(38) || (Key.isDown(32))) {
if (!keyUpDown) {
keyUpDown = true;
_root.game.foot._y = _root.game.foot._y - 5;
if (_root.game.foot._y < (this._y - 40)) {
_root.ui.hintPressUp.removeMovieClip();
this.reset();
return(undefined);
}
}
} else {
keyUpDown = false;
}
if ((++this.counter) > 2) {
if (_root.game.foot._y < this._y) {
_root.game.foot._y = _root.game.foot._y + ((this._y - _root.game.foot._y) * 0.05);
}
this.counter = 0;
}
};
};
_local3.reset = function (speed) {
this.land = false;
if (!speed) {
_root.game.foot.upSpeed = -15;
} else {
_root.game.foot.upSpeed = -speed;
}
_root.ui.hintPressUp.removeMovieClip();
this.enterframe = function () {
_root.game.foot._y = _root.game.foot._y + _root.game.foot.upSpeed;
if (_root.game.foot._y < (this._y - 600)) {
this.moveFoot();
}
};
};
_local3.moveRange = function () {
if (this._x < 0) {
this._x = 0;
this.dx = 0;
} else if (this._x > _root.stageWidth) {
this._x = _root.stageWidth;
this.dx = 0;
}
if (this._y < (this._height * 0.5)) {
this._y = this._height * 0.5;
this.dy = 0;
} else if (this._y > (_root.stageHeight + (this._height * 0.5))) {
this._y = _root.stageHeight + (this._height * 0.5);
this.dy = 0;
}
this.swapDepths(((this._x + (this._y * 600)) * _root.realScalePercent) - 2);
_root.game.foot.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
};
_local3.moveFoot();
}
function newFoot() {
var _local3 = _root.game.attachMovie("\u811A\u5B9E\u4F53", "foot", _root.game.getNextHighestDepth());
_local3._x = 300;
_local3._y = -10;
_local3.gotoAndStop(_root.bigger);
_local3.blood.gotoAndStop(4);
_local3.moveY = 0;
_local3.yOffset = 600;
_local3.dy = 1;
_local3.acl = 1.15;
_local3.strong = false;
_root.game.func.push(_local3);
_local3.counter = 0;
_local3.startShake = function () {
if (((++this.counter) % 2) == 0) {
this._x = this._x + 2;
} else if ((this.counter % 2) == 1) {
this._x = this._x - 2;
}
};
_local3.startTrampling = function () {
this.counter = 0;
this._x = _root.game.footpriny._x;
this._y = _root.game.footpriny._y - this.yOffset;
this.dy = 1;
this.acl = _root.trampleAcl[_root.faster];
this.moveY = 0;
this.strong = false;
this.enterframe = function () {
this.dy = this.dy * this.acl;
this.moveY = this.moveY + this.dy;
if ((++this.counter) > 5) {
actionBlur(this, 0, Math.abs(this.dy) * _root.realScalePercent);
this.counter = 0;
}
this._x = _root.game.footprint._x;
if (this.moveY < this.yOffset) {
this._y = (_root.game.footprint._y - this.yOffset) + this.moveY;
} else {
this._y = _root.game.footprint._y;
if (this.strong) {
var _local5 = _root.game.attachMovie("strongHitFx", "fx" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_root.game.footprint._x, _y:_root.game.footprint._y - (_root.game.footprint._height / 2)});
_local5._xscale = (_local5._yscale = (_root.bigger + 2) * 33);
_local5.onEnterFrame = function () {
if (this._currentframe == 5) {
var _local3 = (_root.stronger * 20) + 50;
for (var _local4 in _root.men) {
if (this.hitTest(_root.men[_local4])) {
_root.men[_local4].coma(_local3);
}
}
}
};
_root.shakeRoot(20, 12);
} else {
_root.shakeRoot(12, 10);
}
_root.game.footprint.hit();
this.filters = undefined;
delete this.enterframe;
}
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
};
};
}
function newQt() {
if (_root.ui.qt._x) {
_root.ui.qt.removeMovieClip();
}
_root.ui.attachMovie("quickTrample", "qt", _root.ui.getNextHighestDepth(), {_x:300, _y:200});
_root.ui.qt.fadeOut = function () {
_root.ui.qt.counter = 10;
_root.ui.qt.onEnterFrame = function () {
if ((--this.counter) < 0) {
this._alpha = this._alpha - 20;
this._xscale = this._xscale + 5;
this._yscale = this._yscale + 5;
this._y--;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
};
};
_root.ui.qt.dx = 1;
_root.ui.qt.acl = _root.trampleAcl[_root.faster];
_root.ui.qt.startRolling = function () {
this.dx = 1;
this.acl = _root.trampleAcl[_root.faster] + 0.05;
this.onEnterFrame = function () {
this.dx = this.dx * this.acl;
this.gotoAndStop(int(this.dx));
if (this.dx >= this._totalframes) {
this.gotoAndStop(this._totalframes);
delete this.onEnterFrame;
}
};
};
}
function initStageInfo() {
stage = [];
stage[1] = function () {
totalNum = (remainNum = 5);
madSpeed = 70;
manSpeed = 2;
var _local1 = 0;
while (_local1 < totalNum) {
newMan();
_local1++;
}
};
stage[2] = function () {
totalNum = (remainNum = 15);
madSpeed = 75;
manSpeed = 2;
var _local1 = 0;
while (_local1 < totalNum) {
newMan();
_local1++;
}
};
stage[3] = function () {
totalNum = (remainNum = 30);
madSpeed = 80;
manSpeed = 3;
var _local1 = 0;
while (_local1 < 28) {
newMan();
_local1++;
}
newSoldier();
newSoldier();
};
stage[4] = function () {
totalNum = (remainNum = 40);
madSpeed = 80;
manSpeed = 3;
var _local1 = 0;
while (_local1 < 31) {
newMan();
_local1++;
}
_local1 = 0;
while (_local1 < 5) {
newSoldier();
_local1++;
}
_local1 = 0;
while (_local1 < 4) {
newDoctor();
_local1++;
}
};
stage[5] = function () {
totalNum = (remainNum = 50);
madSpeed = 85;
manSpeed = 4;
totalHeli = 0;
maxHeli = 2;
var _local1 = 0;
while (_local1 < 45) {
newMan();
_local1++;
}
_local1 = 0;
while (_local1 < 5) {
newHeli();
_local1++;
}
};
stage[6] = function () {
totalNum = (remainNum = 61);
madSpeed = 85;
manSpeed = 4;
var _local1 = 0;
while (_local1 < 60) {
newMan();
_local1++;
}
newSpider();
};
stage[7] = function () {
totalNum = (remainNum = 100);
madSpeed = 90;
manSpeed = 5;
var _local1 = 0;
while (_local1 < 94) {
newMan();
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
newSoldier();
_local1++;
}
_local1 = 0;
while (_local1 < 3) {
newDoctor();
_local1++;
}
};
stage[8] = function () {
madSpeed = 95;
manSpeed = 5;
var _local4 = _root.game.createEmptyMovieClip("enemyController", game.getNextHighestDepth());
_local4.phase = 1;
_local4.phase1 = function () {
totalNum = 6;
remainNum = 7;
newSpider();
var _local1 = 0;
while (_local1 < 3) {
newSoldier();
_local1++;
}
newDoctor();
newDoctor();
};
_local4.phase2 = function () {
totalNum = 6;
remainNum = 7;
newSpider();
totalHeli = 0;
maxHeli = 1;
var _local1 = 0;
while (_local1 < 3) {
newHeli();
_local1++;
}
newDoctor();
newDoctor();
};
_local4.phase3 = function () {
totalNum = 7;
remainNum = 8;
newSpider();
newSpider();
var _local1 = 0;
while (_local1 < 5) {
newDoctor();
_local1++;
}
};
_local4.phase4 = function () {
totalNum = (remainNum = 10);
newSpider();
newSpider();
var _local1 = 0;
while (_local1 < 5) {
newSoldier();
_local1++;
}
totalHeli = 0;
maxHeli = 1;
_local1 = 0;
while (_local1 < 3) {
newHeli();
_local1++;
}
};
_local4.phase1();
game.func.push(_local4);
cotroller.counter = 0;
_local4.enterframe = function () {
if (_root.remainNum == 1) {
if (this.phase < 4) {
this.phase++;
this["phase" + this.phase]();
}
}
};
};
stage[9] = function () {
totalNum = (remainNum = 10);
madSpeed = 80;
manSpeed = 3;
var _local1 = 0;
while (_local1 < totalNum) {
invisibleMen();
_local1++;
}
};
stage[10] = function () {
totalNum = (remainNum = 10);
madSpeed = 80;
manSpeed = 3;
var _local1 = 0;
while (_local1 < totalNum) {
invisibleMen2();
_local1++;
}
};
stage[11] = function () {
totalNum = (remainNum = 30);
madSpeed = 80;
manSpeed = 4;
var _local1 = 0;
while (_local1 < totalNum) {
newDoctor();
_local1++;
}
};
stage[12] = function () {
totalNum = (remainNum = 30);
madSpeed = 80;
manSpeed = 4;
var _local1 = 0;
while (_local1 < totalNum) {
newSoldier();
_local1++;
}
};
stage[13] = function () {
madSpeed = 95;
manSpeed = 5;
var _local4 = _root.game.createEmptyMovieClip("enemyController", game.getNextHighestDepth());
_local4.phase = 1;
_local4.phase1 = function () {
totalNum = 6;
remainNum = 7;
var _local1 = 0;
while (_local1 < 6) {
newDoctor();
_local1++;
}
};
_local4.phase2 = function () {
totalNum = 10;
remainNum = 11;
var _local1 = 0;
while (_local1 < 10) {
newSoldier();
_local1++;
}
};
_local4.phase3 = function () {
totalNum = 10;
remainNum = 11;
totalHeli = 0;
maxHeli = 3;
var _local1 = 0;
while (_local1 < 10) {
newHeli();
_local1++;
}
};
_local4.phase4 = function () {
totalNum = 4;
remainNum = 5;
var _local1 = 0;
while (_local1 < 4) {
newSpider();
_local1++;
}
};
_local4.phase5 = function () {
totalNum = 18;
remainNum = 18;
newSpider();
newSpider();
newSpider();
var _local1 = 0;
while (_local1 < 5) {
newSoldier();
_local1++;
}
_local1 = 0;
while (_local1 < 5) {
newDoctor();
_local1++;
}
totalHeli = 0;
maxHeli = 2;
_local1 = 0;
while (_local1 < 5) {
newHeli();
_local1++;
}
};
_local4.phase1();
game.func.push(_local4);
_local4.enterframe = function () {
if (_root.remainNum == 1) {
if (this.phase < 5) {
this.phase++;
this["phase" + this.phase]();
}
}
};
};
stage[14] = function () {
madSpeed = 95;
manSpeed = 5;
var _local4 = _root.game.createEmptyMovieClip("enemyController", game.getNextHighestDepth());
_local4.phase = 2;
_local4.phase2 = function () {
totalNum = 20;
remainNum = 21;
var _local1 = 0;
while (_local1 < 20) {
newMan();
_local1++;
}
};
_local4.phase3 = function () {
totalNum = 30;
remainNum = 31;
var _local1 = 0;
while (_local1 < 30) {
newMan();
_local1++;
}
};
_local4.phase4 = function () {
totalNum = 40;
remainNum = 41;
var _local1 = 0;
while (_local1 < 40) {
newMan();
_local1++;
}
};
_local4.phase5 = function () {
totalNum = (remainNum = 50);
var _local1 = 0;
while (_local1 < 50) {
newMan();
_local1++;
}
};
_local4.phase2();
game.func.push(_local4);
_local4.enterframe = function () {
if (_root.remainNum == 1) {
if (this.phase < 5) {
this.phase++;
this["phase" + this.phase]();
}
}
};
};
}
function playSound1(what) {
if (music) {
if (this[what] == undefined) {
this[what] = new Sound();
this[what].attachSound(what);
}
this[what].start();
}
}
function playSound(what, mc) {
var _local5 = {x:0, y:0};
mc.localToGlobal(_local5);
if (music) {
if (mc != undefined) {
if (mc != _root) {
if (mc.sound == undefined) {
mc.sound = new Sound(mc);
mc.sound.attachSound(what);
}
if (_local5 != undefined) {
var _local6 = -Math.round((300 - _local5.x) / 3);
mc.sound.setPan(_local6);
}
if (_root.game.soundRegister[what] == undefined) {
_root.game.soundRegister[what] = 1;
}
mc.sound.setVolume(Math.round(100 / _root.game.soundRegister[what]));
_root.game.soundRegister[what]++;
_root.game.sound.push(mc.sound);
}
} else if (this[what] == undefined) {
this[what] = new Sound();
this[what].attachSound(what);
this[what].start();
}
}
}
function stopSound(what) {
_root[what].stop(what);
}
function playMusic(what) {
if (_root.music) {
if (_root[what] == undefined) {
_root[what] = new Sound();
_root[what].attachSound(what);
}
if (_root.nowMusic != what) {
_root.nowMusic = what;
stopAllSounds();
_root[what].start(0, 999);
}
}
}
music = true;
Stage.scaleMode = "noScale";
this.onEnterFrame = function () {
var _local3 = getBytesLoaded();
var _local2 = getBytesTotal();
godzilla._x = (600 * _local3) / _local2;
if ((_local3 >= _local2) && (_local2 > 0)) {
this.onEnterFrame = undefined;
this.play();
}
};
_root.setMask(mask);
stop();
Frame 7
function newEmo(who, type) {
if (!random(2)) {
var _local4 = _root.game.attachMovie("emotion", "em" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth());
} else {
var _local4 = _root.game.attachMovie("emotion1", "em" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth());
}
_local4._x = who._x;
_local4._y = who._y - who._height;
_local4.gotoAndStop(type);
tmp = _root.drawMc(_local4);
if (who.emoMc._x) {
for (var _local5 in _root.game.func) {
if (_root.game.func[_local5] == who.emoMc) {
_root.game.func.splice(_local5, 1);
}
}
who.emoMc.removeMovieClip();
}
tmp._x = who._x;
tmp._y = who._y - who._height;
tmp.counter = 60;
tmp.link = who;
who.emoMc = tmp;
_root.game.func.push(tmp);
tmp.enterframe = function () {
this._x = this.link._x;
this._y = this.link._y - this.link._height;
if ((--this.counter) < 0) {
this._alpha = this._alpha - 10;
if (this._alpha < 0) {
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
this.removeMovieClip();
}
}
};
}
function drawBody(mc) {
var _local6 = _root.game.body.getNextHighestDepth();
var _local2 = _root.game.body.createEmptyMovieClip("body" + _local6, _local6);
_local2.createEmptyMovieClip("loader", 0);
var _local5 = new flash.geom.Matrix();
var _local4 = mc.getBounds(mc);
_local5.translate(-_local4.xMin, -_local4.yMin);
var _local7 = new flash.display.BitmapData(mc._width, mc._height, true, 0);
_local7.draw(mc, _local5);
_local2.loader.attachBitmap(_local7, 0);
_local2.loader._x = _local4.xMin;
_local2.loader._y = _local4.yMin;
_local2._x = mc._x;
_local2._y = mc._y;
_local2._xscale = mc._xscale;
mc.removeMovieClip();
return(_local2);
}
function drawMc(mc) {
var _local5 = mc._parent.getNextHighestDepth();
var _local2 = mc._parent.createEmptyMovieClip("mc" + _local5, _local5);
_local2.createEmptyMovieClip("loader", 0);
var _local4 = new flash.geom.Matrix();
var _local3 = mc.getBounds(mc);
_local4.translate(-_local3.xMin, -_local3.yMin);
var _local6 = new flash.display.BitmapData(mc._width, mc._height, true, 0);
_local6.draw(mc, _local4);
_local2.loader.attachBitmap(_local6, 0);
_local2.loader._x = _local3.xMin;
_local2.loader._y = _local3.yMin;
_local2._x = mc._x;
_local2._y = mc._y;
_local2._xscale = mc._xscale;
mc.removeMovieClip();
return(_local2);
}
function newMan() {
var _local6 = _root.game.getNextHighestDepth();
var _local3 = _root.game.attachMovie("\u4EBA", "man" + _local6, _local6, {_x:random(_root.stageWidth - 60) + 31, _y:random(_root.stageHeight - 50) + 51});
_root.men.push(_local3);
_local3.eyeType = random(_local3.mc.eye._totalframes) + 1;
_local3.wearType = random(_local3.mc.wear._totalframes) + 1;
_local3.hairType = random(_local3.mc.hair._totalframes) + 1;
_local3.mc.stop();
_local3.emo = "normal";
_local3.counter = 0;
_local3.counter1 = 0;
_local3.damage = 2;
_local3.moveSpeed = _root.manSpeed;
game.func.push(_local3);
_local3.fearOrMad = function () {
var _local3 = _root.ui.fearMad.mc.mc._x;
if (_local3 > 100) {
if (!random(((190 - _local3) * (190 - _local3)) * 0.5)) {
this.mad();
}
} else if (!random((_local3 - 10) * (_local3 - 10))) {
if (_root.game.footprint.hitTest(this)) {
this.coma();
} else {
this.run();
}
}
};
_local3.die = function () {
delete this.enterframe;
this.gotoAndStop("die");
newEmo(this, "die");
this.body.gotoAndStop(random(4) + 1);
this.body.eye.gotoAndStop(this.eyeType);
this.body.wear.gotoAndStop(this.wearType);
this.body.hair.gotoAndStop(this.hairType);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
_local3.die2 = function (dir1) {
delete this.enterframe;
this.gotoAndStop("die2");
this.body.gotoAndStop(random(5) + 1);
var _local4 = ((dir1 < 0) ? 1 : -1);
this._xscale = _local4 * 100;
this.emoMc.counter = 0;
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
for (var _local3 in _root.game.func) {
if (_root.game.func[_local3] == this) {
_root.game.func.splice(_local3, 1);
}
}
};
_local3.stopMoving = function () {
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.enterframe = function () {
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (!random(200)) {
this.go();
} else if (!random(500)) {
newEmo(this, "idle");
}
if (_root.game.footprint.hitTest(this)) {
if (!random(300)) {
this.confused();
}
}
this.fearOrMad();
};
};
_local3.go = function () {
this.mc.play();
this.speed = random(this.moveSpeed) + 1;
var _local5 = random(360);
this.xs = this.speed * Math.cos(_local5 * 0.0173);
this.ys = this.speed * Math.sin(_local5 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
var _local4 = this._x + this.xs;
var _local3 = this._y + this.ys;
if (_root.game.footprint.hitTest(this)) {
if (!random(300)) {
this.confused();
}
if (_root.game.footprint.hitTest(_local4 * _root.realScalePercent, _local3 * _root.realScalePercent, true)) {
var _local5 = true;
}
}
if ((!_root.game.footprint.land) || (!_local5)) {
this._x = _local4;
this._y = _local3;
this.checkTurn();
} else {
this.xs = this.xs * -1;
this.ys = this.ys * -1;
this._xscale = this._xscale * -1;
}
if (!random(200)) {
this.stopMoving();
}
this.fearOrMad();
};
};
_local3.coma = function (time) {
_root.newEmo(this, "coma");
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (time == undefined) {
this.counter = 100;
} else {
this.counter = time;
}
this.enterframe = function () {
if ((--this.counter) < 0) {
this.confused();
}
if ((this.counter % 3) == 0) {
this._x++;
} else if ((this.counter % 3) == 1) {
this._x--;
}
};
};
_local3.confused = function () {
_root.newEmo(this, "confused");
this.mc.gotoAndStop(1);
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
this.enterframe = function () {
if (!random(200)) {
newEmo(this, "idle");
this.go();
}
if (_root.game.footprint.hitTest(this)) {
if (!random(200)) {
this.run();
}
if (_root.game.foot.dy > 1) {
this.run();
}
}
this.fearOrMad();
};
};
_local3.run = function () {
_root.newEmo(this, "panic");
this.mc.play();
this.speed = this.moveSpeed * 2;
var _local3 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local3 = _local3 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local3 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local3 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.counter = random(60) + 10;
this.checkTurn();
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
var _local4 = this._x + this.xs;
var _local3 = this._y + this.ys;
if (_root.game.footprint.hitTest(_local4 * _root.realScalePercent, _local3 * _root.realScalePercent, true)) {
var _local5 = true;
}
if ((!_root.game.footprint.land) || (!_local5)) {
this._x = _local4;
this._y = _local3;
} else {
this.xs = this.xs * -1;
this.ys = this.ys * -1;
this._xscale = this._xscale * -1;
}
this.checkTurn();
if (!random(200)) {
this.stopMoving();
}
this.fearOrMad();
if ((--this.counter) < 0) {
if (_root.game.footprint.hitTest(this)) {
this.run();
}
}
};
};
_local3.mad = function () {
_root.newEmo(this, "mad");
this.mc.play();
this.speed = this.moveSpeed * 2;
var _local6 = random(360);
this.xs = this.speed * Math.cos(_local6 * 0.0173);
this.ys = this.speed * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.counter = random(60) + 120;
this.counter1 = 0;
this.enterframe = function () {
this.mc.eye.gotoAndStop(this.eyeType);
this.mc.wear.gotoAndStop(this.wearType);
this.mc.hair.gotoAndStop(this.hairType);
this.swapDepths((this._x + (this._y * 600)) * _root.realScalePercent);
if (!_root.game.footprint.land) {
if (!random(10)) {
if (_root.game.footprint.hitTest(this)) {
this.speed = this.moveSpeed * 2;
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local6 = _local6 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local6 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
}
}
} else {
if (this.counter1 == 1) {
if (_root.game.footprint.hitTest((this._x + this.xs) * _root.realScalePercent, (this._y + this.ys) * _root.realScalePercent, true)) {
var _local3 = _root.game.getNextHighestDepth();
_root.game.attachMovie("attackFx1", "fx" + _local3, _local3, {_x:this._x, _y:this._y - 20});
_root.game.footprint.hitAction(this.damage);
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
_local6 = _local6 + (random(50) - 25);
this.xs = (-this.speed) * Math.cos(_local6 * 0.0173);
this.ys = (-this.speed) * Math.sin(_local6 * 0.0173);
this.counter1 = (-random(30)) - 10;
}
}
if (this.counter1 < 0) {
this.counter1++;
} else if (this.counter1 == 0) {
var _local6 = getRotation(this._x, this._y, _root.game.footprint._x, _root.game.footprint._y - (_root.game.footprint._height / 2));
this.xs = this.speed * Math.cos(_local6 * 0.0173);
this.ys = this.speed * Math.sin(_local6 * 0.0173);
this._xscale = ((this.xs < 0) ? 100 : -100);
this.counter1 = 1;
}
}
if (!random(120)) {
_root.newEmo(this, "mad");
}
var _local5 = this._x + this.xs;
var _local4 = this._y + this.ys;
if (_root.game.footprint.hitTest(_local5 * _root.realScalePercent, _local4 * _root.realScalePercent, true)) {
var _local7 = true;
}
if ((!_root.game.footprint.land) || (!_local7)) {
this._x = _local5;
this._y = _local4;
}
this.checkTurn();
if ((--this.counter) < 0) {
_root.newEmo(this, "idle");
this.go();
}
};
};
_local3.checkTurn = function () {
if (this._x < 30) {
if (this.xs < 0) {
this.xs = this.xs * -1;
this._xscale = this._xscale * -1;
}
} else if (this._x > (_root.stageWidth - 30)) {
if (this.xs > 0) {
this.xs = this.xs * -1;
this._xscale = this._xscale * -1;
}
}
if (this._y < 50) {
if (this.ys < 0) {
this.ys = this.ys * -1;
}
} else if (this._y > (_root.stageHeight - 10)) {
if (this.ys > 0) {
this.ys = this.ys * -1;
}
}
};
_local3.go();
return(_local3);
}
title.onRollOver = function () {
this._xscale = 100;
this._yscale = 100;
};
title.onRollOut = function () {
this._xscale = 90;
this._yscale = 90;
};
title.onRelease = function () {
this.play();
delete this.onRelease;
delete this.onRollOver;
delete this.onRollOut;
};
initColor();
initSavaData();
initCommon();
initStageInfo();
stop();
Frame 21
stop();
btnPlay.onRelease = function () {
_root.playSound("click");
_root.saveData.notFirstTime = undefined;
_root.gotoAndStop("intro1");
};
btnInstruction.onRelease = function () {
_root.playSound("click");
_root.gotoAndStop("instruction");
};
btnAchievement.onRelease = function () {
_root.playSound("click");
_root.gotoAndStop("achievement");
};
btnCredits.onRelease = function () {
_root.playSound("click");
_root.gotoAndStop("credits");
};
btnPlayMore.onRelease = function () {
_root.playSound("click");
getURL ("http://www.armorgames.com", "_blank");
};
if (_root.music) {
btnMusic.gotoAndStop("stop");
} else {
btnMusic.gotoAndStop("play");
}
btnMusic.onRelease = function () {
if (_root.music) {
_root.music = false;
stopAllSounds();
this.gotoAndStop("play");
} else {
_root.music = true;
trace(_root.nowMusic);
_root[_root.nowMusic].start(0, 999);
this.gotoAndStop("stop");
}
};
if (_root.mouseControl) {
mouseC.gotoAndStop(1);
} else {
mouseC.gotoAndStop(2);
}
mouseC.onRelease = function () {
if (_root.mouseControl) {
_root.mouseControl = false;
this.gotoAndStop(2);
} else {
_root.mouseControl = true;
this.gotoAndStop(1);
}
};
playMusic("music1");
_quality = "BEST";
Frame 30
btnSkip.onRelease = function () {
_root.playSound("click");
_root.gotoAndStop("whereTo");
};
_quality = "BEST";
Frame 37
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
btnClear.onPress = function () {
_root.playSound("click");
_root.resetSavaData();
_root.setUIAchievements();
};
setUIAchievements();
if (_root.music) {
btnMusic.gotoAndStop("stop");
} else {
btnMusic.gotoAndStop("play");
}
btnMusic.onRelease = function () {
if (_root.music) {
_root.music = false;
stopAllSounds();
this.gotoAndStop("play");
} else {
_root.music = true;
trace(_root.nowMusic);
_root[_root.nowMusic].start(0, 999);
this.gotoAndStop("stop");
}
};
playMusic("music1");
_quality = "BEST";
Frame 49
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
btnChangeMusic.onPress = function () {
_root.playMusic("music" + (random(4) + 1));
};
btnContact.onPress = function () {
getURL ("mailto:slashlee1984@hotmail.com");
};
_quality = "BEST";
Frame 57
stop();
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
if (_root.music) {
btnMusic.gotoAndStop("stop");
} else {
btnMusic.gotoAndStop("play");
}
btnMusic.onRelease = function () {
if (_root.music) {
_root.music = false;
stopAllSounds();
this.gotoAndStop("play");
} else {
_root.music = true;
trace(_root.nowMusic);
_root[_root.nowMusic].start(0, 999);
this.gotoAndStop("stop");
}
};
playMusic("music1");
_quality = "BEST";
Frame 66
stop();
initGameData();
initGame1();
Frame 74
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
playMusic("music1");
_quality = "BEST";
Frame 84
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
playMusic("music2");
_quality = "BEST";
Frame 96
btnBack.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("menu");
};
btn1.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins1");
};
btn2.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins2");
};
btn3.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins3");
};
btn4.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins4");
};
btn5.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins5");
};
btn6.onPress = function () {
_root.playSound("click");
_root.gotoAndStop("ins6");
};
Symbol 65 MovieClip [godzillaRun] Frame 7
var i = 0;
while (i < 10) {
_root.newDust((this._x - 100) + random(60), this._y);
i++;
}
Symbol 65 MovieClip [godzillaRun] Frame 15
var i = 0;
while (i < 10) {
_root.newDust((this._x - 100) + random(60), this._y);
i++;
}
Symbol 80 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 83 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 83 MovieClip Frame 218
_root.gotoAndStop("intro");
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 18
_root.playSound1("\u5F39");
Symbol 114 MovieClip Frame 50
_root.playSound1("\u5F39");
Symbol 114 MovieClip Frame 69
_root.playSound("\u5598\u6C14");
Symbol 114 MovieClip Frame 213
_root.playMusic("music1");
_root.playSound1("\u51FB\u5730");
_root.playSound1("\u4EBA\u6B7B");
Symbol 114 MovieClip Frame 214
counter = 0;
ox = _x;
oy = _y;
onEnterFrame = function () {
if ((++this.counter) > 20) {
this._x = ox;
this._y = oy;
delete this.onEnterFrame;
} else if ((this.counter % 2) == 1) {
this._x = this._x + (random(16) - 8);
this._y = this._y + (random(16) - 8);
} else {
this._x = ox;
this._y = oy;
}
};
Symbol 114 MovieClip Frame 253
_root.playSound("\u98DE\u8FC7");
Symbol 114 MovieClip Frame 283
_root.gotoAndStop("menu");
Symbol 134 MovieClip Frame 1
stop();
Symbol 139 MovieClip [quickTrample] Frame 1
stop();
Symbol 139 MovieClip [quickTrample] Frame 100
stop();
Symbol 162 MovieClip [attackFx1] Frame 1
_root.playSound("PUNCH", this);
Symbol 162 MovieClip [attackFx1] Frame 4
this.removeMovieClip();
Symbol 168 MovieClip [场景道具 红绿灯] Frame 1
stop();
if (!_root.game[(("item" + this._x) + "-") + this._y]._x) {
this.swapDepths(2);
var tmp = _root.game.attachMovie("\u573A\u666F\u9053\u5177 \u7EA2\u7EFF\u706F", (("item" + this._x) + "-") + this._y, Math.round((this._x + (this._y * 600)) * _root.realScalePercent), {_x:this._x, _y:this._y});
_root.men.push(tmp);
tmp.die = (tmp.die2 = function () {
this.gotoAndStop(2);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
return("boss");
});
this.removeMovieClip();
}
Symbol 172 MovieClip [场景道具 救护车] Frame 1
stop();
if (!_root.game[(("item" + this._x) + "-") + this._y]._x) {
this.swapDepths(2);
var tmp = _root.game.attachMovie("\u573A\u666F\u9053\u5177 \u6551\u62A4\u8F66", (("item" + this._x) + "-") + this._y, Math.round((this._x + (this._y * 600)) * _root.realScalePercent), {_x:this._x, _y:this._y});
_root.men.push(tmp);
tmp.die = (tmp.die2 = function () {
this.gotoAndStop(2);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
return("boss");
});
this.removeMovieClip();
}
Symbol 176 MovieClip [场景道具 机场灯] Frame 1
stop();
if (!_root.game[(("item" + this._x) + "-") + this._y]._x) {
this.swapDepths(2);
var tmp = _root.game.attachMovie("\u573A\u666F\u9053\u5177 \u673A\u573A\u706F", (("item" + this._x) + "-") + this._y, Math.round((this._x + (this._y * 600)) * _root.realScalePercent), {_x:this._x, _y:this._y});
_root.men.push(tmp);
tmp.die = (tmp.die2 = function () {
this.gotoAndStop(2);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
return("boss");
});
this.removeMovieClip();
}
Symbol 180 MovieClip [场景道具 水柱] Frame 1
stop();
if (!_root.game[(("item" + this._x) + "-") + this._y]._x) {
this.swapDepths(2);
var tmp = _root.game.attachMovie("\u573A\u666F\u9053\u5177 \u6C34\u67F1", (("item" + this._x) + "-") + this._y, Math.round((this._x + (this._y * 600)) * _root.realScalePercent), {_x:this._x, _y:this._y});
_root.men.push(tmp);
tmp.die = (tmp.die2 = function () {
this.gotoAndStop(2);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
return("boss");
});
this.removeMovieClip();
}
Symbol 186 MovieClip [场景道具 值班室] Frame 1
stop();
if (!_root.game[(("item" + this._x) + "-") + this._y]._x) {
this.swapDepths(2);
var tmp = _root.game.attachMovie("\u573A\u666F\u9053\u5177 \u503C\u73ED\u5BA4", (("item" + this._x) + "-") + this._y, Math.round((this._x + (this._y * 600)) * _root.realScalePercent), {_x:this._x, _y:this._y});
_root.men.push(tmp);
tmp.die = (tmp.die2 = function () {
this.gotoAndStop(2);
for (var _local3 in _root.men) {
if (_root.men[_local3] == this) {
_root.men.splice(_local3, 1);
}
}
return("boss");
});
this.removeMovieClip();
}
Symbol 205 MovieClip [hintRunOrContinue] Frame 1
_root.playSound1("\u98DE\u8FC7");
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndPlay(random(8)) + 1;
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 248 MovieClip [ui2] Frame 1
stop();
Symbol 251 MovieClip [finishMc] Frame 1
_root.playSound1("\u98DE\u8FC7");
Symbol 251 MovieClip [finishMc] Frame 48
stop();
Symbol 270 MovieClip Frame 1
stop();
Symbol 271 MovieClip [showCombo] Frame 71
this.removeMovieClip();
Symbol 274 MovieClip [hpUp] Frame 29
this.removeMovieClip();
Symbol 275 MovieClip [footHitRed] Frame 2
this.removeMovieClip();
Symbol 297 MovieClip Frame 1
this._visible = false;
Symbol 311 MovieClip Frame 1
_root.playSound("\u5B50\u5F39", this);
Symbol 311 MovieClip Frame 3
_root.game.footprint.hitAction(1);
Symbol 311 MovieClip Frame 4
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 356 MovieClip [spider] Frame 16
Symbol 356 MovieClip [spider] Frame 25
_root.drawBody(this);
Symbol 373 MovieClip [expl1] Frame 1
_root.playSound("\u7206\u70B8", this);
Symbol 373 MovieClip [expl1] Frame 28
this.removeMovieClip();
Symbol 393 MovieClip [heli] Frame 17
Symbol 454 MovieClip Frame 10
stop();
_root.drawBody(this._parent._parent);
Symbol 470 MovieClip Frame 25
stop();
_root.drawBody(this._parent._parent);
Symbol 481 MovieClip [人] Frame 1
stop();
Symbol 481 MovieClip [人] Frame 10
_root.playSound("\u4EBA\u6B7B", this);
Symbol 481 MovieClip [人] Frame 19
_root.playSound("\u4EBA\u6B7B", this);
Symbol 493 MovieClip [doctor] Frame 1
stop();
Symbol 493 MovieClip [doctor] Frame 10
_root.playSound("\u4EBA\u6B7B", this);
Symbol 493 MovieClip [doctor] Frame 19
_root.playSound("\u4EBA\u6B7B", this);
Symbol 504 MovieClip Frame 1
stop();
Symbol 508 MovieClip [solider] Frame 1
stop();
Symbol 508 MovieClip [solider] Frame 18
_root.playSound("\u4EBA\u6B7B", this);
Symbol 508 MovieClip [solider] Frame 27
_root.playSound("\u4EBA\u6B7B", this);
Symbol 514 MovieClip Frame 1
stop();
Symbol 523 MovieClip [pauseMc] Frame 1
btnContinue.onRelease = function () {
_root.continueGame();
this._parent.removeMovieClip();
};
btnQuit.onRelease = function () {
trace(this._parent.getDepth());
if (_root.mouseControl) {
Mouse.removeListener(_root.game.mouseListener);
}
_root.game.removeMovieClip();
_root.ui.removeMovieClip();
_root.gotoAndStop("menu");
this._parent.removeMovieClip();
};
Symbol 554 MovieClip [strongHitFx] Frame 11
this.removeMovieClip();
Symbol 574 MovieClip Frame 1
stop();
Symbol 577 MovieClip [ui] Frame 1
if (_root.music) {
btnMusic.gotoAndStop("stop");
} else {
btnMusic.gotoAndStop("play");
}
btnMusic.onRelease = function () {
if (_root.music) {
_root.music = false;
stopAllSounds();
this.gotoAndStop("play");
} else {
_root.music = true;
trace(_root.nowMusic);
_root[_root.nowMusic].start(0, 999);
this.gotoAndStop("stop");
}
};
Symbol 581 MovieClip Frame 1
stop();
Symbol 592 MovieClip Frame 15
stop();
Symbol 597 MovieClip Frame 235
_root.gotoAndStop("whereTo");
Symbol 626 MovieClip Frame 1
stop();
Symbol 627 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
Symbol 640 MovieClip Frame 115
stop();
this.onEnterFrame = function () {
if (!random(150)) {
this.gotoAndPlay(1);
delete this.onEnterFrame;
}
};
Symbol 663 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 1
stop();
Symbol 713 MovieClip Frame 1
stop();
Symbol 718 MovieClip Frame 1
stop();
Symbol 729 MovieClip [goBigger] Frame 1
stop();
_root.setUIWhereTo();
Symbol 729 MovieClip [goBigger] Frame 2
_root.setUIGoBigger();