Frame 1
loadMovieNum ("sound.swf", 1);
loadMovieNum ("OP.swf", 2);
loadMovieNum ("ED.swf", 3);
var loadPS = 0;
Frame 3
var tv = 0;
var t1 = _root.getBytesTotal();
var t2 = _level1.getBytesTotal();
var t3 = _level2.getBytesTotal();
var t4 = _level3.getBytesTotal();
if ((((t1 > 0) && (t2 > 0)) && (t3 > 0)) && (t4 > 0)) {
var n = (((_root.getBytesLoaded() + _level1.getBytesLoaded()) + _level2.getBytesLoaded()) + _level3.getBytesLoaded());
tv = (n * 100) / (((t1 + t2) + t3) + t4);
}
loadPS = loadPS + ((tv - loadPS) * 0.2);
if ((tv == 100) && (Math.round(loadPS) == 100)) {
loadPS = 100;
}
load_mc.gotoAndStop(1 + Math.floor(((load_mc._totalframes - 1) * loadPS) / 100));
if (loadPS < 100) {
gotoAndPlay(_currentframe - 1);
}
Frame 15
function xOP_GameStart() {
_level2.gotoAndPlay("end");
gotoAndPlay ("main");
}
_level2.gotoAndPlay(2);
stop();
Frame 16
function xSetLightness(n) {
colorTf.rb = n;
colorTf.gb = n;
colorTf.bb = n;
bg_color.setTransform(colorTf);
}
function xChangeSpeed(n) {
if (n > (SPEED_TBL.length - 1)) {
n = SPEED_TBL.length - 1;
}
main_mc.chara_mc.xSetSpeed(SPEED_TBL[n]);
}
function xPlayStageBGM() {
if (_root.stageNo < 5) {
_level1.xPlayBGM("Normal");
} else {
_level1.xPlayBGM("Last");
}
}
function xNextStage() {
stageNo++;
if (stageNo <= TOTAL_STAGE) {
gotoAndPlay ("stageStart");
} else {
gotoAndPlay ("ending");
}
}
function xAddScore(n) {
score = score + n;
if (score > MAX_SCORE) {
score = MAX_SCORE;
}
}
var START_STAGE = 1;
var sendHiscore = false;
var MVS = 48;
var START_WAIT = 10;
var SPEED_TBL = [5, 10, 20, 60];
var SLOW_TIME = 10;
var SLOW_SPEED = 2;
var ENEMY_SPEED = 10;
var MISS_MUTEKI = 10;
var MISS_TIME = 30;
var MAX_SCORE = 9999999999999;
var MAX_MOVE = 999;
var SCORE_COIN = 1500;
var BONUS_MOVE1 = 10000;
var BONUS_MOVE2 = 10;
var BONUS_TIME = 100;
var BONUS_PLAYER = 10000;
var MAP_TBL = new Array();
var YA_TBL = new Array();
var ENEMY_TBL = new Array();
var OPTION_TBL = new Array();
MAP_TBL[1] = new Array();
MAP_TBL[1].push([-1, 31, -1, -1, -1, -1]);
MAP_TBL[1].push([-1, 3, 772, 1, 67, -1]);
MAP_TBL[1].push([-1, 516, 98, 0, 5, -1]);
MAP_TBL[1].push([-1, 770, 5, 18, 1, -1]);
MAP_TBL[1].push([-1, 133, 3, 897, 1, -1]);
MAP_TBL[1].push([-1, -1, -1, -1, 30, -1]);
YA_TBL[1] = new Array();
ENEMY_TBL[1] = new Array();
OPTION_TBL[1] = {shuffle:false, quakeInterval:999, quakeCycle:0, quakePS:0};
MAP_TBL[2] = new Array();
MAP_TBL[2].push([-1, 31, -1, -1, -1, -1]);
MAP_TBL[2].push([-1, 98, 1, 5, 4, -1]);
MAP_TBL[2].push([-1, 5, 0, 6, 771, -1]);
MAP_TBL[2].push([-1, 770, 17, 2, 68, -1]);
MAP_TBL[2].push([-1, 263, 65, 2, 3, -1]);
MAP_TBL[2].push([-1, -1, -1, -1, 30, -1]);
YA_TBL[2] = new Array();
ENEMY_TBL[2] = new Array();
ENEMY_TBL[2].push({type:0, x:3, y:2, dir:1});
OPTION_TBL[2] = {shuffle:false, quakeInterval:999, quakeCycle:0, quakePS:0};
MAP_TBL[3] = new Array();
MAP_TBL[3].push([-1, 31, -1, 21, -1, -1]);
MAP_TBL[3].push([-1, 19, 2, 6, 516, -1]);
MAP_TBL[3].push([-1, 0, 129, 7, 67, -1]);
MAP_TBL[3].push([-1, 769, 257, 4, 19, -1]);
MAP_TBL[3].push([-1, 5, 18, 806, 1, -1]);
MAP_TBL[3].push([-1, -1, -1, -1, 30, -1]);
YA_TBL[3] = new Array();
YA_TBL[3].push({speed:120, interval:30});
ENEMY_TBL[3] = new Array();
OPTION_TBL[3] = {shuffle:false, quakeInterval:999, quakeCycle:0, quakePS:0};
MAP_TBL[4] = new Array();
MAP_TBL[4].push([-1, 31, -1, -1, -1, -1, -1]);
MAP_TBL[4].push([-1, 774, 5, 3, 98, 516, -1]);
MAP_TBL[4].push([21, 835, 2, 7, 6, 18, -1]);
MAP_TBL[4].push([-1, 1, 98, 0, 98, 19, -1]);
MAP_TBL[4].push([-1, 19, 5, 4, 257, 3, -1]);
MAP_TBL[4].push([-1, 902, 17, 2, 2, 7, -1]);
MAP_TBL[4].push([-1, -1, -1, -1, -1, 30, -1]);
YA_TBL[4] = new Array();
YA_TBL[4].push({speed:120, interval:60});
ENEMY_TBL[4] = new Array();
ENEMY_TBL[4].push({type:0, x:3, y:5, dir:1});
OPTION_TBL[4] = {shuffle:false, quakeInterval:999, quakeCycle:0, quakePS:0};
MAP_TBL[5] = new Array();
MAP_TBL[5].push([-1, 31, -1, -1, -1, -1, -1]);
MAP_TBL[5].push([-1, 18, 98, 771, 3, 513, -1]);
MAP_TBL[5].push([-1, 259, 7, 17, 258, 68, -1]);
MAP_TBL[5].push([-1, 68, 0, 18, 2, 19, -1]);
MAP_TBL[5].push([21, 6, 901, 2, 6, 769, -1]);
MAP_TBL[5].push([-1, 101, 6, 5, 3, 65, -1]);
MAP_TBL[5].push([-1, -1, -1, -1, -1, 30, -1]);
YA_TBL[5] = new Array();
YA_TBL[5].push({speed:120, interval:30});
ENEMY_TBL[5] = new Array();
ENEMY_TBL[5].push({type:0, x:5, y:1, dir:2});
OPTION_TBL[5] = {shuffle:true, quakeInterval:30, quakeCycle:20, quakePS:50};
var CUBE_H_SIZE = 40;
var TOTAL_STAGE = 5;
var MAP_OVER = 9999;
var stageNo = START_STAGE;
var bg_color = new Color(bg_mc);
var colorTf = new Object();
colorTf.ra = 100;
colorTf.ga = 100;
colorTf.ba = 100;
colorTf.aa = 100;
colorTf.ab = 0;
Instance of Symbol 518 MovieClip "time_mc" in Frame 16
onClipEvent (load) {
function xSetTime(v) {
var _local2 = posMin + Math.floor(((posMax - posMin) * v) / timeMax);
this._x = _local2;
return(_local2);
}
function xReset() {
this.cnt = 0;
this._x = (this.px = posMin);
_parent.limit_mc._visible = false;
_parent.xSetLightness(0);
}
function xAddTime(n) {
this.cnt = this.cnt - (n * fps);
if (this.cnt < 0) {
this.cnt = 0;
}
this._x = posMin + Math.floor(((posMax - posMin) * this.cnt) / timeMax);
if ((this.px >= 387) && (this._x < 387)) {
_parent.xPlayStageBGM();
_parent.limit_mc._visible = false;
}
this.px = this._x;
var _local3 = Math.floor(blackMax - (((blackMax - blackMin) * (this.cnt - this.blackTime)) / (timeMax - blackTime)));
if (_local3 > 0) {
_local3 = 0;
}
_parent.xSetLightness(_local3);
prev = _local3;
_parent.xChangeSpeed(Math.floor(this.cnt / Math.floor(this.timeMax / 3)));
}
function xGetBonus() {
if (this.cnt >= timeMax) {
return(false);
}
this.cnt = this.cnt + fps;
if (this.cnt > timeMax) {
this.cnt = timeMax;
}
this._x = posMin + Math.floor(((posMax - posMin) * this.cnt) / timeMax);
return(true);
}
var posMin = 200;
var posMax = 440;
var blackMin = -100;
var blackMax = 0;
var fps = 30;
var timeMax = (fps * 180);
var blackTime = (fps * 90);
var prev = 100;
var cnt = 0;
var px = this._x;
_parent.limit_mc._visible = false;
}
onClipEvent (enterFrame) {
if ((this.cnt >= timeMax) || (_root.main_mc.gameState != 1)) {
return(undefined);
}
this.cnt++;
if ((this.cnt % Math.floor(this.timeMax / 3)) == 0) {
_parent.xChangeSpeed(Math.floor(this.cnt / Math.floor(this.timeMax / 3)));
}
var n = (posMin + Math.floor(((posMax - posMin) * this.cnt) / this.timeMax));
if (n != this.px) {
this._x = (this.px = n);
if (n == 387) {
_parent.limit_mc._visible = true;
_level1.xPlayBGM("Limit");
}
}
n = this.cnt - this.blackTime;
if (n > 0) {
var m = Math.floor(blackMax - (((blackMax - blackMin) * n) / (timeMax - blackTime)));
if (m != prev) {
_parent.xSetLightness(m);
}
prev = m;
}
}
Frame 17
var score = 0;
var thunderCnt = 0;
var playerCnt = 3;
Frame 18
var moveCnt = 0;
var missCnt = 0;
thunderCnt++;
thunderBtn_mc.gotoAndPlay(1);
time_mc.xReset();
Frame 26
xPlayStageBGM();
var mapW = MAP_TBL[stageNo][0].length;
var mapH = MAP_TBL[stageNo].length;
var MVL = (MVS * mapW);
var A_TBL = [[0, -1], [1, 0], [0, 1], [-1, 0]];
var D_TBL = [[0, 2], [1, 3], [2, 3], [0, 3], [0, 1], [1, 2], [0, 2, 1, 3]];
var M_TBL = [-mapW, 1, mapW, -1];
var stage_array = new Array();
var holeX = ((holeY = -1));
y = 0;
while (y < mapH) {
stage_array[y] = new Array();
x = 0;
while (x < mapW) {
var n = parseInt(MAP_TBL[stageNo][y][x]);
if (n == 0) {
holeX = x;
holeY = y;
} else if (n == 20) {
n = Math.floor(Math.random() * 7) + 1;
} else if (n == -1) {
n = MAP_OVER;
}
stage_array[y].push(n);
x++;
}
y++;
}
var enemy_array = ENEMY_TBL[stageNo];
var ya_array = YA_TBL[stageNo];
var quake_array = OPTION_TBL[stageNo];
if (OPTION_TBL[stageNo].shuffle) {
var pr = -1;
i = 0;
while (i < 300) {
var r = Math.floor(Math.random() * 4);
var x = (holeX + A_TBL[r][0]);
var y = (holeY + A_TBL[r][1]);
var n = stage_array[y][x];
if ((((n >= 20) && (n <= 31)) || (n == MAP_OVER)) || (r == pr)) {
} else {
pr = (r + 2) % 4;
j = 0;
while (j < enemy_array.length) {
if ((enemy_array[j].x == holeX) && (enemy_array[j].y == holeY)) {
enemy_array[j].x = x;
enemy_array[j].y = y;
} else if ((enemy_array[j].x == x) && (enemy_array[j].y == y)) {
enemy_array[j].x = holeX;
enemy_array[j].y = holeY;
}
j++;
}
stage_array[y][x] = stage_array[holeY][holeX];
stage_array[holeY][holeX] = n;
holeX = x;
holeY = y;
}
i++;
}
}
Frame 27
stop();
Frame 28
stop();
Frame 33
stop();
Frame 38
stop();
Frame 43
stop();
Frame 48
stop();
Frame 53
stop();
Frame 58
stop();
Frame 64
function xED_GameStart() {
_level3.gotoAndPlay("end");
gotoAndPlay ("main");
}
_level3.gotoAndPlay(2);
stop();
Symbol 15 MovieClip [symKusa] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y;
_parent.xSetPriolity(this, _local4.vx + _root.MVS, _local4.vy, 1000);
}
var no = _name.split("_")[1];
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
gotoAndStop(2 + dir);
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
this.xUpdate();
delete this.onEnterFrame;
}
};
Symbol 15 MovieClip [symKusa] Frame 3
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y;
_parent.xSetPriolity(this, _local4.vx + _root.MVS, _local4.vy, 1000);
}
Symbol 15 MovieClip [symKusa] Frame 4
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y;
_parent.xSetPriolity(this, _local4.vx, _local4.vy + _root.MVS, 1000);
}
Symbol 15 MovieClip [symKusa] Frame 5
function xUpdate() {
var _local3 = _parent["cube_" + this.no];
this._x = _local3._x;
this._y = _local3._y;
_parent.xSetPriolity(this, _local3.vx, _local3.vy, 1000);
}
Symbol 52 MovieClip [symCube] Frame 1
function xSetType(no) {
this.type = no;
if (this.type <= 16) {
this.gotoAndStop(1 + this.type);
} else {
this.gotoAndStop(10);
}
}
function xMove(n) {
this.dir = n;
this.cnt = 0;
var _local6 = _parent.map[(this.my * _root.mapW) + this.mx];
_parent.map[(this.my * _root.mapW) + this.mx] = 0;
this.mx = this.mx + _root.A_TBL[n][0];
this.my = this.my + _root.A_TBL[n][1];
_parent.map[(this.my * _root.mapW) + this.mx] = -_local6;
this.onEnterFrame = function () {
this.vx = this.vx + MVX_TBL[this.dir][this.cnt];
this.vy = this.vy + MVY_TBL[this.dir][this.cnt];
var _local4 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y + _root.CUBE_H_SIZE;
_parent.oDepths.xChangeDepth(this, this._y);
_parent.xMoveCubeOnObj(this.no, MVX_TBL[this.dir][this.cnt], MVY_TBL[this.dir][this.cnt]);
var _local5 = _parent["obj_" + this.no];
if (_local5 != undefined) {
_local5.xUpdate();
}
_local5 = _parent["kusa_" + this.no];
if (_local5 != undefined) {
_local5.xUpdate();
}
if ((++this.cnt) == MVX_TBL[this.dir].length) {
_parent.map[(this.my * _root.mapW) + this.mx] = -_parent.map[(this.my * _root.mapW) + this.mx];
_parent.cubeState = 0;
delete this.onEnterFrame;
}
};
}
function xQuake() {
this.cnt = 0;
this.onEnterFrame = function () {
var _local4 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y + _root.CUBE_H_SIZE;
_parent.oDepths.xChangeDepth(this, this._y);
this._y = this._y + QUAKE_TBL[this.cnt];
_parent.xMoveCubeOnObj(this.no, MVX_TBL[this.dir][this.cnt], MVY_TBL[this.dir][this.cnt]);
var _local5 = _parent["obj_" + this.no];
if (_local5 != undefined) {
_local5.xUpdate();
}
_local5 = _parent["kusa_" + this.no];
if (_local5 != undefined) {
_local5.xUpdate();
}
if ((++this.cnt) == QUAKE_TBL.length) {
delete this.onEnterFrame;
}
};
}
function xIsHit(x, y) {
return((((x >= this.vx) && (x < (this.vx + _root.MVS))) && (y >= this.vy)) && (y < (this.vy + _root.MVS)));
}
stop();
var no = _name.split("_")[1];
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
var p = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
this._y = p.y + _root.CUBE_H_SIZE;
_parent.oDepths.xAdd(this, this._y);
type = type & 31;
this.xSetType(type);
var baseY = this._y;
this._y = this._y - 500;
_parent.xDropMap(this);
if (type != 0) {
area_btn.onPress = function () {
_parent.xClickCube(no);
};
area_btn.onRollOver = function () {
if ((_parent.cmdState == 0) && (_parent.xCheckMoveCubeInfo(no) != null)) {
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
};
}
var t = (_root.MVS / 8);
var MVX_TBL = [[0, 0, 0, 0, 0, 0], [t * 2, t * 3, t * 4, -t, t * 0.5, (-t) * 0.5], [0, 0, 0, 0, 0, 0], [(-t) * 2, (-t) * 3, (-t) * 4, t, (-t) * 0.5, t * 0.5]];
var MVY_TBL = [[(-t) * 2, (-t) * 3, (-t) * 4, t, (-t) * 0.5, t * 0.5], [0, 0, 0, 0, 0, 0], [t * 2, t * 3, t * 4, -t, t * 0.5, (-t) * 0.5], [0, 0, 0, 0, 0, 0]];
var QUAKE_TBL = [-36, -25, -16, -9, -4, -1, 0, 4, 0];
Symbol 60 MovieClip [symYahazama] Frame 1
function xDropMapEnd() {
var _local4 = this._name.split("_")[1];
_parent.attachMovie("symYahazamaMae", "yahazamaMae_" + _local4, _parent.dp++, {_x:this._x, _y:this._y});
_parent["yahazamaMae_" + _local4].gotoAndStop(this._currentframe);
_parent.oDepths.xAdd(_parent["yahazamaMae_" + _local4], _parent.xPriolity(this.vx + (_root.MVS / 2), this.vy + _root.MVS) + 1000);
}
this.stop();
var no = -1;
var state = 0;
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
this._y = p.y + _root.CUBE_H_SIZE;
var baseY = this._y;
_parent.oDepths.xAdd(this, baseY);
this._y = this._y - 500;
if (my == (_parent._parent.mapH - 1)) {
gotoAndStop (3);
} else if (mx < 1) {
gotoAndStop (2);
} else if (mx == (_parent._parent.mapW - 1)) {
gotoAndStop (4);
}
_parent.xDropMap(this);
Symbol 64 Button
on (press) {
_root.thunder_mc.xAction(0, this.no);
}
Symbol 65 MovieClip [symObj1] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
this.vx = _local4.vx + (_root.MVS / 2);
this.vy = _local4.vy + (_root.MVS / 2);
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
}
function xIsHit(x, y) {
return((Math.abs(this.vx - x) <= this.hitLen) && (Math.abs(this.vy - y) <= this.hitLen));
}
var no = _name.split("_")[1];
var hitLen = 16;
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
this.xUpdate();
this.onEnterFrame = function () {
this.hit_btn._visible = _parent.cmdState == 1;
};
}
};
Symbol 69 Button
on (press) {
_root.thunder_mc.xAction(0, this.no);
}
Symbol 70 MovieClip [symObj2] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
this.vx = _local4.vx + (_root.MVS / 2);
this.vy = _local4.vy + (_root.MVS / 2);
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
}
function xIsHit(x, y) {
return((Math.abs(this.vx - x) <= this.hitLen) && (Math.abs(this.vy - y) <= this.hitLen));
}
var no = _name.split("_")[1];
var hitLen = 22;
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
this.xUpdate();
this.onEnterFrame = function () {
this.hit_btn._visible = _parent.cmdState == 1;
};
}
};
Symbol 74 Button
on (press) {
_root.thunder_mc.xAction(0, this.no);
}
Symbol 87 MovieClip Frame 35
stop();
_parent.gotoAndStop(2);
Symbol 88 MovieClip [symObj3] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
this.vx = _local4.vx + (_root.MVS / 2);
this.vy = _local4.vy + (_root.MVS / 2);
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
}
function xIsHit(x, y) {
return((Math.abs(this.vx - x) <= this.hitLen) && (Math.abs(this.vy - y) <= this.hitLen));
}
stop();
var no = _name.split("_")[1];
var hitLen = 8;
var vx = (mx * _root.MVS);
var vy = (my * _root.MVS);
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
this.xUpdate();
this.onEnterFrame = function () {
this.hit_btn._visible = _parent.cmdState == 1;
};
}
};
Symbol 92 MovieClip [symYakage] Frame 1
function xSetDir(no) {
dir = no;
gotoAndStop(2 + dir);
}
stop();
_visible = false;
_parent.oDepths.xAdd(this, 999);
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 4
gotoAndStop (1);
Symbol 106 MovieClip Frame 9
_parent.xErase();
Symbol 107 MovieClip [symYa] Frame 1
function xSetDir(n) {
dir = n;
gotoAndStop(2 + dir);
}
function xErase() {
this._visible = (this.kageMC._visible = false);
this.state = (this.vx = (this.vy = 0));
}
function _FrameAction() {
if ((_parent.gameState == 1) || (_parent.gameState == 3)) {
this.shootCnt--;
if (this.state == 0) {
if (this.shootCnt <= 0) {
this.shootCnt = _root.ya_array[this.no - 1].interval;
this.vx = this.svx;
this.vy = this.svy;
this._x = -10000;
this._visible = true;
this.kageMC._x = -10000;
this.kageMC._visible = true;
this.state = 1;
se_sound.start();
}
} else if (this.state == 1) {
this.vx = this.vx + ((_root.A_TBL[this.dir][0] * this.speed) / 10);
this.vy = this.vy + ((_root.A_TBL[this.dir][1] * this.speed) / 10);
var _local4 = _parent.xCheckArea(this.vx, this.vy);
this.kageMC._visible = (_local4 > 0) && (_local4 <= 25);
if ((((this.vx < 0) || (this.vx > xlimit)) || (this.vy < 0)) || (this.vy > ylimit)) {
this.xErase();
} else if (_parent.xGetHitEnemy(this.vx, this.vy, 15) > 0) {
this.ya_mc.gotoAndPlay("hajiku");
this.kageMC._visible = false;
this.state = 3;
} else if ((((_local4 > 0) && (_local4 <= 25)) && (_parent["cube_" + _local4].type >= 17)) && (_parent["obj_" + _local4].xIsHit(this.vx, this.vy))) {
this.ya_mc.gotoAndPlay(2);
this.cnt = 20;
this.hitMC = _parent["obj_" + _local4];
this.vx = this.hitMC.vx - this.vx;
this.vy = this.hitMC.vy - this.vy;
if (this.dir == 0) {
this.vy = -this.hitMC.hitLen;
}
if (this.dir == 1) {
this.vx = this.hitMC.hitLen;
}
if (this.dir == 2) {
this.vy = this.hitMC.hitLen;
}
if (this.dir == 3) {
this.vx = -this.hitMC.hitLen;
}
this.state = 2;
} else if (_parent.xIsHitHero(this.vx, this.vy, 10)) {
trace("\u77E2\u304C\u5F53\u305F\u3063\u305F\uFF01");
if (_parent.xPlayerDead(0)) {
this.ya_mc.gotoAndPlay(2);
this.cnt = 10;
this.hitMC = _parent["obj_" + _local4];
this.vx = this.hitMC.vx - this.vx;
this.vy = this.hitMC.vy - this.vy;
this.state = 2;
}
} else {
var _local5 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local5);
this._x = _local5.x;
this._y = _local5.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, this.vx, this.vy, 1001);
this.kageMC._x = this._x;
this.kageMC._y = this._y;
}
}
}
if (this.state == 2) {
if ((--cnt) > 0) {
var _local7 = this.hitMC.vx - this.vx;
var _local6 = this.hitMC.vy - this.vy;
var _local5 = {x:_local7, y:_local6};
_parent.xPosTo3DPos(_local5);
this._x = _local5.x;
this._y = _local5.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, _local7, _local6, 1000);
this.kageMC._x = this._x;
this.kageMC._y = this._y;
} else {
this.xErase();
}
}
}
stop();
_visible = false;
var se_sound = new Sound(this);
se_sound.attachSound("SE_Ya");
var xlimit = (_root.MVS * _root.mapW);
var ylimit = (_root.MVS * _root.mapH);
var no = _name.split("_")[1];
var state = 0;
var speed = _root.ya_array[no - 1].speed;
var shootCnt = _root.ya_array[no - 1].interval;
var kageMC = _parent["yakage_" + no];
var hitMC;
var cnt;
var dir = 0;
if (my < 1) {
this.xSetDir(2);
} else if (mx < 1) {
this.xSetDir(1);
} else if (mx == (_root.mapW - 1)) {
this.xSetDir(3);
}
kageMC.xSetDir(dir);
var svx = (((mx * _root.MVS) + (_root.MVS / 2)) - (_root.A_TBL[this.dir][0] * 10));
var svy = (((my * _root.MVS) + (_root.MVS / 2)) - (_root.A_TBL[this.dir][1] * 10));
var vx = 0;
var vy = 0;
_parent.oDepths.xAdd(this, 1000);
this.onEnterFrame = _FrameAction;
Symbol 146 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 148 Button
on (press) {
if (_parent.cmdState == 1) {
delete this.onEnterFrame;
var i = 0;
while (i < _parent.obj_array.length) {
if (_parent.obj_array[i] == this) {
_parent.obj_array.splice(i, 1);
break;
}
i++;
}
_root.thunder_mc.xAction(1, this.id);
}
}
Symbol 173 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 198 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 223 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 348 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 373 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 398 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 423 MovieClip Frame 13
this.gotoAndPlay("1");
Symbol 424 MovieClip [symEnemy] Frame 1
function xStart() {
this.state = 0;
this.c_mc.play();
this.onEnterFrame = _FrameAction;
}
function xPause() {
this.c_mc.stop();
}
function xPlay() {
this.c_mc.play();
}
function xSetDir(n) {
this.dir = n;
gotoAndStop(2 + this.dir);
}
function xMoveCube(n, ax, ay) {
if (n == this.cubeNo) {
this.vx = this.vx + ax;
this.vy = this.vy + ay;
var _local4 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
}
}
function _FrameAction() {
if (_parent.gameState == 2) {
return(undefined);
}
if (this.state == 0) {
var _local8 = this.vx + ((_parent._parent.A_TBL[this.dir][0] * this.speed) / 10);
var _local7 = this.vy + ((_parent._parent.A_TBL[this.dir][1] * this.speed) / 10);
var _local6 = _parent.xCheckArea(_local8, _local7);
if (this.cubeNo != _local6) {
this.mstep = (_root.MVS * 10) / 2;
if (_parent.xIsMoveOK(_local6, this.dir, 1)) {
this.cubeNo = _local6;
} else {
if (this.cubeNo <= 25) {
this.xSetDir((this.dir + 2) % 4);
}
return(undefined);
}
}
this.vx = _local8;
this.vy = _local7;
this.mstep = this.mstep - this.speed;
var _local4 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
if (this.mstep <= 0) {
var _local5 = _parent.xGetNextDir(this.cubeNo, this.dir);
if (_local5 >= 0) {
this.mstep = _root.MVS * 10;
if (_local5 != this.dir) {
this.nextDir = _local5;
this.gotoAndStop(("t" + String(this.dir)) + _local5);
this.mstep = 12;
this.state = 1;
}
} else {
trace("error");
}
} else if (this.hitSkipCnt == 0) {
var _local5 = _parent.xGetHitEnemy(vx, vy, 15, this.id);
if ((_local5 > 0) && (_parent["ene_" + _local5].hitSkipCnt == 0)) {
this.xReverse();
_parent["ene_" + _local5].xReverse();
}
}
if (this.hitSkipCnt > 0) {
this.hitSkipCnt--;
}
} else if (this.state == 1) {
if ((this.mstep--) <= 0) {
this.xSetDir(this.nextDir);
this.mstep = _root.MVS * 10;
this.state = 0;
}
}
hit_btn._visible = _parent.cmdState == 1;
if (_parent.xIsHitHero(this.vx, this.vy, 15)) {
trace("\u5F53\u305F\u308A\uFF08\u5927\u602A\u7403\uFF09");
_parent.xPlayerDead(2);
}
}
function xReverse() {
this.hitSkipCnt = 5;
this.xSetDir((this.dir + 2) % 4);
this.mstep = (_root.MVS * 10) - this.mstep;
if (this.state == 1) {
this.state = 0;
}
}
stop();
var id = _name.split("_")[1];
_parent.obj_array.push(this);
var state = 0;
var speed = _root.ENEMY_SPEED;
var hitSkipCnt = 0;
var mstep = (_root.MVS * 10);
var nextDir;
var cubeNo = _parent.map[mx + (my * _root.mapW)];
this.xSetDir(dir);
this.c_mc.stop();
var vx = ((mx * _root.MVS) + (_root.MVS / 2));
var vy = ((my * _root.MVS) + (_root.MVS / 2));
var p = {x:vx, y:vy};
_parent.xPosTo3DPos(p);
this._x = p.x;
this._y = p.y - _root.CUBE_H_SIZE;
_parent.oDepths.xAdd(this, (this._y + _root.CUBE_H_SIZE) + 1);
var baseY = this._y;
this._y = this._y - 500;
_parent.xDropMap(this);
this.waitCnt = _parent["cube_" + cubeNo].waitCnt;
Symbol 435 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 99999);
Symbol 435 MovieClip Frame 20
_parent.removeMovieClip();
stop();
Symbol 436 MovieClip [symItem3] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
_parent.oDepths.xChangeDepth(this, 1000 + this._y);
}
function xGet() {
if (this._currentframe == 1) {
gotoAndStop (2);
_root.xAddScore(_root.SCORE_COIN);
}
}
stop();
var no = _name.split("_")[1];
var p = {x:mx * _root.MVS, y:my * _root.MVS};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
_parent.oDepths.xChangeDepth(this, this._y + 1000, true);
delete this.onEnterFrame;
}
};
Symbol 470 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 99999);
Symbol 470 MovieClip Frame 33
_parent.removeMovieClip();
stop();
Symbol 471 MovieClip [symItem2] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
_parent.oDepths.xChangeDepth(this, 1000 + this._y);
}
function xGet() {
if (this._currentframe == 1) {
gotoAndStop (2);
_root.playerCnt++;
}
}
stop();
var no = _name.split("_")[1];
var p = {x:mx * _root.MVS, y:my * _root.MVS};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
_parent.oDepths.xChangeDepth(this, this._y + 1000, true);
delete this.onEnterFrame;
}
};
Symbol 483 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 99999);
Symbol 483 MovieClip Frame 37
_parent.removeMovieClip();
stop();
Symbol 484 MovieClip [symItem1] Frame 1
function xUpdate() {
var _local4 = _parent["cube_" + this.no];
this._x = _local4._x;
this._y = _local4._y - _root.CUBE_H_SIZE;
_parent.oDepths.xChangeDepth(this, 1000 + this._y);
}
function xGet() {
if (this._currentframe == 1) {
gotoAndStop (2);
_root.main_mc.chara_mc.slowCnt = _root.SLOW_TIME * 30;
}
}
stop();
var no = _name.split("_")[1];
var p = {x:mx * _root.MVS, y:my * _root.MVS};
_parent.xPosTo3DPos(p);
this._x = p.x;
_parent.oDepths.xAdd(this, (p.y + _root.CUBE_H_SIZE) + 1);
this._y = -100;
this.onEnterFrame = function () {
if (!_parent["cube_" + no].onEnterFrame) {
_parent.oDepths.xChangeDepth(this, this._y + 1000, true);
delete this.onEnterFrame;
}
};
Symbol 506 MovieClip Frame 1
stop();
Symbol 880 MovieClip [__Packages.CDepths] Frame 0
class CDepths
{
var depths;
function CDepths () {
depths = [];
}
function xAdd(mc, dp) {
trace(((("add: " + mc) + "(") + dp) + ")");
var _local3 = {mc:mc, depth:dp};
var _local2 = 0;
while (_local2 < depths.length) {
if (depths[_local2].mc.getDepth() > mc.getDepth()) {
depths.splice(_local2, 0, _local3);
break;
}
_local2++;
}
if (_local2 == depths.length) {
depths.push(_local3);
}
changed = true;
return(_local3);
}
function xRemove(mc) {
trace("remove: " + mc);
var _local2 = 0;
while (_local2 < depths.length) {
if (depths[_local2].mc == mc) {
depths.splice(_local2, 1);
break;
}
_local2++;
}
}
function xChangeDepth(mc, dp, u) {
if (u == undefined) {
u = false;
}
var _local2 = 0;
while (_local2 < depths.length) {
if (depths[_local2].mc == mc) {
depths[_local2].depth = dp;
changed = true;
if (u) {
xUpdate();
}
return(depths[_local2]);
}
_local2++;
}
return(null);
}
function xUpdate() {
if (!changed) {
return(undefined);
}
var _local4 = true;
while (_local4) {
_local4 = false;
var _local2 = depths.length - 1;
while (_local2 > 0) {
if ((depths[_local2 - 1].mc.getDepth() < depths[_local2].mc.getDepth()) && (depths[_local2 - 1].depth > depths[_local2].depth)) {
depths[_local2 - 1].mc.swapDepths(depths[_local2].mc);
var _local3 = depths[_local2 - 1];
depths[_local2 - 1] = depths[_local2];
depths[_local2] = _local3;
_local4 = true;
}
_local2--;
}
}
changed = false;
}
var changed = false;
}
Symbol 538 MovieClip Frame 11
stop();
Symbol 540 Button
on (press) {
if (_parent.main_mc.gameState == 1) {
gotoAndStop ("use");
_parent.main_mc.cmdState = 1;
_parent.csr_mc.xEnable();
}
}
Symbol 542 Button
on (press) {
_parent.main_mc.cmdState = 0;
_parent.csr_mc.xDisable();
gotoAndStop ("on");
}
Symbol 543 MovieClip Frame 1
if (_parent.thunderCnt == 0) {
gotoAndStop ("off");
}
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 549 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 1
function xSetPos(x, y) {
var _local4 = {x:x * _root.MVS, y:y * _root.MVS};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y + _root.CUBE_H_SIZE;
_parent.oDepths.xAdd(this, this._y);
baseY = this._y;
this._y = this._y - 500;
_visible = true;
_parent.xDropMap(this);
}
_visible = false;
var no = _name.split("_")[1];
Symbol 551 MovieClip Frame 1
function xSetPos(x, y) {
var _local4 = {x:x * _root.MVS, y:y * _root.MVS};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y + _root.CUBE_H_SIZE;
_parent.oDepths.xAdd(this, this._y);
baseY = this._y;
this._y = this._y - 500;
this._visible = true;
_parent.xDropMap(this);
}
_visible = false;
var no = _name.split("_")[1];
var type = 31;
Symbol 642 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 642 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 649 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 649 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 656 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 656 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 663 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 663 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 665 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 665 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 666 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 666 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 667 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 667 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 668 MovieClip Frame 16
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 668 MovieClip Frame 65
_parent.xDeadEnd();
this.stop();
Symbol 670 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 670 MovieClip Frame 52
_parent.xDeadEnd();
this.stop();
Symbol 671 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 671 MovieClip Frame 52
_parent.xDeadEnd();
this.stop();
Symbol 672 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 672 MovieClip Frame 52
_parent.xDeadEnd();
this.stop();
Symbol 673 MovieClip Frame 1
_parent._parent.oDepths.xChangeDepth(_parent, 1000);
Symbol 673 MovieClip Frame 52
_parent.xDeadEnd();
this.stop();
Symbol 677 MovieClip Frame 28
_parent._parent.oDepths.xChangeDepth(_parent, _parent._y);
Symbol 677 MovieClip Frame 41
_parent.xDeadEnd();
this.stop();
Symbol 681 MovieClip Frame 28
_parent._parent.oDepths.xChangeDepth(_parent, _parent._y);
Symbol 681 MovieClip Frame 41
_parent.xDeadEnd();
this.stop();
Symbol 685 MovieClip Frame 28
_parent._parent.oDepths.xChangeDepth(_parent, _parent._y);
Symbol 685 MovieClip Frame 41
_parent.xDeadEnd();
this.stop();
Symbol 689 MovieClip Frame 28
_parent._parent.oDepths.xChangeDepth(_parent, _parent._y);
Symbol 689 MovieClip Frame 45
_parent.xDeadEnd();
this.stop();
Symbol 690 MovieClip Frame 1
function xSetDir(n) {
dir = n;
var _local2 = ((speed < _root.SPEED_TBL[3]) ? 2 : 6);
gotoAndStop(_local2 + dir);
}
function xSetSpeed(n) {
speed = n;
}
function xSetPos(x, y) {
this.vx = (x * _root.MVS) + (_root.MVS / 2);
this.vy = (y * _root.MVS) + (_root.MVS / 2);
this.mstep = _root.MVS * 10;
this._x = _parent["cube_" + this.cubeNo]._x;
this._y = _parent["cube_" + this.cubeNo]._y - _root.CUBE_H_SIZE;
_parent.oDepths.xAdd(this, (_parent["cube_" + this.cubeNo].baseY + _root.CUBE_H_SIZE) + 1);
_parent.obj_array.push(this);
this._visible = true;
}
function xStart() {
waitCnt = 30 * _root.START_WAIT;
slowCnt = 0;
state = 0;
}
function xPause() {
this.c_mc.stop();
}
function xPlay() {
this.c_mc.play();
}
function xDead(n) {
this.gotoAndStop((10 + (n * 4)) + this.dir);
}
function xDeadEnd() {
if (_root.playerCnt > 0) {
_parent.xPlayerRestart();
this.xSetDir(this.dir);
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
} else {
_parent.xGameOver();
}
}
function xMoveCube(no, ax, ay) {
if (no == this.cubeNo) {
this.vx = this.vx + ax;
this.vy = this.vy + ay;
var _local4 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local4);
this._x = _local4.x;
this._y = _local4.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
}
}
_visible = false;
stop();
var dir = 0;
var cubeNo = 30;
var vx = 0;
var vy = 0;
var mstep = 0;
var speed = _root.SPEED_TBL[0];
var state = 1;
var waitCnt = 0;
var slowCnt = 0;
this.onEnterFrame = function () {
if (_parent.gameState >= 2) {
return(undefined);
}
if (this.state == 0) {
if (this.waitCnt > 0) {
this.waitCnt--;
if (this.waitCnt == 0) {
this.xSetDir(dir);
}
return(undefined);
}
var _local5 = this.speed;
if (this.slowCnt > 0) {
this.slowCnt--;
_local5 = _root.SLOW_SPEED;
}
var _local9 = this.vx + ((_parent._parent.A_TBL[this.dir][0] * _local5) / 10);
var _local8 = this.vy + ((_parent._parent.A_TBL[this.dir][1] * _local5) / 10);
var _local4 = _parent.xCheckArea(_local9, _local8);
if (this.cubeNo != _local4) {
if (_parent.cubeState == 1) {
trace("\u3061\u3087\u3063\u3068\u5F85\u3061");
return(undefined);
}
if ((_local4 == 0) || (_local4 == _root.MAP_OVER)) {
trace("\u843D\u3061\u308B");
if (_parent.xPlayerDead(3)) {
return(undefined);
}
}
if ((_parent["obj_" + _local4] != undefined) && (_parent["obj_" + _local4].type == 19)) {
trace("\u5F53\u305F\u308A\uFF08\u5263\u5C71\uFF09");
if (_parent.xPlayerDead(1)) {
_parent["obj_" + _local4].gotoAndStop(3);
return(undefined);
}
}
this.mstep = (_root.MVS * 10) / 2;
if (_parent.xIsMoveOK(_local4, this.dir, 0) && (!_parent.xIsDangerCube(_local4))) {
this.cubeNo = _local4;
} else {
if (this.cubeNo <= 25) {
this.xSetDir((this.dir + 2) % 4);
}
return(undefined);
}
}
this.vx = _local9;
this.vy = _local8;
this.mstep = this.mstep - _local5;
var _local6 = {x:this.vx, y:this.vy};
_parent.xPosTo3DPos(_local6);
this._x = _local6.x;
this._y = _local6.y - _root.CUBE_H_SIZE;
_parent.xSetPriolity(this, this.vx, this.vy, 1000);
if (this.mstep <= 0) {
var _local10 = _parent["obj_" + this.cubeNo].type >> 8;
if (_local10 > 0) {
_parent["obj_" + this.cubeNo].xGet();
}
if (this.cubeNo == 31) {
_parent.xPlayerGoal();
this.state = 1;
} else {
var _local7 = _parent.xGetNextDir(this.cubeNo, this.dir);
if (_local7 >= 0) {
this.xSetDir(_local7);
}
this.mstep = _root.MVS * 10;
}
}
}
};
Symbol 691 MovieClip Frame 1
function xDropMap(aObj) {
aObj.waitCnt = random(15);
aObj.state = 0;
aObj.ay = 1;
aObj.onEnterFrame = _DropMapAction;
}
function _DropMapAction() {
if ((--this.waitCnt) < 0) {
switch (this.state) {
case 0 :
var _local3 = this._y + this.ay;
this.ay = this.ay + 2;
if (_local3 >= (this.baseY + 10)) {
_local3 = this.baseY + 10;
this.state = 1;
}
break;
default :
var _local4 = [0, 0, 5, 0];
var _local3 = this.baseY + _local4[this.state++];
if (this.state <= _local4.length) {
break;
}
dropCnt--;
if (dropCnt == 0) {
play();
}
this.xDropMapEnd();
delete this.onEnterFrame;
}
this._y = _local3;
if (this._parent["obj_" + this.no] != undefined) {
this._parent["obj_" + this.no]._y = _local3 - _root.CUBE_H_SIZE;
}
if (this._parent["kusa_" + this.no] != undefined) {
this._parent["kusa_" + this.no]._y = _local3;
}
}
}
function xPosTo3DPos(pos) {
var _local5 = pos.x;
var _local4 = pos.y;
pos.x = ((_local5 * _root.CUBE_H_SIZE) / _root.MVS) - ((_local4 * _root.CUBE_H_SIZE) / _root.MVS);
pos.y = ((-_root.CUBE_H_SIZE) + ((_local4 * _root.CUBE_H_SIZE) / _root.MVS)) + ((_local5 * _root.CUBE_H_SIZE) / _root.MVS);
pos.y = pos.y + ((7 - _parent.mapH) * _root.CUBE_H_SIZE);
}
function xCheckArea(x, y) {
if ((((x >= _root.MVS) && (x < (_root.MVS * (_parent.mapW - 1)))) && (y >= _root.MVS)) && (y < (_root.MVS * (_parent.mapH - 1)))) {
var _local4 = 1;
while (_local4 <= maxCube) {
if (this["cube_" + _local4].xIsHit(x, y)) {
return(_local4);
}
_local4++;
}
} else {
return(map[Math.floor(x / _root.MVS) + (Math.floor(y / _root.MVS) * _parent.mapW)]);
}
return(0);
}
function xCheckMoveCubeInfo(no) {
var _local6 = this.chara_mc.cubeNo;
var _local7 = this["cube_" + no];
var _local3 = 0;
while (_local3 < 4) {
var _local5 = [no];
var _local4 = (_local7.my * _parent.mapW) + _local7.mx;
if (map[_local4] == _local6) {
return(null);
}
do {
_local4 = _local4 + _parent.M_TBL[_local3];
var n = map[_local4];
if (n == 0) {
return([_local3, _local5]);
}
_local5.push(n);
} while ((n <= 25) && (n != _local6));
_local3++;
}
return(null);
}
function xClickCube(no) {
if ((cubeState != 0) || (gameState != 1)) {
return(undefined);
}
var _local5 = xCheckMoveCubeInfo(no);
if (_local5 != null) {
cubeState = 1;
if (_parent.moveCnt < _root.MAX_MOVE) {
_parent.moveCnt++;
}
var _local4 = _local5[1].length - 1;
while (_local4 >= 0) {
this["cube_" + _local5[1][_local4]].xMove(_local5[0]);
_local4--;
}
se_sound.attachSound("SE_Cube");
se_sound.start();
}
}
function xGetNextDir(no, dir) {
var _local5 = this["cube_" + no].type;
var _local3 = _parent.D_TBL[_local5 - 1];
dir = (dir + 2) % 4;
i = 0;
while (i < _local3.length) {
if (_local3[i] == dir) {
return((((i % 2) == 0) ? (_local3[i + 1]) : (_local3[i - 1])));
}
i++;
}
return(-1);
}
function xIsMoveOK(no, dir, type) {
var _local6 = this["cube_" + no].type;
if ((_local6 == 19) || (_local6 == 31)) {
return(((type == 0) ? true : false));
}
if (_local6 > 7) {
return(false);
}
var _local4 = _parent.D_TBL[_local6 - 1];
dir = (dir + 2) % 4;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] == dir) {
return(true);
}
_local3++;
}
return(false);
}
function xIsDangerCube(no) {
if ((this["obj_" + no] != undefined) && (this["obj_" + no].type == 19)) {
return(true);
}
var _local3 = 1;
while (_local3 <= _parent.enemy_array.length) {
var _local4 = this["ene_" + _local3];
if ((_local4 != undefined) && (_local4.cubeNo == no)) {
return(true);
}
_local3++;
}
return(false);
}
function xMoveCubeOnObj(no, ax, ay) {
var _local1 = 0;
while (_local1 < obj_array.length) {
obj_array[_local1].xMoveCube(no, ax, ay);
_local1++;
}
}
function xGetHitEnemy(x, y, h, s) {
if (s == undefined) {
s = -1;
}
var _local3 = 1;
while (_local3 <= _parent.enemy_array.length) {
var _local4 = this["ene_" + _local3];
if ((((s != _local3) && (_local4 != undefined)) && (Math.abs(_local4.vx - x) < h)) && (Math.abs(_local4.vy - y) < h)) {
return(_local3);
}
_local3++;
}
return(0);
}
function xIsHitHero(x, y, h) {
if (gameState != 1) {
return(false);
}
var _local2 = this.chara_mc;
return((Math.abs(_local2.vx - x) < h) && (Math.abs(_local2.vy - y) < h));
}
function xPriolity(x, y) {
return((Math.round(y / 4) * _root.MVL) + x);
}
function xSetPriolity(mc, x, y, base) {
oDepths.xChangeDepth(mc, (base + (Math.round(y / 4) * _root.MVL)) + x);
}
function xQuakeSwap() {
var _local4;
var _local3;
var _local2;
do {
_local4 = Math.floor(Math.random() * maxCube) + 1;
_local3 = Math.floor(Math.random() * maxCube) + 1;
// unexpected jump
_local2 = 0;
while (_local2 < obj_array.length) {
trace((((_local4 + " : ") + _local3) + " - ") + obj_array[_local2].cubeNo);
if ((obj_array[_local2].cubeNo == _local4) || (obj_array[_local2].cubeNo == _local3)) {
break;
}
_local2++;
}
} while (_local2 != obj_array.length);
trace((("quake: " + _local4) + " <-> ") + _local3);
var _local7 = this["cube_" + _local4];
var _local8 = this["cube_" + _local3];
var _local9 = _local7.type;
_local7.xSetType(_local8.type);
_local8.xSetType(_local9);
var _local5 = this["obj_" + _local4];
var _local6 = this["obj_" + _local3];
if (_local5 != undefined) {
_local5.no = _local3;
_local5._name = "obj_" + _local3;
_local5.xUpdate();
}
if (_local6 != undefined) {
_local6.no = _local4;
_local6._name = "obj_" + _local4;
_local6.xUpdate();
}
_local5 = this["kusa_" + _local4];
_local6 = this["kusa_" + _local3];
if (_local5 != undefined) {
_local5.no = _local3;
_local5._name = "kusa_" + _local3;
_local5.xUpdate();
}
if (_local6 != undefined) {
_local6.no = _local4;
_local6._name = "kusa_" + _local4;
_local6.xUpdate();
}
_local7.xQuake();
_local8.xQuake();
se_sound.attachSound("SE_Cube");
se_sound.start();
}
function xEarthquakeEnd() {
quakeWait = _root.quake_array.quakeInterval * 30;
chara_mc.xPlay();
var _local4 = 1;
while (_local4 <= _parent.enemy_array.length) {
this["ene_" + _local4].xPlay();
_local4++;
}
gameState = 1;
}
function xQuakeArea() {
this.baseX = this._x;
this.cnt = 300;
this.onEnterFrame = function () {
this.cnt--;
this._x = this.baseX + (((this.cnt % 2) > 0) ? 5 : -5);
if (this.cnt <= 0) {
this._x = this.baseX;
delete this.onEnterFrame;
}
};
}
function xSpeedUp() {
if (speedIdx < (_root.SPEED_TBL.length - 1)) {
speedIdx++;
}
chara_mc.xSetSpeed(_root.SPEED_TBL[speedIdx]);
trace("speed up:" + speedIdx);
}
function xPlayerDead(n) {
if (freeCnt == 0) {
gameState = 3;
_root.playerCnt--;
_root.missCnt++;
chara_mc.xDead(n);
return(true);
}
return(false);
}
function xPlayerGoal() {
gameState = 4;
chara_mc._visible = false;
_level1.xStopBGM();
_parent.gotoAndPlay("clear" + _root.stageNo);
}
function xPlayerRestart() {
gameState = 1;
freeCnt = _root.MISS_MUTEKI * 30;
_root.time_mc.xAddTime(_root.MISS_TIME);
}
function xGameOver() {
gameState = 4;
_level1.xStopBGM();
_root.gotoAndPlay("over");
}
var oDepths = new CDepths();
var bgm_sound = new Sound(this);
var se_sound = new Sound(this);
var gameState = 0;
var cubeState = 1;
var cmdState = 0;
var obj_array = [];
var quakeWait = (_parent.quake_array.quakeInterval * 30);
var quakeCnt = (_parent.quake_array.quakeCycle * 30);
var speedIdx = 0;
var freeCnt = 0;
Symbol 691 MovieClip Frame 2
var map = new Array(_parent.mapW * _parent.mapH);
var dropCnt = 0;
var maxCube = 0;
var dp = 32;
var y = 0;
while (y < _parent.mapH) {
var x = 0;
while (x < _parent.mapW) {
var n = _parent.stage_array[y][x];
if ((((x > 0) && (y > 0)) && (x < (_parent.mapW - 1))) && (y < (_parent.mapH - 1))) {
if (n > 0) {
maxCube++;
dropCnt++;
this.attachMovie("symCube", "cube_" + maxCube, maxCube, {mx:x, my:y, type:n});
if ((n >= 17) && (n <= 19)) {
this.attachMovie("symObj" + (n - 16), "obj_" + maxCube, dp++, {mx:x, my:y, type:n});
}
var i = ((n >> 5) & 7);
if (i > 0) {
this.attachMovie("symKusa", "kusa_" + maxCube, dp++, {mx:x, my:y, dir:i - 1});
}
i = n >> 8;
if (n > 0) {
this.attachMovie("symItem" + i, "obj_" + maxCube, dp++, {mx:x, my:y, type:n});
}
}
map[(y * _parent.mapW) + x] = ((n > 0) ? (maxCube) : 0);
} else {
if (n == 30) {
dropCnt++;
cube_30.xSetPos(x, y);
if (y < 1) {
chara_mc.dir = 2;
} else if (x < 1) {
chara_mc.dir = 1;
} else if (x == (_parent.mapW - 1)) {
chara_mc.dir = 3;
}
chara_mc.xSetPos(x, y);
chara_mc._name = "obj_30";
} else if (n == 31) {
dropCnt++;
cube_31.xSetPos(x, y);
} else if ((n >= 21) && (n <= 29)) {
dropCnt++;
this.attachMovie("symYahazama", "yahazama_" + (n - 20), dp++, {mx:x, my:y});
this.attachMovie("symYakage", "yakage_" + (n - 20), dp++);
this.attachMovie("symYa", "ya_" + (n - 20), dp++, {mx:x, my:y});
n = n + 20;
}
map[(y * _parent.mapW) + x] = n;
}
x++;
}
y++;
}
trace("\u30AD\u30E5\u30FC\u30D6\u6570\uFF1A" + maxCube);
dp = 100;
var i = 0;
while (i < _parent.enemy_array.length) {
var x = _parent.enemy_array[i].x;
var y = _parent.enemy_array[i].y;
var d = _parent.enemy_array[i].dir;
this.attachMovie("symEnemy", "ene_" + (dp - 99), dp, {mx:x, my:y, dir:d});
dp++;
i++;
}
Symbol 691 MovieClip Frame 3
oDepths.xUpdate();
stop();
Symbol 691 MovieClip Frame 4
_parent.play();
Symbol 691 MovieClip Frame 50
gameState = 1;
cubeState = 0;
obj_30._name = "chara_mc";
chara_mc.xStart();
var i = 1;
while (i <= _parent.enemy_array.length) {
this["ene_" + i].xStart();
i++;
}
stop();
this.onEnterFrame = function () {
if ((--quakeWait) <= 0) {
if ((--quakeCnt) <= 0) {
quakeCnt = _parent.quake_array.quakeCycle * 30;
if ((Math.random() * 100) < _parent.quake_array.quakePS) {
_root.main_mc.gameState = 2;
_parent.earthquake_mc.xStart();
chara_mc.xPause();
var _local4 = 1;
while (_local4 <= _parent.enemy_array.length) {
this["ene_" + _local4].xPause();
_local4++;
}
quakeWait = 99999 /* 0x01869F */;
}
}
}
if ((freeCnt > 0) && (gameState < 4)) {
freeCnt--;
chara_mc._visible = (((Math.floor(freeCnt / 2) % 2) > 0) ? false : true);
}
oDepths.xUpdate();
};
Symbol 730 MovieClip Frame 23
stop();
Symbol 733 MovieClip Frame 6
_parent._Breaking();
Symbol 733 MovieClip Frame 31
_parent._End();
stop();
Symbol 734 MovieClip Frame 1
function xAction(type, no) {
_parent.thunderCnt--;
_parent.csr_mc.xDisable();
_parent.main_mc.cmdState = -1;
_parent.thunderBtn_mc.gotoAndPlay(3);
this.type = type;
this.no = no;
gotoAndPlay (2);
}
function _Breaking() {
var _local3;
if (this.type == 0) {
_local3 = _root.main_mc["obj_" + this.no];
_root.main_mc["cube_" + this.no].xSetType(7);
} else {
_local3 = _root.main_mc["ene_" + this.no];
}
_root.main_mc.oDepths.xRemove(_local3);
_local3.removeMovieClip();
}
function _End() {
_parent.main_mc.cmdState = 0;
_parent.thunderBtn_mc.gotoAndPlay(1);
gotoAndStop (1);
}
stop();
var type = 0;
var no = 0;
Instance of Symbol 733 MovieClip in Symbol 734 MovieClip Frame 2
onClipEvent (load) {
if (_parent.type == 0) {
var p = {x:_root.main_mc["obj_" + _parent.no]._x, y:_root.main_mc["obj_" + _parent.no]._y};
} else {
var p = {x:_root.main_mc["ene_" + _parent.no]._x, y:_root.main_mc["ene_" + _parent.no]._y - 20};
}
_root.main_mc.localToGlobal(p);
this._x = p.x;
this._y = p.y;
}
Symbol 734 MovieClip Frame 9
stop();
Symbol 749 MovieClip Frame 1
function xStart() {
this.gotoAndPlay("start");
_parent.earthquakeBG_mc.gotoAndPlay("start");
}
stop();
Symbol 749 MovieClip Frame 70
_parent.main_mc.xQuakeSwap();
Symbol 749 MovieClip Frame 95
_parent.main_mc.xQuakeSwap();
Symbol 749 MovieClip Frame 120
_parent.main_mc.xQuakeSwap();
Symbol 749 MovieClip Frame 145
_parent.main_mc.xQuakeSwap();
Symbol 749 MovieClip Frame 218
_root.main_mc.xEarthquakeEnd();
Symbol 750 MovieClip Frame 1
function xEnable() {
this._mouseMove();
Mouse.hide();
_visible = true;
this.onMouseMove = _mouseMove;
}
function xDisable() {
_visible = false;
Mouse.show();
delete this.onMouseMove;
}
function _mouseMove() {
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
}
_visible = false;
Symbol 757 MovieClip Frame 1
var p = {x:_parent.main_mc.cube_30._x, y:_parent.main_mc.cube_30._y};
_parent.main_mc.localToGlobal(p);
this._x = p.x - 140;
this._y = p.y - 85;
Symbol 757 MovieClip Frame 20
stop();
Symbol 764 MovieClip Frame 1
var p = {x:_parent.main_mc.cube_31._x, y:_parent.main_mc.cube_31._y};
_parent.main_mc.localToGlobal(p);
this._x = p.x + 50;
this._y = p.y - 20;
Symbol 764 MovieClip Frame 20
stop();
Symbol 775 MovieClip Frame 1
gotoAndStop(_root.stageNo);
Symbol 776 MovieClip Frame 6
stage_sound = new Sound();
stage_sound.attachSound("SE_Stage" + _root.stageNo);
stage_sound.start();
Symbol 776 MovieClip Frame 50
stop();
Symbol 797 Button
on (release) {
continueFlag = true;
play();
}
Symbol 798 Button
on (release) {
continueFlag = false;
play();
}
Symbol 801 MovieClip Frame 1
totalScore = _root.score;
Symbol 802 MovieClip Frame 28
_parent.main_mc._visible = false;
stop();
Symbol 802 MovieClip Frame 29
if (continueFlag) {
_parent.gotoAndPlay("continue");
} else {
_root.gotoAndPlay("title");
}
stop();
Symbol 804 MovieClip Frame 11
_root.main_mc._visible = false;
stop();
Symbol 808 MovieClip Frame 20
stop();
Symbol 808 MovieClip Frame 31
_parent.xNextStage();
Symbol 831 MovieClip Frame 2
timeBonus = (moveCnt = (totalScore = 0));
moveBonus = _root.BONUS_MOVE1;
var ten_sound = new Sound(this);
ten_sound.attachSound("SE_ten");
ten_sound.start(0, 999);
Symbol 831 MovieClip Frame 4
if (_root.time_mc.xGetBonus()) {
timeBonus = timeBonus + _root.BONUS_TIME;
gotoAndPlay ("lp1");
}
Symbol 831 MovieClip Frame 5
ten_sound.stop();
Symbol 831 MovieClip Frame 14
ten_sound.start(0, 999);
Symbol 831 MovieClip Frame 16
if (moveCnt < _root.moveCnt) {
moveCnt++;
moveBonus = moveBonus - _root.BONUS_MOVE2;
gotoAndPlay ("lp2");
}
Symbol 831 MovieClip Frame 17
ten_sound.stop();
Symbol 831 MovieClip Frame 27
_root.xAddScore(timeBonus + moveBonus);
totalScore = _root.score;
Symbol 831 MovieClip Frame 37
stop();
Symbol 851 Button
on (release) {
play();
}
Symbol 852 MovieClip Frame 95
if (bonus_mc._currentframe < bonus_mc._totalframes) {
gotoAndPlay(_currentframe - 1);
}
Symbol 852 MovieClip Frame 96
stop();
Symbol 852 MovieClip Frame 159
_parent.road_mc.play();
stop();
Symbol 857 MovieClip Frame 133
if (bonus_mc._currentframe < bonus_mc._totalframes) {
gotoAndPlay(_currentframe - 1);
}
Symbol 857 MovieClip Frame 134
stop();
Symbol 857 MovieClip Frame 197
_parent.road_mc.play();
stop();
Symbol 861 MovieClip Frame 168
if (bonus_mc._currentframe < bonus_mc._totalframes) {
gotoAndPlay(_currentframe - 1);
}
Symbol 861 MovieClip Frame 169
stop();
Symbol 861 MovieClip Frame 232
_parent.road_mc.play();
stop();
Symbol 866 MovieClip Frame 204
if (bonus_mc._currentframe < bonus_mc._totalframes) {
gotoAndPlay(_currentframe - 1);
}
Symbol 866 MovieClip Frame 205
stop();
Symbol 866 MovieClip Frame 268
_parent.road_mc.play();
stop();
Symbol 876 MovieClip Frame 2
timeBonus = (moveCnt = (playerBonus = (totalScore = 0)));
moveBonus = _root.BONUS_MOVE1;
var ten_sound = new Sound(this);
ten_sound.attachSound("SE_ten");
ten_sound.start(0, 999);
Symbol 876 MovieClip Frame 4
if (_root.time_mc.xGetBonus()) {
timeBonus = timeBonus + _root.BONUS_TIME;
gotoAndPlay ("lp1");
}
Symbol 876 MovieClip Frame 5
ten_sound.stop();
Symbol 876 MovieClip Frame 14
ten_sound.start(0, 999);
Symbol 876 MovieClip Frame 16
if (moveCnt < _root.moveCnt) {
moveCnt++;
moveBonus = moveBonus - _root.BONUS_MOVE2;
gotoAndPlay ("lp2");
}
Symbol 876 MovieClip Frame 17
ten_sound.stop();
Symbol 876 MovieClip Frame 26
ten_sound.start(0, 999);
Symbol 876 MovieClip Frame 28
if (_root.playerCnt > 0) {
_root.playerCnt--;
playerBonus = playerBonus + _root.BONUS_PLAYER;
gotoAndPlay ("lp3");
}
Symbol 876 MovieClip Frame 29
ten_sound.stop();
Symbol 876 MovieClip Frame 39
_root.xAddScore((timeBonus + moveBonus) + playerBonus);
totalScore = _root.score;
Symbol 876 MovieClip Frame 49
stop();
Symbol 879 MovieClip Frame 260
if (bonus_mc._currentframe < bonus_mc._totalframes) {
gotoAndPlay(_currentframe - 1);
}
Symbol 879 MovieClip Frame 381
_parent.road_mc.play();
stop();