Frame 1
var menu_cm = new ContextMenu();
menu_cm.builtInItems.forward_back = false;
menu_cm.builtInItems.loop = false;
menu_cm.builtInItems.play = false;
menu_cm.builtInItems.print = false;
menu_cm.builtInItems.quality = true;
menu_cm.builtInItems.rewind = false;
menu_cm.builtInItems.zoom = true;
_root.menu = menu_cm;
var init = {cf0:65, cf1:68, cf2:87, cf3:83, cf4:82, cf5:32, cf6:49, cf7:50, cf8:51, cf9:52, cf10:81, cf11:69, char0:"A", char1:"D", char2:"W", char3:"S", char4:"R", char5:"SP", char6:"1", char7:"2", char8:"3", char9:"4", char10:"Q", char11:"E"};
var keySetting = new Object();
var data_so = SharedObject.getLocal("data");
if (data_so.data.keySetting == undefined) {
trace("keySetting\u521D\u671F\u5316");
data_so.data.keySetting = new Object();
i = 0;
while (i < 12) {
nm = "cf" + i;
ai = "char" + i;
data_so.data.keySetting[nm] = init[nm];
data_so.data.keySetting[ai] = init[ai];
i++;
}
}
if (data_so.data.playerName == undefined) {
trace("playerName\u521D\u671F\u5316");
data_so.data.playerName = "Your name";
}
if (data_so.data.qual == undefined) {
trace("qual\u521D\u671F\u5316");
data_so.data.qual = "high";
}
if (data_so.data.shell == undefined) {
trace("shell\u521D\u671F\u5316");
data_so.data.shell = true;
}
if (data_so.data.bgm == undefined) {
data_so.data.bgm = true;
}
if (data_so.data.okusenman == undefined) {
trace("okusenman\u521D\u671F\u5316");
data_so.data.okusenman = false;
}
if (data_so.data.unarmedMode == undefined) {
trace("unarmedMode\u521D\u671F\u5316");
data_so.data.unarmedMode = false;
}
if (data_so.data.samuraiMode == undefined) {
trace("samuraiMode\u521D\u671F\u5316");
data_so.data.samuraiMode = false;
}
if (data_so.data.bombermanMode == undefined) {
trace("bombermanMode\u521D\u671F\u5316");
data_so.data.bombermanMode = false;
}
if (data_so.data.enhancedMode == undefined) {
trace("enhancedMode\u521D\u671F\u5316");
data_so.data.enhancedMode = false;
}
if (data_so.data.beamSaber == undefined) {
trace("beamSaber\u521D\u671F\u5316");
data_so.data.beamSaber = false;
}
if (data_so.data.grenadeMachinegun == undefined) {
trace("grenadeMachinegun\u521D\u671F\u5316");
data_so.data.grenadeMachinegun = false;
}
if (data_so.data.busterRifle == undefined) {
trace("busterRifle\u521D\u671F\u5316");
data_so.data.busterRifle = false;
}
if (data_so.data.unarmedModeAv == undefined) {
trace("unarmedModeAv\u521D\u671F\u5316");
data_so.data.unarmedModeAv = false;
}
if (data_so.data.samuraiModeAv == undefined) {
trace("samuraiModeAv\u521D\u671F\u5316");
data_so.data.samuraiModeAv = false;
}
if (data_so.data.bombermanModeAv == undefined) {
trace("bombermanModeAv\u521D\u671F\u5316");
data_so.data.bombermanModeAv = false;
}
if (data_so.data.enhancedModeAv == undefined) {
trace("enhancedModeAv\u521D\u671F\u5316");
data_so.data.enhancedModeAv = false;
}
if (data_so.data.beamSaberAv == undefined) {
trace("beamSaberAv\u521D\u671F\u5316");
data_so.data.beamSaberAv = false;
}
if (data_so.data.grenadeMachinegunAv == undefined) {
trace("grenadeMachinegunAv\u521D\u671F\u5316");
data_so.data.grenadeMachinegunAv = false;
}
if (data_so.data.busterRifleAv == undefined) {
trace("busterRifleAv\u521D\u671F\u5316");
data_so.data.busterRifleAv = false;
}
if (data_so.data.okusenmanAv == undefined) {
trace("okusenmanAv\u521D\u671F\u5316");
data_so.data.okusenmanAv = false;
}
if (data_so.data.OTKill == undefined) {
data_so.data.OTKill = 0;
}
if (data_so.data.numberOfPlaying == undefined) {
trace("\u6226\u6B74\u521D\u671F\u5316");
data_so.data.numberOfPlaying = 0;
data_so.data.normalTry = 0;
data_so.data.totalPlayingTime = 0;
data_so.data.aveDis = 0;
data_so.data.maxDis = 0;
data_so.data.totalDis = 0;
data_so.data.aveKill = 0;
data_so.data.maxKill = 0;
data_so.data.totalKill = 0;
data_so.data.HGKill = 0;
data_so.data.MGKill = 0;
data_so.data.SGKill = 0;
data_so.data.SRKill = 0;
data_so.data.FGKill = 0;
data_so.data.OTKill = 0;
data_so.data.aveScore = 0;
data_so.data.maxScore = 0;
data_so.data.totalScore = 0;
data_so.data.maxDisOnUnarmedMode = 0;
data_so.data.maxDisOnSamuraiMode = 0;
data_so.data.maxDisOnBombermanMode = 0;
}
i = 0;
while (i < 12) {
nm = "cf" + i;
ai = "char" + i;
_root.keySetting[nm] = data_so.data.keySetting[nm];
_root.keySetting[ai] = data_so.data.keySetting[ai];
trace((nm + ": ") + _root.keySetting[nm]);
i++;
}
_global.playerName = data_so.data.playerName;
trace("playerName: " + _global.playerName);
_global.qual = data_so.data.qual;
_global.shell = data_so.data.shell;
_global.bgm = data_so.data.bgm;
_global.okusenman = data_so.data.okusenman;
_global.unarmedMode = data_so.data.unarmedMode;
_global.samuraiMode = data_so.data.samuraiMode;
_global.bombermanMode = data_so.data.bombermanMode;
_global.enhancedMode = data_so.data.enhancedMode;
_global.beamSaber = data_so.data.beamSaber;
_global.grenadeMachinegun = data_so.data.grenadeMachinegun;
_global.busterRifle = data_so.data.busterRifle;
_global.unarmedModeAv = data_so.data.unarmedModeAv;
_global.samuraiModeAv = data_so.data.samuraiModeAv;
_global.bombermanModeAv = data_so.data.bombermanModeAv;
_global.enhancedModeAv = data_so.data.enhancedModeAv;
_global.beamSaberAv = data_so.data.beamSaberAv;
_global.grenadeMachinegunAv = data_so.data.grenadeMachinegunAv;
_global.busterRifleAv = data_so.data.busterRifleAv;
_global.okusenmanAv = data_so.data.okusenmanAv;
_global.numberOfPlaying = data_so.data.numberOfPlaying;
_global.normalTry = data_so.data.normalTry;
_global.totalPlayingTime = data_so.data.totalPlayingTime;
_global.aveDis = data_so.data.aveDis;
_global.maxDis = data_so.data.maxDis;
_global.totalDis = data_so.data.totalDis;
_global.aveKill = data_so.data.aveKill;
_global.maxKill = data_so.data.maxKill;
_global.totalKill = data_so.data.totalKill;
_global.HGKill = data_so.data.HGKill;
_global.MGKill = data_so.data.MGKill;
_global.SGKill = data_so.data.SGKill;
_global.SRKill = data_so.data.SRKill;
_global.FGKill = data_so.data.FGKill;
_global.OTKill = data_so.data.OTKill;
_global.aveScore = data_so.data.aveScore;
_global.maxScore = data_so.data.maxScore;
_global.totalScore = data_so.data.totalScore;
_global.maxDisOnUnarmedMode = data_so.data.maxDisOnUnarmedMode;
_global.maxDisOnSamuraiMode = data_so.data.maxDisOnSamuraiMode;
_global.maxDisOnBombermanMode = data_so.data.maxDisOnBombermanMode;
_quality = _global.qual;
stop();
Instance of Symbol 653 MovieClip in Frame 2
onClipEvent (load) {
trace("\uFF3C(^o^)\uFF0F");
}
Frame 5
bgm_title = new Sound();
bgm_title.attachSound("bgm_title");
bgm_tutorial = new Sound();
bgm_tutorial.attachSound("bgm_tutorial");
bgm_play1 = new Sound();
bgm_play1.attachSound("bgm_play1");
bgm_play2 = new Sound();
bgm_play2.attachSound("bgm_play2");
bgm_play3 = new Sound();
bgm_play3.attachSound("bgm_play3");
bgm_play4 = new Sound();
bgm_play4.attachSound("bgm_play4");
se_cursol4 = new Sound();
se_cursol4.attachSound("se_cursol4");
se_cursol5 = new Sound();
se_cursol5.attachSound("se_cursol5");
var lvArr = new Array(-1, -1, -1, -1, -1, -1);
stopAllSounds();
if (_global.bgm) {
bgm_title.start(0, 99);
}
_root.gotoAndStop("title");
Frame 6
_root.stop();
_global.score = 0;
_global.dist = 0;
_global.killNo = 0;
_global.NewRank = 0;
_global.scoreValid = 0;
_global.version = "1.09";
_global.cgiVersion = "426";
i = 0;
while (i < 6) {
_root.lvArr[i] = -1;
i++;
}
_global.unarmedRelease = false;
_global.samuraiRelease = false;
_global.bombermanRelease = false;
_global.enhancedRelease = false;
_global.beamSaberRelease = false;
_global.grenadeMachinegunRelease = false;
_global.busterRifleRelease = false;
_global.okusenmanRelease = false;
Instance of Symbol 658 MovieClip in Frame 6
/* no clip actions */
Instance of Symbol 681 MovieClip in Frame 6
onClipEvent (load) {
fr = 30;
time = 1000;
time_count = 0;
old_timer = getTimer();
fps = (fr + "/") + fr;
}
onClipEvent (enterFrame) {
time_count++;
if ((getTimer() - old_timer) >= time) {
fps = (Math.floor((time_count * 1000) / (getTimer() - old_timer)) + "/") + fr;
old_timer = getTimer();
time_count = 0;
}
}
Frame 11
stop();
Frame 12
if (_global.tutorial) {
stopAllSounds();
if (_global.bgm) {
_root.bgm_tutorial.start(0, 99);
}
}
stop();
Instance of Symbol 719 MovieClip "gun" in Frame 12
onClipEvent (load) {
function isOnWeaponPanel() {
res = -1;
if ((_root._ymouse > 302) && (_root._ymouse < 369)) {
if ((_root._xmouse > 188.5) && (_root._xmouse < 230.5)) {
res = 0;
} else if ((_root._xmouse > 244.5) && (_root._xmouse < 286.5)) {
res = 1;
} else if ((_root._xmouse > 300.5) && (_root._xmouse < 342.5)) {
res = 2;
} else if ((_root._xmouse > 356.5) && (_root._xmouse < 398.5)) {
res = 3;
}
}
return(res);
}
function isOnRPWeaponPanel() {
res = -1;
if ((_root._ymouse > 112) && (_root._ymouse < 166)) {
if ((_root._xmouse > 60) && (_root._xmouse < 124)) {
res = 0;
} else if ((_root._xmouse > 140) && (_root._xmouse < 204)) {
res = 1;
} else if ((_root._xmouse > 220) && (_root._xmouse < 284)) {
res = 2;
}
} else if ((_root._ymouse > 192) && (_root._ymouse < 250)) {
if ((_root._xmouse > 60) && (_root._xmouse < 124)) {
res = 3;
} else if ((_root._xmouse > 140) && (_root._xmouse < 204)) {
res = 4;
} else if ((_root._xmouse > 220) && (_root._xmouse < 284)) {
res = 5;
}
}
return(res);
}
function drawArm() {
if (_global.usingWeapon == 0) {
_root.player.attachMovie("arm_handgun", "arm", 166);
_root.player.arm._x = -1;
_root.player.arm._y = -18.5;
} else if (_global.usingWeapon == 1) {
_root.player.attachMovie("arm_machinegun", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -18.5;
} else if (_global.usingWeapon == 2) {
_root.player.attachMovie("arm_shotgun", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 3) {
_root.player.attachMovie("arm_magnum", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 10) {
_root.player.attachMovie("arm_shield", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 11) {
_root.player.attachMovie("arm_dummy", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else {
trace("ERROR in drawArm(): _global.usingWeapon=" + _global.usingWeapon);
}
}
function drawFrameOnWeapon(usingWeapon) {
_root.attachMovie("frameOnWeapon", "frameOnWeapon", 2000);
_root.frameOnWeapon._x = 188.5 + (usingWeapon * 56);
_root.frameOnWeapon._y = 302;
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function putParamName(wp) {
str = "";
switch (wp) {
case -1 :
str = "";
break;
case 0 :
str = "\u30EC\u30D9\u30EB\n\u6700\u5927HP\n";
break;
case 1 :
str = "\u30EC\u30D9\u30EB\n\u653B\u6483\u529B\n\u5F3E\u901F\n\u6700\u5927\u88C5\u586B\u6570\n\u30EA\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\n\u5F3E\u85AC\u30B3\u30B9\u30C8\n";
break;
case 2 :
str = "\u30EC\u30D9\u30EB\n\u653B\u6483\u529B\n\u9023\u5C04\u9593\u9694\n\u5F3E\u901F\n\u62E1\u6563\u5EA6\n\u6700\u5927\u88C5\u586B\u6570\n\u30EA\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\n\u5F3E\u85AC\u30B3\u30B9\u30C8\n";
break;
case 3 :
str = "\u30EC\u30D9\u30EB\n\u653B\u6483\u529B\n\u6563\u5F3E\u6570\n\u5F3E\u901F\n\u62E1\u6563\u5EA6\n\u6700\u5927\u88C5\u586B\u6570\n\u30EA\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\n\u5F3E\u85AC\u30B3\u30B9\u30C8\n";
break;
case 4 :
str = "\u30EC\u30D9\u30EB\n\u653B\u6483\u529B\n\u6700\u5927\u88C5\u586B\u6570\n\u30EA\u30ED\u30FC\u30C9\u30BF\u30A4\u30E0\n\u5F3E\u85AC\u30B3\u30B9\u30C8\n";
break;
case 5 :
str = "\u30EC\u30D9\u30EB\n\u653B\u6483\u529B\n\u7206\u767A\u7BC4\u56F2\n\u30B3\u30B9\u30C8\n";
break;
default :
trace("ERROR in putParamName: wp=" + wp);
}
return(str);
}
function putParamWord(wp, wd) {
str = "";
switch (wp) {
case -1 :
str = "";
break;
case 0 :
str = ((wd + newline) + wd) + newline;
break;
case 1 :
str = ((((((((((wd + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline;
break;
case 2 :
str = ((((((((((((((wd + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline;
break;
case 3 :
str = ((((((((((((((wd + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline;
break;
case 4 :
str = ((((((((wd + newline) + wd) + newline) + wd) + newline) + wd) + newline) + wd) + newline;
break;
case 5 :
str = ((((((wd + newline) + wd) + newline) + wd) + newline) + wd) + newline;
break;
default :
trace("ERROR in putParamWord: wp=" + wp);
}
return(str);
}
function putParam(wp, lv) {
str = "";
switch (wp) {
case -1 :
str = "";
break;
case 0 :
if (!_global.samuraiMode) {
str = ((lv + newline) + heal[lv]) + newline;
} else {
str = "0\n1\n";
}
break;
case 1 :
if (!_global.bombermanMode) {
str = ((((((((((lv + newline) + handgun.attack[lv]) + newline) + handgun.speed[lv]) + newline) + handgun.ammo[lv]) + newline) + handgun.reload[lv]) + newline) + handgun.cost[lv]) + newline;
} else {
str = "0\n0\n0\n0\n0\n0\n";
}
break;
case 2 :
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
str = ((((((((((((((lv + newline) + machinegun.attack[lv]) + newline) + machinegun.rate[lv]) + newline) + machinegun.speed[lv]) + newline) + machinegun.precision[lv]) + newline) + machinegun.ammo[lv]) + newline) + machinegun.reload[lv]) + newline) + machinegun.cost[lv]) + newline;
} else {
str = "0\n0\n0\n0\n0\n0\n0\n0\n";
}
break;
case 3 :
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
str = ((((((((((((((lv + newline) + shotgun.attack[lv]) + newline) + shotgun.spreads[lv]) + newline) + shotgun.speed[lv]) + newline) + shotgun.precision[lv]) + newline) + shotgun.ammo[lv]) + newline) + shotgun.reload[lv]) + newline) + shotgun.cost[lv]) + newline;
} else {
str = "0\n0\n0\n0\n0\n0\n0\n0\n";
}
break;
case 4 :
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
if (!_global.busterRifle) {
str = ((((((((lv + newline) + sniper.attack[lv]) + newline) + sniper.ammo[lv]) + newline) + sniper.reload[lv]) + newline) + sniper.cost[lv]) + newline;
} else {
str = ((((((((lv + newline) + (860 + sniper.attack[lv])) + newline) + sniper.ammo[lv]) + newline) + sniper.reload[lv]) + newline) + sniper.cost[lv]) + newline;
}
} else {
str = "0\n0\n0\n0\n0\n";
}
break;
case 5 :
if (!_global.unarmedMode) {
str = ((((((lv + newline) + frag.attack[lv]) + newline) + frag.range[lv]) + newline) + frag.cost[lv]) + newline;
} else {
str = "0\n0\n0\n0\n";
}
break;
default :
trace("ERROR in putParam: wp=" + wp);
}
return(str);
}
function getLV(wp) {
lv = -1;
switch (wp) {
case -1 :
lv = -1;
break;
case 0 :
lv = _root.player.healLV;
break;
case 1 :
lv = _root.player.handgunLV;
break;
case 2 :
lv = _root.player.machinegunLV;
break;
case 3 :
lv = _root.player.shotgunLV;
break;
case 4 :
lv = _root.player.sniperLV;
break;
case 5 :
lv = _root.player.fragLV;
break;
default :
trace("ERROR in getLV: wp=" + wp);
}
return(lv);
}
function updatePanelInfoFromMain() {
_root.PanelMachinegun.ammoPrice = transUsingK(APMachinegun);
_root.PanelShotgun.ammoPrice = transUsingK(APShotgun);
_root.PanelSniper.ammoPrice = transUsingK(APSniper);
_root.PanelFrag.ammoPrice = transUsingK(APFrag);
_root.PanelHandgun.dMAXAmmo = MAHandgun;
_root.PanelMachinegun.dMAXAmmo = MAMachinegun;
_root.PanelShotgun.dMAXAmmo = MAShotgun;
_root.PanelSniper.dMAXAmmo = MASniper;
}
function updatePanelInfoFromGun() {
_root.PanelMachinegun.ammoPrice = transUsingK(_root.player.APMachinegun);
_root.PanelShotgun.ammoPrice = transUsingK(_root.player.APShotgun);
_root.PanelSniper.ammoPrice = transUsingK(_root.player.APSniper);
_root.PanelFrag.ammoPrice = transUsingK(_root.player.APFrag);
_root.PanelHandgun.dMAXAmmo = _root.player.MAHandgun;
_root.PanelMachinegun.dMAXAmmo = _root.player.MAMachinegun;
_root.PanelShotgun.dMAXAmmo = _root.player.MAShotgun;
_root.PanelSniper.dMAXAmmo = _root.player.MASniper;
}
function transUsingK(num) {
var _local1 = "";
if (num >= 10000) {
len = num.toString().length - 3;
i = 0;
while (i < len) {
_local1 = _local1 + num.toString().charAt(i);
i++;
}
_local1 = _local1 + "k";
} else {
_local1 = num.toString();
}
trace("str: " + _local1);
return(_local1);
}
function unarmedMode() {
}
function samuraiMode() {
MAX_HP = 1;
_root.DpMAXHP = "/ " + MAX_HP;
_global.pHP = MAX_HP;
}
function bombermanMode() {
}
function enhancedMode() {
healLV = 9;
handgunLV = 9;
machinegunLV = 9;
shotgunLV = 9;
sniperLV = 9;
fragLV = 9;
MAX_HP = heal[9];
_global.pHP = MAX_HP;
_root.DpMAXHP = "/ " + MAX_HP;
RTHandgun = handgun.reload[9];
RTMachinegun = machinegun.reload[9];
RTShotgun = shotgun.reload[9];
RTSniper = sniper.reload[9];
MAHandgun = handgun.ammo[9];
MAMachinegun = machinegun.ammo[9];
MAShotgun = shotgun.ammo[9];
MASniper = sniper.ammo[9];
_global.bHandgun = MAHandgun;
_global.bMachinegun = MAMachinegun;
_global.bShotgun = MAShotgun;
_global.bMagnum = MASniper;
APMachinegun = machinegun.cost[9];
APShotgun = shotgun.cost[9];
APSniper = sniper.cost[9];
APFrag = frag.cost[9];
}
function enhancedModeOnGunCircle() {
spd_handgun = handgun.speed[9];
ATHandgun = handgun.attack[9];
ATSniper = sniper.attack[9];
waitSniper = 6;
fragDelay = 18;
fragRange = frag.range[9];
ATFrag = frag.attack[9];
spd_machinegun = machinegun.speed[9];
mPrecision = machinegun.precision[9];
mFireRate = machinegun.rate[9];
ATMachinegun = machinegun.attack[9];
spd_shotgun = shotgun.speed[9];
spreadNo = shotgun.spreads[9];
sPrecision = shotgun.precision[9];
ATShotgun = shotgun.attack[9];
waitShotgun = 6;
}
var heal = [280, 290, 300, 315, 330, 345, 360, 380, 400, 420];
var handgun = {attack:[50, 55, 60, 65, 70, 75, 80, 85, 90, 100], speed:[18, 18, 19, 19, 20, 20, 21, 21, 22, 23], ammo:[12, 13, 14, 15, 16, 17, 18, 19, 20, 21], reload:[0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1], cost:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]};
var machinegun = {attack:[50, 55, 60, 65, 70, 75, 80, 85, 90, 100], rate:[3, 3, 2, 2, 2, 2, 2, 1, 1, 1], speed:[19, 19, 20, 20, 20, 21, 21, 21, 22, 22], precision:[13, 12, 12, 12, 11, 11, 11, 10, 10, 10], ammo:[35, 37, 41, 43, 45, 47, 49, 51, 53, 57], reload:[1, 1, 0.9, 0.9, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6], cost:[600, 750, 1050, 1950, 4000, 7500, 13000, 18000, 25000, 31000]};
var shotgun = {attack:[50, 53, 56, 59, 62, 65, 68, 71, 74, 77], spreads:[9, 10, 10, 11, 11, 12, 12, 13, 13, 14], speed:[16, 16, 17, 17, 17, 17, 18, 18, 18, 18], precision:[31, 31, 30, 30, 30, 29, 29, 29, 28, 28], ammo:[4, 4, 5, 5, 5, 6, 6, 6, 7, 7], reload:[1.66, 1.66, 1.5, 1.5, 1.5, 1.5, 1.4, 1.4, 1.4, 1.3], cost:[1000, 1300, 1800, 2500, 6000, 12000, 20000, 29000, 36000, 43000]};
var sniper = {attack:[140, 210, 280, 350, 420, 490, 560, 610, 680, 800], ammo:[8, 8, 9, 9, 9, 9, 10, 10, 10, 11], reload:[1.66, 1.58, 1.5, 1.42, 1.35, 1.28, 1.21, 1.14, 1.06, 1], cost:[800, 1000, 1200, 2000, 5000, 10000, 18000, 25000, 32000, 40000]};
var frag = {attack:[30, 45, 60, 75, 90, 105, 120, 135, 150, 165], range:[100, 105, 110, 115, 120, 125, 131, 137, 143, 150], cost:[1500, 2000, 3000, 5000, 9000, 15000, 28000, 40000, 60000, 82000]};
Mouse.hide();
this.swapDepths(50000);
spd_handgun = handgun.speed[0];
ATHandgun = handgun.attack[0];
ATSniper = sniper.attack[0];
waitSniper = 6;
fragDelay = 18;
fragTime = 0;
fragRange = frag.range[0];
ATFrag = frag.attack[0];
spd_machinegun = machinegun.speed[0];
wait_machinegun = 0;
mPrecision = machinegun.precision[0];
mFireRate = machinegun.rate[0];
ATMachinegun = machinegun.attack[0];
spd_shotgun = shotgun.speed[0];
spreadNo = shotgun.spreads[0];
sPrecision = shotgun.precision[0];
ATShotgun = shotgun.attack[0];
waitShotgun = 6;
ATBuster = 860 + sniper.attack[0];
waitBuster = 10;
ATBeamSaber = 500;
if (_global.enhancedMode) {
enhancedModeOnGunCircle();
}
se_handgun = new Sound();
se_handgun.attachSound("se_handgun");
se_changeHandgun = new Sound();
se_changeHandgun.attachSound("se_changeHandgun");
se_sniper = new Sound();
se_sniper.attachSound("se_sniper");
se_shotgun = new Sound();
se_shotgun.attachSound("se_shotgun");
now_sounding = false;
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun", false);
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_shell1 = new Sound();
se_shell1.attachSound("se_shell1");
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
if (_global.RP) {
RPNum = isOnRPWeaponPanel();
weaponLV = getLV(RPNum);
_root.refuelingPoint.paramInfo.gotoAndStop(RPNum + 2);
_root.refuelingPoint.paramName = putParamName(RPNum);
_root.refuelingPoint.paramBefore = putParam(RPNum, weaponLV);
_root.refuelingPoint.paramArrow = putParamWord(RPNum, "\u2192");
if ((weaponLV + 1) < 10) {
_root.refuelingPoint.paramAfter = putParam(RPNum, weaponLV + 1);
} else {
_root.refuelingPoint.paramAfter = putParamWord(RPNum, "-");
}
RPPanelName = "RPPanelName" + RPNum;
if (_root.refuelingPoint[RPPanelName]._currentframe == 1) {
_root.refuelingPoint[RPPanelName].play();
_root.se_cursol5.start();
}
if (RPNum == -1) {
i = 0;
while (i < 6) {
RPPanelName = "RPPanelName" + i;
_root.refuelingPoint[RPPanelName].gotoAndStop(1);
i++;
}
}
}
}
onClipEvent (enterFrame) {
if ((_global.mode != "death") && (!_global.RP)) {
xDis = _root._xmouse - _root.player._x;
yDis = _root._ymouse - (_root.player._y - (_root.player._height / 2));
if (xDis > 0) {
_root.player.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
_root.player.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
if (((((!Key_SPACE) && (Key.isDown(_root.keySetting.cf5))) && (fragTime == 0)) && (_global.score >= _root.player.APFrag)) && (!_global.unarmedMode)) {
_root.player.attachMovie("arm_frag", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -18;
_root.player.arm.power = ATFrag;
_root.player.arm.range = fragRange;
fragTime = fragDelay;
_global.score = _global.score - _root.player.APFrag;
}
Key_SPACE = Key.isDown(_root.keySetting.cf5);
if (fragTime > 0) {
fragTime--;
if (fragTime <= 0) {
drawArm();
fragTime = 0;
}
}
} else if (_global.mode == "death") {
this._x = -100;
this._y = -100;
this._visible = false;
Mouse.show();
}
}
on (release) {
if ((_global.usingWeapon == 1) && (!_global.RP)) {
wait_machinegun = 0;
se_machinegun.stop("se_machinegun");
now_sounding = false;
if ((((_global.bMachinegun != 0) && (_global.bMachinegun != 35)) && (_global.reloading == false)) && (isOnWeaponPanel() != 1)) {
se_machinegunE.start();
}
delete this.onEnterFrame;
}
}
onClipEvent (mouseDown) {
if ((!_global.RP) && (!_global.bombermanMode)) {
if (((isOnWeaponPanel() == -1) && (fragTime == 0)) && (_global.wait == 0)) {
rad = Math.atan2(yDis, xDis);
if (_global.mode != "death") {
if (((_global.pHP != 0) && (!_global.reloading)) && (_global.wait == 0)) {
if ((_global.bHandgun != 0) && (_global.usingWeapon == 0)) {
se_handgun.start();
_global.bHandgun--;
_global.fireNo++;
handgunName = "ef_handgun" + _global.pHandgunNo;
_root.scr.attachMovie("ef_handgun", handgunName, 101 + _global.pHandgunNo);
_global.handgunList.push(handgunName);
trace("length = " + _global.handgunList.length);
_root.scr[handgunName]._x = (_root.player._x + (16.0654909666652 * Math.cos(rad))) + _global.screenX;
_root.scr[handgunName]._y = (_root.player._y - (_root.player._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = spd_handgun * Math.cos(rad);
_root.scr[handgunName].dy = spd_handgun * Math.sin(rad);
_root.scr[handgunName].power = (ATHandgun + Math.floor(Math.random() * (Math.floor(ATHandgun / 5) + 1))) - Math.floor(ATHandgun / 10);
_root.scr[handgunName].isHandgun = true;
if ((++_global.pHandgunNo) > 49) {
_global.pHandgunNo = 0;
}
if (_global.shell == true) {
shell("ef_shell", handgunName);
}
} else if ((_global.usingWeapon == 3) && (_global.bMagnum != 0)) {
if (!_global.busterRifle) {
_global.wait = waitSniper;
se_sniper.start();
_global.bMagnum--;
sniperName = "ef_magnum" + _global.pMagnumNo;
_root.scr.attachMovie("ef_magnum", sniperName, 177 + _global.pMagnumNo);
_global.sniperList.push(sniperName);
_root.scr[sniperName]._x = (_root.player._x + (16.0654909666652 * Math.cos(rad))) + _global.screenX;
_root.scr[sniperName]._y = (_root.player._y - (_root.player._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[sniperName]._rotation = rad * 57.2957795130823;
_root.scr[sniperName].power = (ATSniper + Math.floor(Math.random() * (Math.floor(ATSniper / 5) + 1))) - Math.floor(ATSniper / 10);
if ((++_global.pMagnumNo) > 7) {
_global.pMagnumNo = 0;
}
if (_global.shell == true) {
shell("ef_shell", sniperName);
}
} else {
_global.wait = waitBuster;
_global.bMagnum--;
sniperName = "ef_busterRifle" + _global.pMagnumNo;
_root.scr.attachMovie("ef_busterRifle", sniperName, 177 + _global.pMagnumNo);
_global.busterRifleList.push(sniperName);
_root.scr[sniperName]._x = (_root.player._x + (16.0654909666652 * Math.cos(rad))) + _global.screenX;
_root.scr[sniperName]._y = (_root.player._y - (_root.player._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[sniperName]._rotation = rad * 57.2957795130823;
_root.scr[sniperName].power = (ATBuster + Math.floor(Math.random() * (Math.floor(ATSniper / 5) + 1))) - Math.floor(ATSniper / 10);
if ((++_global.pMagnumNo) > 7) {
_global.pMagnumNo = 0;
}
}
} else if ((_global.bShotgun != 0) && (_global.usingWeapon == 2)) {
_global.wait = waitShotgun;
se_shotgun.start();
_global.bShotgun--;
_global.fireNo++;
i = 0;
while (i < spreadNo) {
shotgunName = "ef_shotgun" + _global.pShotgunNo;
_root.scr.attachMovie("ef_shotgun", shotgunName, 201 + _global.pShotgunNo);
_global.shotgunList.push(shotgunName);
spreadX = Math.floor((Math.random() * 10) - 5);
spreadY = Math.floor((Math.random() * 10) - 5);
_root.scr[shotgunName]._x = ((_root.player._x + spreadX) + (16.0654909666652 * Math.cos(rad))) + _global.screenX;
_root.scr[shotgunName]._y = ((_root.player._y - (_root.player._height / 2)) + spreadY) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * sPrecision) - Math.floor(sPrecision / 2));
_root.scr[shotgunName].dx = spd_shotgun * Math.cos(rad + spreadRad);
_root.scr[shotgunName].dy = spd_shotgun * Math.sin(rad + spreadRad);
_root.scr[shotgunName].power = (ATShotgun + Math.floor(Math.random() * (Math.floor(ATShotgun / 5) + 1))) - Math.floor(ATShotgun / 10);
if ((++_global.pShotgunNo) > 49) {
_global.pShotgunNo = 0;
}
i++;
}
if (_global.shell == true) {
shell("ef_shell2", shotgunName);
}
}
if ((_global.usingWeapon == 1) && (_global.bMachinegun != 0)) {
this.onEnterFrame = function () {
if (((_global.bMachinegun != 0) && (_global.usingWeapon == 1)) && (wait_machinegun == 0)) {
if (now_sounding == false) {
se_machinegun.start(0, 999);
now_sounding = true;
}
_global.bMachinegun--;
_global.fireNo++;
rad = Math.atan2(yDis, xDis);
machinegunName = "ef_handgun" + _global.pHandgunNo;
_root.scr.attachMovie("ef_handgun", machinegunName, 101 + _global.pHandgunNo);
_global.handgunList.push(machinegunName);
_root.scr[machinegunName]._x = (_root.player._x + (16.0654909666652 * Math.cos(rad))) + _global.screenX;
_root.scr[machinegunName]._y = (_root.player._y - (_root.player._height / 2)) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[machinegunName].dx = spd_machinegun * Math.cos(rad + spreadRad);
_root.scr[machinegunName].dy = spd_machinegun * Math.sin(rad + spreadRad);
wait_machinegun = mFireRate;
_root.scr[machinegunName].power = (ATMachinegun + Math.floor(Math.random() * (Math.floor(ATMachinegun / 5) + 1))) - Math.floor(ATMachinegun / 10);
_root.scr[machinegunName].isHandgun = false;
if ((++_global.pHandgunNo) > 49) {
_global.pHandgunNo = 0;
}
if (_global.shell == true) {
shell("ef_shell", machinegunName);
}
} else if (_global.bMachinegun == 0) {
wait_machinegun = 0;
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
delete this.onEnterFrame;
}
if (wait_machinegun != 0) {
wait_machinegun--;
}
if (_global.reloading || (_global.RP)) {
wait_machinegun = 0;
se_machinegun.stop("se_machinegun");
delete this.onEnterFrame;
}
if (_global.usingWeapon != 1) {
wait_machinegun = 0;
se_machinegun.stop("se_machinegun");
delete this.onEnterFrame;
}
};
}
}
}
} else if ((((!_global.reloading) && (_global.usingWeapon != 10)) && (!_global.bombermanMode)) && (!_global.unarmedMode)) {
if (isOnWeaponPanel() == 0) {
se_changeHandgun.start();
_global.usingWeapon = 0;
drawArm();
drawFrameOnWeapon(0);
} else if (isOnWeaponPanel() == 1) {
se_changeHandgun.start();
_global.usingWeapon = 1;
drawArm();
drawFrameOnWeapon(1);
} else if (isOnWeaponPanel() == 2) {
se_changeHandgun.start();
_global.usingWeapon = 2;
drawArm();
drawFrameOnWeapon(2);
} else if (isOnWeaponPanel() == 3) {
se_changeHandgun.start();
_global.usingWeapon = 3;
drawArm();
drawFrameOnWeapon(3);
} else {
trace("ERROR: isOnWeaponPanel(): " + isOnWeaponPanel());
}
}
} else if ((_root.refuelingPoint._currentframe == 32) && (!_global.rock)) {
_global.rock = true;
if (isOnRPWeaponPanel() == 0) {
if (!_global.samuraiMode) {
if (_root.player.healLV < 9) {
_root.se_cursol4.start();
_root.player.healLV++;
_root.player.MAX_HP = heal[_root.player.healLV];
_global.pHP = _root.player.MAX_HP;
_root.refuelingPoint.play();
} else {
_root.se_cursol4.start();
_global.pHP = _root.player.MAX_HP;
_root.refuelingPoint.play();
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else if (isOnRPWeaponPanel() == 1) {
_global.rock = true;
if (!_global.bombermanMode) {
if (_root.player.handgunLV < 9) {
_root.se_cursol4.start();
_root.player.handgunLV++;
ATHandgun = handgun.attack[_root.player.handgunLV];
spd_handgun = handgun.speed[_root.player.handgunLV];
_root.player.MAHandgun = handgun.ammo[_root.player.handgunLV];
_root.player.RTHandgun = handgun.reload[_root.player.handgunLV];
_root.player.APHandgun = handgun.cost[_root.player.handgunLV];
_global.bHandgun = _root.player.MAHandgun;
updatePanelInfoFromGun();
_root.refuelingPoint.play();
} else {
_global.rock = false;
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else if (isOnRPWeaponPanel() == 2) {
_global.rock = true;
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
if (_root.player.machinegunLV < 9) {
_root.se_cursol4.start();
_root.player.machinegunLV++;
ATMachinegun = machinegun.attack[_root.player.machinegunLV];
mFireRate = machinegun.rate[_root.player.machinegunLV];
spd_machinegun = machinegun.speed[_root.player.machinegunLV];
mPrecision = machinegun.precision[_root.player.machinegunLV];
_root.player.MAMachinegun = machinegun.ammo[_root.player.machinegunLV];
_root.player.RTMachinegun = machinegun.reload[_root.player.machinegunLV];
_root.player.APMachinegun = machinegun.cost[_root.player.machinegunLV];
_global.bMachinegun = _root.player.MAMachinegun;
updatePanelInfoFromGun();
_root.refuelingPoint.play();
} else {
_global.rock = false;
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else if (isOnRPWeaponPanel() == 3) {
_global.rock = true;
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
if (_root.player.shotgunLV < 9) {
_root.se_cursol4.start();
_root.player.shotgunLV++;
ATShotgun = shotgun.attack[_root.player.shotgunLV];
spreadNo = shotgun.spreads[_root.player.shotgunLV];
spd_shotgun = shotgun.speed[_root.player.shotgunLV];
sPrecision = shotgun.precision[_root.player.shotgunLV];
_root.player.MAShotgun = shotgun.ammo[_root.player.shotgunLV];
_root.player.RTShotgun = shotgun.reload[_root.player.shotgunLV];
_root.player.APShotgun = shotgun.cost[_root.player.shotgunLV];
_global.bShotgun = _root.player.MAShotgun;
updatePanelInfoFromGun();
_root.refuelingPoint.play();
} else {
_global.rock = false;
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else if (isOnRPWeaponPanel() == 4) {
if ((!_global.bombermanMode) && (!_global.unarmedMode)) {
if (_root.player.sniperLV < 9) {
if (!_global.busterRifle) {
_root.se_cursol4.start();
_root.player.sniperLV++;
ATSniper = sniper.attack[_root.player.sniperLV];
_root.player.MASniper = sniper.ammo[_root.player.sniperLV];
_root.player.RTSniper = sniper.reload[_root.player.sniperLV];
_root.player.APSniper = sniper.cost[_root.player.sniperLV];
_global.bMagnum = _root.player.MASniper;
updatePanelInfoFromGun();
_root.refuelingPoint.play();
} else {
_root.se_cursol4.start();
_root.player.sniperLV++;
ATBuster = 860 + sniper.attack[_root.player.sniperLV];
_root.player.MASniper = sniper.ammo[_root.player.sniperLV];
_root.player.RTSniper = sniper.reload[_root.player.sniperLV];
_root.player.APSniper = sniper.cost[_root.player.sniperLV];
_global.bMagnum = _root.player.MASniper;
updatePanelInfoFromGun();
_root.refuelingPoint.play();
}
} else {
_global.rock = false;
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else if (isOnRPWeaponPanel() == 5) {
if (!_global.unarmedMode) {
if (_root.player.fragLV < 9) {
_root.se_cursol4.start();
_root.player.fragLV++;
ATFrag = frag.attack[_root.player.fragLV];
fragRange = frag.range[_root.player.fragLV];
_root.player.APFrag = frag.cost[_root.player.fragLV];
updatePanelInfoFromGun();
_root.refuelingPoint.play();
} else {
_global.rock = false;
}
} else {
_root.se_cursol4.start();
_root.refuelingPoint.play();
}
} else {
_global.rock = false;
trace("ERROR: isOnRPWeaponPanel(): " + isOnRPWeaponPanel());
}
}
}
Instance of Symbol 681 MovieClip in Frame 12
onClipEvent (load) {
fr = 30;
time = 1000;
time_count = 0;
old_timer = getTimer();
fps = (fr + "/") + fr;
}
onClipEvent (enterFrame) {
time_count++;
if ((getTimer() - old_timer) >= time) {
fps = (Math.floor((time_count * 1000) / (getTimer() - old_timer)) + "/") + fr;
old_timer = getTimer();
time_count = 0;
}
}
Instance of Symbol 863 MovieClip in Frame 12
onClipEvent (load) {
function getMode() {
var _local2 = "";
if (_global.unarmedMode) {
_local2 = "unarmedMode";
} else if (_global.samuraiMode) {
_local2 = "samuraiMode";
} else if (_global.bombermanMode) {
_local2 = "bombermanMode";
} else if (_global.enhancedMode) {
_local2 = "enhancedMode";
} else {
_local2 = "NormalMode";
}
return(_local2);
}
function getWeapon() {
var _local2 = " ";
if (_global.beamSaber) {
_local2 = _local2 + "BS";
}
if (_global.grenadeMachinegun) {
_local2 = _local2 + " GM";
}
if (_global.busterRifle) {
_local2 = _local2 + " BR";
}
return(_local2);
}
this.mode = getMode();
this.weapon = getWeapon();
}
Frame 17
if ((_global.scoreValid == 1) && (!_global.tutorial)) {
if (_global.unarmedRelease) {
_global.unarmedModeAv = true;
data_so.data.unarmedModeAv = true;
}
if (_global.samuraiRelease) {
_global.samuraiModeAv = true;
data_so.data.samuraiModeAv = true;
}
if (_global.bombermanRelease) {
_global.bombermanModeAv = true;
data_so.data.bombermanModeAv = true;
}
if (_global.enhancedRelease) {
_global.enhancedModeAv = true;
data_so.data.enhancedModeAv = true;
}
if (_global.beamSaberRelease) {
_global.beamSaberAv = true;
data_so.data.beamSaberAv = true;
}
if (_global.grenadeMachinegunRelease) {
_global.grenadeMachinegunAv = true;
data_so.data.grenadeMachinegunAv = true;
}
if (_global.busterRifleRelease) {
_global.busterRifleAv = true;
data_so.data.busterRifleAv = true;
}
if (_global.okusenmanRelease) {
_global.okusenmanAv = true;
data_so.data.okusenmanAv = true;
}
} else {
trace("\u4E0D\u6B63\u306A\u9077\u79FB");
}
stop();
Frame 18
function recordSave() {
data_so.data.numberOfPlaying = _global.numberOfPlaying;
data_so.data.normalTry = _global.normalTry;
data_so.data.totalPlayingTime = _global.totalPlayingTime;
data_so.data.aveDis = _global.aveDis;
data_so.data.maxDis = _global.maxDis;
data_so.data.totalDis = _global.totalDis;
data_so.data.aveKill = _global.aveKill;
data_so.data.maxKill = _global.maxKill;
data_so.data.totalKill = _global.totalKill;
data_so.data.HGKill = _global.HGKill;
data_so.data.MGKill = _global.MGKill;
data_so.data.SGKill = _global.SGKill;
data_so.data.SRKill = _global.SRKill;
data_so.data.FGKill = _global.FGKill;
data_so.data.OTKill = _global.OTKill;
data_so.data.aveScore = _global.aveScore;
data_so.data.maxScore = _global.maxScore;
data_so.data.totalScore = _global.totalScore;
data_so.data.maxDisOnUnarmedMode = _global.maxDisOnUnarmedMode;
data_so.data.maxDisOnSamuraiMode = _global.maxDisOnSamuraiMode;
data_so.data.maxDisOnBombermanMode = _global.maxDisOnBombermanMode;
}
if (_global.bgm) {
_root.bgm_title.start(0, 99);
}
i = 0;
while (i < 6) {
trace((("_root.lvArr[" + i) + "]: ") + _root.lvArr[i]);
i++;
}
_global.comment = "";
_root.resultMC.resultMC2.DispScore = "$ " + _global.score;
_root.resultMC.resultMC2.DispDist = _global.dist;
_root.resultMC.resultMC2.DispKill = _global.killNo;
_root.resultMC.resultMC2.DispVersion = _global.version;
_root.resultMC.resultMC2.DispHPLv = _root.lvArr[0];
_root.resultMC.resultMC2.DispHGLv = _root.lvArr[1];
_root.resultMC.resultMC2.DispMGLv = _root.lvArr[2];
_root.resultMC.resultMC2.DispSGLv = _root.lvArr[3];
_root.resultMC.resultMC2.DispSRLv = _root.lvArr[4];
_root.resultMC.resultMC2.DispFGLv = _root.lvArr[5];
_root.ani_rank._visible = false;
_root.ani_rank.stop();
_root.resultMC.resultMC2.bt_entry._visible = false;
_root.resultMC.resultMC2.bt_entry.enabled = false;
if (_global.scoreValid == 1) {
if (((_global.unarmedMode && (!_global.beamSaber)) && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
_global.maxDisOnUnarmedMode = Math.max(_global.maxDisOnUnarmedMode, _global.dist);
} else if (((_global.samuraiMode && (!_global.beamSaber)) && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
_global.maxDisOnSamuraiMode = Math.max(_global.maxDisOnSamuraiMode, _global.dist);
_global.numberOfPlaying++;
} else if (((_global.bombermanMode && (!_global.beamSaber)) && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
_global.maxDisOnBombermanMode = Math.max(_global.maxDisOnBombermanMode, _global.dist);
_global.numberOfPlaying++;
} else if (_global.enhancedMode) {
_global.numberOfPlaying++;
} else if (_global.grenadeMachinegun || (_global.busterRifle)) {
_global.numberOfPlaying++;
} else {
if (_global.normalTry == 0) {
_global.aveDis = _global.dist;
_global.aveKill = _global.killNo;
_global.aveScore = _global.score;
} else {
_global.aveDis = ((_global.aveDis * _global.normalTry) + _global.dist) / (_global.normalTry + 1);
_global.aveKill = ((_global.aveKill * _global.normalTry) + _global.killNo) / (_global.normalTry + 1);
_global.aveScore = ((_global.aveScore * _global.normalTry) + _global.score) / (_global.normalTry + 1);
trace("_global.aveDis: " + _global.aveDis);
trace("_global.aveKill: " + _global.aveKill);
trace("_global.aveScore: " + _global.aveScore);
}
_global.maxDis = Math.max(_global.maxDis, _global.dist);
_global.totalDis = _global.totalDis + _global.dist;
_global.maxKill = Math.max(_global.maxKill, _global.killNo);
_global.totalKill = _global.totalKill + _global.killNo;
_global.maxScore = Math.max(_global.maxScore, _global.score);
_global.totalScore = _global.totalScore + _global.score;
_global.normalTry++;
_global.numberOfPlaying++;
}
recordSave();
}
CGIFile = "http://www23.tok2.com/home/hometc/cgi-bin/leading_edge/ranking.cgi?" + Math.floor(Math.random() * 1000);
_global.NewRank = "out";
myLoadVars = new LoadVars();
myLoadVars.onLoad = function (success) {
if ((((((!_global.unarmedMode) && (!_global.samuraiMode)) && (!_global.bombermanMode)) && (!_global.enhancedMode)) && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
if (success && (_global.scoreValid == 1)) {
if (_global.cgiVersion == myLoadVars.version) {
i = 0;
while (i < 99) {
if (Number(myLoadVars["score" + i]) < _global.score) {
_global.NewRank = i + 1;
break;
}
i++;
}
_root.ani_nowloading.play();
_root.ani_rank._visible = true;
_root.ani_rank.play();
if (_global.NewRank != "out") {
_global.scoreValid = 2;
_root.resultMC.resultMC2.bt_entry._visible = true;
_root.resultMC.resultMC2.bt_entry.enabled = true;
if (_global.NewRank == 1) {
end = "st !!";
} else if (_global.NewRank == 2) {
end = "nd !!";
} else if (_global.NewRank == 3) {
end = "rd !!";
} else {
end = "th !!";
}
_root.ani_rank.DispRank2 = end;
} else {
_root.resultMC.resultMC2.ar1._visible = false;
_root.resultMC.resultMC2.ar2._visible = false;
_root.ani_rank.DispRank2 = " .";
}
} else {
trace("_global.version: " + _global.version);
trace("myLoadVars[version]: " + myLoadVars.version);
_global.scoreValid = 0;
_root.ani_nowloading.play();
_root.resultMC.play();
_root.word_error.gotoAndStop(5);
}
} else if (!success) {
_global.scoreValid = 0;
_root.ani_nowloading.play();
_root.resultMC.play();
_root.word_error.gotoAndStop(2);
} else if (!_global.scoreValid) {
_global.scoreValid = 0;
_root.ani_nowloading.play();
_root.resultMC.play();
_root.word_error.gotoAndStop(3);
}
} else {
_global.scoreValid = 0;
_root.ani_nowloading.play();
_root.resultMC.play();
_root.word_error.gotoAndStop(4);
}
};
myLoadVars.load(CGIFile);
stop();
Frame 23
function storeRankingData() {
i = 0;
while (i < 99) {
_root.rankingData[i].score = myLoadVars["score" + i];
_root.rankingData[i].scoreLength = _root.rankingData[i].score.length;
while (_root.rankingData[i].score.length < 11) {
_root.rankingData[i].score = "0".concat(_root.rankingData[i].score);
}
_root.rankingData[i].name = myLoadVars["name" + i];
_root.rankingData[i].dist = myLoadVars["dist" + i];
_root.rankingData[i].distLength = _root.rankingData[i].dist.length;
while (_root.rankingData[i].dist.length < 6) {
_root.rankingData[i].dist = "0".concat(_root.rankingData[i].dist);
}
_root.rankingData[i].kill = myLoadVars["kill" + i];
_root.rankingData[i].killLength = _root.rankingData[i].kill.length;
while (_root.rankingData[i].kill.length < 5) {
_root.rankingData[i].kill = "0".concat(_root.rankingData[i].kill);
}
_root.rankingData[i].comment = myLoadVars["comment" + i];
_root.rankingData[i].date = myLoadVars["date" + i];
_root.rankingData[i].version = myLoadVars["ver" + i];
_root.rankingData[i].HPLv = myLoadVars["hplv" + i];
_root.rankingData[i].HGLv = myLoadVars["hglv" + i];
_root.rankingData[i].MGLv = myLoadVars["mglv" + i];
_root.rankingData[i].SGLv = myLoadVars["sglv" + i];
_root.rankingData[i].SRLv = myLoadVars["srlv" + i];
_root.rankingData[i].FGLv = myLoadVars["fglv" + i];
i++;
}
}
function dispRanking(srd) {
i = 0;
while (i < 99) {
tempName = "rankingMCr" + i;
_root.rankingRoot.attachMovie("rankingMCr", tempName, 50 + i);
_root.rankingRoot[tempName]._x = 0;
_root.rankingRoot[tempName]._y = i * 90;
if (i == 0) {
_root.rankingRoot[tempName].rank = "1st";
} else if (i == 1) {
_root.rankingRoot[tempName].rank = "2nd";
} else if (i == 2) {
_root.rankingRoot[tempName].rank = "3rd";
} else {
_root.rankingRoot[tempName].rank = (i + 1) + "th";
}
trace((srd[i].score + ", ") + typeof(srd[i].score));
trace(srd[i].scoreLength);
trace(srd[i].substring(0, srd[i].scoreLength) + newline);
_root.rankingRoot[tempName].DispScore = "$ " + srd[i].score.substring(11 - srd[i].scoreLength, 12);
_root.rankingRoot[tempName].DispName = srd[i].name;
_root.rankingRoot[tempName].DispDist = srd[i].dist.substring(6 - srd[i].distLength, 7);
_root.rankingRoot[tempName].DispKill = srd[i].kill.substring(5 - srd[i].killLength, 6);
_root.rankingRoot[tempName].DispComment = srd[i].comment;
_root.rankingRoot[tempName].DispDate = srd[i].date;
_root.rankingRoot[tempName].DispVersion = srd[i].version;
_root.rankingRoot[tempName].DispHPLv = srd[i].HPLv;
_root.rankingRoot[tempName].DispHGLv = srd[i].HGLv;
_root.rankingRoot[tempName].DispMGLv = srd[i].MGLv;
_root.rankingRoot[tempName].DispSGLv = srd[i].SGLv;
_root.rankingRoot[tempName].DispSRLv = srd[i].SRLv;
_root.rankingRoot[tempName].DispFGLv = srd[i].FGLv;
i++;
}
}
function removeRankingMC() {
i = 0;
while (i < 99) {
tempName = "rankingMCr" + i;
_root.rankingRoot[tempName].removeMovieClip();
i++;
}
}
function sortRecord(cond, srd) {
if (cond == "dist") {
srd.sortOn("dist", Array.DESCENDING);
} else if (cond == "kill") {
srd.sortOn("kill", Array.DESCENDING);
} else {
srd.sortOn("score", Array.DESCENDING);
}
return(srd);
}
var rankingData = new Array();
i = 0;
while (i < 99) {
rankingData.push({score:"0", scoreLength:"0", name:"str", dist:"0", distLength:"0", kill:"0", killLength:"0", comment:"str", date:"str", version:"0", HPLv:"0", HGLv:"0", MGLv:"0", SGLv:"0", SRLv:"0", FGLv:"0"});
i++;
}
if (_global.scoreValid == 2) {
_global.scoreValid = 0;
CGIFile = "http://www23.tok2.com/home/hometc/cgi-bin/leading_edge/ranking.cgi?" + Math.floor(Math.random() * 1000);
mySaveVars = new LoadVars();
mySaveVars.score = _global.score;
mySaveVars.playername = _global.playerName;
mySaveVars.dist = _global.dist;
mySaveVars.kill = _global.killNo;
mySaveVars.comment = _global.comment;
mySaveVars.ver = _global.version;
mySaveVars.hplv = _root.lvArr[0];
mySaveVars.hglv = _root.lvArr[1];
mySaveVars.mglv = _root.lvArr[2];
mySaveVars.sglv = _root.lvArr[3];
mySaveVars.srlv = _root.lvArr[4];
mySaveVars.fglv = _root.lvArr[5];
bt_title._visible = false;
_global.score = 0;
_global.dist = 0;
_global.killNo = 0;
i = 0;
while (i < 6) {
_root.lvArr[i] = -1;
i++;
}
dateobj = new Date();
thisDate = ((((((dateobj.getFullYear() + "/") + (dateobj.getMonth() + 1)) + "/") + dateobj.getDate()) + " ") + dateobj.getHours()) + ":";
tempMinutes = dateobj.getMinutes();
i = 0;
while (i < 10) {
if (i == tempMinutes) {
tempMinutes = "0" + i;
break;
}
i++;
}
thisDate = thisDate + tempMinutes;
mySaveVars.date = thisDate;
myLoadVars = new LoadVars();
myLoadVars.onLoad = function (success) {
if (success) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "ranking2";
_root.gotoAndStop("ranking2");
storeRankingData();
dispRanking(_root.rankingData);
_global.sortRanking = "score";
_global.beforeSortRanking = "score";
} else {
ani_nowloading.play();
bt_title._visible = true;
_root.word_error.gotoAndStop(2);
}
};
mySaveVars.sendAndLoad(CGIFile, myLoadVars, "POST");
} else {
trace("\u7121\u52B9\u306A\u9077\u79FB\u3067\u3059\u3002");
_root.word_error.gotoAndStop(3);
bt_title._visible = true;
ani_nowloading.play();
_global.score = 0;
_global.dist = 0;
_global.killNo = 0;
_global.scoreValid = 0;
}
stop();
Frame 28
function storeRankingData() {
i = 0;
while (i < 99) {
_root.rankingData[i].score = myLoadVars["score" + i];
_root.rankingData[i].scoreLength = _root.rankingData[i].score.length;
while (_root.rankingData[i].score.length < 11) {
_root.rankingData[i].score = "0".concat(_root.rankingData[i].score);
}
_root.rankingData[i].name = myLoadVars["name" + i];
_root.rankingData[i].dist = myLoadVars["dist" + i];
_root.rankingData[i].distLength = _root.rankingData[i].dist.length;
while (_root.rankingData[i].dist.length < 6) {
_root.rankingData[i].dist = "0".concat(_root.rankingData[i].dist);
}
_root.rankingData[i].kill = myLoadVars["kill" + i];
_root.rankingData[i].killLength = _root.rankingData[i].kill.length;
while (_root.rankingData[i].kill.length < 5) {
_root.rankingData[i].kill = "0".concat(_root.rankingData[i].kill);
}
_root.rankingData[i].comment = myLoadVars["comment" + i];
_root.rankingData[i].date = myLoadVars["date" + i];
_root.rankingData[i].version = myLoadVars["ver" + i];
_root.rankingData[i].HPLv = myLoadVars["hplv" + i];
_root.rankingData[i].HGLv = myLoadVars["hglv" + i];
_root.rankingData[i].MGLv = myLoadVars["mglv" + i];
_root.rankingData[i].SGLv = myLoadVars["sglv" + i];
_root.rankingData[i].SRLv = myLoadVars["srlv" + i];
_root.rankingData[i].FGLv = myLoadVars["fglv" + i];
i++;
}
}
function dispRanking(srd) {
i = 0;
while (i < 99) {
tempName = "rankingMCr" + i;
_root.rankingRoot.attachMovie("rankingMCr", tempName, 50 + i);
_root.rankingRoot[tempName]._x = 0;
_root.rankingRoot[tempName]._y = i * 90;
if (i == 0) {
_root.rankingRoot[tempName].rank = "1st";
} else if (i == 1) {
_root.rankingRoot[tempName].rank = "2nd";
} else if (i == 2) {
_root.rankingRoot[tempName].rank = "3rd";
} else {
_root.rankingRoot[tempName].rank = (i + 1) + "th";
}
trace((srd[i].score + ", ") + typeof(srd[i].score));
trace(srd[i].scoreLength);
trace(srd[i].substring(0, srd[i].scoreLength) + newline);
_root.rankingRoot[tempName].DispScore = "$ " + srd[i].score.substring(11 - srd[i].scoreLength, 12);
_root.rankingRoot[tempName].DispName = srd[i].name;
_root.rankingRoot[tempName].DispDist = srd[i].dist.substring(6 - srd[i].distLength, 7);
_root.rankingRoot[tempName].DispKill = srd[i].kill.substring(5 - srd[i].killLength, 6);
_root.rankingRoot[tempName].DispComment = srd[i].comment;
_root.rankingRoot[tempName].DispDate = srd[i].date;
_root.rankingRoot[tempName].DispVersion = srd[i].version;
_root.rankingRoot[tempName].DispHPLv = srd[i].HPLv;
_root.rankingRoot[tempName].DispHGLv = srd[i].HGLv;
_root.rankingRoot[tempName].DispMGLv = srd[i].MGLv;
_root.rankingRoot[tempName].DispSGLv = srd[i].SGLv;
_root.rankingRoot[tempName].DispSRLv = srd[i].SRLv;
_root.rankingRoot[tempName].DispFGLv = srd[i].FGLv;
i++;
}
}
function removeRankingMC() {
i = 0;
while (i < 99) {
tempName = "rankingMCr" + i;
_root.rankingRoot[tempName].removeMovieClip();
i++;
}
}
function sortRecord(cond, srd) {
if (cond == "dist") {
srd.sortOn("dist", Array.DESCENDING);
} else if (cond == "kill") {
srd.sortOn("kill", Array.DESCENDING);
} else {
srd.sortOn("score", Array.DESCENDING);
}
return(srd);
}
var scrY = 0;
var scrMinAmount = 8590;
var posPerRank = 3.29896907216495;
var iniPosY = _root.scrollbar.bt._y;
_root.scoreSort.gotoAndStop(2);
if (_global.NewRank != 0) {
if ((_global.NewRank == 1) || (_global.NewRank == 2)) {
_root.scrollbar.bt._y = 0;
} else if ((_global.NewRank == 98) || (_global.NewRank == 99)) {
_root.scrollbar.bt._y = 320;
} else {
_root.scrollbar.bt._y = (_global.NewRank - 2) * posPerRank;
}
}
this.onEnterFrame = function () {
_root.rankingRoot._y = (-(((scrMinAmount + 50) / 320) * _root.scrollbar.bt._y)) + 50;
if (_global.sortRanking != _global.beforeSortRanking) {
_root.rankingData = sortRecord(_global.sortRanking, _root.rankingData);
removeRankingMC();
dispRanking(_root.rankingData);
_global.beforeSortRanking = _global.sortRanking;
_root.scrollbar.bt._y = iniPosY;
}
};
mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if ((_root.scrollbar.bt._y <= (iniPosY + Math.abs(delta / 2))) && (delta > 0)) {
_root.scrollbar.bt._y = 0;
trace("\u6700\u4E0A\u90E8");
} else if ((_root.scrollbar.bt._y >= (320 - Math.abs(delta / 2))) && (delta < 0)) {
_root.scrollbar.bt._y = 320;
trace("\u6700\u4E0B\u90E8");
} else {
_root.scrollbar.bt._y = _root.scrollbar.bt._y - (delta / 2);
}
};
Mouse.addListener(mouseListener);
stop();
Instance of Symbol 928 MovieClip "distSort" in Frame 28
on (press) {
_root.se_cursol5.start();
_global.sortRanking = "dist";
_root.distSort.gotoAndStop(2);
_root.killSort.gotoAndStop(1);
_root.scoreSort.gotoAndStop(1);
}
Instance of Symbol 928 MovieClip "killSort" in Frame 28
on (press) {
_root.se_cursol5.start();
_global.sortRanking = "kill";
_root.distSort.gotoAndStop(1);
_root.killSort.gotoAndStop(2);
_root.scoreSort.gotoAndStop(1);
}
Instance of Symbol 928 MovieClip "scoreSort" in Frame 28
on (press) {
_root.se_cursol5.start();
_global.sortRanking = "score";
_root.distSort.gotoAndStop(1);
_root.killSort.gotoAndStop(1);
_root.scoreSort.gotoAndStop(2);
}
Frame 33
function getStringFromSymbolCode(gc) {
switch (gc) {
case 8 :
str = "BS";
break;
case 20 :
str = "CL";
break;
case 17 :
str = "CR";
break;
case 46 :
str = "DL";
break;
case 40 :
str = "DW";
break;
case 35 :
str = "ED";
break;
case 13 :
str = "ER";
break;
case 27 :
str = "ES";
break;
case 36 :
str = "HM";
break;
case 45 :
str = "IN";
break;
case 37 :
str = "LT";
break;
case 34 :
str = "PD";
break;
case 33 :
str = "PU";
break;
case 39 :
str = "RT";
break;
case 16 :
str = "ST";
break;
case 32 :
str = "SP";
break;
case 9 :
str = "TB";
break;
case 38 :
str = "UP";
break;
default :
str = "none";
}
return(str);
}
function setTempData() {
i = 0;
while (i < 12) {
_root.tempSetting["cf" + i] = _root.keySetting["cf" + i];
_root.tempSetting["char" + i] = _root.keySetting["char" + i];
i++;
}
_root.tempGraphic.qual = _global.qual;
_root.tempGraphic.shell = _global.shell;
_root.tempGraphic.bgm = _global.bgm;
_root.tempGraphic.okusenman = _global.okusenman;
_root.tempBonus.unarmedMode = _global.unarmedMode;
_root.tempBonus.samuraiMode = _global.samuraiMode;
_root.tempBonus.bombermanMode = _global.bombermanMode;
_root.tempBonus.enhancedMode = _global.enhancedMode;
_root.tempBonus.beamSaber = _global.beamSaber;
_root.tempBonus.grenadeMachinegun = _global.grenadeMachinegun;
_root.tempBonus.busterRifle = _global.busterRifle;
}
function dispKeyState() {
i = 0;
while (i < 12) {
_root.optionMainMC[i].cf.text = _root.keySetting["char" + i];
i++;
}
}
function dispGraphicState() {
if (_global.qual == "high") {
_root.optionMainMC.gp_high.gotoAndStop(2);
_root.optionMainMC.gp_medium.gotoAndStop(1);
_root.optionMainMC.gp_low.gotoAndStop(1);
} else if (_global.qual == "medium") {
_root.optionMainMC.gp_high.gotoAndStop(1);
_root.optionMainMC.gp_medium.gotoAndStop(2);
_root.optionMainMC.gp_low.gotoAndStop(1);
} else if (_global.qual == "low") {
_root.optionMainMC.gp_high.gotoAndStop(1);
_root.optionMainMC.gp_medium.gotoAndStop(1);
_root.optionMainMC.gp_low.gotoAndStop(2);
} else {
trace("ERROR in dispGraphicState(): _global.qual=" + _global.qual);
}
if (_global.shell) {
_root.optionMainMC.gp_shellOn.gotoAndStop(2);
_root.optionMainMC.gp_shellOff.gotoAndStop(1);
} else {
_root.optionMainMC.gp_shellOn.gotoAndStop(1);
_root.optionMainMC.gp_shellOff.gotoAndStop(2);
}
if (_global.bgm) {
_root.optionMainMC.gp_bgmOn.gotoAndStop(2);
_root.optionMainMC.gp_bgmOff.gotoAndStop(1);
} else {
_root.optionMainMC.gp_bgmOn.gotoAndStop(1);
_root.optionMainMC.gp_bgmOff.gotoAndStop(2);
}
if (_global.okusenmanAv) {
_root.optionMainMC.okusenmanMC.gotoAndStop(1);
} else {
_root.optionMainMC.okusenmanMC.gotoAndStop(2);
}
if (_global.okusenman) {
_root.optionMainMC.okusenmanMC.gp_okusenmanOn.gotoAndStop(2);
_root.optionMainMC.okusenmanMC.gp_okusenmanOff.gotoAndStop(1);
} else {
_root.optionMainMC.okusenmanMC.gp_okusenmanOn.gotoAndStop(1);
_root.optionMainMC.okusenmanMC.gp_okusenmanOff.gotoAndStop(2);
}
}
function dispBonusState() {
if (_global.unarmedModeAv) {
_root.optionMainMC.unarmedMC.gotoAndStop(1);
} else {
_root.optionMainMC.unarmedMC.gotoAndStop(2);
}
if (_global.samuraiModeAv) {
_root.optionMainMC.samuraiMC.gotoAndStop(1);
} else {
_root.optionMainMC.samuraiMC.gotoAndStop(2);
}
if (_global.bombermanModeAv) {
_root.optionMainMC.bombermanMC.gotoAndStop(1);
} else {
_root.optionMainMC.bombermanMC.gotoAndStop(2);
}
if (_global.enhancedModeAv) {
_root.optionMainMC.enhancedMC.gotoAndStop(1);
} else {
_root.optionMainMC.enhancedMC.gotoAndStop(2);
}
if (_global.beamSaberAv) {
_root.optionMainMC.beamSaberMC.gotoAndStop(1);
} else {
_root.optionMainMC.beamSaberMC.gotoAndStop(2);
}
if (_global.grenadeMachinegunAv) {
_root.optionMainMC.grenadeMachinegunMC.gotoAndStop(1);
} else {
_root.optionMainMC.grenadeMachinegunMC.gotoAndStop(2);
}
if (_global.busterRifleAv) {
_root.optionMainMC.busterRifleMC.gotoAndStop(1);
} else {
_root.optionMainMC.busterRifleMC.gotoAndStop(2);
}
if (_global.unarmedMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(2);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_global.samuraiMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_global.bombermanMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_global.enhancedMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(1);
} else {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
}
if (_global.beamSaber) {
_root.optionMainMC.beamSaberMC.bo_beamsaberOn.gotoAndStop(2);
_root.optionMainMC.beamSaberMC.bo_beamsaberOff.gotoAndStop(1);
} else {
_root.optionMainMC.beamSaberMC.bo_beamsaberOn.gotoAndStop(1);
_root.optionMainMC.beamSaberMC.bo_beamsaberOff.gotoAndStop(2);
}
if (_global.grenadeMachinegun) {
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOn.gotoAndStop(2);
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOff.gotoAndStop(1);
} else {
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOn.gotoAndStop(1);
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOff.gotoAndStop(2);
}
if (_global.busterRifle) {
_root.optionMainMC.busterRifleMC.bo_busterrifleOn.gotoAndStop(2);
_root.optionMainMC.busterRifleMC.bo_busterrifleOff.gotoAndStop(1);
} else {
_root.optionMainMC.busterRifleMC.bo_busterrifleOn.gotoAndStop(1);
_root.optionMainMC.busterRifleMC.bo_busterrifleOff.gotoAndStop(2);
}
}
function dispRecord() {
_root.optionMainMC.disp_numberOfPlaying.text = _global.numberOfPlaying;
_root.optionMainMC.disp_totalPlayinTimeHour.text = Math.floor(_global.totalPlayingTime / 3600);
_root.optionMainMC.disp_totalPlayinTimeMinute.text = Math.floor((_global.totalPlayingTime % 3600) / 60);
_root.optionMainMC.disp_totalPlayinTimeSecond.text = (_global.totalPlayingTime % 3600) % 60;
_root.optionMainMC.disp_aveDis.text = Math.round(_global.aveDis);
_root.optionMainMC.disp_maxDis.text = _global.maxDis;
_root.optionMainMC.disp_totalDis.text = _global.totalDis;
_root.optionMainMC.disp_aveKill.text = Math.round(_global.aveKill);
_root.optionMainMC.disp_maxKill.text = _global.maxKill;
_root.optionMainMC.disp_totalKill.text = _global.totalKill;
_root.optionMainMC.disp_HGKill.text = _global.HGKill;
_root.optionMainMC.disp_MGKill.text = _global.MGKill;
_root.optionMainMC.disp_SGKill.text = _global.SGKill;
_root.optionMainMC.disp_SRKill.text = _global.SRKill;
_root.optionMainMC.disp_FGKill.text = _global.FGKill;
_root.optionMainMC.disp_OTKill.text = _global.OTKill;
sum = ((((_global.HGKill + _global.MGKill) + _global.SGKill) + _global.SRKill) + _global.FGKill) + _global.OTKill;
if (sum != 0) {
_root.optionMainMC.disp_HGKillPercent.text = Math.round((_global.HGKill / sum) * 100);
_root.optionMainMC.disp_MGKillPercent.text = Math.round((_global.MGKill / sum) * 100);
_root.optionMainMC.disp_SGKillPercent.text = Math.round((_global.SGKill / sum) * 100);
_root.optionMainMC.disp_SRKillPercent.text = Math.round((_global.SRKill / sum) * 100);
_root.optionMainMC.disp_FGKillPercent.text = Math.round((_global.FGKill / sum) * 100);
_root.optionMainMC.disp_OTKillPercent.text = Math.round((_global.OTKill / sum) * 100);
} else {
_root.optionMainMC.disp_HGKillPercent.text = "0";
_root.optionMainMC.disp_MGKillPercent.text = "0";
_root.optionMainMC.disp_SGKillPercent.text = "0";
_root.optionMainMC.disp_SRKillPercent.text = "0";
_root.optionMainMC.disp_FGKillPercent.text = "0";
_root.optionMainMC.disp_OTKillPercent.text = "0";
}
_root.optionMainMC.disp_aveScore.text = "$ " + Math.round(_global.aveScore);
_root.optionMainMC.disp_maxScore.text = "$ " + _global.maxScore;
_root.optionMainMC.disp_totalScore.text = "$ " + _global.totalScore;
_root.optionMainMC.disp_maxDisOnUnarmedMode.text = _global.maxDisOnUnarmedMode;
_root.optionMainMC.disp_maxDisOnSamuraiMode.text = _global.maxDisOnSamuraiMode;
_root.optionMainMC.disp_maxDisOnBombermanMode.text = _global.maxDisOnBombermanMode;
}
function refleshGraphicState() {
if (_root.tempGraphic.qual == "high") {
_root.optionMainMC.gp_high.gotoAndStop(2);
_root.optionMainMC.gp_medium.gotoAndStop(1);
_root.optionMainMC.gp_low.gotoAndStop(1);
} else if (_root.tempGraphic.qual == "medium") {
_root.optionMainMC.gp_high.gotoAndStop(1);
_root.optionMainMC.gp_medium.gotoAndStop(2);
_root.optionMainMC.gp_low.gotoAndStop(1);
} else if (_root.tempGraphic.qual == "low") {
_root.optionMainMC.gp_high.gotoAndStop(1);
_root.optionMainMC.gp_medium.gotoAndStop(1);
_root.optionMainMC.gp_low.gotoAndStop(2);
} else {
trace("ERROR in dispGraphicState(): _root.tempGraphic.qual=" + _root.tempGraphic.qual);
}
if (_root.tempGraphic.shell) {
_root.optionMainMC.gp_shellOn.gotoAndStop(2);
_root.optionMainMC.gp_shellOff.gotoAndStop(1);
} else {
_root.optionMainMC.gp_shellOn.gotoAndStop(1);
_root.optionMainMC.gp_shellOff.gotoAndStop(2);
}
if (_root.tempGraphic.bgm) {
_root.optionMainMC.gp_bgmOn.gotoAndStop(2);
_root.optionMainMC.gp_bgmOff.gotoAndStop(1);
} else {
_root.optionMainMC.gp_bgmOn.gotoAndStop(1);
_root.optionMainMC.gp_bgmOff.gotoAndStop(2);
}
if (_root.tempGraphic.okusenman) {
_root.optionMainMC.okusenmanMC.gp_okusenmanOn.gotoAndStop(2);
_root.optionMainMC.okusenmanMC.gp_okusenmanOff.gotoAndStop(1);
} else {
_root.optionMainMC.okusenmanMC.gp_okusenmanOn.gotoAndStop(1);
_root.optionMainMC.okusenmanMC.gp_okusenmanOff.gotoAndStop(2);
}
}
function refleshBonusState() {
if (_root.tempBonus.unarmedMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(2);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_root.tempBonus.samuraiMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_root.tempBonus.bombermanMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
} else if (_root.tempBonus.enhancedMode) {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(1);
} else {
_root.optionMainMC.unarmedMC.bo_unarmedOn.gotoAndStop(1);
_root.optionMainMC.unarmedMC.bo_unarmedOff.gotoAndStop(2);
_root.optionMainMC.samuraiMC.bo_samuraiOn.gotoAndStop(1);
_root.optionMainMC.samuraiMC.bo_samuraiOff.gotoAndStop(2);
_root.optionMainMC.bombermanMC.bo_bombermanOn.gotoAndStop(1);
_root.optionMainMC.bombermanMC.bo_bombermanOff.gotoAndStop(2);
_root.optionMainMC.enhancedMC.bo_enhancedOn.gotoAndStop(1);
_root.optionMainMC.enhancedMC.bo_enhancedOff.gotoAndStop(2);
}
if (_root.tempBonus.beamSaber) {
_root.optionMainMC.beamSaberMC.bo_beamsaberOn.gotoAndStop(2);
_root.optionMainMC.beamSaberMC.bo_beamsaberOff.gotoAndStop(1);
} else {
_root.optionMainMC.beamSaberMC.bo_beamsaberOn.gotoAndStop(1);
_root.optionMainMC.beamSaberMC.bo_beamsaberOff.gotoAndStop(2);
}
if (_root.tempBonus.grenadeMachinegun) {
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOn.gotoAndStop(2);
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOff.gotoAndStop(1);
} else {
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOn.gotoAndStop(1);
_root.optionMainMC.grenadeMachinegunMC.bo_grenademachinegunOff.gotoAndStop(2);
}
if (_root.tempBonus.busterRifle) {
_root.optionMainMC.busterRifleMC.bo_busterrifleOn.gotoAndStop(2);
_root.optionMainMC.busterRifleMC.bo_busterrifleOff.gotoAndStop(1);
} else {
_root.optionMainMC.busterRifleMC.bo_busterrifleOn.gotoAndStop(1);
_root.optionMainMC.busterRifleMC.bo_busterrifleOff.gotoAndStop(2);
}
}
id = "none";
var choiceMenu = 0;
var tempSetting = new Object();
var tempGraphic = new Object();
var tempBonus = new Object();
var beforeChoiceMenu = -1;
var iniY = _root.optionMainMC._y;
var endY = (_root.optionMainMC._y - ((_root.optionMainMC._height * 2) / 5));
var range = ((_root.optionMainMC._height * 2) / 5);
setTempData();
dispKeyState();
this.onEnterFrame = function () {
if (_root.choiceMenu == 3) {
_root.optionMainMC._y = (-((range / 320) * _root.scrollbar.bt._y)) + iniY;
}
if (beforeChoiceMenu != _root.choiceMenu) {
beforeChoiceMenu = _root.choiceMenu;
switch (_root.choiceMenu) {
case 0 :
_root.optionMainMC.gotoAndStop(1);
_root.scrollbar.bt._y = 0;
_root.optionMainMC._y = iniY;
setTempData();
dispKeyState();
break;
case 1 :
_root.optionMainMC.gotoAndStop(2);
_root.scrollbar.bt._y = 0;
_root.optionMainMC._y = iniY;
setTempData();
dispGraphicState();
break;
case 2 :
_root.optionMainMC.gotoAndStop(3);
_root.scrollbar.bt._y = 0;
_root.optionMainMC._y = iniY;
setTempData();
dispBonusState();
break;
case 3 :
_root.optionMainMC.gotoAndStop(4);
_root.scrollbar.bt._y = 0;
_root.optionMainMC._y = iniY;
dispRecord();
break;
default :
trace("ERROR in optionMenuMC: _root.choiceMenu=" + _root.choiceMenu);
}
}
};
keyListener = new Object();
keyListener.onKeyDown = function () {
if (_root.choiceMenu == 0) {
code = Key.getCode();
ascii = Key.getAscii();
str = getStringFromSymbolCode(code);
_root.tempSetting["cf" + id] = code;
if (str != "none") {
_root.optionMainMC[id].cf.text = str;
_root.tempSetting["char" + id] = _root.optionMainMC[id].cf.text;
} else {
_root.optionMainMC[id].cf.text = String.fromCharCode(ascii).toUpperCase();
_root.tempSetting["char" + id] = _root.optionMainMC[id].cf.text;
}
_root.optionMainMC[id].gotoAndStop(1);
id = "none";
}
};
Key.addListener(keyListener);
mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if (_root.choiceMenu == 3) {
trace("delta: " + delta);
if (_root.optionMainMC._y > iniY) {
trace("mListener!!!: 1");
_root.optionMainMC._y = iniY;
} else if (_root.optionMainMC._y < endY) {
trace("mListener!!!: 2");
_root.optionMainMC._y = endY;
} else {
trace("mListener!!!: 3");
if ((!((_root.optionMainMC._y == iniY) && (delta > 0))) && (!((_root.optionMainMC._y == endY) && (delta < 0)))) {
trace("delta: " + delta);
}
trace("Before: _root.optionMainMC._y = " + _root.optionMainMC._y);
_root.optionMainMC._y = _root.optionMainMC._y + (delta * 3);
trace("After: _root.optionMainMC._y = " + _root.optionMainMC._y);
}
_root.scrollbar.bt._y = (iniY - _root.optionMainMC._y) * (320 / range);
if (_root.scrollbar.bt._y < 0) {
_root.scrollbar.bt._y = 0;
} else if (_root.scrollbar.bt._y > 320) {
_root.scrollbar.bt._y = 320;
}
}
};
Mouse.addListener(mouseListener);
stop();
Instance of Symbol 1131 MovieClip in Frame 33
onClipEvent (load) {
this._visible = false;
R = 60;
henpei = -0.4;
minS = 40;
speed = 91;
mk = 0;
maxY = (1 * R) * henpei;
}
onClipEvent (enterFrame) {
this._visible = true;
if (_root.choiceMenu == 3) {
_root.scrollbar._visible = true;
} else {
_root.scrollbar._visible = false;
}
speed = speed + (((91 - mk) - speed) / 12);
}
Symbol 16 MovieClip [canon] Frame 1
stop();
Symbol 16 MovieClip [canon] Frame 83
this.removeMovieClip();
Symbol 26 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 51 MovieClip Frame 1
stop();
Symbol 51 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 31
this.gotoAndPlay(2);
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 2
stop();
Symbol 98 MovieClip Frame 3
stop();
Symbol 98 MovieClip Frame 4
stop();
Symbol 98 MovieClip Frame 5
stop();
Symbol 98 MovieClip Frame 6
stop();
Symbol 98 MovieClip Frame 7
stop();
Symbol 100 MovieClip [refuelingPoint] Frame 32
stop();
Symbol 100 MovieClip [refuelingPoint] Frame 57
_global.RP = false;
this.removeMovieClip();
Symbol 109 MovieClip [pDashVarnia] Frame 9
this.removeMovieClip();
Symbol 115 MovieClip [pBackDashVarnia] Frame 10
this.removeMovieClip();
Symbol 117 MovieClip Frame 1
this._visible = false;
Symbol 141 MovieClip Frame 35
_parent.removeMovieClip();
stop();
Symbol 142 MovieClip [trap1] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function shot() {
if (shotCount == 0) {
se_laser.start();
shotCount = shotWait;
laserName = "ef_laserE" + _global.eLaserNo;
_root.scr.attachMovie("ef_laserE", laserName, 781 + _global.eLaserNo);
_root.scr[laserName]._x = this._x;
_root.scr[laserName]._y = this._y - 30;
_root.scr[laserName].dx = 0;
_root.scr[laserName].dy = -shotSpeed;
_root.scr[laserName].power = shotPower;
_root.scr[laserName]._rotation = 90;
if ((++_global.eLaserNo) > 19) {
_global.eLaserNo = 0;
}
}
}
eMAXHP = 160;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
dist = _global.screenX / 20;
baseScore = 500;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 5;
shotPower = 6;
shotWait = 15;
shotCount = 0;
power = 10;
sPower = 3;
xDamageEffect = 0;
yDamageEffect = -36;
inScreen = false;
se_laser = new Sound();
se_laser.attachSound("se_laser2");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
eGroundEffect();
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount != 0) {
shotCount--;
}
shot();
if (this.hitdamage.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
damageEffectForPlayer(sPower);
_global.pHP = _global.pHP - sPower;
} else if (this.hitdamage.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(power);
_global.pHP = _global.pHP - power;
se_damageHG.start();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 142 MovieClip [trap1] Frame 2
stop();
Symbol 142 MovieClip [trap1] Frame 12
stop();
Symbol 143 MovieClip [trap3] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function shot() {
if (shotCount == 0) {
se_laser.start();
shotCount = shotWait;
laserName = "ef_laserE" + _global.eLaserNo;
_root.scr.attachMovie("ef_laserE", laserName, 781 + _global.eLaserNo);
_root.scr[laserName]._x = this._x;
_root.scr[laserName]._y = this._y + 120;
_root.scr[laserName].dx = 0;
_root.scr[laserName].dy = shotSpeed;
_root.scr[laserName].power = shotPower;
_root.scr[laserName]._rotation = 90;
if ((++_global.eLaserNo) > 19) {
_global.eLaserNo = 0;
}
}
}
eMAXHP = 160;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
dist = _global.screenX / 20;
baseScore = 550;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 5;
shotPower = 6;
shotWait = 15;
shotCount = 0;
power = 10;
sPower = 3;
xDamageEffect = 0;
yDamageEffect = -36;
inScreen = false;
dx = 10;
dy = 10;
zigzagTime = 15;
zigzagCount = zigzagTime;
se_laser = new Sound();
se_laser.attachSound("se_laser2");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
this._y = 32;
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount != 0) {
shotCount--;
}
shot();
switch (moveType) {
case 0 :
break;
case 1 :
this._x = this._x - dx;
break;
case 2 :
this._x = this._x - dx;
if (zigzagCount > 0) {
this._y = this._y + dy;
} else if (zigzagCount <= 0) {
this._y = this._y - dy;
}
if ((--zigzagCount) <= (-(zigzagTime - 1))) {
zigzagCount = zigzagTime;
}
break;
default :
trace("ERROR in trap2AS: moveType=" + moveType);
}
if (this.hitdamage.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
damageEffectForPlayer(sPower);
_global.pHP = _global.pHP - sPower;
} else if (this.hitdamage.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(power);
_global.pHP = _global.pHP - power;
se_damageHG.start();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 143 MovieClip [trap3] Frame 2
stop();
Symbol 143 MovieClip [trap3] Frame 12
stop();
Symbol 153 MovieClip [trap5] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
HP = 999999 /* 0x0F423F */;
power = 20;
inScreen = false;
dx = 10;
dy = 10;
zigzagTime = 10;
zigzagCount = zigzagTime;
moveFlag = true;
if (moveType == 0) {
eGroundEffect();
} else {
this._y = 20 + Math.floor(Math.random() * 280);
}
se_hit = new Sound();
se_hit.attachSound("se_valcan");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
this.onEnterFrame = function () {
if (!_global.RP) {
switch (moveType) {
case 0 :
break;
case 1 :
this._x = this._x - dx;
break;
case 2 :
this._x = this._x - dx;
if (zigzagCount > 0) {
this._y = this._y + dy;
} else if (zigzagCount <= 0) {
this._y = this._y - dy;
}
if ((--zigzagCount) <= (-(zigzagTime - 1))) {
zigzagCount = zigzagTime;
}
break;
default :
trace("ERROR in trap2AS: moveType=" + moveType);
}
if (this.hitTest(_root.player.arm.shieldCheck)) {
trace(HP);
se_shield.start();
dx = 0;
dy = 0;
if (_root.player._xscale == 100) {
this._x = this._x + 5;
} else {
this._x = this._x - 5;
}
if (moveType == 0) {
eGroundEffect();
}
} else if (this.hitdamage.hitTest(_root.player.hitcheck)) {
_root.player.damagedByIgaIga = true;
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(power);
_global.pHP = _global.pHP - power;
se_damageHG.start();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
}
};
Symbol 153 MovieClip [trap5] Frame 2
stop();
Symbol 167 MovieClip Frame 35
_parent.removeMovieClip();
stop();
Symbol 168 MovieClip [trap2] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function shot() {
if (shotCount == 0) {
se_laser.start();
shotCount = shotWait;
laserName = "ef_laserE" + _global.eLaserNo;
_root.scr.attachMovie("ef_laserE", laserName, 781 + _global.eLaserNo);
_root.scr[laserName]._x = this._x;
_root.scr[laserName]._y = this._y + 120;
_root.scr[laserName].dx = 0;
_root.scr[laserName].dy = shotSpeed;
_root.scr[laserName].power = shotPower;
_root.scr[laserName]._rotation = 90;
if ((++_global.eLaserNo) > 19) {
_global.eLaserNo = 0;
}
}
}
eMAXHP = 10;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
dist = _global.screenX / 20;
baseScore = 130;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 5;
shotPower = 6;
shotWait = 15;
shotCount = 0;
power = 10;
sPower = 3;
xDamageEffect = 0;
yDamageEffect = -36;
inScreen = false;
dx = 10;
dy = 10;
zigzagTime = 15;
zigzagCount = zigzagTime;
se_laser = new Sound();
se_laser.attachSound("se_laser2");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
this._y = 32;
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount != 0) {
shotCount--;
}
shot();
switch (moveType) {
case 0 :
break;
case 1 :
this._x = this._x - dx;
break;
case 2 :
this._x = this._x - dx;
if (zigzagCount > 0) {
this._y = this._y + dy;
} else if (zigzagCount <= 0) {
this._y = this._y - dy;
}
if ((--zigzagCount) <= (-(zigzagTime - 1))) {
zigzagCount = zigzagTime;
}
break;
default :
trace("ERROR in trap2AS: moveType=" + moveType);
}
if (this.hitdamage.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
damageEffectForPlayer(sPower);
_global.pHP = _global.pHP - sPower;
} else if (this.hitdamage.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(power);
_global.pHP = _global.pHP - power;
se_damageHG.start();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 168 MovieClip [trap2] Frame 2
stop();
Symbol 168 MovieClip [trap2] Frame 12
stop();
Symbol 179 MovieClip Frame 35
_parent.removeMovieClip();
stop();
Symbol 180 MovieClip [trap4] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function shot() {
if (shotCount == 0) {
se_moti.start();
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
motiName = "ef_motiE" + _global.eShotNo;
_root.scr.attachMovie("ef_motiE", motiName, 781 + _global.eShotNo);
_root.scr[motiName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[motiName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[motiName].dx = shotSpeed * Math.cos(rad);
_root.scr[motiName].dy = shotSpeed * Math.sin(rad);
_root.scr[motiName].motiTime = this.motiTime;
if ((++_global.eShotNo) > 19) {
_global.eShotNo = 0;
}
}
}
eMAXHP = 10;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
dist = _global.screenX / 20;
baseScore = 75;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 7;
shotWait = 30;
shotCount = 0;
motiTime = 90;
xDamageEffect = 0;
yDamageEffect = -36;
inScreen = false;
se_moti = new Sound();
se_moti.attachSound("se_moti");
se_hit = new Sound();
se_hit.attachSound("se_hit");
eGroundEffect();
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount != 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
tempRot = Math.atan2(-yDis, -xDis) / (Math.PI/180);
if (tempRot >= 70) {
this.arm._rotation = 70;
} else if (tempRot <= -11) {
this.arm._rotation = -11;
} else {
this.arm._rotation = tempRot;
}
if ((this.arm._rotation != 70) && (this.arm._rotation != -11)) {
shot();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 180 MovieClip [trap4] Frame 2
stop();
Symbol 180 MovieClip [trap4] Frame 12
stop();
Symbol 181 MovieClip [trap0] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function shot() {
if (shotCount == 0) {
se_laser.start();
shotCount = shotWait;
laserName = "ef_laserE" + _global.eLaserNo;
_root.scr.attachMovie("ef_laserE", laserName, 781 + _global.eLaserNo);
_root.scr[laserName]._x = this._x;
_root.scr[laserName]._y = this._y - 30;
_root.scr[laserName].dx = 0;
_root.scr[laserName].dy = -shotSpeed;
_root.scr[laserName].power = shotPower;
_root.scr[laserName]._rotation = 90;
if ((++_global.eLaserNo) > 19) {
_global.eLaserNo = 0;
}
}
}
eMAXHP = 10;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
dist = _global.screenX / 20;
baseScore = 70;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 5;
shotPower = 6;
shotWait = 15;
shotCount = 0;
power = 10;
sPower = 3;
xDamageEffect = 0;
yDamageEffect = -36;
inScreen = false;
se_laser = new Sound();
se_laser.attachSound("se_laser2");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
eGroundEffect();
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount != 0) {
shotCount--;
}
shot();
if (this.hitdamage.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
damageEffectForPlayer(sPower);
_global.pHP = _global.pHP - sPower;
} else if (this.hitdamage.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(power);
_global.pHP = _global.pHP - power;
se_damageHG.start();
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
} else if ((this._x - _global.screenX) < -50) {
this.removeMovieClip();
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 181 MovieClip [trap0] Frame 2
stop();
Symbol 181 MovieClip [trap0] Frame 12
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 11
stop();
Symbol 216 MovieClip Frame 38
_parent.se_heri.stop("se_heri");
Symbol 216 MovieClip Frame 64
_parent.removeMovieClip();
Symbol 217 MovieClip [niwaheri1] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shot() {
if (shotCount == 0) {
shotCount = shotWait;
se_bomb.start();
bombName = "ef_bombE" + _global.eShotNo;
_root.scr.attachMovie("ef_bombE", bombName, 1701 + _global.eShotNo);
if (this._xscale == 100) {
_root.scr[bombName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[bombName]._x = this._x - this.shotPoint._x;
}
_root.scr[bombName]._y = this._y + this.shotPoint._y;
_root.scr[bombName].dx = 0;
_root.scr[bombName].dy = 0;
_root.scr[bombName].power = shotPower;
if ((++_global.eShotNo) > 99) {
_global.eShotNo = 0;
}
}
}
eMAXHP = 500;
HP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 5000;
score = Math.floor(baseScore * (dist / 20));
shotPower = 10;
shotWait = 9;
xDamageEffect = 25;
yDamageEffect = 0;
shotCount = 0;
goalDist = 80;
winceTime = 2;
winceCount = 0;
winceMove = 0;
inScreen = false;
se_biggun = new Sound();
se_biggun.attachSound("se_bomb");
se_heri = new Sound();
se_heri.attachSound("se_heri");
se_heri.start(0, 99);
se_hit = new Sound();
se_hit.attachSound("se_hit");
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (state == "walk") {
if (this._xscale == 100) {
this._x = this._x - speed;
shot();
} else {
this._x = this._x + speed;
shot();
}
} else if (state == "wince") {
if ((--winceCount) <= 0) {
winceCount = 0;
state = "walk";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in niwaheri1: state = " + state);
}
if ((this._x - _global.screenX) > 850) {
inScreen = false;
this._visible = false;
if ((this._x - _global.screenX) > 900) {
se_heri.stop("se_heri");
this.removeMovieClip();
}
} else if ((this._x - _global.screenX) < -200) {
inScreen = false;
this._visible = false;
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
se_heri.stop("se_heri");
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 217 MovieClip [niwaheri1] Frame 2
stop();
Symbol 217 MovieClip [niwaheri1] Frame 12
stop();
Symbol 217 MovieClip [niwaheri1] Frame 22
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 11
stop();
Symbol 223 MovieClip Frame 46
_parent.se_heri.stop("se_heri");
Symbol 223 MovieClip Frame 78
_parent.removeMovieClip();
Symbol 224 MovieClip [niwaheri2] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
this.niwatoriMC.gotoAndStop("attack");
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
se_biggun2.start();
handgunName = "ef_biggun2E" + _global.eShotNo;
_root.scr.attachMovie("ef_biggun2E", handgunName, 1701 + _global.eShotNo);
if (this._xscale == 100) {
_root.scr[handgunName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[handgunName]._x = this._x - this.shotPoint._x;
}
_root.scr[handgunName]._y = this._y + this.shotPoint._y;
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if (_global.eShotNo <= 99) {
_global.eShotNo++;
} else {
_global.eShotNo = 0;
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
shotting = false;
this.niwatoriMC.gotoAndStop("normal");
se_niwatoriR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
if (this._xscale == 100) {
_root.scr[reloadName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[reloadName]._x = this._x - this.shotPoint._x;
}
_root.scr[reloadName]._y = this._y + this.shotPoint._y;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 2000;
HP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 8500;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 17;
mPrecision = 30;
shotPower = 18;
shotWait = 2;
xDamageEffect = 25;
yDamageEffect = 0;
shotCount = 0;
goalDist = 80;
winceTime = 2;
winceCount = 0;
winceMove = 0;
flashTime = 2;
flashCount = 0;
beHP = eMAXHP;
zonbi = true;
rightGoal = (-goalDist) + (_root.player._x + _global.screenX);
leftGoal = goalDist + (_root.player._x + _global.screenX);
MaxAmmo = 55;
ammo = MaxAmmo;
reloadTime = 5.3;
reloadCount = 0;
shotting = false;
reloadName = "";
inScreen = false;
basicHi = 0;
se_biggun2 = new Sound();
se_biggun2.attachSound("se_biggun2");
se_niwatoriR = new Sound();
se_niwatoriR.attachSound("se_niwatoriR");
se_heri = new Sound();
se_heri.attachSound("se_heri");
se_heri.start(0, 99);
se_hit = new Sound();
se_hit.attachSound("se_hit");
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
if (this._xscale == 100) {
xDis = (_root.player._x + _global.screenX) - (this._x + this.shotPoint._x);
} else {
xDis = (_root.player._x + _global.screenX) - (this._x - this.shotPoint._x);
}
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y + this.shotPoint._y);
trace((("xDis, yDis = " + xDis) + ", ") + yDis);
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - 10)) {
this._x = this._x + speed;
} else if (this._x > (leftGoal + 10)) {
this._x = this._x - speed;
} else {
shotting = true;
}
} else {
rightGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + 10)) {
this._x = this._x - speed;
} else if (this._x < (rightGoal - 10)) {
this._x = this._x + speed;
} else {
shotting = true;
}
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
if (this._xscale == 100) {
_root.scr[reloadName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[reloadName]._x = this._x - this.shotPoint._x;
}
_root.scr[reloadName]._y = this._y + this.shotPoint._y;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "walk";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if (beHP != HP) {
this.gotoAndStop("flash");
flashCount = flashTime;
beHP = HP;
} else if (flashCount > 0) {
if ((--flashCount) <= 0) {
flashCount = 0;
this.gotoAndStop("normal");
}
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -200) {
inScreen = false;
this._visible = false;
this._xscale = -100;
if (state != "reloading") {
state = "walk";
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 224 MovieClip [niwaheri2] Frame 2
stop();
Symbol 224 MovieClip [niwaheri2] Frame 12
stop();
Symbol 224 MovieClip [niwaheri2] Frame 22
stop();
Symbol 225 MovieClip [niwaheri0] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
this.niwatoriMC.gotoAndStop("attack");
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
se_biggun.start();
handgunName = "ef_biggunE" + _global.eShotNo;
_root.scr.attachMovie("ef_biggunE", handgunName, 1701 + _global.eShotNo);
if (this._xscale == 100) {
_root.scr[handgunName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[handgunName]._x = this._x - this.shotPoint._x;
}
_root.scr[handgunName]._y = this._y + this.shotPoint._y;
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if (_global.eShotNo <= 99) {
_global.eShotNo++;
} else {
_global.eShotNo = 0;
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
shotting = false;
this.niwatoriMC.gotoAndStop("normal");
se_niwatoriR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
if (this._xscale == 100) {
_root.scr[reloadName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[reloadName]._x = this._x - this.shotPoint._x;
}
_root.scr[reloadName]._y = this._y + this.shotPoint._y;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 500;
HP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 2000;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 17;
mPrecision = 12;
shotPower = 10;
shotWait = 3;
xDamageEffect = 25;
yDamageEffect = 0;
shotCount = 0;
goalDist = 80;
winceTime = 2;
winceCount = 0;
winceMove = 0;
rightGoal = (-goalDist) + (_root.player._x + _global.screenX);
leftGoal = goalDist + (_root.player._x + _global.screenX);
MaxAmmo = 35;
ammo = MaxAmmo;
reloadTime = 6;
reloadCount = 0;
shotting = false;
reloadName = "";
inScreen = false;
basicHi = 0;
se_biggun = new Sound();
se_biggun.attachSound("se_biggun");
se_niwatoriR = new Sound();
se_niwatoriR.attachSound("se_niwatoriR");
se_heri = new Sound();
se_heri.attachSound("se_heri");
se_heri.start(0, 99);
se_hit = new Sound();
se_hit.attachSound("se_hit");
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
if (this._xscale == 100) {
xDis = (_root.player._x + _global.screenX) - (this._x + this.shotPoint._x);
} else {
xDis = (_root.player._x + _global.screenX) - (this._x - this.shotPoint._x);
}
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y + this.shotPoint._y);
trace((("xDis, yDis = " + xDis) + ", ") + yDis);
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - 10)) {
this._x = this._x + speed;
} else if (this._x > (leftGoal + 10)) {
this._x = this._x - speed;
} else {
shotting = true;
}
} else {
rightGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + 10)) {
this._x = this._x - speed;
} else if (this._x < (rightGoal - 10)) {
this._x = this._x + speed;
} else {
shotting = true;
}
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
if (this._xscale == 100) {
_root.scr[reloadName]._x = this._x + this.shotPoint._x;
} else {
_root.scr[reloadName]._x = this._x - this.shotPoint._x;
}
_root.scr[reloadName]._y = this._y + this.shotPoint._y;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "walk";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if ((--winceCount) <= 0) {
winceCount = 0;
state = "walk";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -200) {
inScreen = false;
this._visible = false;
this._xscale = -100;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
se_heri.stop("se_heri");
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 225 MovieClip [niwaheri0] Frame 2
stop();
Symbol 225 MovieClip [niwaheri0] Frame 12
stop();
Symbol 225 MovieClip [niwaheri0] Frame 22
stop();
Symbol 262 MovieClip Frame 21
stop();
_parent.removeMovieClip();
Symbol 263 MovieClip [enemy5] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName]._xscale = 150;
_root.scr[handgunName]._yscale = 150;
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 1500;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 2000;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 15;
shotPower = 11;
shotWait = 3;
mPrecision = 13;
firingTime = 7;
firingRange = 3;
fireRateNormal = 50;
fireRateWalk = 100;
fireCount = 0;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = true;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 35;
ammo = MaxAmmo;
reloadTime = 6.5;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 263 MovieClip [enemy5] Frame 2
stop();
Symbol 263 MovieClip [enemy5] Frame 12
stop();
Symbol 263 MovieClip [enemy5] Frame 22
stop();
Symbol 263 MovieClip [enemy5] Frame 32
stop();
Symbol 265 MovieClip [enemy4] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName]._xscale = 120;
_root.scr[handgunName]._yscale = 120;
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 400;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 500;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 15;
shotPower = 6;
shotWait = 3;
mPrecision = 15;
firingTime = 6;
firingRange = 3;
fireRateNormal = 50;
fireRateWalk = 100;
fireCount = 0;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = true;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 25;
ammo = MaxAmmo;
reloadTime = 6;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 265 MovieClip [enemy4] Frame 2
stop();
Symbol 265 MovieClip [enemy4] Frame 12
stop();
Symbol 265 MovieClip [enemy4] Frame 22
stop();
Symbol 265 MovieClip [enemy4] Frame 32
stop();
Symbol 269 MovieClip [enemy6] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_sniper.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
handgunName = "ef_sniperE" + _global.eShotNo;
_root.scr.attachMovie("ef_sniperE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell2", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_sniperR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 170;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 24;
shotPower = 10;
shotWait = 45;
fireRateNormal = 30;
fireRateWalk = 60;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 150;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 3;
ammo = MaxAmmo;
reloadTime = 6;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
se_sniper = new Sound();
se_sniper.attachSound("se_magnum");
se_sniperR = new Sound();
se_sniperR.attachSound("se_magnumR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 269 MovieClip [enemy6] Frame 2
stop();
Symbol 269 MovieClip [enemy6] Frame 12
stop();
Symbol 269 MovieClip [enemy6] Frame 22
stop();
Symbol 269 MovieClip [enemy6] Frame 32
stop();
Symbol 309 MovieClip Frame 21
stop();
_parent.removeMovieClip();
Symbol 310 MovieClip [enemy9] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_sniper.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
handgunName = "ef_sniperE" + _global.eShotNo;
_root.scr.attachMovie("ef_sniperE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell2", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_sniperR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
function jump() {
trace("enemyJumpped!!");
se_jump.start();
this.gotoAndStop("jump");
jumpMode = "up";
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.eJump.gotoAndStop(i);
} else {
this.eJump.gotoAndStop(24);
}
}
function jumpLoop(groundY) {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
}
eMAXHP = 500;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 2000;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 30;
shotPower = 50;
shotWait = 25;
fireRateNormal = 25;
fireRateWalk = 30;
chRateOnWalk = 500;
chRateOnNormal = 10;
jumpRate = 20;
goalDist = 230;
goalDistRange = 10;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 5;
winceMove = 8;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 5;
ammo = MaxAmmo;
reloadTime = 3;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
jumpMode = "-";
jumpModeBeforeWince = "none";
jmpCnt = 1;
if (fallen) {
jumpMode = "down";
jmpCnt = 12;
} else {
jumpMode = "-";
}
se_sniper = new Sound();
se_sniper.attachSound("se_sniper");
se_sniperR = new Sound();
se_sniperR.attachSound("se_magnumR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
jumpLoop(eGroundEffectForAkaGao());
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
} else if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
}
} else if (state == "reloading") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (jumpModeBeforeWince == "none") {
jumpModeBeforeWince = jumpMode;
}
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
if (jumpModeBeforeWince == "-") {
this.gotoAndStop("normal");
} else {
this.gotoAndStop("jump");
}
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 310 MovieClip [enemy9] Frame 2
stop();
Symbol 310 MovieClip [enemy9] Frame 12
stop();
Symbol 310 MovieClip [enemy9] Frame 32
stop();
Symbol 310 MovieClip [enemy9] Frame 42
stop();
Symbol 312 MovieClip [enemy3] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_sniper.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
handgunName = "ef_sniperE" + _global.eShotNo;
_root.scr.attachMovie("ef_sniperE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell2", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_sniperR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 210;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 24;
shotPower = 10;
shotWait = 45;
fireRateNormal = 30;
fireRateWalk = 60;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 150;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 3;
ammo = MaxAmmo;
reloadTime = 6;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
se_sniper = new Sound();
se_sniper.attachSound("se_magnum");
se_sniperR = new Sound();
se_sniperR.attachSound("se_magnumR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 312 MovieClip [enemy3] Frame 2
stop();
Symbol 312 MovieClip [enemy3] Frame 12
stop();
Symbol 312 MovieClip [enemy3] Frame 22
stop();
Symbol 312 MovieClip [enemy3] Frame 32
stop();
Symbol 316 MovieClip [enemy8] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_shotgun.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
i = 0;
while (i < spreadNo) {
handgunName = "ef_shotgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_shotgunE", handgunName, 1701 + _global.eShotNo);
spreadX = Math.floor((Math.random() * 10) - 5);
spreadY = Math.floor((Math.random() * 10) - 5);
_root.scr[handgunName]._x = (this._x + spreadX) + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = ((this._y - (this._height / 2)) + spreadY) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * sPrecision) - Math.floor(sPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
i++;
}
if (_global.shell) {
eShell("ef_shell2", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_shotgunR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
function jump() {
trace("enemyJumpped!!");
se_jump.start();
this.gotoAndStop("jump");
jumpMode = "up";
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.eJump.gotoAndStop(i);
} else {
this.eJump.gotoAndStop(24);
}
}
function jumpLoop(groundY) {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
}
eMAXHP = 500;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 1800;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 17;
shotPower = 7;
spreadNo = 10;
sPrecision = 29;
shotWait = 30;
fireRateNormal = 20;
fireRateWalk = 50;
chRateOnWalk = 10;
chRateOnNormal = 10;
jumpRate = 20;
goalDist = 25;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 5;
winceMove = 8;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 4;
ammo = MaxAmmo;
reloadTime = 2.5;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
jumpMode = "-";
jumpModeBeforeWince = "none";
jmpCnt = 1;
if (fallen) {
jumpMode = "down";
jmpCnt = 12;
} else {
jumpMode = "-";
}
se_shotgun = new Sound();
se_shotgun.attachSound("se_shotgun");
se_shotgunR = new Sound();
se_shotgunR.attachSound("se_shotgunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
jumpLoop(eGroundEffectForAkaGao());
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
} else if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
}
} else if (state == "reloading") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (jumpModeBeforeWince == "none") {
jumpModeBeforeWince = jumpMode;
}
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if ((--winceCount) <= 0) {
winceCount = 0;
jumpModeBeforeWince = "none";
state = "normal";
if (jumpModeBeforeWince == "-") {
this.gotoAndStop("normal");
} else {
this.gotoAndStop("jump");
}
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 316 MovieClip [enemy8] Frame 2
stop();
Symbol 316 MovieClip [enemy8] Frame 12
stop();
Symbol 316 MovieClip [enemy8] Frame 32
stop();
Symbol 316 MovieClip [enemy8] Frame 42
stop();
Symbol 318 MovieClip [enemy2] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_shotgun.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
i = 0;
while (i < spreadNo) {
handgunName = "ef_shotgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_shotgunE", handgunName, 1701 + _global.eShotNo);
spreadX = Math.floor((Math.random() * 10) - 5);
spreadY = Math.floor((Math.random() * 10) - 5);
_root.scr[handgunName]._x = (this._x + spreadX) + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = ((this._y - (this._height / 2)) + spreadY) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * sPrecision) - Math.floor(sPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
i++;
}
if (_global.shell) {
eShell("ef_shell2", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_shotgunR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 190;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 13;
shotPower = 5;
spreadNo = 6;
sPrecision = 31;
shotWait = 45;
fireRateNormal = 30;
fireRateWalk = 60;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 3;
ammo = MaxAmmo;
reloadTime = 6;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
se_shotgun = new Sound();
se_shotgun.attachSound("se_shotgun");
se_shotgunR = new Sound();
se_shotgunR.attachSound("se_shotgunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 318 MovieClip [enemy2] Frame 2
stop();
Symbol 318 MovieClip [enemy2] Frame 12
stop();
Symbol 318 MovieClip [enemy2] Frame 22
stop();
Symbol 318 MovieClip [enemy2] Frame 32
stop();
Symbol 320 MovieClip [enemy11] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
_root.scr[handgunName]._xscale = 200;
_root.scr[handgunName]._yscale = 200;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
function jump() {
trace("enemyJumpped!!");
se_jump.start();
this.gotoAndStop("jump");
jumpMode = "up";
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.eJump.gotoAndStop(i);
} else {
this.eJump.gotoAndStop(24);
}
}
function jumpLoop(groundY) {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
}
eMAXHP = 7000;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 50000;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 19;
shotPower = 20;
shotWait = 3;
mPrecision = 8;
firingTime = 7;
firingRange = 2;
fireRateNormal = 40;
fireRateWalk = 80;
fireCount = 0;
chRateOnWalk = 10;
chRateOnNormal = 10;
jumpRate = 20;
goalDist = 60;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 5;
winceMove = 8;
zonbi = true;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 100;
ammo = MaxAmmo;
reloadTime = 0.5;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
jumpMode = "-";
jumpModeBeforeWince = "none";
jmpCnt = 1;
if (fallen) {
jumpMode = "down";
jmpCnt = 12;
} else {
jumpMode = "-";
}
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
jumpLoop(eGroundEffectForAkaGao());
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
} else if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
}
} else if (state == "reloading") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (jumpModeBeforeWince == "none") {
jumpModeBeforeWince = jumpMode;
}
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if ((--winceCount) <= 0) {
winceCount = 0;
jumpModeBeforeWince = "none";
state = "normal";
if (jumpModeBeforeWince == "-") {
this.gotoAndStop("normal");
} else {
this.gotoAndStop("jump");
}
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 320 MovieClip [enemy11] Frame 2
stop();
Symbol 320 MovieClip [enemy11] Frame 12
stop();
Symbol 320 MovieClip [enemy11] Frame 32
stop();
Symbol 320 MovieClip [enemy11] Frame 42
stop();
Symbol 322 MovieClip [enemy10] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
_root.scr[handgunName]._xscale = 120;
_root.scr[handgunName]._yscale = 120;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
function jump() {
trace("enemyJumpped!!");
se_jump.start();
this.gotoAndStop("jump");
jumpMode = "up";
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.eJump.gotoAndStop(i);
} else {
this.eJump.gotoAndStop(24);
}
}
function jumpLoop(groundY) {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
}
eMAXHP = 2300;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 10000;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 16;
shotPower = 14;
shotWait = 3;
mPrecision = 8;
firingTime = 6;
firingRange = 2;
fireRateNormal = 40;
fireRateWalk = 80;
fireCount = 0;
chRateOnWalk = 10;
chRateOnNormal = 10;
jumpRate = 20;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 5;
winceMove = 8;
zonbi = true;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 32;
ammo = MaxAmmo;
reloadTime = 2.5;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
jumpMode = "-";
jumpModeBeforeWince = "none";
jmpCnt = 1;
if (fallen) {
jumpMode = "down";
jmpCnt = 12;
} else {
jumpMode = "-";
}
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
jumpLoop(eGroundEffectForAkaGao());
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
} else if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
}
} else if (state == "reloading") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (jumpModeBeforeWince == "none") {
jumpModeBeforeWince = jumpMode;
}
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if ((--winceCount) <= 0) {
winceCount = 0;
jumpModeBeforeWince = "none";
state = "normal";
if (jumpModeBeforeWince == "-") {
this.gotoAndStop("normal");
} else {
this.gotoAndStop("jump");
}
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 322 MovieClip [enemy10] Frame 2
stop();
Symbol 322 MovieClip [enemy10] Frame 12
stop();
Symbol 322 MovieClip [enemy10] Frame 32
stop();
Symbol 322 MovieClip [enemy10] Frame 42
stop();
Symbol 324 MovieClip [enemy7] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
function jump() {
trace("enemyJumpped!!");
se_jump.start();
this.gotoAndStop("jump");
jumpMode = "up";
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.eJump.gotoAndStop(i);
} else {
this.eJump.gotoAndStop(24);
}
}
function jumpLoop(groundY) {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (groundY < this._y) {
se_landing.start();
this.gotoAndStop("normal");
jumpMode = "-";
this._y = groundY;
jmpCnt = 1;
}
}
}
eMAXHP = 500;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 1500;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 17;
shotPower = 10;
shotWait = 3;
mPrecision = 8;
firingTime = 6;
firingRange = 2;
fireRateNormal = 40;
fireRateWalk = 80;
fireCount = 0;
chRateOnWalk = 10;
chRateOnNormal = 10;
jumpRate = 20;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 5;
winceMove = 8;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 20;
ammo = MaxAmmo;
reloadTime = 2;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
jmpCnt = 1;
if (fallen) {
jumpMode = "down";
jmpCnt = 12;
} else {
jumpMode = "-";
}
jumpModeBeforeWince = "none";
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
jumpLoop(eGroundEffectForAkaGao());
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (jumpMode == "-") {
this.gotoAndStop("normal");
}
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
} else if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
if (((state != "reloading") && (jumpMode == "-")) && (Math.floor(Math.random() * jumpRate) == 0)) {
jump();
}
} else if (state == "reloading") {
jumpLoop(eGroundEffectForAkaGao());
if (jumpMode == "-") {
this.gotoAndStop("normal");
}
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (jumpModeBeforeWince == "none") {
jumpModeBeforeWince = jumpMode;
}
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
if (jumpMode == "-") {
this._y = eGroundEffectForAkaGao();
}
if ((--winceCount) <= 0) {
winceCount = 0;
jumpModeBeforeWince = "none";
state = "normal";
if (jumpModeBeforeWince == "-") {
this.gotoAndStop("normal");
} else {
this.gotoAndStop("jump");
}
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -600) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 324 MovieClip [enemy7] Frame 2
stop();
Symbol 324 MovieClip [enemy7] Frame 12
stop();
Symbol 324 MovieClip [enemy7] Frame 32
stop();
Symbol 324 MovieClip [enemy7] Frame 42
stop();
Symbol 326 MovieClip [enemy1] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
ammo--;
shotCount = shotWait;
if (fireCount == 0) {
fireCount = firingTime + Math.floor((Math.random() * (firingRange * 2)) - firingRange);
se_machinegun.start(0, 999);
} else if ((--fireCount) == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunE.start();
shotting = false;
fireCount = 0;
}
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
spreadRad = (Math.PI/180) * Math.floor((Math.random() * mPrecision) - Math.floor(mPrecision / 2));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad + spreadRad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad + spreadRad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_machinegun.stop("se_machinegun");
se_machinegunR.start();
fireCount = 0;
shotting = false;
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 180;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 13;
shotPower = 5;
shotWait = 4;
mPrecision = 15;
firingTime = 6;
firingRange = 3;
fireRateNormal = 60;
fireRateWalk = 120;
fireCount = 0;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 15;
ammo = MaxAmmo;
reloadTime = 4.5;
reloadCount = 0;
reloadName = "";
inScreen = false;
shotting = false;
basicHi = 0;
se_machinegun = new Sound();
se_machinegun.attachSound("se_machinegun");
se_machinegunE = new Sound();
se_machinegunE.attachSound("se_machinegunE");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
if (shotting) {
shot();
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shotting = true;
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shotting = true;
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
se_machinegun.stop("se_machinegun");
shotting = false;
fireCount = 0;
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
} else {
se_machinegun.stop("se_machinegun");
}
};
Symbol 326 MovieClip [enemy1] Frame 2
stop();
Symbol 326 MovieClip [enemy1] Frame 12
stop();
Symbol 326 MovieClip [enemy1] Frame 22
stop();
Symbol 326 MovieClip [enemy1] Frame 32
stop();
Symbol 330 MovieClip [arm_handgun] Frame 1
stop();
Symbol 332 MovieClip [enemyT] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if (id) {
if ((ammo > 0) && (shotCount == 0)) {
se_handgun.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_handgunR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 100;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 13;
shotPower = 5;
shotWait = 15;
fireRateNormal = 30;
fireRateWalk = 60;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 5;
ammo = MaxAmmo;
reloadTime = 2;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
se_handgun = new Sound();
se_handgun.attachSound("se_handgun");
se_handgunR = new Sound();
se_handgunR.attachSound("se_handgunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 332 MovieClip [enemyT] Frame 2
stop();
Symbol 332 MovieClip [enemyT] Frame 12
stop();
Symbol 332 MovieClip [enemyT] Frame 22
stop();
Symbol 332 MovieClip [enemyT] Frame 32
stop();
Symbol 334 MovieClip [enemy0] Frame 1
function hitCheckOnEnemy() {
if (moveFlag) {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.handgunList[i]])) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.handgunList[i]].power;
damageEffect(_root.scr[_global.handgunList[i]].power);
_root.scr[_global.handgunList[i]].power = 0;
if (_root.scr[_global.handgunList[i]].isHandgun) {
deathCheck("HG");
} else {
deathCheck("MG");
}
break;
}
i++;
}
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.sniperList[i]].hitcheck2))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.sniperList[i]].power;
if (HP >= tmpPW) {
HP = HP - tmpPW;
damageEffect(tmpPW);
_root.scr[_global.sniperList[i]].power = 0;
} else if (tmpPW > HP) {
damageEffect(tmpPW);
HP = 0;
} else {
trace("ERROR in hitCheckOnEnemy at Sniper");
}
deathCheck("SR");
break;
}
i++;
}
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.shotgunList[i]].hitcheck)) {
se_hit.start();
setWince();
HP = HP - _root.scr[_global.shotgunList[i]].power;
damageEffect(_root.scr[_global.shotgunList[i]].power);
_root.scr[_global.shotgunList[i]].power = 0;
deathCheck("SG");
}
i++;
}
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.fragList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.fragList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("FG");
}
i++;
}
if (_global.grenadeMachinegun) {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (this.hitcheck.hitTest(_root.scr[_global.smallBombList[i]])) {
se_hit.start();
setWince();
p = _root.scr[_global.smallBombList[i]].power;
p2 = (p + Math.floor(Math.random() * (Math.floor(p / 5) + 1))) - Math.floor(p / 10);
HP = HP - p2;
damageEffect(p2);
deathCheck("OT");
}
i++;
}
}
if (_global.busterRifle) {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if ((this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck2))) || (this.hitcheck.hitTest(_root.scr[_global.busterRifleList[i]].hitcheck3))) {
se_hit.start();
setWince();
tmpPW = _root.scr[_global.busterRifleList[i]].power;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
break;
}
i++;
}
}
if (_global.beamSaber) {
se_hit2 = new Sound();
se_hit2.attachSound("se_hit2");
if (this.hitcheck.hitTest(_root.player.pBeamSaber.hitcheck)) {
se_hit2.start();
setWince();
tmpPW = (_root.gun.ATBeamSaber + Math.floor(Math.random() * 100)) - 50;
damageEffect(tmpPW);
HP = HP - tmpPW;
deathCheck("OT");
}
}
}
}
function deathCheck(wp) {
if (HP <= 0) {
HP = 0;
moveFlag = 0;
if (wp == "HG") {
scoreEffect(this.score + " *2 !!");
_global.score = _global.score + (this.score * 2);
_global.HGKill++;
} else {
scoreEffect(this.score);
_global.score = _global.score + this.score;
_global[wp + "Kill"]++;
trace((("_global[" + wp) + "Kill]") + _global[wp + "Kill"]);
}
_global.killNo++;
_root.dKill.gotoAndPlay(2);
_root.scr[reloadName].removeMovieClip();
_root.scr[squareName].removeMovieClip();
this.gotoAndPlay("death");
}
}
function damageEffect(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
if (this._xscale == 100) {
_root.scr[damageName]._x = this._x + xDamageEffect;
} else {
_root.scr[damageName]._x = this._x - xDamageEffect;
}
_root.scr[damageName]._y = this._y + yDamageEffect;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
function scoreEffect(sc) {
scoreName = "dispPlusScore" + _global.dispScoreNo;
_root.attachMovie("dispPlusScore", scoreName, 1601 + _global.dispScoreNo);
_root[scoreName]._x = 58.5;
_root[scoreName]._y = 283;
_root[scoreName].dispPlusScore2.sc = "+ " + sc;
if ((++_global.dispScoreNo) > 14) {
_global.dispScoreNo = 0;
}
}
function setWince() {
if (!zonbi) {
winceCount = winceTime;
_root.scr[reloadName].removeMovieClip();
reloadCount = 0;
this.gotoAndStop("wince");
state = "wince";
}
}
function eGroundEffect() {
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
this._y = bloY * 32;
break;
case 2 :
this._y = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
this._y = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
this._y = _global.blockHi[0] * 32;
}
}
function eGroundEffectForAkaGao() {
res = -1;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloY = _global.blockHi[bloX];
if (bloY == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[bloX]].blockType;
}
if (_global.debugMode) {
_root.scr[squareName]._x = (bloX + _global.bpx) * 32;
_root.scr[squareName]._y = bloY * 32;
}
switch (tempBlockType) {
case 0 :
break;
case 1 :
res = bloY * 32;
break;
case 2 :
res = ((bloY + 1) * 32) - (this._x - ((bloX + _global.bpx) * 32));
break;
case 3 :
res = ((bloY + 1) * 32) - (32 - (this._x - ((bloX + _global.bpx) * 32)));
break;
default :
res = _global.blockHi[0] * 32;
}
return(res);
}
function eDispHP() {
if (HP != beforeHP) {
this.eHPbar.eHPbar2._x = -9.5 - ((18.5 / eMAXHP) * (eMAXHP - HP));
beforeHP = HP;
}
if ((this._xscale == -100) && (this.eHPbar._xscale != (-HPbarScale))) {
this.eHPbar._xscale = -HPbarScale;
} else if ((this._xscale == 100) && (this.eHPbar._scale != HPbarScale)) {
this.eHPbar._xscale = HPbarScale;
}
}
function shell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = (_root.player._x + (11.1036030188403 * Math.cos(rad))) + _global.screenX;
_root.scr[shellName]._y = (_root.player._y - (_root.player._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function eShell(shellLinkageName, bulletName) {
shellName = shellLinkageName + _global.shellNo;
_root.scr.attachMovie(shellLinkageName, shellName, 751 + _global.shellNo);
_root.scr[shellName]._x = this._x + (11.1036030188403 * Math.cos(rad));
_root.scr[shellName]._y = (this._y - (this._height / 2)) + (11.1036030188403 * Math.sin(rad));
if (_root.scr[bulletName].dx > 0) {
_root.scr[shellName].dx = -Math.floor((Math.random() * 10) + 6);
} else {
_root.scr[shellName].dx = Math.floor((Math.random() * 10) + 6);
}
_root.scr[shellName].dy = Math.floor(((-Math.random()) * 27) + 1);
if ((++_global.shellNo) > 19) {
_global.shellNo = 0;
}
}
function shot() {
if ((ammo > 0) && (shotCount == 0)) {
se_handgun.start();
ammo--;
shotCount = shotWait;
rad = Math.atan2(yDis, xDis);
handgunName = "ef_handgunE" + _global.eShotNo;
_root.scr.attachMovie("ef_handgunE", handgunName, 1701 + _global.eShotNo);
_root.scr[handgunName]._x = this._x + (16.0654909666652 * Math.cos(rad));
_root.scr[handgunName]._y = (this._y - (this._height / 2)) + (16.0654909666652 * Math.sin(rad));
_root.scr[handgunName].dx = shotSpeed * Math.cos(rad);
_root.scr[handgunName].dy = shotSpeed * Math.sin(rad);
_root.scr[handgunName].power = shotPower;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
if (_global.shell) {
eShell("ef_shell", handgunName);
}
} else if (ammo <= 0) {
if (reloadCount == 0) {
se_handgunR.start();
reloadCount = Math.floor(reloadTime * 30);
state = "reloading";
reloadName = "disp_reload" + _global.eReloadNo;
_root.scr.attachMovie("disp_reload", reloadName, 771 + _global.eReloadNo);
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if ((++_global.eReloadNo) > 9) {
_global.eReloadNo = 0;
}
}
}
}
eMAXHP = 130;
HP = eMAXHP;
beforeHP = eMAXHP;
HPbarScale = this.eHPbar._xscale;
moveFlag = 1;
state = "walk";
dist = _global.screenX / 20;
baseScore = 100;
score = Math.floor(baseScore * (dist / 20));
shotSpeed = 13;
shotPower = 5;
shotWait = 15;
fireRateNormal = 30;
fireRateWalk = 60;
chRateOnWalk = 90;
chRateOnNormal = 60;
goalDist = 35;
goalDistRange = 3;
xDamageEffect = 0;
yDamageEffect = -36;
winceTime = 10;
winceMove = 16;
zonbi = false;
rightGoal = goalDist + (_root.player._x + _global.screenX);
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
shotCount = 0;
winceCount = 0;
MaxAmmo = 5;
ammo = MaxAmmo;
reloadTime = 2;
reloadCount = 0;
reloadName = "";
inScreen = false;
basicHi = 0;
se_handgun = new Sound();
se_handgun.attachSound("se_handgun");
se_handgunR = new Sound();
se_handgunR.attachSound("se_handgunR");
se_hit = new Sound();
se_hit.attachSound("se_hit");
if (_global.debugMode) {
squareName = "square3" + _global.eDebugBlock;
_root.scr.attachMovie("square3", squareName, 1181 + _global.eDebugBlock);
if ((++_global.eDebugBlock) > 19) {
_global.eDebugBlock = 0;
}
}
this.onEnterFrame = function () {
if (moveFlag && (!_global.RP)) {
if (shotCount > 0) {
shotCount--;
}
xDis = (_root.player._x + _global.screenX) - this._x;
yDis = (_root.player._y - (_root.player._height / 2)) - (this._y - (this._height / 2));
if (state != "reloading") {
if (xDis > 0) {
this.arm._rotation = Math.atan2(yDis, xDis) / (Math.PI/180);
} else {
this.arm._rotation = Math.atan2(yDis, -xDis) / (Math.PI/180);
}
}
if (mode != "wince") {
if ((_root.player._x + _global.screenX) > this._x) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (state == "walk") {
if (this._xscale == 100) {
leftGoal = (-goalDist) + (_root.player._x + _global.screenX);
if (this._x < (leftGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else if (this._x > (leftGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else {
this.gotoAndStop("normal");
}
} else {
rightGoal = goalDist + (_root.player._x + _global.screenX);
if (this._x > (rightGoal + goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x - speed;
} else if (this._x < (rightGoal - goalDistRange)) {
this.gotoAndStop("walk");
this._x = this._x + speed;
} else {
this.gotoAndStop("normal");
}
}
eGroundEffect();
if (inScreen) {
if (Math.floor(Math.random() * chRateOnWalk) == 0) {
state = "normal";
} else if (Math.floor(Math.random() * fireRateWalk) == 0) {
shot();
}
}
} else if (state == "normal") {
this.gotoAndStop("normal");
if (Math.floor(Math.random() * fireRateNormal) == 0) {
shot();
} else if (Math.floor(Math.random() * chRateOnNormal) == 0) {
state = "walk";
}
} else if (state == "reloading") {
this.gotoAndStop("normal");
reloadCount--;
_root.scr[reloadName]._x = this._x - (this._width / 2);
_root.scr[reloadName]._y = this._y - this._height;
_root.scr[reloadName].reloadtime = reloadCount;
if (reloadCount == 0) {
state = "normal";
ammo = MaxAmmo;
_root.scr[reloadName].removeMovieClip();
}
} else if (state == "wince") {
if (this._xscale == 100) {
this._x = this._x - (winceMove / Math.pow(2, winceTime - winceCount));
} else {
this._x = this._x + (winceMove / Math.pow(2, winceTime - winceCount));
}
eGroundEffect();
if ((--winceCount) <= 0) {
winceCount = 0;
state = "normal";
this.gotoAndStop("normal");
}
} else {
trace("ERROR in enemy0: state = " + state);
}
if ((this._x - _global.screenX) > 640) {
inScreen = false;
if (state != "reloading") {
state = "walk";
}
} else if ((this._x - _global.screenX) < -50) {
inScreen = false;
this._visible = false;
if (state != "reloading") {
state = "walk";
}
if ((this._x - _global.screenX) < -400) {
_global.eNum--;
this.removeMovieClip();
}
} else {
inScreen = true;
this._visible = true;
}
hitCheckOnEnemy();
eDispHP();
}
};
Symbol 334 MovieClip [enemy0] Frame 2
stop();
Symbol 334 MovieClip [enemy0] Frame 12
stop();
Symbol 334 MovieClip [enemy0] Frame 22
stop();
Symbol 334 MovieClip [enemy0] Frame 32
stop();
Symbol 336 MovieClip [ef_rocket_bomb] Frame 28
stop();
this.removeMovieClip();
Symbol 338 MovieClip [ef_sniperE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitcheck.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitcheck.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 338 MovieClip [ef_sniperE] Frame 7
stop();
Symbol 345 MovieClip [ef_busterRifle] Frame 1
firstPower = power;
Symbol 345 MovieClip [ef_busterRifle] Frame 14
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
busterRifleListDelete();
Symbol 349 MovieClip [ef_magnum] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
firstPower = power;
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
if (this.power == 0) {
sniperListDelete();
}
hitCheckOnSniperBullet();
};
Symbol 349 MovieClip [ef_magnum] Frame 14
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
sniperListDelete();
Symbol 351 MovieClip [ef_shotgunE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 351 MovieClip [ef_shotgunE] Frame 17
this.removeMovieClip();
Symbol 352 MovieClip [ef_shotgun] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
firstPower = power;
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if ((this._x - _global.screenX) < -32) {
shotgunListDelete();
} else if ((this._x - _global.screenX) > 640) {
shotgunListDelete();
}
if (this._y < -4) {
shotgunListDelete();
} else if (this._y > 354) {
shotgunListDelete();
}
if (this.power == 0) {
shotgunListDelete();
}
if (hitCheckOnBullet()) {
shotgunListDelete();
}
};
Symbol 352 MovieClip [ef_shotgun] Frame 17
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
shotgunListDelete();
Symbol 354 MovieClip [ef_shell2] Frame 1
time = 40;
g = 9.8;
e = 0.5;
dt = 0.35;
fall = false;
se_shell1 = new Sound();
se_shell1.attachSound("se_shell1");
this.onEnterFrame = function () {
dy = dy + (g * dt);
this._x = this._x + (dx * dt);
this._y = this._y + (dy * dt);
if (this._y >= 288) {
dy = dy * (-e);
this._y = 288;
if (fall == false) {
se_shell1.start();
}
fall = true;
}
time--;
if (time <= 0) {
this.removeMovieClip();
}
};
Symbol 356 MovieClip [ef_shell] Frame 1
time = 40;
g = 9.8;
e = 0.5;
dt = 0.35;
fall = false;
se_shell1 = new Sound();
se_shell1.attachSound("se_shell1");
this.onEnterFrame = function () {
dy = dy + (g * dt);
this._x = this._x + (dx * dt);
this._y = this._y + (dy * dt);
if (this._y >= 288) {
dy = dy * (-e);
this._y = 288;
if (fall == false) {
se_shell1.start();
}
fall = true;
}
time--;
if (time <= 0) {
this.removeMovieClip();
}
};
Symbol 358 MovieClip [ef_laserE] Frame 1
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 430) {
this.removeMovieClip();
}
};
Symbol 359 MovieClip [ef_laser] Frame 14
stop();
Symbol 360 MovieClip [ef_handgunE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 361 MovieClip [ef_handgun] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function smallBomb() {
fragName = "ef_smallBomb" + _global.pSmallBombNo;
_root.scr.attachMovie("ef_smallBomb", fragName, _global.pSmallBombNo + 1201);
_global.smallBombList.push(fragName);
_root.scr[fragName]._x = this._x;
_root.scr[fragName]._y = this._y;
_root.scr[fragName].power = this.firstPower;
if ((++_global.pSmallBombNo) > 29) {
_global.pSmallBombNo = 0;
}
}
firstPower = power;
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if ((this._x - _global.screenX) < -32) {
handgunListDelete();
} else if ((this._x - _global.screenX) > 640) {
handgunListDelete();
}
if (this._y < -4) {
handgunListDelete();
} else if (this._y > 354) {
handgunListDelete();
}
if (this.power == 0) {
if (_global.grenadeMachinegun && (!this.isHandgun)) {
smallBomb();
}
handgunListDelete();
}
if (hitCheckOnBullet()) {
if (_global.grenadeMachinegun && (!this.isHandgun)) {
smallBomb();
}
handgunListDelete();
}
};
Symbol 362 MovieClip [ef_fragSpread] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
}
hitCheckOnBullet();
};
Symbol 362 MovieClip [ef_fragSpread] Frame 13
this.removeMovieClip();
Symbol 364 MovieClip [ef_smallBomb] Frame 28
stop();
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in ef_fragBomb at 28 of timeLine: this._name = " + this._name);
Symbol 366 MovieClip [ef_fragBomb] Frame 28
stop();
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in ef_fragBomb at 28 of timeLine: this._name = " + this._name);
Symbol 369 MovieClip [ef_frag] Frame 1
function hitCheckOnFrag() {
blockNumX = -1;
i = 0;
while (i < 23) {
if (_root.scr[_global.blockHiName[i]].hitTest((this._x + 2) - _global.screenX, this._y + 4, true)) {
trace("this._x+2: " + ((this._x + 2) - _global.screenX));
trace((("_root.scr[" + _global.blockHiName[i]) + "]._x: ") + _root.scr[_global.blockHiName[i]]._x);
blockNumX = i;
break;
}
i++;
}
return(blockNumX);
}
function getFragPosition(blockNumX) {
posY = 0;
blockType = _root.scr[_global.blockHiName[blockNumX]].blockType;
blockNumY = _global.blockHi[blockNumX];
switch (blockType) {
case 0 :
trace("ERROR in getFragPosition: blockType = 0");
break;
case 1 :
posY = blockNumY * 32;
break;
case 2 :
posY = ((blockNumY + 1) * 32) - ((scrX + this._x) - ((_root.blockNumX + blockPosX) * 32));
break;
case 3 :
posY = ((blockNumY + 1) * 32) - (32 - ((scrX + this._x) - ((_root.blockNumX + blockPosX) * 32)));
break;
default :
trace("ERROR in getFragPosition: blockType = " + blockType);
}
return(posY);
}
dt = 0.333333333333333;
g = 4.9;
bound = 0;
boundNum = 5;
hitFlg = false;
se_bound = new Sound();
se_bound.attachSound("fragBound");
this.onEnterFrame = function () {
this._x = this._x + (vx * dt);
this._y = this._y + (vy * dt);
vy = vy + (g * dt);
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
blockNumX = hitCheckOnFrag();
if (blockNumX != -1) {
this._y = getFragPosition(blockNumX) - 8;
blockType = _root.scr[_global.blockHiName[blockNumX]].blockType;
trace("blockNumX: " + blockNumX);
trace("this._y: " + this._y);
trace("blockType: " + blockType);
switch (blockType) {
case 0 :
trace("ERROR in ef_frag: blockTYpe=" + blockType);
break;
case 1 :
vy = (-vy) * 0.5;
vx = vx * 0.5;
bound++;
if (hitFlg) {
vy = vy - 10;
} else {
se_bound.start();
}
break;
case 2 :
temp = (-vx) * 0.5;
vx = (-vy) * 0.5;
vy = temp;
bound++;
if (hitFlg) {
vx = vx - 3;
vy = vy - 10;
} else {
se_bound.start();
}
break;
case 3 :
temp = vx * 0.5;
vx = vy * 0.5;
vy = temp;
bound++;
if (hitFlg) {
vx = vx + 3;
vy = vy - 10;
} else {
se_bound.start();
}
break;
default :
trace("ERROR in ef_frag: blockTYpe=" + blockType);
}
hitFlg = true;
} else if (this._y > 280) {
hitFlg = true;
se_bound.start();
this._y = this._y - 5;
vy = (-vy) * 0.5;
vx = vx * 0.5;
bound++;
} else {
hitFlg = false;
}
};
Symbol 369 MovieClip [ef_frag] Frame 51
stop();
fragName = "ef_fragBomb" + _global.pFragNo;
_root.scr.attachMovie("ef_fragBomb", fragName, _global.pFragNo + 1231);
_global.fragList.push(fragName);
_root.scr[fragName]._x = this._x;
_root.scr[fragName]._y = this._y;
_root.scr[fragName].power = this.power;
_root.scr[fragName]._xscale = this._xscale;
_root.scr[fragName]._yscale = this._yscale;
if ((++_global.pFragNo) > 5) {
_global.pFragNo = 0;
}
this.removeMovieClip();
Symbol 371 MovieClip [ef_bombE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function bomb() {
bombName = "ef_bomb2E" + _global.eShotNo;
_root.scr.attachMovie("ef_bomb2E", bombName, _global.eShotNo + 1701);
_root.scr[bombName]._x = this._x;
_root.scr[bombName]._y = this._y;
_root.scr[bombName].power = this.pw;
if ((++_global.eShotNo) > 100) {
_global.eShotNo = 0;
}
}
dt = 0.333333333333333;
g = 4.9;
bound = 0;
pw = power;
vy = 5;
se_shield = new Sound();
se_shield.attachSound("se_shield");
this.onEnterFrame = function () {
this._y = this._y + (vy * dt);
vy = vy + (g * dt);
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
bomb();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
bomb();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y > 280) {
bomb();
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
bomb();
this.removeMovieClip();
}
};
Symbol 374 MovieClip [ef_bomb2E] Frame 1
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
this.onEnterFrame = function () {
i = 1;
while (i < 3) {
nm = "hitcheck" + i;
if (this[nm].hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
} else if (this[nm].hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
}
i++;
}
};
Symbol 374 MovieClip [ef_bomb2E] Frame 28
this.removeMovieClip();
Symbol 377 MovieClip [ef_motiE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_motiHG = new Sound();
se_motiHG.attachSound("se_motiHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.player.motiCnt = motiTime;
se_motiHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 380 MovieClip [ef_biggun2E] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 382 MovieClip [ef_biggunE] Frame 1
function hitCheckOnBullet() {
res = false;
bloX = Math.floor(this._x / 32) - _global.bpx;
bloYHi = _global.blockHi[bloX];
bloYNow = Math.floor(this._y / 32);
if (bloYNow == bloYHi) {
if (_root.scr[_global.blockHiName[bloX]].hitTest(this._x - _global.screenX, this._y, true)) {
se_hitBlock.start();
res = true;
}
}
return(res);
}
function hitCheckOnSniperBullet() {
i = 0;
while (i < 20) {
if (this.hitwall.hitTest(_root.scr[_global.blockHiName[i]])) {
se_hitBlock.start();
sniperListDelete();
break;
}
i++;
}
}
function handgunListDelete() {
lh = _global.handgunList.length;
i = 0;
while (i < lh) {
if (_global.handgunList[i] == this._name) {
_global.handgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in handgunListDelete(): this._name = " + this._name);
}
function shotgunListDelete() {
lh = _global.shotgunList.length;
i = 0;
while (i < lh) {
if (_global.shotgunList[i] == this._name) {
_global.shotgunList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in shotgunListDelete(): this._name = " + this._name);
}
function sniperListDelete() {
lh = _global.sniperList.length;
i = 0;
while (i < lh) {
if (_global.sniperList[i] == this._name) {
_global.sniperList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in sniperListDelete(): this._name = " + this._name);
}
function fragListDelete() {
lh = _global.fragList.length;
i = 0;
while (i < lh) {
if (_global.fragList[i] == this._name) {
_global.fragList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in fragListDelete(): this._name = " + this._name);
}
function smallBombDelete() {
lh = _global.smallBombList.length;
i = 0;
while (i < lh) {
if (_global.smallBombList[i] == this._name) {
_global.smallBombList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in smallBombDelete(): this._name = " + this._name);
}
function busterRifleListDelete() {
lh = _global.busterRifleList.length;
i = 0;
while (i < lh) {
if (_global.busterRifleList[i] == this._name) {
_global.busterRifleList.splice(i, 1);
this.removeMovieClip();
break;
}
i++;
}
trace("ERROR in busterRifleListDelete(): this._name = " + this._name);
}
function damageEffectForPlayer(dame) {
damageName = "eDispDamage" + _global.eDamageNo;
_root.scr.attachMovie("eDispDamage", damageName, 1501 + _global.eDamageNo);
_root.scr[damageName]._x = _root.player._x + _global.screenX;
_root.scr[damageName]._y = _root.player._y - 36;
_root.scr[damageName].eDispDamage2.damage = dame;
if ((++_global.eDamageNo) > 99) {
_global.eDamageNo = 0;
}
}
se_damageHG = new Sound();
se_damageHG.attachSound("se_damageHG");
se_shield = new Sound();
se_shield.attachSound("se_shield");
se_hitBlock = new Sound();
se_hitBlock.attachSound("se_valcan");
this.onEnterFrame = function () {
this._x = this._x + dx;
this._y = this._y + dy;
if (this.hitTest(_root.player.arm.shieldCheck)) {
se_shield.start();
this.removeMovieClip();
} else if (this.hitTest(_root.player.hitcheck)) {
_root.HPArea.gotoAndPlay(1);
damageEffectForPlayer(this.power);
_global.pHP = _global.pHP - this.power;
se_damageHG.start();
this.removeMovieClip();
}
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
} else if ((this._x - _global.screenX) > 640) {
this.removeMovieClip();
}
if (this._y < -4) {
this.removeMovieClip();
} else if (this._y > 300) {
this.removeMovieClip();
}
if (hitCheckOnBullet()) {
this.removeMovieClip();
}
};
Symbol 385 MovieClip [dispPlusScore] Frame 16
this.removeMovieClip();
Symbol 395 MovieClip Frame 1
play();
Symbol 408 MovieClip [block3] Frame 1
this.onEnterFrame = function () {
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
}
};
Symbol 410 MovieClip [block2] Frame 1
this.onEnterFrame = function () {
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
}
};
Symbol 412 MovieClip [block1] Frame 1
this.onEnterFrame = function () {
if ((this._x - _global.screenX) < -32) {
this.removeMovieClip();
}
};
Symbol 421 MovieClip [arm_shield] Frame 4
this.onEnterFrame = function () {
};
Symbol 421 MovieClip [arm_shield] Frame 8
stop();
Symbol 433 MovieClip [arm_frag] Frame 11
xDis = _root._xmouse - _root.player._x;
yDis = _root._ymouse - (_root.player._y - (_root.player._height / 2));
fragName = "ef_frag" + _global.pFragNo;
_root.scr.attachMovie("ef_frag", fragName, _global.pFragNo + 1231);
_root.scr[fragName]._x = (_global.screenX + _root.player._x) + 2;
_root.scr[fragName]._y = (_root.player._y - 12) - (_root.player._height / 2);
_root.scr[fragName].vx = xDis / 5;
_root.scr[fragName].vy = yDis / 5;
_root.scr[fragName].power = this.power;
_root.scr[fragName]._xscale = range;
_root.scr[fragName]._yscale = range;
if ((++_global.pFragNo) > 5) {
_global.pFragNo = 0;
}
Symbol 433 MovieClip [arm_frag] Frame 18
stop();
Symbol 436 MovieClip [eDispDamage] Frame 25
this.removeMovieClip();
Symbol 438 MovieClip [fubuki] Frame 98
this.removeMovieClip();
Symbol 475 MovieClip [gra_fade] Frame 1
if (goal == "ranking2") {
this.gotoAndPlay(11);
}
Symbol 475 MovieClip [gra_fade] Frame 10
_root.gotoAndStop(this.goal);
if (this.goal == "result") {
stopAllSounds();
}
Symbol 475 MovieClip [gra_fade] Frame 19
this.removeMovieClip();
Symbol 477 MovieClip Frame 1
stop();
Symbol 479 MovieClip [niwaheriOP2] Frame 1
Symbol 481 MovieClip Frame 2
stop();
Symbol 481 MovieClip Frame 12
stop();
Symbol 481 MovieClip Frame 22
stop();
Instance of Symbol 479 MovieClip [niwaheriOP2] in Symbol 483 MovieClip [OPMovie2] Frame 1
onClipEvent (load) {
this.gotoAndStop("after2");
}
Symbol 483 MovieClip [OPMovie2] Frame 153
this.removeMovieClip();
Symbol 488 MovieClip [thiun] Frame 131
this.removeMovieClip();
Symbol 506 Button
on (release) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "title";
}
Symbol 510 Button
on (release) {
var nam = _root.resultMC.resultMC2.playerName;
var com = _root.resultMC.resultMC2.comment;
if (((((((nam == "") || (nam == " ")) || (nam == "\u3000")) || (nam == "\u3000\u3000")) || (nam == "Your name")) || (nam == "Your name ")) || (nam == "Your name\u3000")) {
} else if (((((((com == "") || (com == " ")) || (com == "\u3000")) || (com == "\u3000\u3000")) || (com == "Your comment")) || (com == "Your comment ")) || (com == "Your comment\u3000")) {
} else {
if (_global.scoreValid == 1) {
_global.scoreValid = 2;
}
var data_so = SharedObject.getLocal("data");
data_so.data.playerName = _root.resultMC.resultMC2.playerName;
_global.playerName = nam;
_global.comment = com;
_root.gotoAndStop("ranking1");
}
}
Symbol 520 MovieClip [resultMC] Frame 1
this.resultMC2.ar1.onSetFocus = function () {
trace("ar1 focused!!");
trace("_root.resultMC.resultMC2.playerName: " + _root.resultMC.resultMC2.playerName);
if (_root.resultMC.resultMC2.playerName == "Your name") {
_root.resultMC.resultMC2.playerName = "";
}
};
this.resultMC2.ar2.onSetFocus = function () {
trace("ar2 focused!!");
trace("_root.resultMC.resultMC2.comment: " + _root.resultMC.resultMC2.comment);
if (_root.resultMC.resultMC2.comment == "Your comment") {
_root.resultMC.resultMC2.comment = "";
}
};
stop();
Symbol 520 MovieClip [resultMC] Frame 15
stop();
Symbol 530 MovieClip Frame 20
stop();
Symbol 533 MovieClip Frame 20
stop();
Symbol 561 MovieClip Frame 11
_parent.isBeamSaber = false;
_global.usingWeapon = _parent.lastUsingWeapon;
_parent.drawArm();
_parent.lastUsingWeapon = -1;
if (_parent.jumpMode == "-") {
_parent.gotoAndStop("normal");
} else if (_parent.jumpMode == "up") {
_parent.gotoAndStop("jump");
} else if (_parent.jumpMode == "down") {
_parent.gotoAndStop("jump");
} else {
trace("ERROR in pBeamSaberAS: _parent.jumpMode=" + _parent.jumpMode);
}
stop();
Symbol 585 MovieClip Frame 46
stop();
Symbol 586 MovieClip [player] Frame 1
function addRandGround() {
if ((_root.blockX + blockPosX) > tempBlockX) {
tempBlockX = _root.blockX + blockPosX;
blockPosX++;
_global.bpx = blockPosX;
i = 0;
while (i < 23) {
_global.blockHi[i] = _global.blockHi[i + 1];
_global.blockHiName[i] = _global.blockHiName[i + 1];
i++;
}
createRandGround(_global.blockHi[21]);
setGround();
}
}
function createRandGround(maxHi) {
topBlock = _root.scr[_global.blockHiName[21]].blockType;
buryRestSpace(8);
if ((maxHi >= 2) && (maxHi <= 6)) {
i = 8;
while (i >= (maxHi + 2)) {
_global.nextBlock[i] = 1;
i--;
}
if ((topBlock == 2) || (topBlock == 1)) {
_global.nextBlock[maxHi + 1] = 1;
if (topBlock == 2) {
if (trueOrFalse()) {
_global.nextBlock[maxHi] = 3;
} else {
_global.nextBlock[maxHi] = 1;
if (maxHi != 2) {
if (trueOrFalse()) {
_global.nextBlock[maxHi - 1] = 2;
}
}
}
} else if (topBlock == 1) {
if (trueOrFalse()) {
_global.nextBlock[maxHi] = 1;
if (maxHi != 2) {
if (trueOrFalse()) {
_global.nextBlock[maxHi - 1] = 2;
}
}
} else {
_global.nextBlock[maxHi] = 3;
}
} else {
trace((("ERROR in createRandGround(" + maxHi) + "): topBlock = ") + topBlock);
}
} else if (topBlock == 3) {
if (trueOrFalse()) {
_global.nextBlock[maxHi + 1] = 1;
if (trueOrFalse()) {
_global.nextBlock[maxHi] = 2;
}
} else {
_global.nextBlock[maxHi + 1] = 3;
}
}
} else if (maxHi == 7) {
if (topBlock == 1) {
_global.nextBlock[8] = 1;
if (trueOrFalse()) {
_global.nextBlock[7] = 3;
} else {
_global.nextBlock[7] = 1;
if (trueOrFalse()) {
_global.nextBlock[6] = 2;
}
}
} else if (topBlock == 2) {
_global.nextBlock[8] = 1;
if (trueOrFalse()) {
_global.nextBlock[7] = 1;
if (trueOrFalse()) {
_global.nextBlock[6] = 2;
}
} else {
_global.nextBlock[7] = 3;
}
} else if (topBlock == 3) {
if (trueOrFalse()) {
_global.nextBlock[8] = 1;
if (trueOrFalse()) {
_global.nextBlock[7] = 2;
}
} else {
_global.nextBlock[8] = 3;
}
}
} else if (maxHi == 8) {
if (topBlock == 1) {
if (trueOrFalse()) {
_global.nextBlock[8] = 1;
if (trueOrFalse()) {
_global.nextBlock[7] = 2;
}
} else {
_global.nextBlock[8] = 3;
}
} else if (topBlock == 2) {
if (trueOrFalse()) {
_global.nextBlock[8] = 1;
if (trueOrFalse()) {
_global.nextBlock[7] = 2;
}
} else {
_global.nextBlock[8] = 3;
}
} else if (topBlock == 3) {
if (trueOrFalse()) {
_global.nextBlock[8] = 2;
}
}
} else if (maxHi == 9) {
if (trueOrFalse()) {
_global.nextBlock[8] = 2;
}
} else {
trace((("ERROR in createRandGround(" + maxHi) + "): maxHi = ") + maxHi);
}
i = 8;
while (i >= 0) {
if (!_global.nextBlock[i]) {
_global.blockHi[22] = i + 1;
break;
}
i--;
}
}
function buryRestSpace(blockPosY) {
i = blockPosY;
while (i >= 0) {
_global.nextBlock[i] = 0;
i--;
}
}
function trueOrFalse() {
return(Math.floor(Math.random() * 2));
}
function createTestGround() {
i = 8;
while (i >= 2) {
_global.nextBlock[i] = 1;
i--;
}
}
function drawArm() {
if (_global.usingWeapon == 0) {
_root.player.attachMovie("arm_handgun", "arm", 166);
_root.player.arm._x = -1;
_root.player.arm._y = -18.5;
} else if (_global.usingWeapon == 1) {
_root.player.attachMovie("arm_machinegun", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -18.5;
} else if (_global.usingWeapon == 2) {
_root.player.attachMovie("arm_shotgun", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 3) {
_root.player.attachMovie("arm_magnum", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 10) {
_root.player.attachMovie("arm_shield", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else if (_global.usingWeapon == 11) {
_root.player.attachMovie("arm_dummy", "arm", 166);
_root.player.arm._x = 0;
_root.player.arm._y = -19.5;
} else {
trace("ERROR in drawArm(): _global.usingWeapon=" + _global.usingWeapon);
}
}
function chkReload() {
if (reloadtime > 0) {
if (_root.disp_reload == undefined) {
_root.attachMovie("disp_reload", "disp_reload", 167);
}
_root.disp_reload._x = this._x - (this._width / 2);
_root.disp_reload._y = this._y - this._height;
_root.disp_reload.reloadtime = reloadtime;
reloadtime--;
} else if (reloadtime == 0) {
_root.disp_reload.removeMovieClip();
if (_global.usingWeapon == 0) {
_global.bHandgun = MAHandgun;
} else if (_global.usingWeapon == 1) {
_global.score = _global.score - APMachinegun;
_global.bMachinegun = MAMachinegun;
} else if (_global.usingWeapon == 2) {
_global.score = _global.score - APShotgun;
_global.bShotgun = MAShotgun;
} else if (_global.usingWeapon == 3) {
_global.score = _global.score - APSniper;
_global.bMagnum = MASniper;
}
trace("\u30EA\u30ED\u30FC\u30C9\u5B8C\u4E86");
reloadtime = -1;
_global.reloading = false;
}
}
function drawFrameOnWeapon(usingWeapon) {
_root.attachMovie("frameOnWeapon", "frameOnWeapon", 2000);
_root.frameOnWeapon._x = 188.5 + (usingWeapon * 56);
_root.frameOnWeapon._y = 302;
}
function loadBlock() {
i = 0;
while (i < 23) {
j = 8;
while (j >= 2) {
switch (block[i][j]) {
case 0 :
if (_global.groundDepth != 0) {
_global.blockHiName[i] = "BL" + (_global.groundDepth - 1);
} else {
_global.blockHiName[i] = "BL154";
}
trace((("blockHiName[" + i) + "]: ") + blockHiName[i]);
if (_global.debugMode) {
tempName = "square2" + i;
_root.scr.attachMovie("square2", tempName, 1158 + i);
_root.scr[tempName]._x = _root.scr[_global.blockHiName[i]]._x;
_root.scr[tempName]._y = _root.scr[_global.blockHiName[i]]._y;
}
break;
case 1 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block1", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = (i * 32) + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 1;
trace(_root.scr[blockName]._x);
_global.groundDepth++;
break;
case 2 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block2", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = (i * 32) + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 2;
_global.groundDepth++;
break;
case 3 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block3", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = (i * 32) + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 3;
_global.groundDepth++;
break;
default :
trace((((("ERROR: setGround, block[" + i) + "][") + j) + "] = ") + block[i][j]);
}
if (_global.groundDepth > 154) {
_global.groundDepth = 0;
}
j--;
}
i++;
}
}
function getNextdy(i) {
dy = 0;
switch (i) {
case 0 :
trace("ERROR in setJumpPosition: jmpCnt=0");
break;
case 1 :
dy = 0;
break;
case 2 :
dy = -11.8;
break;
case 3 :
dy = -11.6;
break;
case 4 :
dy = -8.7;
break;
case 5 :
dy = -5.4;
break;
case 6 :
dy = -3.4;
break;
case 7 :
dy = -4;
break;
case 8 :
dy = -3;
break;
case 9 :
dy = -3;
break;
case 10 :
dy = -1.9;
break;
case 11 :
dy = -1.7;
break;
case 12 :
dy = -1.4;
break;
case 13 :
dy = 0;
break;
case 14 :
dy = 1.1;
break;
case 15 :
dy = 2.3;
break;
case 16 :
dy = 2.1;
break;
case 17 :
dy = 2.2;
break;
case 18 :
dy = 3.1;
break;
case 19 :
dy = 4.9;
break;
case 20 :
dy = 2.5;
break;
case 21 :
dy = 5.2;
break;
case 22 :
dy = 10.3;
break;
case 23 :
dy = 13.4;
break;
case 24 :
dy = 13.4;
break;
case 25 :
dy = 13.4;
break;
default :
dy = 13.4;
}
return(dy);
}
function chkLife() {
_root.HPArea.pHPbar.pHPbar2._x = -44.6 - ((162 / MAX_HP) * (MAX_HP - _global.pHP));
if ((_global.pHP > untilWhiteHP) && (_root.pHPbar.pHPbar2.getRGB() != 16777215)) {
if (HBFlg) {
se_heartBeat.stop("se_heartBeat");
HBFlg = false;
if (!_global.okusenman) {
if (!bgmChFlg) {
if (_global.bgm) {
_root[tempBGMName].start(0, 99);
}
}
} else if (_global.bgm) {
_root.bgm_play4.start(0, 99);
}
}
_root.iro.setRGB(16777215);
_root.iro2.setRGB(16777215);
} else if ((_global.pHP > untilYellowHP) && (_root.pHPbar.pHPbar2.getRGB() != 16750848)) {
if (HBFlg) {
se_heartBeat.stop("se_heartBeat");
HBFlg = false;
if (!_global.okusenman) {
if (!bgmChFlg) {
if (_global.bgm) {
_root[tempBGMName].start(0, 99);
}
}
} else if (_global.bgm) {
_root.bgm_play4.start(0, 99);
}
}
_root.iro.setRGB(16750848);
_root.iro2.setRGB(16750848);
} else if ((_global.pHP > 0) && (_root.pHPbar.pHPbar2.getRGB() != 13369344)) {
if (!HBFlg) {
HBFlg = true;
if (!_global.okusenman) {
if (_global.bgm) {
_root[tempBGMName].stop(tempBGMName);
}
} else if (_global.bgm) {
_root.bgm_play4.stop("bgm_play4");
}
if (_global.bgm) {
se_heartBeat.start(0, 99);
}
}
_root.iro.setRGB(13369344);
_root.iro2.setRGB(13369344);
} else if (_global.pHP <= 0) {
if (_global.bgm) {
se_heartBeat.stop("se_heartBeat");
}
HBFlg = false;
_global.pHP = 0;
_root.HPArea.pHPbar.pHPbar2._x = -250;
_global.mode = "death";
this.arm.removeMovieClip();
_root.disp_reload.removeMovieClip();
this.gotoAndStop("death");
if (damagedByIgaIga) {
_root.player._visible = false;
_root.attachMovie("thiun", "thiun", 1301);
_root.thiun._x = _root.player._x;
_root.thiun._y = _root.player._y;
}
}
}
function eHumanPattern(rate, appRate, rRate, spd) {
if (Math.floor(Math.random() * rate) == 0) {
var _local3 = Math.floor(Math.random() * 100) + 1;
var _local4 = appRate[0] + appRate[1];
var _local7 = _local4 + appRate[2];
var _local2 = "";
_global.eNum++;
if ((Math.floor(Math.random() * 100) + 1) <= rRate) {
_local2 = "right";
} else {
_local2 = "left";
}
if (_local3 <= appRate[0]) {
enemy(0, _local2, spd);
trace("HG appeared");
} else if ((_local3 > appRate[0]) && (_local3 <= _local4)) {
enemy(1, _local2, spd);
trace("MG appeared");
} else if ((_local3 > _local4) && (_local3 <= _local7)) {
enemy(2, _local2, spd);
trace("SG appeared");
} else {
enemy(3, _local2, spd - 1);
trace("SR appeared");
}
}
}
function eBigHumanPattern(rate, appRate, rRate, spd) {
if (Math.floor(Math.random() * rate) == 0) {
var _local3 = Math.floor(Math.random() * 100) + 1;
var _local2 = "";
_global.eNum++;
if ((Math.floor(Math.random() * 100) + 1) <= rRate) {
_local2 = "right";
} else {
_local2 = "left";
}
if (_local3 <= appRate[0]) {
enemy(4, _local2, spd);
} else {
enemy(5, _local2, spd);
}
}
}
function eRedHumanPattern(rate, appRate, rRate, fallNo, spd) {
if (Math.floor(Math.random() * rate) == 0) {
var _local4 = Math.floor(Math.random() * 100) + 1;
var _local7 = appRate[0] + appRate[1];
var _local8 = _local7 + appRate[2];
var _local9 = _local8 + appRate[3];
var _local5 = "";
_global.eNum++;
if ((Math.floor(Math.random() * 100) + 1) <= rRate) {
_local5 = "right";
} else {
_local5 = "left";
}
if (_local4 <= appRate[0]) {
if (fallNo == -1) {
enemy(7, _local5, spd);
} else {
redEnemyFallen(7, fallNo, spd);
}
} else if ((_local4 > appRate[0]) && (_local4 <= _local7)) {
if (fallNo == -1) {
enemy(8, _local5, spd);
} else {
redEnemyFallen(8, fallNo, spd);
}
} else if ((_local4 > _local7) && (_local4 <= _local8)) {
if (fallNo == -1) {
enemy(9, _local5, spd);
} else {
redEnemyFallen(9, fallNo, spd);
}
} else if ((_local4 > _local8) && (_local4 <= _local9)) {
if (fallNo == -1) {
enemy(10, _local5, spd);
} else {
redEnemyFallen(10, fallNo, spd);
}
} else if (fallNo == -1) {
enemy(11, _local5, spd);
} else {
redEnemyFallen(11, fallNo, spd);
}
}
}
function eHeriPattern(rate, appRate, rRate, spd) {
if (Math.floor(Math.random() * rate) == 0) {
var _local3 = Math.floor(Math.random() * 100) + 1;
var _local6 = appRate[0] + appRate[1];
var _local2 = "";
_global.eNum++;
if ((Math.floor(Math.random() * 100) + 1) <= rRate) {
_local2 = "right";
} else {
_local2 = "left";
}
if (_local3 <= appRate[0]) {
niwaheri(0, _local2, spd);
} else if ((_local3 > appRate[0]) && (_local3 <= _local6)) {
niwaheri(1, _local2, spd);
} else {
niwaheri(2, _local2, spd);
}
}
}
function eTrapPattern(rate, appRate) {
if (Math.floor(Math.random() * rate) == 0) {
var _local2 = Math.floor(Math.random() * 100) + 1;
var _local4 = appRate[0] + appRate[1];
var _local6 = _local4 + appRate[2];
var _local5 = _local6 + appRate[3];
var _local7 = _local5 + appRate[4];
_global.eNum++;
if (_local2 <= appRate[0]) {
trap(0, 0);
} else if ((_local2 > appRate[0]) && (_local2 <= _local4)) {
trap(1, 0);
} else if ((_local2 > _local4) && (_local2 <= _local6)) {
trap(2, Math.floor(Math.random() * 3));
} else if ((_local2 > _local6) && (_local2 <= _local5)) {
trap(3, Math.floor(Math.random() * 3));
} else if ((_local2 > _local5) && (_local2 <= _local7)) {
trap(4, 0);
} else {
trap(5, Math.floor(Math.random() * 3));
}
}
}
function traps(id, moveType, num) {
i = 0;
while (i < num) {
enemyName = ("trap" + id) + _global.eSetNo;
_root.scr.attachMovie("trap" + id, enemyName, 701 + _global.eSetNo);
_root.scr[enemyName]._x = (640 + _global.screenX) + (i * 25);
_root.scr[enemyName].moveType = moveType;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
i++;
}
}
function trap(id, moveType) {
enemyName = ("trap" + id) + _global.eSetNo;
_root.scr.attachMovie("trap" + id, enemyName, 701 + _global.eSetNo);
_root.scr[enemyName]._x = 640 + _global.screenX;
_root.scr[enemyName].moveType = moveType;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function enemy(id, position, speed) {
enemyName = ("enemy" + id) + _global.eSetNo;
_root.scr.attachMovie("enemy" + id, enemyName, 701 + _global.eSetNo);
if (position == "right") {
_root.scr[enemyName]._x = 640 + _global.screenX;
} else if (position == "left") {
_root.scr[enemyName]._x = 0 + _global.screenX;
}
_root.scr[enemyName].speed = speed;
_root.scr[enemyname].fallen = false;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function redEnemyFallen(id, posNum, speed) {
enemyName = ("enemy" + id) + _global.eSetNo;
_root.scr.attachMovie("enemy" + id, enemyName, 701 + _global.eSetNo);
switch (posNum) {
case 0 :
_root.scr[enemyName]._x = 600 + _global.screenX;
break;
case 1 :
_root.scr[enemyName]._x = 460 + _global.screenX;
break;
case 2 :
_root.scr[enemyName]._x = 320 + _global.screenX;
break;
case 3 :
_root.scr[enemyName]._x = 180 + _global.screenX;
break;
case 4 :
_root.scr[enemyName]._x = 40 + _global.screenX;
break;
default :
trace("ERROR in redEnemyFallen: posNum=" + posNum);
}
_root.scr[enemyName]._y = -10;
_root.scr[enemyName].speed = speed;
_root.scr[enemyName].fallen = true;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function niwaheri(id, position, speed) {
enemyName = ("niwaheri" + id) + _global.eSetNo;
_root.scr.attachMovie("niwaheri" + id, enemyName, 701 + _global.eSetNo);
if (position == "right") {
_root.scr[enemyName]._x = 640 + _global.screenX;
} else if (position == "left") {
_root.scr[enemyName]._xscale = -100;
_root.scr[enemyName]._x = 0 + _global.screenX;
}
_root.scr[enemyName].speed = speed;
_root.scr[enemyName]._y = 30;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function OPMovie2() {
enemyName = "OPMovie2" + _global.eSetNo;
_root.bg.attachMovie("OPMovie2", enemyName, 51);
_root.bg[enemyName]._x = 428.8;
_root.bg[enemyName]._y = -27.95;
}
function updatePanelInfoFromMain() {
_root.PanelMachinegun.ammoPrice = transUsingK(APMachinegun);
_root.PanelShotgun.ammoPrice = transUsingK(APShotgun);
_root.PanelSniper.ammoPrice = transUsingK(APSniper);
_root.PanelFrag.ammoPrice = transUsingK(APFrag);
_root.PanelHandgun.dMAXAmmo = MAHandgun;
_root.PanelMachinegun.dMAXAmmo = MAMachinegun;
_root.PanelShotgun.dMAXAmmo = MAShotgun;
_root.PanelSniper.dMAXAmmo = MASniper;
}
function updatePanelInfoFromGun() {
_root.PanelMachinegun.ammoPrice = transUsingK(_root.player.APMachinegun);
_root.PanelShotgun.ammoPrice = transUsingK(_root.player.APShotgun);
_root.PanelSniper.ammoPrice = transUsingK(_root.player.APSniper);
_root.PanelFrag.ammoPrice = transUsingK(_root.player.APFrag);
_root.PanelHandgun.dMAXAmmo = _root.player.MAHandgun;
_root.PanelMachinegun.dMAXAmmo = _root.player.MAMachinegun;
_root.PanelShotgun.dMAXAmmo = _root.player.MAShotgun;
_root.PanelSniper.dMAXAmmo = _root.player.MASniper;
}
function transUsingK(num) {
var _local1 = "";
if (num >= 10000) {
len = num.toString().length - 3;
i = 0;
while (i < len) {
_local1 = _local1 + num.toString().charAt(i);
i++;
}
_local1 = _local1 + "k";
} else {
_local1 = num.toString();
}
trace("str: " + _local1);
return(_local1);
}
function changeWeapon(str, wpNo) {
var _local1 = wpNo;
if (str == "prev") {
_local1--;
if (_local1 == -1) {
_local1 = 3;
}
} else if (str == "next") {
_local1++;
if (_local1 == 4) {
_local1 = 0;
}
} else {
trace("ERROR in changeWeapon: str=" + str);
}
return(_local1);
}
function getNextBGMName(dis) {
str = "se_booing";
switch (Math.floor(dis / 2500) % 4) {
case 0 :
str = "bgm_play1";
break;
case 1 :
str = "bgm_play2";
break;
case 2 :
str = "bgm_play3";
break;
case 3 :
str = "bgm_play4";
}
return(str);
}
function unarmedMode() {
}
function samuraiMode() {
MAX_HP = 1;
_root.DpMAXHP = "/ " + MAX_HP;
_global.pHP = MAX_HP;
}
function bombermanMode() {
}
function enhancedMode() {
healLV = 9;
handgunLV = 9;
machinegunLV = 9;
shotgunLV = 9;
sniperLV = 9;
fragLV = 9;
MAX_HP = heal[9];
_global.pHP = MAX_HP;
_root.DpMAXHP = "/ " + MAX_HP;
RTHandgun = handgun.reload[9];
RTMachinegun = machinegun.reload[9];
RTShotgun = shotgun.reload[9];
RTSniper = sniper.reload[9];
MAHandgun = handgun.ammo[9];
MAMachinegun = machinegun.ammo[9];
MAShotgun = shotgun.ammo[9];
MASniper = sniper.ammo[9];
_global.bHandgun = MAHandgun;
_global.bMachinegun = MAMachinegun;
_global.bShotgun = MAShotgun;
_global.bMagnum = MASniper;
APMachinegun = machinegun.cost[9];
APShotgun = shotgun.cost[9];
APSniper = sniper.cost[9];
APFrag = frag.cost[9];
}
function enhancedModeOnGunCircle() {
spd_handgun = handgun.speed[9];
ATHandgun = handgun.attack[9];
ATSniper = sniper.attack[9];
waitSniper = 6;
fragDelay = 18;
fragRange = frag.range[9];
ATFrag = frag.attack[9];
spd_machinegun = machinegun.speed[9];
mPrecision = machinegun.precision[9];
mFireRate = machinegun.rate[9];
ATMachinegun = machinegun.attack[9];
spd_shotgun = shotgun.speed[9];
spreadNo = shotgun.spreads[9];
sPrecision = shotgun.precision[9];
ATShotgun = shotgun.attack[9];
waitShotgun = 6;
}
function speedReduction() {
if (isBeamSaber) {
if (tempSpeed == -1) {
tempDirection = dashDirection;
if ((_global.moveMode == "walkR") || (_global.moveMode == "walkL")) {
tempSpeed = walkSpeed;
} else if ((_global.moveMode == "runR") || (_global.moveMode == "runL")) {
tempSpeed = dashSpeed;
} else {
tempSpeed = 0;
}
} else if (tempSpeed == 0) {
} else {
tempSpeed = tempSpeed - lessSpeed;
slide(tempSpeed, tempDirection);
}
} else {
tempSpeed = -1;
}
}
function slide(am, dir) {
if (dir == "right") {
if (this._x < 315) {
this._x = this._x + am;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
} else if (this._x >= 315) {
this._x = 315;
scrX = scrX + am;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
} else if (dir == "left") {
if (this._x > 10) {
this._x = this._x - am;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
}
}
function Normal() {
_global.mode = "normal";
this.gotoAndStop("normal");
}
function pChkDirection() {
if (_root._xmouse > this._x) {
this._xscale = 100;
} else if (_root._xmouse < this._x) {
this._xscale = -100;
}
}
function Walk(direction) {
if (direction == "right") {
if (_global.mode != "jump") {
this.gotoAndStop("walk");
}
if (this._x < 315) {
this._x = this._x + walkSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
} else if (this._x >= 315) {
this._x = 315;
scrX = scrX + walkSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
} else if (direction == "left") {
if (this._x > 10) {
if (_global.mode != "jump") {
this.gotoAndStop("walk");
}
this._x = this._x - walkSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
}
}
function Run(direction) {
beforeBasicHi = _global.basicHi;
if (_global.mode != "jump") {
dshCnt++;
if (dshCnt >= 20) {
_global.mode = "normal";
dshCnt = 0;
dashFrag = 5;
dashDirection = "none";
_global.dashing = false;
}
} else {
dshCnt = 0;
}
if (direction == "right") {
if (_global.mode != "jump") {
if (this._xscale == 100) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("backDash");
}
}
if (this._x < 315) {
this._x = this._x + dashSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
} else if (this._x >= 315) {
this._x = 315;
scrX = scrX + dashSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
} else if (direction == "left") {
if (this._x > 10) {
if (_global.mode != "jump") {
if (this._xscale == 100) {
this.gotoAndStop("backDash");
} else {
this.gotoAndStop("run");
}
}
this._x = this._x - dashSpeed;
groundEffect();
if (_global.mode != "jump") {
this._y = _global.basicHi;
}
}
}
}
function Jump() {
se_jump.start();
this.gotoAndStop("jump");
_global.mode = "jump";
jumpMode = "up";
}
function Down() {
this.gotoAndStop("jump");
_global.mode = "jump";
jumpMode = "up";
jmpCnt = 12;
}
function aniJump(i) {
if ((i >= 1) && (i <= 25)) {
this.pJump.gotoAndStop(i);
} else {
this.pJump.gotoAndStop(24);
}
}
function JumpLoop() {
if (jumpMode == "up") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
if (jmpCnt >= 13) {
jumpMode = "down";
}
jmpCnt++;
if (_global.basicHi < this._y) {
se_landing.start();
_global.mode = "normal";
jumpMode = "-";
this._y = _global.basicHi;
jmpCnt = 1;
dshCnt = 0;
dashFrag = 5;
dashDirection = "none";
_global.dashing = false;
}
}
if (jumpMode == "down") {
this._y = this._y + getNextdy(jmpCnt);
aniJump(jmpCnt);
jmpCnt++;
if (_global.basicHi < this._y) {
se_landing.start();
_global.mode = "normal";
jumpMode = "-";
this._y = _global.basicHi;
jmpCnt = 1;
dshCnt = 0;
dashFrag = 5;
dashDirection = "none";
_global.dashing = false;
}
}
}
function groundEffect() {
_global.effectiveBlock = _global.blockHi[_root.blockX];
if (effectiveBlock == 9) {
tempBlockType = 1;
} else {
tempBlockType = _root.scr[_global.blockHiName[_root.blockX]].blockType;
}
if (_global.debugMode) {
_root.scr.attachMovie("square", "square", 1181);
_root.scr.square._x = (_root.blockX + blockPosX) * 32;
_root.scr.square._y = _global.effectiveBlock * 32;
}
switch (tempBlockType) {
case 0 :
trace(("ERROR in groundEffect: _global.blockHi[" + _global.effectiveBlock) + "] = 0");
break;
case 1 :
_global.basicHi = _global.effectiveBlock * 32;
break;
case 2 :
_global.basicHi = ((_global.effectiveBlock + 1) * 32) - ((_global.screenX + this._x) - ((_root.blockX + blockPosX) * 32));
break;
case 3 :
_global.basicHi = ((_global.effectiveBlock + 1) * 32) - (32 - ((_global.screenX + this._x) - ((_root.blockX + blockPosX) * 32)));
break;
default :
trace((("ERROR in groundEffect: _global.blockHi[" + _global.effectiveBlock) + "] = ") + _global.blockHi[_global.effectiveBlock]);
}
}
function setGround() {
if (_global.debugMode) {
_root.scr.attachMovie("line", "line1", 1156);
_root.scr.line1._x = blockPosX * 32;
_root.scr.line1._y = 0;
_root.scr.attachMovie("line", "line2", 1155);
_root.scr.line2._x = (blockPosX + 22) * 32;
_root.scr.line2._y = 0;
}
j = 8;
while (j >= 1) {
if (_global.nextBlock[j] == 0) {
if (_global.groundDepth != 0) {
_global.blockHiName[22] = "BL" + (_global.groundDepth - 1);
} else {
_global.blockHiName[22] = "BL154";
}
if (_global.debugMode) {
tempName = "square2" + _global.debugDepth;
_root.scr.attachMovie("square2", tempName, 1158 + _global.debugDepth);
_root.scr[tempName]._x = _root.scr[_global.blockHiName[22]]._x;
_root.scr[tempName]._y = _root.scr[_global.blockHiName[22]]._y;
if ((++_global.debugDepth) > 22) {
_global.debugDepth = 0;
}
}
break;
}
switch (_global.nextBlock[j]) {
case 0 :
trace("ERROR in setGround(): \u5230\u9054\u4E0D\u80FD\u30A8\u30EA\u30A2 j=" + j);
break;
case 1 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block1", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = 704 + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 1;
_global.groundDepth++;
break;
case 2 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block2", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = 704 + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 2;
_global.groundDepth++;
break;
case 3 :
blockName = "BL" + _global.groundDepth;
_root.scr.attachMovie("block3", blockName, _global.groundDepth + 1000);
_root.scr[blockName]._x = 704 + (blockPosX * 32);
_root.scr[blockName]._y = j * 32;
_root.scr[blockName].blockType = 3;
_global.groundDepth++;
break;
default :
trace((("ERROR in setGround(): _global.nextBlock[" + j) + "]= ") + _global.nextBlock[j]);
}
if (_global.groundDepth > 154) {
_global.groundDepth = 0;
}
j--;
}
}
block = [[0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 3, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 3, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 3, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1]];
_global.blockHi = [6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8];
_global.blockHiName = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""];
_global.nextBlock = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1];
if (_global.debugMode) {
_root.scr.attachMovie("line", "line1", 1156);
_root.scr.line1._x = blockPosX * 32;
_root.scr.line1._y = 0;
_root.scr.attachMovie("line", "line2", 1155);
_root.scr.line2._x = (blockPosX + 22) * 32;
_root.scr.line2._y = 0;
}
var heal = [280, 290, 300, 315, 330, 345, 360, 380, 400, 420];
var handgun = {attack:[50, 55, 60, 65, 70, 75, 80, 85, 90, 100], speed:[18, 18, 19, 19, 20, 20, 21, 21, 22, 23], ammo:[12, 13, 14, 15, 16, 17, 18, 19, 20, 21], reload:[0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1], cost:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]};
var machinegun = {attack:[50, 55, 60, 65, 70, 75, 80, 85, 90, 100], rate:[3, 3, 2, 2, 2, 2, 2, 1, 1, 1], speed:[19, 19, 20, 20, 20, 21, 21, 21, 22, 22], precision:[13, 12, 12, 12, 11, 11, 11, 10, 10, 10], ammo:[35, 37, 41, 43, 45, 47, 49, 51, 53, 57], reload:[1, 1, 0.9, 0.9, 0.8, 0.8, 0.7, 0.7, 0.6, 0.6], cost:[600, 750, 1050, 1950, 4000, 7500, 13000, 18000, 25000, 31000]};
var shotgun = {attack:[50, 53, 56, 59, 62, 65, 68, 71, 74, 77], spreads:[9, 10, 10, 11, 11, 12, 12, 13, 13, 14], speed:[16, 16, 17, 17, 17, 17, 18, 18, 18, 18], precision:[31, 31, 30, 30, 30, 29, 29, 29, 28, 28], ammo:[4, 4, 5, 5, 5, 6, 6, 6, 7, 7], reload:[1.66, 1.66, 1.5, 1.5, 1.5, 1.5, 1.4, 1.4, 1.4, 1.3], cost:[1000, 1300, 1800, 2500, 6000, 12000, 20000, 29000, 36000, 43000]};
var sniper = {attack:[140, 210, 280, 350, 420, 490, 560, 610, 680, 800], ammo:[8, 8, 9, 9, 9, 9, 10, 10, 10, 11], reload:[1.66, 1.58, 1.5, 1.42, 1.35, 1.28, 1.21, 1.14, 1.06, 1], cost:[800, 1000, 1200, 2000, 5000, 10000, 18000, 25000, 32000, 40000]};
var frag = {attack:[30, 45, 60, 75, 90, 105, 120, 135, 150, 165], range:[100, 105, 110, 115, 120, 125, 131, 137, 143, 150], cost:[1500, 2000, 3000, 5000, 9000, 15000, 28000, 40000, 60000, 82000]};
trace("\u521D\u671F\u5316\u958B\u59CB");
_global.debugMode = false;
_global.RPdebugMode = false;
_global.appEdebugMode = false;
_global.speedDebugMode = false;
_global.invincibleMode = false;
_global.RP = false;
_global.mode = "normal";
_global.dashing = false;
_global.usingWeapon = 0;
_global.moveMode = "stop";
_global.reloading = false;
_global.wait = 0;
_global.score = 0;
_global.dist = 0;
_global.fireNo = 0;
_global.fireHitNo = 0;
_global.killNo = 0;
_global.eShotNo = 0;
_global.eLaserNo = 0;
_global.eSetNo = 0;
_global.eDamageNo = 0;
_global.eReloadNo = 0;
_global.pHandgunNo = 0;
_global.pMagnumNo = 0;
_global.pShotgunNo = 0;
_global.pFragNo = 0;
_global.pSmallBombNo = 0;
_global.itemNo = 0;
_global.shellNo = 0;
_global.varniaNo = 0;
_global.groundDepth = 0;
_global.debugDepth = 0;
_global.eDebugBlock = 0;
_global.eNum = 0;
_global.dispScoreNo = 0;
_global.bHandgun = 0;
_global.bMagnum = 0;
_global.bMachinegun = 0;
_global.bShotgun = 0;
_global.APHandgun = 0;
_global.APSniper = 0;
_global.APMachinegun = 0;
_global.APShotgun = 0;
_global.APFrag = 0;
_global.screenX = 0;
_global.bpx = 0;
_global.effectiveBlock = 8;
_global.basicHi = this._y;
_global.rock = false;
this._x = 135;
scrX = 0;
tempBlockX = 9;
blockPosX = 0;
beforeBasicHi = 500;
beforeBasicHi2 = 500;
reloadtime = -1;
jumpMode = "-";
jmpCnt = 1;
dshCnt = 0;
opCnt = 0;
timeCnt = 0;
slideCnt = 0;
motiCnt = -1;
appSpE = 0;
tempSpeed = -1;
dashDirection = "none";
dashFrag = 0;
dashCount = 0;
pressingKey = "none";
lastUsingWeapon = -1;
nextRP = 1;
bgmChFlg = false;
healLV = 0;
handgunLV = 0;
machinegunLV = 0;
shotgunLV = 0;
sniperLV = 0;
fragLV = 0;
bgm_name = "bgm_play1";
tempBGMName = "";
HBFlg = false;
isBeamSaber = false;
damagedByIgaIga = false;
_root.iro = new Color(_root.HPArea.pHPbar.pHPbar2);
_root.iro2 = new Color(_root.HPArea.DpHPMC);
_global.handgunList = new Array();
_global.shotgunList = new Array();
_global.sniperList = new Array();
_global.fragList = new Array();
_global.smallBombList = new Array();
_global.busterRifleList = new Array();
MAX_HP = heal[0];
_global.pHP = MAX_HP;
_root.DpMAXHP = "/ " + MAX_HP;
_root.dDist = 0;
untilWhiteHP = Math.floor(MAX_HP / 3);
untilYellowHP = Math.floor(MAX_HP / 12);
nWalkSpeed = 3;
nDashSpeed = 10;
mWalkSpeed = 1;
mDashSpeed = 3;
walkSpeed = nWalkSpeed;
dashSpeed = nDashSpeed;
acceptTime = 8;
lessSpeed = 0.5;
RPdist = 500;
RTHandgun = handgun.reload[0];
RTMachinegun = machinegun.reload[0];
RTShotgun = shotgun.reload[0];
RTSniper = sniper.reload[0];
MAHandgun = handgun.ammo[0];
MAMachinegun = machinegun.ammo[0];
MAShotgun = shotgun.ammo[0];
MASniper = sniper.ammo[0];
_global.bHandgun = MAHandgun;
_global.bMachinegun = MAMachinegun;
_global.bShotgun = MAShotgun;
_global.bMagnum = MASniper;
APMachinegun = machinegun.cost[0];
APShotgun = shotgun.cost[0];
APSniper = sniper.cost[0];
APFrag = frag.cost[0];
if (_global.unarmedMode) {
unarmedMode();
} else if (_global.samuraiMode) {
samuraiMode();
} else if (_global.bombermanMode) {
bombermanMode();
} else if (_global.enhancedMode) {
enhancedMode();
}
if (_global.bombermanMode) {
_global.score = 500000 /* 0x07A120 */;
}
if (_global.tutorial) {
_global.score = 50000;
}
if (_global.debugMode) {
_global.score = 5000000 /* 0x4C4B40 */;
}
if (_global.invincibleMode) {
MAX_HP = 99999 /* 0x01869F */;
_global.pHP = MAX_HP;
_root.DpMAXHP = "/ 99999";
}
drawArm();
drawFrameOnWeapon(_global.usingWeapon);
loadBlock();
updatePanelInfoFromMain();
var eHAppRate = [[100, 0, 0, 0], [95, 5, 0, 0], [90, 5, 5, 0], [90, 0, 0, 10], [65, 15, 15, 5], [85, 5, 5, 5], [85, 0, 0, 15], [80, 10, 5, 5], [80, 0, 20, 0], [80, 20, 0, 0], [75, 5, 10, 10], [75, 0, 25, 0], [70, 10, 10, 10], [70, 0, 0, 30], [60, 15, 10, 15], [50, 15, 20, 15], [40, 20, 20, 20], [0, 30, 35, 35]];
var eBHAppRate = [[100, 0], [80, 20], [50, 50], [25, 75]];
var eRHAppRate = [[34, 33, 33, 0, 0], [25, 25, 25, 25, 0], [0, 0, 100, 0, 0], [0, 30, 30, 30, 10], [0, 25, 25, 25, 25], [0, 30, 30, 10, 30], [0, 34, 33, 0, 33], [0, 15, 15, 10, 60]];
var eHeriAppRate = [[100, 0, 0], [50, 50, 0], [50, 50, 0], [62, 33, 5], [65, 15, 20], [55, 10, 35], [0, 0, 100]];
var eTrapAppRate = [[70, 0, 10, 0, 20, 0], [35, 25, 10, 5, 5, 20], [20, 30, 15, 10, 0, 25], [5, 45, 5, 20, 0, 25], [0, 50, 0, 25, 0, 25], [0, 0, 0, 0, 0, 100], [0, 0, 0, 100, 0, 0], [0, 35, 0, 35, 0, 30]];
se_handgunR = new Sound();
se_handgunR.attachSound("se_handgunR");
se_magnumR = new Sound();
se_magnumR.attachSound("se_magnumR");
se_machinegunR = new Sound();
se_machinegunR.attachSound("se_machinegunR");
se_shotgunR = new Sound();
se_shotgunR.attachSound("se_shotgunR");
se_changeHandgun = new Sound();
se_changeHandgun.attachSound("se_changeHandgun");
se_dash = new Sound();
se_dash.attachSound("se_dash");
se_jump = new Sound();
se_jump.attachSound("se_jump");
se_landing = new Sound();
se_landing.attachSound("se_landing");
se_heartBeat = new Sound();
se_heartBeat.attachSound("se_heartBeat");
trace("\u521D\u671F\u5316\u7D42\u4E86");
this.onEnterFrame = function () {
if ((_global.mode != "death") && (!_global.RP)) {
if (!isBeamSaber) {
if (!_global.dashing) {
if (Key.isDown(_root.keySetting.cf0) && (Key.isDown(_root.keySetting.cf1))) {
_global.moveMode = "stop";
pressingKey = "both";
dashDirection = "none";
if (_global.mode != "jump") {
this.Normal();
}
} else if (Key.isDown(_root.keySetting.cf1)) {
_global.moveMode = "walkR";
if (dashDirection == "left") {
dashFrag = 0;
}
dashDirection = "right";
pressingKey = "right";
this.Walk("right");
} else if (Key.isDown(_root.keySetting.cf0)) {
_global.moveMode = "walkL";
if (dashDirection == "right") {
dashFrag = 0;
}
dashDirection = "left";
pressingKey = "left";
this.Walk("left");
} else {
pressingKey = "none";
if (_global.mode != "jump") {
_global.moveMode = "stop";
this.Normal();
}
}
}
if ((dashFrag == 0) && (dashDirection != "none")) {
dashCount = acceptTime;
dashFrag = 1;
} else if (dashFrag == 1) {
dashCount--;
if (dashCount <= 0) {
dashFrag = 5;
dashDirection = "none";
} else if (pressingKey == "none") {
dashCount = acceptTime;
dashFrag = 2;
}
} else if (dashFrag == 2) {
if (dashDirection == pressingKey) {
if (_global.mode != "jump") {
se_dash.start();
dashFrag = 3;
_global.dashing = true;
varniaName = "varnia" + _global.varniaNo;
if (this._xscale == 100) {
if (dashDirection == "right") {
_root.scr.attachMovie("pDashVarnia", varniaName, 91 + _global.varniaNo);
} else {
_root.scr.attachMovie("pBackDashVarnia", varniaName, 91 + _global.varniaNo);
}
} else {
if (dashDirection == "right") {
_root.scr.attachMovie("pBackDashVarnia", varniaName, 91 + _global.varniaNo);
} else {
_root.scr.attachMovie("pDashVarnia", varniaName, 91 + _global.varniaNo);
}
_root.scr[varniaName]._xscale = -100;
}
_root.scr[varniaName]._x = this._x + _global.screenX;
_root.scr[varniaName]._y = this._y;
if ((++_global.varniaNo) >= 5) {
}
_global.varniaNo = 0;
}
} else if (pressingKey == "none") {
dashCount--;
if (dashCount <= 0) {
dashFrag = 5;
dashDirection = "none";
}
} else {
dashFrag = 0;
dashDirection = "none";
}
} else if (dashFrag == 3) {
if (_global.mode != "jump") {
this.Run(dashDirection);
if (dashDirection == "right") {
_global.moveMode = "runR";
if (Key.isDown(_root.keySetting.cf0)) {
dshCnt = 0;
dashFrag = 0;
dashDirection = "none";
_global.dashing = false;
} else if (!Key.isDown(_root.keySetting.cf1)) {
dshCnt = 0;
dashFrag = 4;
_global.dashing = false;
}
} else if (dashDirection == "left") {
_global.moveMode = "runL";
if (Key.isDown(_root.keySetting.cf1)) {
dshCnt = 0;
dashFrag = 0;
dashDirection = "none";
_global.dashing = false;
} else if (!Key.isDown(_root.keySetting.cf0)) {
dshCnt = 0;
dashFrag = 4;
_global.dashing = false;
}
}
} else if (_global.mode == "jump") {
if (Key.isDown(_root.keySetting.cf0)) {
this.Run("left");
dashDirection = "left";
} else if (Key.isDown(_root.keySetting.cf1)) {
this.Run("right");
dashDirection = "right";
}
}
} else if (dashFrag == 4) {
_global.moveMode = "stop";
if (Key.isDown(_root.keySetting.cf0)) {
dashFrag = 0;
dashDirection = "none";
} else if (Key.isDown(_root.keySetting.cf1)) {
dashFrag = 0;
dashDirection = "none";
}
} else if (dashFrag == 5) {
if ((!Key.isDown(_root.keySetting.cf0)) && (!Key.isDown(_root.keySetting.cf1))) {
dashFrag = 4;
}
}
}
if ((Key.isDown(_root.keySetting.cf2) && (Key_W == 0)) && (!isBeamSaber)) {
if (_global.mode == "normal") {
Jump();
}
}
if (!_global.beamSaber) {
if (Key.isDown(_root.keySetting.cf3)) {
if (lastUsingWeapon == -1) {
_root.disp_reload.removeMovieClip();
reloadtime = -1;
_global.reloading = false;
lastUsingWeapon = _global.usingWeapon;
_global.usingWeapon = 10;
drawArm();
}
} else if (_global.usingWeapon == 10) {
_global.usingWeapon = lastUsingWeapon;
drawArm();
lastUsingWeapon = -1;
}
} else if ((Key.isDown(_root.keySetting.cf3) && (!Key_S)) && (!isBeamSaber)) {
if (lastUsingWeapon == -1) {
_root.disp_reload.removeMovieClip();
reloadtime = -1;
_global.reloading = false;
lastUsingWeapon = _global.usingWeapon;
_global.usingWeapon = 11;
isBeamSaber = true;
this.gotoAndStop("beamSaber");
drawArm();
}
}
if (((Key.isDown(_root.keySetting.cf4) && (!Key_R)) || (Key.isDown(4) && (!Key_Wheel))) && ((!_global.reloading) && (_global.wait == 0))) {
if ((_global.usingWeapon == 0) && (_global.bHandgun != MAHandgun)) {
se_handgunR.start();
reloadtime = Math.floor(RTHandgun * 30);
_global.reloading = true;
} else if (((_global.usingWeapon == 1) && (_global.score >= APMachinegun)) && (_global.bMachinegun != MAMachinegun)) {
se_machinegunR.start();
reloadtime = Math.floor(RTMachinegun * 30);
_global.reloading = true;
} else if (((_global.usingWeapon == 2) && (_global.score >= APShotgun)) && (_global.bShotgun != MAShotgun)) {
se_shotgunR.start();
reloadtime = Math.floor(RTShotgun * 30);
_global.reloading = true;
} else if (((_global.usingWeapon == 3) && (_global.score >= APSniper)) && (_global.bMagnum != MASniper)) {
se_magnumR.start();
reloadtime = Math.floor(RTSniper * 30);
_global.reloading = true;
}
}
if (((((!_global.reloading) && (_global.usingWeapon != 10)) && (!_global.bombermanMode)) && (!_global.unarmedMode)) && (!isBeamSaber)) {
if (Key.isDown(_root.keySetting.cf10) && (!Key_Q)) {
se_changeHandgun.start();
_global.usingWeapon = changeWeapon("prev", _global.usingWeapon);
drawArm();
drawFrameOnWeapon(_global.usingWeapon);
} else if (Key.isDown(_root.keySetting.cf11) && (!Key_E)) {
se_changeHandgun.start();
_global.usingWeapon = changeWeapon("next", _global.usingWeapon);
drawArm();
drawFrameOnWeapon(_global.usingWeapon);
}
}
if (((((!_global.reloading) && (_global.usingWeapon != 10)) && (!_global.bombermanMode)) && (!_global.unarmedMode)) && (!isBeamSaber)) {
if (Key.isDown(_root.keySetting.cf6) && (!Key_1)) {
se_changeHandgun.start();
_global.usingWeapon = 0;
drawArm();
drawFrameOnWeapon(0);
} else if (Key.isDown(_root.keySetting.cf7) && (!Key_2)) {
se_changeHandgun.start();
_global.usingWeapon = 1;
drawArm();
drawFrameOnWeapon(1);
} else if (Key.isDown(_root.keySetting.cf8) && (!Key_3)) {
se_changeHandgun.start();
_global.usingWeapon = 2;
drawArm();
drawFrameOnWeapon(2);
} else if (Key.isDown(_root.keySetting.cf9) && (!Key_4)) {
se_changeHandgun.start();
_global.usingWeapon = 3;
drawArm();
drawFrameOnWeapon(3);
}
}
Key_E = Key.isDown(_root.keySetting.cf11);
Key_Q = Key.isDown(_root.keySetting.cf10);
Key_R = Key.isDown(_root.keySetting.cf4);
Key_S = Key.isDown(_root.keySetting.cf3);
Key_W = Key.isDown(_root.keySetting.cf2);
Key_Wheel = Key.isDown(4);
Key_1 = Key.isDown(_root.keySetting.cf6);
Key_2 = Key.isDown(_root.keySetting.cf7);
Key_3 = Key.isDown(_root.keySetting.cf8);
Key_4 = Key.isDown(_root.keySetting.cf9);
pChkDirection();
JumpLoop();
speedReduction();
chkReload();
addRandGround();
damagedByIgaIga = false;
if (motiCnt > 0) {
if ((--motiCnt) == 0) {
walkSpeed = nWalkSpeed;
dashSpeed = nDashSpeed;
motiCnt = -1;
} else {
walkSpeed = mWalkSpeed;
dashSpeed = mDashSpeed;
}
}
if ((++timeCnt) >= 30) {
_global.totalPlayingTime++;
timeCnt = 0;
}
if ((--_global.wait) < 0) {
_global.wait = 0;
}
if ((_root.dDist >= nextRP) && (!_global.tutorial)) {
_global.rock = false;
if (!_global.okusenman) {
tempBGMName = getNextBGMName(_root.dDist);
trace("tempBGMName: " + tempBGMName);
if (bgm_name != tempBGMName) {
_root[bgm_name].stop(bgm_name);
if (_global.bgm) {
_root[tempBGMName].start(0, 99);
}
bgm_name = tempBGMName;
bgmChFlg = true;
trace("BGM\u5909\u66F4\u51E6\u7406\u5B8C\u4E86");
} else {
bgmChFlg = false;
}
}
_global.RP = true;
_root.attachMovie("refuelingPoint", "refuelingPoint", 10000);
_root.refuelingPoint._y = -10;
if (nextRP == 1) {
nextRP = RPdist;
} else {
nextRP = nextRP + RPdist;
}
}
chkLife();
_root.blockX = Math.floor((scrX + this._x) / 32) - blockPosX;
_root.scr._x = -scrX;
_global.screenX = scrX;
_global.dist = Math.floor(_global.screenX / 20);
if (_global.speedDebugMode) {
if (Key.isDown(13) && (!Key_ENTER)) {
if (walkSpeed != 31) {
walkSpeed = 31;
dashSpeed = 31;
} else {
walkSpeed = nWalkSpeed;
dashSpeed = nDashSpeed;
}
}
Key_ENTER = Key.isDown(13);
}
if (_global.debugMode) {
_root.scrY = this._y;
_root.scrX = scrX;
_root.realX = this._x;
_root.blockY = Math.round(this._y / 32);
_root.bHi = _global.basicHi;
_root.efBlock = _global.effectiveBlock;
_root.efBlockType = _root.scr[_global.blockHiName[_root.blockX]].blockType;
_root.DblockPosX = blockPosX;
_root.DgroundDepth = _global.groundDepth;
_root.DdashCount = dshCnt;
_root.DpHP = _global.pHP;
_root.DHGLength = _global.handgunList.length;
_root.DSGLength = _global.shotgunList.length;
_root.DSRLength = _global.sniperList.length;
_root.DFGLength = _global.fragList.length;
_root.DWait = _global.wait;
_root.DeNum = _global.eNum - _global.killNo;
}
_root.PanelHandgun.ammo = _global.bHandgun;
_root.PanelMachinegun.ammo = _global.bMachinegun;
_root.PanelShotgun.ammo = _global.bShotgun;
_root.PanelSniper.ammo = _global.bMagnum;
_root.dScore = "$ " + _global.score;
_root.dDist = _global.dist;
_root.dKill.dKill2.dKillNo = _global.killNo;
_root.HPArea.DpHP = _global.pHP;
_root.HPArea.DpMAXHP = "/" + MAX_HP;
if (!_global.tutorial) {
if (!_global.appEdebugMode) {
dis = _global.dist;
switch (true) {
case (dis >= 1) && (dis < 250) :
eHumanPattern(90, eHAppRate[0], 100, 3);
break;
case (dis >= 250) && (dis < 500) :
if (appSpE == 0) {
enemy(1, "right", 3);
enemy(1, "right", 3);
appSpE++;
}
eHumanPattern(80, eHAppRate[1], 100, 3);
break;
case (dis >= 500) && (dis < 750) :
if (appSpE == 1) {
enemy(4, "right", 4);
appSpE++;
}
eHumanPattern(75, eHAppRate[2], 100, 3);
break;
case (dis >= 750) && (dis < 1000) :
if (appSpE == 2) {
enemy(4, "left", 5);
enemy(4, "right", 5);
appSpE++;
}
eHumanPattern(70, eHAppRate[2], 100, 3);
break;
case (dis >= 1000) && (dis < 1250) :
if (appSpE == 3) {
enemy(4, "left", 5);
enemy(4, "right", 5);
enemy(3, "right", 2);
enemy(3, "right", 2);
traps(4, 0, 2);
appSpE++;
}
eHumanPattern(75, eHAppRate[3], 95, 3);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 1250) && (dis < 1500) :
if (appSpE == 4) {
niwaheri(1, "left", 17);
enemy(2, "right", 3);
appSpE++;
}
eHumanPattern(70, eHAppRate[3], 95, 3);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 1500) && (dis < 1750) :
if (appSpE == 5) {
enemy(5, "right", 7);
enemy(4, "left", 5);
traps(4, 0, 2);
appSpE++;
}
eHumanPattern(70, eHAppRate[5], 95, 3);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 1750) && (dis < 2000) :
if (appSpE == 6) {
niwaheri(1, "left", 17);
niwaheri(1, "right", 17);
appSpE++;
}
eHumanPattern(67, eHAppRate[5], 95, 3);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 2000) && (dis < 2250) :
if (appSpE == 7) {
niwaheri(0, "right", 7);
appSpE++;
}
eHumanPattern(74, eHAppRate[6], 95, 3);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 2250) && (dis < 2500) :
if (appSpE == 8) {
niwaheri(0, "left", 7);
traps(0, 0, 3);
enemy(5, "right", 7);
appSpE++;
}
eHumanPattern(72, eHAppRate[6], 95, 3);
eHeriPattern(3000, eHeriAppRate[1], 0, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 2500) && (dis < 2750) :
if (appSpE == 9) {
niwaheri(0, "left", 7);
niwaheri(1, "right", 17);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(70, eHAppRate[6], 95, 3);
eHeriPattern(2950, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 2750) && (dis < 3000) :
if (appSpE == 10) {
enemy(5, "left", 7);
enemy(5, "right", 7);
traps(5, 0, 4);
appSpE++;
}
eHumanPattern(75, eHAppRate[7], 95, 3);
eHeriPattern(2900, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 3000) && (dis < 3250) :
if (appSpE == 11) {
niwaheri(0, "left", 10);
enemy(5, "right", 7);
traps(2, 0, 3);
appSpE++;
}
eHumanPattern(75, eHAppRate[7], 95, 3);
eHeriPattern(2850, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 3250) && (dis < 3500) :
if (appSpE == 12) {
enemy(1, "right", 3);
enemy(1, "right", 4);
enemy(1, "right", 3);
enemy(1, "right", 4);
enemy(1, "right", 3);
enemy(1, "left", 4);
enemy(1, "left", 3);
traps(4, 0, 2);
appSpE++;
}
eHumanPattern(72, eHAppRate[7], 95, 3);
eHeriPattern(2800, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 3500) && (dis < 3750) :
if (appSpE == 13) {
enemy(2, "right", 3);
enemy(2, "right", 4);
enemy(2, "right", 3);
enemy(2, "right", 4);
enemy(2, "right", 3);
enemy(2, "left", 3);
enemy(2, "left", 4);
traps(4, 0, 2);
traps(5, 0, 2);
appSpE++;
}
eHumanPattern(70, eHAppRate[8], 95, 3);
eHeriPattern(2750, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 3750) && (dis < 4000) :
if (appSpE == 14) {
enemy(3, "right", 2);
enemy(3, "right", 3);
enemy(3, "right", 2);
enemy(3, "right", 3);
enemy(3, "right", 2);
enemy(3, "right", 3);
enemy(3, "right", 2);
traps(4, 0, 2);
traps(5, 0, 2);
appSpE++;
}
eHumanPattern(70, eHAppRate[8], 95, 3);
eHeriPattern(2700, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 4000) && (dis < 4250) :
if (appSpE == 15) {
enemy(4, "right", 4);
enemy(4, "right", 5);
enemy(4, "right", 4);
enemy(4, "right", 5);
enemy(4, "right", 4);
enemy(4, "right", 5);
enemy(4, "right", 4);
traps(4, 0, 3);
traps(5, 2, 2);
appSpE++;
}
eHumanPattern(70, eHAppRate[8], 95, 3);
eHeriPattern(2650, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 4250) && (dis < 4500) :
if (appSpE == 16) {
enemy(5, "right", 5);
enemy(5, "right", 6);
enemy(5, "right", 5);
enemy(5, "left", 6);
appSpE++;
}
eHumanPattern(70, eHAppRate[9], 95, 3);
eHeriPattern(2600, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 4500) && (dis < 4750) :
if (appSpE == 17) {
enemy(0, "left", 12);
enemy(1, "left", 12);
enemy(2, "left", 12);
enemy(3, "left", 12);
traps(5, 2, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[9], 95, 3);
eHeriPattern(2550, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 4750) && (dis < 5000) :
if (appSpE == 18) {
enemy(0, "left", 12);
enemy(1, "left", 12);
enemy(2, "left", 12);
enemy(3, "left", 12);
traps(5, 2, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[9], 95, 3);
eHeriPattern(2500, eHeriAppRate[1], 50, 17);
eTrapPattern(250, eTrapAppRate[0]);
break;
case (dis >= 5000) && (dis < 5250) :
if (appSpE == 19) {
niwaheri(2, "right", 20);
appSpE++;
}
eHumanPattern(68, eHAppRate[10], 95, 4);
eBigHumanPattern(5000, eBHAppRate[0], 90, 5);
eHeriPattern(2450, eHeriAppRate[3], 50, 17);
eTrapPattern(247, eTrapAppRate[1]);
break;
case (dis >= 5250) && (dis < 5500) :
if (appSpE == 20) {
enemy(4, "left", 12);
enemy(5, "left", 12);
traps(1, 0, 2);
traps(4, 0, 3);
appSpE++;
}
eHumanPattern(68, eHAppRate[10], 95, 4);
eBigHumanPattern(4500, eBHAppRate[0], 90, 5);
eHeriPattern(2400, eHeriAppRate[3], 50, 17);
eTrapPattern(244, eTrapAppRate[1]);
break;
case (dis >= 5500) && (dis < 5750) :
if (appSpE == 21) {
redEnemyFallen(7, 2, 15);
redEnemyFallen(7, 3, 15);
redEnemyFallen(7, 4, 15);
appSpE++;
}
eHumanPattern(68, eHAppRate[10], 95, 4);
eBigHumanPattern(4000, eBHAppRate[0], 90, 5);
eHeriPattern(2350, eHeriAppRate[3], 50, 17);
eTrapPattern(241, eTrapAppRate[1]);
break;
case (dis >= 5750) && (dis < 6000) :
if (appSpE == 22) {
redEnemyFallen(8, 2, 15);
redEnemyFallen(8, 3, 15);
redEnemyFallen(8, 4, 15);
appSpE++;
}
eHumanPattern(68, eHAppRate[11], 95, 4);
eBigHumanPattern(3500, eBHAppRate[0], 90, 5);
eHeriPattern(2300, eHeriAppRate[3], 50, 17);
eTrapPattern(238, eTrapAppRate[1]);
break;
case (dis >= 6000) && (dis < 6250) :
if (appSpE == 23) {
redEnemyFallen(9, 2, 15);
redEnemyFallen(9, 3, 15);
redEnemyFallen(9, 4, 15);
appSpE++;
}
eHumanPattern(68, eHAppRate[11], 95, 4);
eBigHumanPattern(3000, eBHAppRate[0], 90, 5);
eHeriPattern(2250, eHeriAppRate[3], 50, 17);
eTrapPattern(235, eTrapAppRate[1]);
break;
case (dis >= 6250) && (dis < 6500) :
if (appSpE == 24) {
redEnemyFallen(7, 1, 16);
redEnemyFallen(8, 3, 16);
redEnemyFallen(9, 4, 16);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(68, eHAppRate[11], 95, 4);
eBigHumanPattern(2800, eBHAppRate[0], 90, 5);
eHeriPattern(2200, eHeriAppRate[3], 50, 17);
eTrapPattern(232, eTrapAppRate[1]);
break;
case (dis >= 6500) && (dis < 6750) :
if (appSpE == 25) {
niwaheri(2, "left", 20);
redEnemyFallen(7, 1, 16);
redEnemyFallen(8, 3, 16);
redEnemyFallen(9, 4, 16);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(68, eHAppRate[12], 95, 4);
eRedHumanPattern(2000, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(2700, eBHAppRate[0], 90, 5);
eHeriPattern(2150, eHeriAppRate[3], 50, 17);
eTrapPattern(229, eTrapAppRate[1]);
break;
case (dis >= 6750) && (dis < 7000) :
if (appSpE == 26) {
niwaheri(2, "left", 20);
niwaheri(1, "right", 17);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(68, eHAppRate[12], 95, 4);
eRedHumanPattern(1950, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(2600, eBHAppRate[0], 90, 5);
eHeriPattern(2100, eHeriAppRate[3], 50, 17);
eTrapPattern(226, eTrapAppRate[1]);
break;
case (dis >= 7000) && (dis < 7250) :
if (appSpE == 27) {
niwaheri(1, "right", 6);
niwaheri(2, "right", 20);
niwaheri(1, "left", 6);
trap(1, 0);
trap(3, 0);
appSpE++;
}
eHumanPattern(70, eHAppRate[12], 90, 4);
eRedHumanPattern(1900, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(800, eBHAppRate[0], 90, 5);
eHeriPattern(2050, eHeriAppRate[3], 50, 17);
eTrapPattern(226, eTrapAppRate[1]);
break;
case (dis >= 7250) && (dis < 7500) :
if (appSpE == 28) {
niwaheri(1, "right", 6);
niwaheri(2, "right", 20);
niwaheri(1, "left", 6);
trap(1, 0);
trap(3, 0);
appSpE++;
}
eHumanPattern(71, eHAppRate[13], 90, 4);
eRedHumanPattern(1850, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(500, eBHAppRate[0], 90, 5);
eHeriPattern(2000, eHeriAppRate[3], 50, 17);
eTrapPattern(226, eTrapAppRate[1]);
break;
case (dis >= 7500) && (dis < 7750) :
if (appSpE == 29) {
niwaheri(0, "right", 17);
niwaheri(0, "right", 15);
niwaheri(0, "right", 13);
enemy(5, "left", 10);
traps(0, 0, 3);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[13], 90, 4);
eRedHumanPattern(1800, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(450, eBHAppRate[0], 90, 5);
eHeriPattern(1950, eHeriAppRate[3], 50, 17);
eTrapPattern(220, eTrapAppRate[2]);
break;
case (dis >= 7750) && (dis < 8000) :
if (appSpE == 30) {
niwaheri(0, "left", 17);
niwaheri(0, "left", 15);
niwaheri(0, "left", 13);
enemy(9, "right", 15);
enemy(9, "right", 15);
traps(2, 0, 3);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[13], 90, 4);
eRedHumanPattern(1750, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(450, eBHAppRate[0], 90, 5);
eHeriPattern(1900, eHeriAppRate[3], 50, 17);
eTrapPattern(214, eTrapAppRate[2]);
break;
case (dis >= 8000) && (dis < 8250) :
if (appSpE == 31) {
enemy(5, "left", 13);
enemy(5, "left", 7);
enemy(9, "right", 16);
traps(1, 0, 4);
traps(2, 2, 4);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(68, eHAppRate[13], 90, 4);
eRedHumanPattern(1700, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(450, eBHAppRate[0], 90, 5);
eHeriPattern(1850, eHeriAppRate[4], 50, 17);
eTrapPattern(214, eTrapAppRate[2]);
break;
case (dis >= 8250) && (dis < 8500) :
if (appSpE == 32) {
enemy(5, "left", 13);
enemy(5, "left", 10);
enemy(5, "left", 7);
niwaheri(0, "right", 13);
traps(1, 0, 4);
traps(2, 2, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[13], 90, 5);
eRedHumanPattern(1650, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(420, eBHAppRate[0], 90, 5);
eHeriPattern(1800, eHeriAppRate[4], 50, 17);
eTrapPattern(210, eTrapAppRate[2]);
break;
case (dis >= 8500) && (dis < 8750) :
if (appSpE == 33) {
redEnemyFallen(7, 0, 15);
redEnemyFallen(7, 1, 15);
redEnemyFallen(7, 2, 15);
redEnemyFallen(7, 3, 15);
redEnemyFallen(7, 4, 15);
enemy(7, "right", 15);
enemy(7, "left", 15);
traps(3, 0, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[13], 90, 5);
eRedHumanPattern(1600, eRHAppRate[0], 65, -1, 15);
eBigHumanPattern(420, eBHAppRate[1], 90, 5);
eHeriPattern(1750, eHeriAppRate[4], 50, 17);
eTrapPattern(210, eTrapAppRate[2]);
break;
case (dis >= 8750) && (dis < 9000) :
if (appSpE == 34) {
redEnemyFallen(10, 2, 15);
redEnemyFallen(10, 4, 15);
enemy(4, "left", 8);
enemy(4, "right", 8);
traps(4, 0, 4);
appSpE++;
}
eHumanPattern(70, eHAppRate[13], 90, 5);
eRedHumanPattern(1550, eRHAppRate[1], 65, -1, 15);
eBigHumanPattern(420, eBHAppRate[1], 90, 5);
eHeriPattern(1700, eHeriAppRate[4], 50, 17);
eTrapPattern(200, eTrapAppRate[2]);
break;
case (dis >= 9000) && (dis < 9250) :
if (appSpE == 35) {
niwaheri(2, "left", 20);
niwaheri(2, "right", 20);
traps(3, 0, 3);
appSpE++;
}
eHumanPattern(55, eHAppRate[14], 70, 5);
eRedHumanPattern(1500, eRHAppRate[1], 65, -1, 15);
eBigHumanPattern(400, eBHAppRate[1], 90, 6);
eHeriPattern(1650, eHeriAppRate[4], 50, 17);
eTrapPattern(200, eTrapAppRate[2]);
break;
case (dis >= 9250) && (dis < 9500) :
if (appSpE == 36) {
redEnemyFallen(9, 0, 16);
redEnemyFallen(9, 1, 16);
redEnemyFallen(9, 2, 16);
redEnemyFallen(9, 3, 16);
redEnemyFallen(9, 4, 16);
enemy(9, "right", 16);
enemy(9, "left", 16);
traps(1, 0, 3);
traps(3, 0, 3);
appSpE++;
}
eHumanPattern(55, eHAppRate[14], 70, 5);
eRedHumanPattern(1450, eRHAppRate[1], 65, -1, 15);
eBigHumanPattern(400, eBHAppRate[1], 90, 6);
eHeriPattern(1600, eHeriAppRate[4], 50, 17);
eTrapPattern(200, eTrapAppRate[2]);
break;
case (dis >= 9500) && (dis < 9750) :
if (appSpE == 37) {
redEnemyFallen(7, 3, 20);
enemy(7, "right", 20);
enemy(7, "right", 20);
redEnemyFallen(8, 1, 20);
enemy(8, "left", 20);
enemy(8, "left", 20);
traps(1, 0, 3);
traps(3, 1, 3);
appSpE++;
}
eHumanPattern(55, eHAppRate[14], 70, 5);
eRedHumanPattern(1400, eRHAppRate[1], 65, -1, 15);
eBigHumanPattern(400, eBHAppRate[1], 90, 6);
eHeriPattern(1550, eHeriAppRate[4], 50, 17);
eTrapPattern(199, eTrapAppRate[3]);
break;
case (dis >= 9750) && (dis < 10000) :
if (appSpE == 38) {
niwaheri(2, "left", 20);
niwaheri(2, "right", 20);
traps(1, 0, 5);
appSpE++;
}
eHumanPattern(55, eHAppRate[14], 70, 5);
eRedHumanPattern(1350, eRHAppRate[1], 65, -1, 15);
eBigHumanPattern(400, eBHAppRate[1], 90, 6);
eHeriPattern(1500, eHeriAppRate[4], 50, 17);
eTrapPattern(198, eTrapAppRate[3]);
break;
case (dis >= 10000) && (dis < 10250) :
if (appSpE == 39) {
enemy(11, "right", 15);
traps(1, 0, 3);
traps(4, 0, 3);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(50, eHAppRate[15], 65, 6);
eRedHumanPattern(1300, eRHAppRate[2], 65, Math.floor(Math.random() * 6) - 1, 15);
eBigHumanPattern(390, eBHAppRate[1], 90, 7);
eHeriPattern(1450, eHeriAppRate[5], 50, 17);
eTrapPattern(195, eTrapAppRate[4]);
break;
case (dis >= 10250) && (dis < 10500) :
if (appSpE == 40) {
redEnemyFallen(7, 0, 20);
redEnemyFallen(7, 1, 20);
redEnemyFallen(7, 2, 20);
redEnemyFallen(7, 3, 20);
redEnemyFallen(7, 4, 20);
enemy(7, "right", 20);
enemy(7, "left", 20);
traps(1, 0, 3);
traps(4, 0, 3);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(40, eHAppRate[15], 55, 6);
eRedHumanPattern(1250, eRHAppRate[2], 65, Math.floor(Math.random() * 6) - 1, 15);
eBigHumanPattern(380, eBHAppRate[1], 90, 7);
eHeriPattern(1400, eHeriAppRate[5], 50, 17);
eTrapPattern(190, eTrapAppRate[4]);
break;
case (dis >= 10500) && (dis < 10750) :
if (appSpE == 41) {
redEnemyFallen(10, 0, 20);
redEnemyFallen(10, 1, 20);
redEnemyFallen(10, 2, 20);
redEnemyFallen(10, 3, 20);
redEnemyFallen(10, 4, 20);
enemy(10, "right", 20);
enemy(10, "left", 20);
traps(1, 0, 3);
traps(4, 0, 3);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(50, eHAppRate[16], 65, 6);
eRedHumanPattern(1200, eRHAppRate[2], 65, Math.floor(Math.random() * 6) - 1, 15);
eBigHumanPattern(380, eBHAppRate[2], 90, 7);
eHeriPattern(1350, eHeriAppRate[6], 50, 17);
eTrapPattern(190, eTrapAppRate[4]);
break;
case (dis >= 10750) && (dis < 11000) :
if (appSpE == 42) {
redEnemyFallen(8, 0, 20);
redEnemyFallen(8, 1, 20);
redEnemyFallen(8, 2, 20);
redEnemyFallen(8, 3, 20);
redEnemyFallen(8, 4, 20);
enemy(8, "right", 20);
enemy(8, "left", 20);
traps(1, 0, 3);
traps(4, 0, 3);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(50, eHAppRate[16], 65, 6);
eRedHumanPattern(1150, eRHAppRate[3], 65, Math.floor(Math.random() * 6) - 1, 15);
eBigHumanPattern(370, eBHAppRate[2], 90, 7);
eHeriPattern(1300, eHeriAppRate[6], 50, 17);
eTrapPattern(185, eTrapAppRate[5]);
break;
case (dis >= 11000) && (dis < 11250) :
if (appSpE == 43) {
redEnemyFallen(11, 0, 20);
redEnemyFallen(11, 4, 20);
traps(1, 0, 3);
traps(4, 0, 3);
traps(5, 0, 3);
appSpE++;
}
eHumanPattern(50, eHAppRate[16], 65, 7);
eRedHumanPattern(1100, eRHAppRate[3], 65, Math.floor(Math.random() * 6) - 1, 15);
eBigHumanPattern(360, eBHAppRate[2], 90, 7);
eHeriPattern(1250, eHeriAppRate[6], 50, 17);
eTrapPattern(185, eTrapAppRate[5]);
break;
case (dis >= 11250) && (dis < 11500) :
if (appSpE == 44) {
traps(5, 0, 10);
appSpE++;
}
eHumanPattern(150, eHAppRate[17], 60, 7);
eRedHumanPattern(1050, eRHAppRate[3], 65, Math.floor(Math.random() * 6) - 1, 17);
eBigHumanPattern(260, eBHAppRate[2], 60, 7);
eHeriPattern(1200, eHeriAppRate[6], 50, 17);
eTrapPattern(180, eTrapAppRate[6]);
break;
case (dis >= 11500) && (dis < 11750) :
if (appSpE == 45) {
enemy(9, "left", 20);
enemy(9, "left", 20);
enemy(9, "left", 20);
enemy(9, "left", 20);
traps(5, 1, 10);
appSpE++;
}
eHumanPattern(170, eHAppRate[17], 60, 7);
eRedHumanPattern(1050, eRHAppRate[3], 65, Math.floor(Math.random() * 6) - 1, 17);
eBigHumanPattern(240, eBHAppRate[2], 60, 7);
eHeriPattern(1150, eHeriAppRate[6], 50, 17);
eTrapPattern(180, eTrapAppRate[6]);
break;
case (dis >= 11750) && (dis < 12000) :
if (appSpE == 46) {
enemy(9, "left", 20);
enemy(9, "left", 20);
traps(5, 1, 10);
traps(5, 2, 10);
appSpE++;
}
eHumanPattern(190, eHAppRate[17], 60, 8);
eRedHumanPattern(1000, eRHAppRate[4], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(220, eBHAppRate[2], 60, 8);
eHeriPattern(1100, eHeriAppRate[6], 50, 18);
eTrapPattern(180, eTrapAppRate[7]);
break;
case (dis >= 12000) && (dis < 12250) :
if (appSpE == 47) {
enemy(11, "left", 15);
traps(5, 1, 10);
traps(5, 2, 10);
traps(4, 0, 5);
appSpE++;
}
eHumanPattern(205, eHAppRate[17], 60, 8);
eRedHumanPattern(1000, eRHAppRate[4], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(205, eBHAppRate[2], 60, 8);
eHeriPattern(1050, eHeriAppRate[6], 50, 18);
eTrapPattern(180, eTrapAppRate[7]);
break;
case (dis >= 12250) && (dis < 12500) :
if (appSpE == 48) {
redEnemyFallen(10, 0, 20);
redEnemyFallen(10, 1, 20);
redEnemyFallen(10, 2, 20);
redEnemyFallen(10, 3, 20);
redEnemyFallen(10, 4, 20);
enemy(10, "right", 20);
enemy(10, "left", 20);
traps(5, 1, 5);
traps(5, 2, 5);
appSpE++;
}
eHumanPattern(205, eHAppRate[17], 60, 8);
eRedHumanPattern(950, eRHAppRate[5], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(200, eBHAppRate[2], 60, 8);
eHeriPattern(1050, eHeriAppRate[6], 50, 18);
eTrapPattern(180, eTrapAppRate[7]);
break;
case (dis >= 12500) && (dis < 12750) :
if (appSpE == 49) {
redEnemyFallen(10, 0, 20);
redEnemyFallen(10, 1, 20);
redEnemyFallen(10, 2, 20);
redEnemyFallen(10, 3, 20);
redEnemyFallen(10, 4, 20);
enemy(10, "right", 20);
enemy(10, "left", 20);
traps(5, 1, 5);
traps(5, 2, 5);
appSpE++;
}
eHumanPattern(205, eHAppRate[17], 60, 8);
eRedHumanPattern(950, eRHAppRate[5], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(200, eBHAppRate[2], 60, 8);
eHeriPattern(1050, eHeriAppRate[6], 50, 18);
eTrapPattern(180, eTrapAppRate[7]);
break;
case (dis >= 12750) && (dis < 13000) :
if (appSpE == 50) {
redEnemyFallen(10, 0, 20);
redEnemyFallen(10, 1, 20);
redEnemyFallen(10, 2, 20);
redEnemyFallen(10, 3, 20);
redEnemyFallen(10, 4, 20);
enemy(10, "right", 20);
enemy(10, "left", 20);
traps(5, 1, 5);
traps(5, 2, 5);
appSpE++;
}
eHumanPattern(205, eHAppRate[17], 60, 8);
eRedHumanPattern(950, eRHAppRate[5], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(200, eBHAppRate[2], 60, 8);
eHeriPattern(1050, eHeriAppRate[6], 50, 18);
eTrapPattern(180, eTrapAppRate[7]);
break;
case dis >= 13000 :
if (appSpE == 51) {
redEnemyFallen(11, 0, 20);
redEnemyFallen(11, 1, 20);
redEnemyFallen(11, 2, 20);
redEnemyFallen(11, 3, 20);
redEnemyFallen(11, 4, 20);
enemy(11, "right", 20);
enemy(11, "left", 20);
traps(5, 1, 5);
traps(5, 2, 5);
appSpE++;
}
eRedHumanPattern(500, eRHAppRate[7], 65, Math.floor(Math.random() * 6) - 1, 18);
eBigHumanPattern(60, eBHAppRate[3], 60, 8);
eHeriPattern(1000, eHeriAppRate[6], 50, 18);
eTrapPattern(150, eTrapAppRate[7]);
break;
default :
trace("ERROR in appEnemy: dis=" + dis);
}
if (opCnt <= 300) {
if (opCnt == 300) {
OPMovie2();
}
opCnt++;
}
} else if (_global.appEdebugMode) {
if (enemySwitch) {
if (!Math.floor(Math.random() * 80)) {
speed = 3;
if (!Math.floor(Math.random() * 5)) {
position = "left";
} else {
position = "right";
}
switch (Math.floor(Math.random() * 4)) {
case 0 :
eType = 0;
break;
case 1 :
eType = 1;
break;
case 2 :
eType = 2;
break;
case 3 :
speed = 2;
eType = 3;
}
enemy(eType, position, speed);
_global.eNum++;
} else if (!Math.floor(Math.random() * 1800)) {
speed = 7;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
niwaheri(0, position, speed);
_global.eNum++;
}
}
if (Key.isDown(75) && (!Key_K)) {
if (enemySwitch) {
enemySwitch = false;
} else {
enemySwitch = true;
}
}
if (Key.isDown(66) && (!Key_B)) {
id = Math.floor(Math.random() * 4);
if (id >= 3) {
moveType = Math.floor(Math.random() * 3);
} else {
moveType = 0;
}
num = Math.floor(Math.random() * 8);
traps(id, moveType, num);
_global.eNum = _global.eNum + num;
}
if (Key.isDown(70) && (!Key_F)) {
trap(3, Math.floor(Math.random() * 3));
_global.eNum++;
}
if (Key.isDown(71) && (!Key_G)) {
trap(2, Math.floor(Math.random() * 3));
_global.eNum++;
}
if (Key.isDown(72) && (!Key_H)) {
speed = 20;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
niwaheri(2, position, speed);
_global.eNum++;
}
if (Key.isDown(73) && (!Key_I)) {
speed = 3;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(5, position, speed);
_global.eNum++;
}
if (Key.isDown(74) && (!Key_J)) {
speed = 3;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(4, position, speed);
_global.eNum++;
}
if (Key.isDown(76) && (!Key_L)) {
speed = 7;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
niwaheri(0, position, speed);
_global.eNum++;
}
if (Key.isDown(77) && (!Key_M)) {
speed = 3;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(0, position, speed);
_global.eNum++;
}
if (Key.isDown(78) && (!Key_N)) {
speed = 3;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(1, position, speed);
_global.eNum++;
}
if (Key.isDown(79) && (!Key_O)) {
speed = 3;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(2, position, speed);
_global.eNum++;
}
if (Key.isDown(80) && (!Key_P)) {
speed = 2;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(3, position, speed);
_global.eNum++;
}
if (Key.isDown(84) && (!Key_T)) {
trap(0, 0);
_global.eNum++;
}
if (Key.isDown(85) && (!Key_U)) {
speed = 17;
position = "left";
niwaheri(1, position, speed);
_global.eNum++;
}
if (Key.isDown(86) && (!Key_V)) {
speed = 13;
redEnemyFallen(7 + Math.floor(Math.random() * 5), Math.floor(Math.random() * 5), speed);
_global.eNum++;
}
if (Key.isDown(89) && (!Key_Y)) {
trap(1, 0);
_global.eNum++;
}
if (Key.isDown(48) && (!Key_0)) {
_global.RP = true;
_root.attachMovie("refuelingPoint", "refuelingPoint", 10000);
_root.refuelingPoint._y = -10;
}
if (Key.isDown(53) && (!Key_5)) {
trap(4, 0);
_global.eNum++;
}
if (Key.isDown(54) && (!Key_6)) {
speed = 13;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(9, position, speed);
_global.eNum++;
}
if (Key.isDown(55) && (!Key_7)) {
speed = 13;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(8, position, speed);
_global.eNum++;
}
if (Key.isDown(56) && (!Key_8)) {
speed = 13;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(7, position, speed);
_global.eNum++;
}
if (Key.isDown(57) && (!Key_9)) {
OPMovie2();
}
if (Key.isDown(189) && (!Key_Minus)) {
speed = 13;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(10, position, speed);
_global.eNum++;
}
if (Key.isDown(192) && (!Key_At)) {
trap(5, Math.floor(Math.random() * 3));
_global.eNum++;
}
if (Key.isDown(222) && (!Key_Power)) {
speed = 13;
if (Math.floor(Math.random() * 2)) {
position = "right";
} else {
position = "left";
}
enemy(11, position, speed);
_global.eNum++;
}
Key_0 = Key.isDown(48);
Key_5 = Key.isDown(53);
Key_6 = Key.isDown(54);
Key_7 = Key.isDown(55);
Key_8 = Key.isDown(56);
Key_9 = Key.isDown(57);
Key_B = Key.isDown(66);
Key_F = Key.isDown(70);
Key_G = Key.isDown(71);
Key_H = Key.isDown(72);
Key_I = Key.isDown(73);
Key_J = Key.isDown(74);
Key_K = Key.isDown(75);
Key_L = Key.isDown(76);
Key_M = Key.isDown(77);
Key_N = Key.isDown(78);
Key_O = Key.isDown(79);
Key_P = Key.isDown(80);
Key_T = Key.isDown(84);
Key_U = Key.isDown(85);
Key_V = Key.isDown(86);
Key_Y = Key.isDown(89);
Key_Minus = Key.isDown(189);
Key_At = Key.isDown(192);
Key_Power = Key.isDown(222);
}
}
}
};
Symbol 586 MovieClip [player] Frame 2
stop();
Symbol 586 MovieClip [player] Frame 12
stop();
Symbol 586 MovieClip [player] Frame 22
stop();
Symbol 586 MovieClip [player] Frame 32
stop();
Symbol 586 MovieClip [player] Frame 42
stop();
Symbol 586 MovieClip [player] Frame 52
stop();
Symbol 586 MovieClip [player] Frame 62
function chkBonusCond() {
if (!_global.unarmedModeAv) {
if (isNormalMode()) {
if (handgunLV >= 2) {
_global.unarmedRelease = true;
}
}
}
if (!_global.samuraiModeAv) {
if (isNormalMode()) {
if (healLV >= 2) {
_global.samuraiRelease = true;
}
}
}
if (!_global.bombermanModeAv) {
if (isNormalMode()) {
if (fragLV >= 2) {
_global.bombermanRelease = true;
}
}
}
if (!_global.enhancedModeAv) {
if (isNormalMode()) {
if (_global.dist >= 10000) {
_global.enhancedRelease = true;
}
}
}
if (!_global.beamSaberAv) {
if ((_global.samuraiMode && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
if (_global.dist >= 1000) {
_global.beamSaberRelease = true;
}
}
}
if (!_global.grenadeMachinegunAv) {
if (isNormalMode()) {
if ((machinegunLV >= 9) && (_global.dist >= 6000)) {
_global.grenadeMachinegunRelease = true;
}
}
}
if (!_global.busterRifleAv) {
if (isNormalMode()) {
if ((sniperLV >= 9) && (_global.dist >= 6000)) {
_global.busterRifleRelease = true;
}
}
}
if (!_global.okusenmanAv) {
if (_global.numberOfPlaying >= 2) {
_global.okusenmanRelease = true;
}
}
}
function isNormalMode() {
var _local2 = false;
if (!_global.tutorial) {
if (((((((!_global.unarmedMode) && (!_global.samuraiMode)) && (!_global.bombermanMode)) && (!_global.enhancedMode)) && (!_global.beamSaber)) && (!_global.grenadeMachinegun)) && (!_global.busterRifle)) {
_local2 = true;
}
}
return(_local2);
}
stop();
_root.gun.removeMovieClip();
_root.player.arm.removeMovieClip();
flg = false;
this.onEnterFrame = function () {
if ((this.pDeath._currentframe == 46) && (!flg)) {
trace("death\u5F8C\u51E6\u7406");
chkBonusCond();
_global.scoreValid = 1;
_root.lvArr[0] = healLV;
_root.lvArr[1] = handgunLV;
_root.lvArr[2] = machinegunLV;
_root.lvArr[3] = shotgunLV;
_root.lvArr[4] = sniperLV;
_root.lvArr[5] = fragLV;
Mouse.show();
_root.frameOnWeapon.removeMovieClip();
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "result";
flg = true;
}
};
Symbol 588 MovieClip [cloud3] Frame 1
this.onEnterFrame = function () {
this._y = this._y + speed;
if (this._y > 500) {
this.removeMovieClip();
}
};
Symbol 590 MovieClip [cloud2] Frame 1
this.onEnterFrame = function () {
this._y = this._y + speed;
if (this._y > 500) {
this.removeMovieClip();
}
};
Symbol 592 MovieClip [cloud1] Frame 1
this.onEnterFrame = function () {
this._y = this._y + speed;
if (this._y > 500) {
this.removeMovieClip();
}
};
Instance of Symbol 594 MovieClip "a1" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) - _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 0;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "a2" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) - _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 90;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "a3" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) - _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 180;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "a4" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) - _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 270;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "b1" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) + _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 0;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "b2" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) + _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 90;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "b3" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) + _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 180;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 594 MovieClip "b4" in Symbol 595 MovieClip Frame 1
onClipEvent (load) {
function kaiten() {
theKakudo = kakudo + _parent.kakudoX;
theRadian = (theKakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = ((Math.sin(theRadian) * _parent.R) * _parent.henpei) + _parent.Center;
kakudo = kakudo + _parent.speed;
}
kakudo = 270;
}
onClipEvent (enterFrame) {
kaiten();
}
Instance of Symbol 595 MovieClip in Symbol 596 MovieClip Frame 1
onClipEvent (load) {
function move() {
kakudoX = kakudoX + ((kakudoXM - kakudoX) / 10);
kakudoY = kakudoY + ((kakudoYM - kakudoY) / 10);
Center = (Math.sin((kakudoY * Math.PI) / 180) * Ippen) / 2;
Radian1 = ((kakudoY + 45) * Math.PI) / 180;
Radian2 = ((kakudoY - 45) * Math.PI) / 180;
henpei = ((Math.sin(Radian1) - Math.sin(Radian2)) * R) / Ippen;
line();
}
function line() {
with (this) {
clear();
lineStyle();
if (henpei >= 0) {
paintUe();
} else {
paintSita();
}
if (Center >= 0) {
minKakudo = 45;
maxKakudo = 135;
} else {
minKakudo = 225;
maxKakudo = 315;
}
if (((a1.theKakudo % 360) >= minKakudo) && ((a1.theKakudo % 360) < maxKakudo)) {
paintYoko1();
paintYoko4();
}
if (((a2.theKakudo % 360) >= minKakudo) && ((a2.theKakudo % 360) < maxKakudo)) {
paintYoko2();
paintYoko1();
}
if (((a3.theKakudo % 360) >= minKakudo) && ((a3.theKakudo % 360) < maxKakudo)) {
paintYoko3();
paintYoko2();
}
if (((a4.theKakudo % 360) >= minKakudo) && ((a4.theKakudo % 360) < maxKakudo)) {
paintYoko4();
paintYoko3();
}
}
}
function paintUe() {
beginFill(colorUe);
moveTo(a1._x, a1._y);
lineTo(a2._x, a2._y);
lineTo(a3._x, a3._y);
lineTo(a4._x, a4._y);
lineTo(a1._x, a1._y);
endFill();
}
function paintSita() {
beginFill(colorSita);
moveTo(b1._x, b1._y);
lineTo(b2._x, b2._y);
lineTo(b3._x, b3._y);
lineTo(b4._x, b4._y);
lineTo(b1._x, b1._y);
endFill();
}
function paintYoko1() {
beginFill(colorYoko1);
moveTo(a1._x, a1._y);
lineTo(b1._x, b1._y);
lineTo(b2._x, b2._y);
lineTo(a2._x, a2._y);
lineTo(a1._x, a1._y);
endFill();
}
function paintYoko2() {
beginFill(colorYoko2);
moveTo(a2._x, a2._y);
lineTo(b2._x, b2._y);
lineTo(b3._x, b3._y);
lineTo(a3._x, a3._y);
lineTo(a2._x, a2._y);
endFill();
}
function paintYoko3() {
beginFill(colorYoko3);
moveTo(a3._x, a3._y);
lineTo(b3._x, b3._y);
lineTo(b4._x, b4._y);
lineTo(a4._x, a4._y);
lineTo(a3._x, a3._y);
endFill();
}
function paintYoko4() {
beginFill(colorYoko4);
moveTo(a4._x, a4._y);
lineTo(b4._x, b4._y);
lineTo(b1._x, b1._y);
lineTo(a1._x, a1._y);
lineTo(a4._x, a4._y);
endFill();
}
R = 50;
speed = 5;
colorUe = 8947848 /* 0x888888 */;
colorSita = 8947848 /* 0x888888 */;
colorYoko1 = 11184810 /* 0xAAAAAA */;
colorYoko2 = 13421772 /* 0xCCCCCC */;
colorYoko3 = 11184810 /* 0xAAAAAA */;
colorYoko4 = 13421772 /* 0xCCCCCC */;
kakudoX = (kakudoXM = 0);
kakudoY = (kakudoYM = 60);
Ippen = Math.sqrt((2 * R) * R);
}
onClipEvent (enterFrame) {
move();
}
Symbol 597 MovieClip Frame 1
stop();
Symbol 597 MovieClip Frame 15
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 279
stop();
Symbol 615 MovieClip Frame 1
function MovieStart() {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "pretitle";
}
_root.stop();
totalSize = _root.getBytesTotal();
DTotalSize = totalSize;
loadSize0 = root.getBytesLoaded;
DLoaded = loadSize0;
trace(("\u7DCF\u5BB9\u91CF" + totalSize) + "byte");
Symbol 615 MovieClip Frame 2
loadedSize = _root.getBytesLoaded();
DLoaded = loadedSize;
if (loadedSize >= totalSize) {
this.bar.sizeChange(100);
this.gotoAndStop(4);
} else {
parcent = (loadedSize / totalSize) * 100;
this.bar.sizeChange(parcent);
}
Symbol 615 MovieClip Frame 3
this.gotoAndPlay(_currentframe - 1);
Symbol 615 MovieClip Frame 4
this.picoHam.play();
var flg = false;
this.onEnterFrame = function () {
if ((this.picoHam._currentframe >= 39) && (!flg)) {
this.MovieStart();
flg = true;
}
};
this.stop();
Symbol 666 Button
on (release) {
stopAllSounds();
if (_global.bgm) {
if (_global.samuraiMode) {
} else if (_global.okusenman) {
_root.bgm_play4.start(0, 99);
} else {
_root.bgm_play1.start(0, 99);
}
}
_root.attachMovie("gra_fade", "gra_fade", 9999);
_global.tutorial = false;
_root.gra_fade.goal = "preplay";
}
Symbol 670 Button
on (release) {
_root.bgm_title.stop("bgm_title");
_root.attachMovie("gra_fade", "gra_fade", 9999);
_global.tutorial = true;
_root.gra_fade.goal = "play";
}
Symbol 674 Button
on (release) {
_global.scoreValid = 2;
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "ranking1";
}
Symbol 678 Button
on (release) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "option";
}
Symbol 684 MovieClip Frame 1
stop();
Symbol 684 MovieClip Frame 11
stop();
Symbol 684 MovieClip Frame 21
stop();
Symbol 686 Button
on (press) {
se_bombOP.stop("se_bombOP");
se_heri.stop("se_heri");
_root.gotoAndStop("play");
}
Symbol 707 MovieClip Frame 2
stop();
this._visible = false;
this.swapDepths(52);
this.removeMovieClip();
Symbol 712 MovieClip Frame 2
se_heri = new Sound();
se_heri.attachSound("se_heri");
se_heri.start(0, 2);
Symbol 712 MovieClip Frame 23
se_bombOP = new Sound();
se_bombOP.attachSound("se_bombOP");
se_bombOP.start();
Instance of Symbol 684 MovieClip in Symbol 712 MovieClip Frame 49
onClipEvent (load) {
this.gotoAndStop("after");
}
Instance of Symbol 684 MovieClip in Symbol 712 MovieClip Frame 69
onClipEvent (load) {
this.gotoAndStop("after2");
}
Instance of Symbol 707 MovieClip in Symbol 712 MovieClip Frame 127
onClipEvent (load) {
this.stop();
}
Symbol 712 MovieClip Frame 140
_root.gotoAndStop("play");
Symbol 715 MovieClip Frame 1
this._visible = false;
Symbol 722 MovieClip Frame 1
if (_global.tutorial) {
this.gotoAndStop(25);
}
Symbol 722 MovieClip Frame 25
this.swapDepths(53);
this.removeMovieClip();
Symbol 755 MovieClip Frame 1
stop();
Symbol 755 MovieClip Frame 12
this.gotoAndStop(1);
Symbol 782 MovieClip Frame 1
stop();
Symbol 782 MovieClip Frame 10
this.gotoAndStop(1);
Symbol 790 MovieClip Frame 1
this._visible = false;
Symbol 810 MovieClip Frame 1
stop();
Symbol 810 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 815 MovieClip Frame 1
stop();
Symbol 815 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 824 MovieClip Frame 1
stop();
Symbol 824 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 828 MovieClip Frame 1
stop();
Symbol 828 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 831 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 837 MovieClip Frame 1
stop();
Symbol 837 MovieClip Frame 40
this.gotoAndPlay(2);
Symbol 845 MovieClip Frame 1
this._visible = false;
Symbol 847 MovieClip Frame 1
this._visible = false;
Symbol 853 MovieClip Frame 1
this._visible = false;
stop();
Symbol 853 MovieClip Frame 62
this.gotoAndPlay(2);
Symbol 860 MovieClip Frame 1
if (!_global.tutorial) {
this.swapDepths(52);
this.removeMovieClip();
}
function getTutorialWords(id) {
var _local1 = "";
switch (id) {
case 0 :
_local1 = "\u6700\u521D\u306B\u3001\u3053\u306E\u30B2\u30FC\u30E0\u306E\u76EE\u7684\u306B\u3064\u3044\u3066\u8AAC\u660E\u3057\u307E\u3059\u3002";
break;
case 1 :
_local1 = "\u3053\u306E\u30B2\u30FC\u30E0\u306E\u76EE\u7684\u306F\u3001\u767B\u5834\u3059\u308B\u6575\u3092\u5012\u3059\u3053\u3068\u3067\u9AD8\u5F97\u70B9\u3092\u7A3C\u3050\u3053\u3068\u3067\u3059\u3002";
tl_score._visible = true;
break;
case 2 :
tl_score._visible = false;
_local1 = "\u6575\u306F\u524D\u7DDA\u3078\u9032\u884C\u3059\u308B\u3068\u5171\u306B\u5F37\u304F\u306A\u308A\u307E\u3059\u304C\u3001\u305D\u306E\u5206\u5F97\u70B9\u3082\u4E0A\u304C\u308A\u307E\u3059\u306E\u3067\u3001\n\u3067\u304D\u308B\u3060\u3051\u9032\u884C\u8DDD\u96E2\u3092\u7A3C\u304E\u307E\u3057\u3087\u3046\u3002";
tl_distance._visible = true;
break;
case 3 :
tl_distance._visible = false;
_local1 = "\u3067\u306F\u3001\u64CD\u4F5C\u65B9\u6CD5\u306B\u3064\u3044\u3066\u8AAC\u660E\u3057\u3066\u3044\u304D\u307E\u3059\u3002";
break;
case 4 :
_local1 = "\u306A\u304A\u3001\u64CD\u4F5C\u30AD\u30FC\u306F\u3001\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u81EA\u7531\u306B\u5909\u66F4\u3067\u304D\u307E\u3059\u306E\u3067\u3001\n\u4F7F\u3044\u6613\u3044\u3088\u3046\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u3066\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002\n\u3053\u3053\u3067\u306F\u3001\u64CD\u4F5C\u30AD\u30FC\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u3082\u306E\u3068\u3057\u3066\u3054\u8AAC\u660E\u3057\u307E\u3059\u3002";
break;
case 5 :
_local1 = "A\u30AD\u30FC\u30FBD\u30AD\u30FC\u3067\u5DE6\u53F3\u306B\u79FB\u52D5\u3057\u307E\u3059\u3002\n\u9023\u7D9A\u30672\u56DE\u540C\u3058\u65B9\u5411\u306B\u30AD\u30FC\u3092\u5165\u308C\u308B\u3068\u30B7\u30E7\u30FC\u30C8\u30C0\u30C3\u30B7\u30E5\u3092\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002";
key_AD.play();
break;
case 6 :
key_AD.gotoAndStop(1);
_local1 = "W\u30AD\u30FC\u3067\u30B8\u30E3\u30F3\u30D7\u3057\u307E\u3059\u3002\u30C0\u30C3\u30B7\u30E5\u4E2D\u306B\u30B8\u30E3\u30F3\u30D7\u3059\u308B\u3053\u3068\u3067\u3001\u9AD8\u901F\u3067\u7D30\u304B\u306A\u79FB\u52D5\u304C\u3067\u304D\u307E\u3059\u3002\n\u91CD\u8981\u306A\u30C6\u30AF\u30CB\u30C3\u30AF\u3068\u306A\u308A\u307E\u3059\u306E\u3067\u3001\u662F\u975E\u8EAB\u306B\u3064\u3051\u3066\u304A\u304D\u307E\u3057\u3087\u3046\u3002";
key_W.play();
break;
case 7 :
key_W.gotoAndStop(1);
_local1 = "\u6B21\u306B\u5C04\u6483\u3067\u3059\u3002\u30DE\u30A6\u30B9\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u3092\u52D5\u304B\u3057\u30AF\u30EA\u30C3\u30AF\u3067\u5C04\u6483\u3057\u307E\u3059\u3002";
key_CLICK.play();
break;
case 8 :
key_CLICK.gotoAndStop(1);
_local1 = "\u4E0B\u90E8\u60C5\u5831\u30A8\u30EA\u30A2\u306B\u6B8B\u5F3E\u6570\u3068\u30EA\u30ED\u30FC\u30C9\u306B\u5FC5\u8981\u306A\u30B3\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002";
tl_panel._visible = true;
break;
case 9 :
tl_panel._visible = false;
_local1 = "\u6B66\u5668\u306E\u5909\u66F4\u306B\u306F\u3001\u76F4\u63A5\u4E0B\u306E\u30D1\u30CD\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u65B9\u6CD5\u3001\n1\u30AD\u30FC\u30FB2\u30AD\u30FC\u30FB3\u30AD\u30FC\u30FB4\u30AD\u30FC\u3067\u76F4\u63A5\u5909\u66F4\u3059\u308B\u65B9\u6CD5\u3001Q\u30AD\u30FC\u30FBE\u30AD\u30FC\u3067\u96A3\u63A5\u3059\u308B\u6B66\u5668\u3078\u5909\u66F4\u3059\u308B\u65B9\u6CD5\u306E3\u901A\u308A\u304C\u3042\u308A\u307E\u3059\u3002\u6700\u3082\u4F7F\u3044\u6613\u3044\u65B9\u6CD5\u3092\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002";
key_1234QE.play();
break;
case 10 :
key_1234QE.gotoAndStop(1);
_local1 = "\u5F3E\u304C\u306A\u304F\u306A\u3063\u305F\u3089\u30DB\u30A4\u30FC\u30EB\u30AF\u30EA\u30C3\u30AF\u3001\u307E\u305F\u306FR\u30AD\u30FC\u3067\u30EA\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\n\u3053\u306E\u969B\u306B\u6B66\u5668\u306B\u5FDC\u3058\u305F\u30EA\u30ED\u30FC\u30C9\u30B3\u30B9\u30C8\u304C\u5F97\u70B9\u304B\u3089\u5DEE\u3057\u5F15\u304B\u308C\u307E\u3059\u3002\n\u5F3E\u5207\u308C\u3092\u8D77\u3053\u3057\u3066\u614C\u3066\u306A\u3044\u3088\u3046\u5C0F\u307E\u3081\u306A\u30EA\u30ED\u30FC\u30C9\u3092\u5FC3\u304C\u3051\u307E\u3057\u3087\u3046\u3002";
key_RWHEEL.play();
break;
case 11 :
key_RWHEEL.gotoAndStop(1);
key_CLICK.play();
_local1 = "\u3067\u306F\u3001\u6575\u306B\u72D9\u3044\u3092\u3064\u3051\u3066\u6483\u3063\u3066\u307F\u307E\u3057\u3087\u3046\u3002\n\u6575\u306E\u982D\u306E\u4E0A\u306B\u3042\u308B\u7DD1\u8272\u306E\u30D0\u30FC\u306F\u6575\u306EHP\u3092\u8868\u3057\u3066\u3044\u307E\u3059\u3002";
enemyT(0, 430);
enemyT(0, 500);
break;
case 12 :
_local1 = "\u5404\u6B66\u5668\u306B\u306F\u305D\u308C\u305E\u308C\u7279\u5FB4\u304C\u3042\u308A\u307E\u3059\u3002";
break;
case 13 :
_local1 = "\u30CF\u30F3\u30C9\u30AC\u30F3\u306F\u3001\u653B\u6483\u529B\u306E\u4F4E\u3044\u6B66\u5668\u3067\u3059\u304C\u3001\u30EA\u30ED\u30FC\u30C9\u304C\u65E9\u304F\u30B3\u30B9\u30C8\u3082\u304B\u304B\u3089\u305A\u6271\u3044\u6613\u3044\u7279\u5FB4\u304C\u3042\u308A\u307E\u3059\u3002\n\u307E\u305F\u3001\u30CF\u30F3\u30C9\u30AC\u30F3\u3067\u6575\u3092\u5012\u3057\u305F\u5834\u5408\u306F\u901A\u5E38\u306E2\u500D\u306E\u5F97\u70B9\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002";
enemyT(0, 430);
enemyT(0, 500);
enemyT(0, 570);
enemyT(0, 640);
break;
case 14 :
_local1 = "\u6B21\u306B\u3001\u30DE\u30B7\u30F3\u30AC\u30F3\u306F\u3001\u8FD1\uFF5E\u4E2D\u8DDD\u96E2\u306B\u3066\u4F7F\u3044\u6613\u304F\u653B\u6483\u529B\u3082\u3042\u308B\u4E07\u80FD\u306A\u6B66\u5668\u3067\u3059\u3002\n\u30EA\u30ED\u30FC\u30C9\u3082\u9045\u304F\u306F\u306A\u304F\u3001\u5C0F\u307E\u3081\u306A\u6B66\u5668\u30C1\u30A7\u30F3\u30B8\u3092\u8981\u6C42\u3055\u308C\u306A\u3044\u305F\u3081\u3001\u521D\u5FC3\u8005\u306B\u30AA\u30B9\u30B9\u30E1\u306E\u6B66\u5668\u3067\u3059\u3002";
enemyT(0, 430);
enemyT(0, 500);
enemyT(0, 570);
enemyT(0, 640);
break;
case 15 :
_local1 = "\u30B7\u30E7\u30C3\u30C8\u30AC\u30F3\u306F\u3001\u8FD1\u8DDD\u96E2\u306B\u3066\u7D76\u5927\u306A\u5A01\u529B\u3092\u767A\u63EE\u3059\u308B\u6B66\u5668\u3067\u3059\u3002\n\u3057\u304B\u3057\u3001\u9060\u8DDD\u96E2\u306E\u6575\u306B\u306F\u5F53\u305F\u3089\u305A\u3001\u307E\u305F\u30EA\u30ED\u30FC\u30C9\u304C\u9045\u304F\u5F3E\u6570\u304C\u5C11\u306A\u3044\u305F\u3081\u3001\n\u4ED6\u6B66\u5668\u3068\u7D44\u307F\u5408\u308F\u305B\u305F\u4F7F\u3044\u65B9\u304C\u8981\u6C42\u3055\u308C\u307E\u3059\u3002";
enemyT(0, 430);
enemyT(0, 500);
enemyT(0, 570);
enemyT(0, 640);
break;
case 16 :
sogeki._visible = true;
sogeki.play();
_local1 = "\u30B9\u30CA\u30A4\u30D1\u30FC\u30E9\u30A4\u30D5\u30EB\u306F\u3001\u9060\u8DDD\u96E2\u306E\u6575\u306B\u5927\u30C0\u30E1\u30FC\u30B8\u3092\u4E0E\u3048\u308B\u3053\u3068\u304C\u51FA\u6765\u307E\u3059\u3002\n\u6575\u3092\u8CAB\u901A\u3057\u3066\u306A\u304E\u5012\u305B\u308B\u306E\u3067\u3001\u96C6\u56E3\u306B\u5BFE\u3057\u3066\u6709\u52B9\u306A\u4ED6\u3001\u5730\u5F62\u3092\u5229\u7528\u3057\u305F\u72D9\u6483\u306B\u3088\u3063\u3066\u5B89\u5168\u306B\u6575\u3092\u5012\u3059\u3053\u3068\u3082\u51FA\u6765\u307E\u3059\u3002\n\u305F\u3060\u3057\u3001\u8FD1\u3065\u304B\u308C\u305F\u6575\u306B\u306F\u5F3E\u304C\u3042\u305F\u3089\u306A\u3044\u306E\u3067\u3001\u30B7\u30E7\u30C3\u30C8\u30AC\u30F3\u3068\u540C\u3058\u304F\u4ED6\u6B66\u5668\u3068\u306E\u7D44\u307F\u5408\u308F\u305B\u3066\u4F7F\u3046\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002";
enemyT(0, 430);
enemyT(0, 500);
enemyT(0, 570);
enemyT(0, 640);
break;
case 17 :
sogeki._visible = false;
sogeki.stop();
_local1 = "\u6700\u5F8C\u306B\u3001\u30B9\u30DA\u30FC\u30B9\u30AD\u30FC\u3067\u624B\u69B4\u5F3E\u3092\u4F7F\u3046\u3053\u3068\u304C\u51FA\u6765\u307E\u3059\u3002\n\u30B3\u30B9\u30C8\u304C\u304B\u304B\u308A\u307E\u3059\u304C\u653B\u6483\u529B\u304C\u9AD8\u304F\u3001\u5F37\u529B\u306A\u6575\u3084\u3001\u6575\u306B\u56F2\u307E\u308C\u305F\u3068\u304D\u306B\u5229\u7528\u3059\u308B\u3068\u826F\u3044\u3067\u3057\u3087\u3046\u3002\n\u307E\u305F\u3001\u30D7\u30EC\u30A4\u30E4\u30FC\u3068\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u8DDD\u96E2\u306B\u3088\u3063\u3066\u6295\u3052\u308B\u901F\u5EA6\u304C\u5909\u308F\u308A\u307E\u3059\u3002";
key_CLICK.gotoAndStop(1);
key_SPACE.play();
enemyT(0, 400);
enemyT(0, 415);
enemyT(0, 430);
enemyT(0, 445);
enemyT(0, 460);
enemyT(0, 475);
break;
case 18 :
key_SPACE.gotoAndStop(1);
_local1 = "S\u30AD\u30FC\u3067\u30B7\u30FC\u30EB\u30C9\u3092\u69CB\u3048\u307E\u3059\u3002\n\u5411\u3051\u305F\u65B9\u5411\u306E\u5F3E\u3092\u9632\u304E\u307E\u3059\u304C\u3001\u305D\u306E\u4ED6\u306E\u65B9\u5411\u304B\u3089\u306E\u5F3E\u306F\u9632\u3050\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002";
key_S.play();
enemyT(1, 430);
enemyT(1, 150);
break;
case 19 :
_local1 = "\u307E\u305F\u3001\u9032\u884C\u8DDD\u96E2\u304C\u9032\u3080\u3068\u3001\u30A4\u30AC\u30A4\u30AC\u30C8\u30E9\u30C3\u30D7\u304C\u51FA\u3066\u304D\u307E\u3059\u3002\n\u3053\u308C\u306F\u89E6\u308C\u308B\u3068\u5373\u6B7B\u7D1A\u306E\u30C0\u30E1\u30FC\u30B8\u3092\u53D7\u3051\u307E\u3059\u306E\u3067\u3001\u98DB\u3073\u8D8A\u3048\u308B\u3088\u3046\u306B\u3057\u307E\u3057\u3087\u3046\u3002\n\u307E\u305F\u3001\u98DB\u3073\u8D8A\u3048\u306B\u304F\u3044\u5834\u5408\u306F\u30B7\u30FC\u30EB\u30C9\u3092\u4F7F\u3063\u3066\u79FB\u52D5\u3055\u305B\u3066\u304B\u3089\u98DB\u3073\u8D8A\u3048\u307E\u3057\u3087\u3046\u3002";
igaiga(445);
break;
case 20 :
key_S.gotoAndStop(1);
_local1 = "\u6700\u5F8C\u306B\u3001\u88DC\u7D66\u306B\u3064\u3044\u3066\u8AAC\u660E\u3057\u307E\u3059\u3002\n\u30B9\u30BF\u30FC\u30C8\u958B\u59CB\u3068\u3001500m\u306E\u9032\u884C\u3054\u3068\u306E\u88DC\u7D66\u30DD\u30A4\u30F3\u30C8\u306B\u3066\u3001\n\u88DC\u7D66\u3092\u53D7\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002";
break;
case 21 :
_local1 = "\u88DC\u7D66\u30DD\u30A4\u30F3\u30C8\u3067\u306F\u3001\u305D\u308C\u305E\u308C5\u7A2E\u985E\u306E\u6B66\u5668\u306E\u5F37\u5316\u3068\u6CBB\u7642\u306E\u4E2D\u304B\u30891\u3064\u3092\u9078\u3076\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\nENTER\u30AD\u30FC\u3067\u88DC\u7D66\u753B\u9762\u3092\u958B\u304D\u307E\u3059\u3002";
break;
case 22 :
_local1 = "\u305D\u308C\u305E\u308C\u521D\u671F\u30EC\u30D9\u30EB\u306F0\u3067\u3001\u30EC\u30D9\u30EB\u306F\u6700\u59279\u307E\u3067\u4E0A\u6607\u3057\u307E\u3059\u3002\n\u81EA\u5206\u306E\u597D\u304D\u306A\u6B66\u56681\u3064\u3092\u96C6\u4E2D\u3057\u3066\u5F37\u5316\u3059\u308B\u304B\u3001\u30D0\u30E9\u30F3\u30B9\u826F\u304F\u5747\u7B49\u306B\u5F37\u5316\u3059\u308B\u304B\u3001\u81EA\u5206\u306E\u4F5C\u6226\u306B\u5FDC\u3058\u3066\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3057\u307E\u3057\u3087\u3046\u3002";
dRP();
break;
case 23 :
_local1 = "\u306A\u304A\u3001\u53D6\u5F97\u3057\u305F\u30B9\u30B3\u30A2\u306B\u5FDC\u3058\u3066\u3001\n\u30AA\u30F3\u30E9\u30A4\u30F3\u30E9\u30F3\u30AD\u30F3\u30B0\u306B\u30A8\u30F3\u30C8\u30EA\u30FC\u3067\u304D\u307E\u3059\u306E\u3067\u9811\u5F35\u3063\u3066\u304F\u3060\u3055\u3044\u266A";
break;
case 24 :
_local1 = "\u4EE5\u4E0A\u3067\u30C1\u30E5\u30FC\u30C8\u30EA\u30A2\u30EB\u7D42\u4E86\u3067\u3059\u3002\n\u305D\u308C\u3067\u306F\u3001\u672C\u4F5C\u3092\u304A\u697D\u3057\u307F\u304F\u3060\u3055\u3044\u307E\u305B\u3002(\u00B4\u30FC\uFF40)\u30CE\nESC\u3067\u30BF\u30A4\u30C8\u30EB\u3078\u623B\u308A\u307E\u3059\u3002";
break;
case 25 :
_local1 = "none";
break;
default :
_local1 = "ERROR in getTutorialWords: wd=" + _local1;
trace(_local1);
}
return(_local1);
}
function enemyT(id, realPosX) {
enemyName = "enemyT" + _global.eSetNo;
_root.scr.attachMovie("enemyT", enemyName, 701 + _global.eSetNo);
_root.scr[enemyName]._x = realPosX + _global.screenX;
_root.scr[enemyName].speed = 3;
_root.scr[enemyName].id = id;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function igaiga(realPosX) {
enemyName = "trap5" + _global.eSetNo;
_root.scr.attachMovie("trap5", enemyName, 701 + _global.eSetNo);
_root.scr[enemyName]._x = realPosX + _global.screenX;
_root.scr[enemyName].moveType = 0;
if ((++_global.eSetNo) > 49) {
_global.eSetNo = 0;
}
}
function dRP() {
_global.RP = true;
_root.attachMovie("refuelingPoint", "refuelingPoint", 10000);
_root.refuelingPoint._y = -10;
}
var words = "\u672C\u4F5C\u54C1\u3092\u30D7\u30EC\u30A4\u9802\u304D\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01(\uFF40\u30FB\u03C9\u30FB\u00B4)b\nENTER\u30AD\u30FC\u3067\u6B21\u3078\u9032\u307F\u307E\u3059\u3002";
var count = 0;
var id = 0;
var num = 0;
var dispWait = 1;
var dispFlg = true;
var endFlg = false;
this.DTutorial = "";
this.onEnterFrame = function () {
if (!_global.RP) {
if ((((count++) % dispWait) == 0) && (dispFlg)) {
this.DTutorial = this.DTutorial + words.charAt(num++);
}
if (num > words.length) {
dispFlg = false;
this.gotoAndStop(3);
}
if ((Key.isDown(13) && (!Key_ENTER)) && (!dispFlg)) {
this.DTutorial = "";
words = getTutorialWords(id++);
if (words != "none") {
dispFlg = true;
num = 0;
this.gotoAndStop(2);
} else {
Mouse.show();
stopAllSounds();
if (_global.bgm) {
_root.bgm_title.start(0, 99);
}
_root.frameOnWeapon.removeMovieClip();
_root.gun.removeMovieClip();
_root.player.arm.removeMovieClip();
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "title";
endFlg = true;
}
} else if ((Key.isDown(27) && (!Key_ESC)) && (!endFlg)) {
trace("\u7D42\u4E86\u51E6\u7406");
Mouse.show();
stopAllSounds();
if (_global.bgm) {
_root.bgm_title.start(0, 99);
}
_root.frameOnWeapon.removeMovieClip();
_root.gun.removeMovieClip();
_root.player.arm.removeMovieClip();
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "title";
endFlg = true;
}
Key_ENTER = Key.isDown(13);
Key_ESC = Key.isDown(27);
}
};
if (!_global.tutorial) {
this._visible = false;
delete this.onEnterFrame;
}
Symbol 860 MovieClip Frame 2
stop();
Symbol 860 MovieClip Frame 3
stop();
Symbol 875 MovieClip Frame 101
if ((((((((!_global.unarmedRelease) && (!_global.samuraiRelease)) && (!_global.bombermanRelease)) && (!_global.enhancedRelease)) && (!_global.beamSaberRelease)) && (!_global.grenadeMachinegunRelease)) && (!_global.busterRifleRelease)) && (!_global.okusenmanRelease)) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
if (_global.tutorial) {
_root.gra_fade.goal = "title";
_root.bgm_title.start(0, 99);
} else {
_root.gra_fade.goal = "result2";
}
stop();
}
Instance of Symbol 873 MovieClip "wd_av" in Symbol 875 MovieClip Frame 125
onClipEvent (load) {
this.wd = "";
if ((_global.scoreValid == 1) && (!_global.tutorial)) {
if (_global.unarmedRelease) {
wd = wd + "\u6B66\u5668\u5236\u9650\u30E2\u30FC\u30C9\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\n";
}
if (_global.samuraiRelease) {
wd = wd + "\u6B66\u58EB\u9053\u30E2\u30FC\u30C9\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\n";
}
if (_global.bombermanRelease) {
wd = wd + "\u30DC\u30F3\u30D0\u30FC\u30DE\u30F3\u30E2\u30FC\u30C9\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\n";
}
if (_global.enhancedRelease) {
wd = wd + "\u3064\u3088\u304F\u3066\u30CB\u30E5\u30FC\u30B2\u30FC\u30E0\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002\n";
}
if (_global.beamSaberRelease) {
wd = wd + "\u30D3\u30FC\u30E0\u30B5\u30FC\u30D9\u30EB\u304C\u4F7F\u7528\u53EF\u80FD\u306B\u306A\u308A\u307E\u3057\u305F\u3002\n";
}
if (_global.grenadeMachinegunRelease) {
wd = wd + "\u30B0\u30EC\u30CD\u30FC\u30C9\u30DE\u30B7\u30F3\u30AC\u30F3\u304C\u4F7F\u7528\u53EF\u80FD\u306B\u306A\u308A\u307E\u3057\u305F\u3002\n";
}
if (_global.busterRifleRelease) {
wd = wd + "\u30D0\u30B9\u30BF\u30FC\u30E9\u30A4\u30D5\u30EB\u304C\u4F7F\u7528\u53EF\u80FD\u306B\u306A\u308A\u307E\u3057\u305F\u3002\n";
}
if (_global.okusenmanRelease) {
wd = wd + "\u304A\u3063\u304F\u305B\u3093\u307E\u3093\u304C\u9078\u3079\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002\n";
}
}
}
Symbol 875 MovieClip Frame 205
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "result2";
stop();
Symbol 876 Button
on (press) {
if (!_global.tutorial) {
if ((((((((!_global.unarmedRelease) && (!_global.samuraiRelease)) && (!_global.bombermanRelease)) && (!_global.enhancedRelease)) && (!_global.beamSaberRelease)) && (!_global.grenadeMachinegunRelease)) && (!_global.busterRifleRelease)) && (!_global.okusenmanRelease)) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "result2";
}
} else {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "title";
_root.bgm_title.start(0, 99);
}
}
Symbol 892 MovieClip Frame 85
_root.resultMC.play();
se_cheer = new Sound();
se_cheer.attachSound("se_cheer");
se_booing = new Sound();
se_booing.attachSound("se_booing");
if (_global.NewRank != "out") {
se_cheer.start();
} else {
se_booing.start();
}
if (_global.NewRank != "out") {
this.rankMC.dDispRank = _global.NewRank;
} else {
this.rankMC.dDispRank = "out";
}
Symbol 892 MovieClip Frame 95
if (_global.NewRank != "out") {
_root.attachMovie("fubuki", "fubuki", 50);
_root.fubuki._xscale = 200;
_root.fubuki._yscale = 200;
_root.fubuki._x = 320;
_root.fubuki._y = 100;
trace("playerName: " + _global.playerName);
_root.resultMC.resultMC2.playerName;
_root.resultMC.resultMC2.playerName = _global.playerName;
_root.resultMC.resultMC2.comment = "Your comment";
} else {
_root.resultMC.resultMC2.playerName = "\u2015";
_root.resultMC.resultMC2.comment = "\u2015";
}
Symbol 892 MovieClip Frame 115
stop();
Symbol 911 MovieClip Frame 1
stop();
Symbol 912 Button
on (release) {
_root.attachMovie("gra_fade", "gra_fade", 9999);
_root.gra_fade.goal = "title";
}
Instance of Symbol 919 MovieClip "bt" in Symbol 920 MovieClip Frame 1
on (press) {
startDrag ("", false, -16, 0, -16, 320);
}
on (release) {
stopDrag();
}
Symbol 928 MovieClip Frame 1
stop();
Symbol 928 MovieClip Frame 2
stop();
Symbol 934 MovieClip Frame 1
stop();
Symbol 934 MovieClip Frame 2
stop();
Symbol 936 MovieClip Frame 1
stop();
Symbol 936 MovieClip Frame 2
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 2
stop();
Symbol 940 MovieClip Frame 1
stop();
Symbol 940 MovieClip Frame 2
stop();
Symbol 942 MovieClip Frame 1
stop();
Symbol 942 MovieClip Frame 2
stop();
Symbol 944 MovieClip Frame 1
stop();
Symbol 944 MovieClip Frame 2
stop();
Symbol 946 MovieClip Frame 1
stop();
Symbol 946 MovieClip Frame 2
stop();
Symbol 948 MovieClip Frame 1
stop();
Symbol 948 MovieClip Frame 2
stop();
Symbol 950 MovieClip Frame 1
stop();
Symbol 950 MovieClip Frame 2
stop();
Symbol 952 MovieClip Frame 1
stop();
Symbol 952 MovieClip Frame 2
stop();
Symbol 954 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 2
stop();
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 2
stop();
Symbol 978 MovieClip Frame 1
stop();
Symbol 978 MovieClip Frame 2
stop();
Symbol 980 MovieClip Frame 1
stop();
Symbol 980 MovieClip Frame 2
stop();
Symbol 982 MovieClip Frame 1
stop();
Symbol 982 MovieClip Frame 2
stop();
Symbol 984 MovieClip Frame 1
stop();
Symbol 984 MovieClip Frame 2
stop();
Symbol 986 MovieClip Frame 1
stop();
Symbol 986 MovieClip Frame 2
stop();
Symbol 994 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "gp_okusenmanOn" in Symbol 994 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 986 MovieClip "gp_okusenmanOff" in Symbol 994 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Symbol 998 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_unarmedOn" in Symbol 998 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_unarmedOff" in Symbol 998 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1001 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_samuraiOn" in Symbol 1001 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_samuraiOff" in Symbol 1001 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1004 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_bombermanOn" in Symbol 1004 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_bombermanOff" in Symbol 1004 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1007 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_enhancedOn" in Symbol 1007 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_enhancedOff" in Symbol 1007 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1010 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_beamsaberOn" in Symbol 1010 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_beamsaberOff" in Symbol 1010 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1013 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_grenademachinegunOn" in Symbol 1013 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_grenademachinegunOff" in Symbol 1013 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1016 MovieClip Frame 1
stop();
Instance of Symbol 984 MovieClip "bo_busterrifleOn" in Symbol 1016 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Instance of Symbol 986 MovieClip "bo_busterrifleOff" in Symbol 1016 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "bo_unarmedOn") {
_root.tempBonus.unarmedMode = true;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_unarmedOff") {
_root.tempBonus.unarmedMode = false;
} else if (this._name == "bo_samuraiOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = true;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_samuraiOff") {
_root.tempBonus.samuraiMode = false;
} else if (this._name == "bo_bombermanOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = true;
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_bombermanOff") {
_root.tempBonus.bombermanMode = false;
} else if (this._name == "bo_enhancedOn") {
_root.tempBonus.unarmedMode = false;
_root.tempBonus.samuraiMode = false;
_root.tempBonus.bombermanMode = false;
_root.tempBonus.enhancedMode = true;
} else if (this._name == "bo_enhancedOff") {
_root.tempBonus.enhancedMode = false;
} else if (this._name == "bo_beamsaberOn") {
_root.tempBonus.beamSaber = true;
} else if (this._name == "bo_beamsaberOff") {
_root.tempBonus.beamSaber = false;
} else if (this._name == "bo_grenademachinegunOn") {
_root.tempBonus.grenadeMachinegun = true;
} else if (this._name == "bo_grenademachinegunOff") {
_root.tempBonus.grenadeMachinegun = false;
} else if (this._name == "bo_busterrifleOn") {
_root.tempBonus.busterRifle = true;
} else if (this._name == "bo_busterrifleOff") {
_root.tempBonus.busterRifle = false;
}
_root.refleshBonusState();
}
Symbol 1101 MovieClip Frame 1
function drawGraph(r1, r2, r3, r4, r5, r6) {
this.HGLine.rc._rotation = (Math.min(r1, 50) * 3.6) - 180;
this.HGLine.lc._rotation = Math.max(r1 - 50, 0) * 3.6;
this.MGLine.rc._rotation = (Math.min(r2, 50) * 3.6) - 180;
this.MGLine.lc._rotation = Math.max(r2 - 50, 0) * 3.6;
this.SGLine.rc._rotation = (Math.min(r3, 50) * 3.6) - 180;
this.SGLine.lc._rotation = Math.max(r3 - 50, 0) * 3.6;
this.SRLine.rc._rotation = (Math.min(r4, 50) * 3.6) - 180;
this.SRLine.lc._rotation = Math.max(r4 - 50, 0) * 3.6;
this.FGLine.rc._rotation = (Math.min(r5, 50) * 3.6) - 180;
this.FGLine.lc._rotation = Math.max(r5 - 50, 0) * 3.6;
this.OTLine.rc._rotation = (Math.min(r6, 50) * 3.6) - 180;
this.OTLine.lc._rotation = Math.max(r6 - 50, 0) * 3.6;
}
function aniGraph(R1, R2, R3, R4, R5, R6, rateCnt) {
drawGraph(Math.min(rateCnt, R1), Math.min(rateCnt, R1 + R2), Math.min(rateCnt, (R1 + R2) + R3), Math.min(rateCnt, ((R1 + R2) + R3) + R4), Math.min(rateCnt, (((R1 + R2) + R3) + R4) + R5), Math.min(rateCnt, ((((R1 + R2) + R3) + R4) + R5) + R6));
}
var dat = [Number(_root.optionMainMC.disp_HGKillPercent.text), Number(_root.optionMainMC.disp_MGKillPercent.text), Number(_root.optionMainMC.disp_SGKillPercent.text), Number(_root.optionMainMC.disp_SRKillPercent.text), Number(_root.optionMainMC.disp_FGKillPercent.text), Number(_root.optionMainMC.disp_OTKillPercent.text)];
var cnt = 0;
this.onEnterFrame = function () {
trace("\u5B9F\u884C");
if ((cnt++) <= 100) {
aniGraph(dat[0], dat[1], dat[2], dat[3], dat[4], dat[5], cnt);
} else {
trace("\u63CF\u753B\u7D42\u4E86");
delete this.onEnterFrame;
}
};
Symbol 1102 MovieClip Frame 1
stop();
Instance of Symbol 934 MovieClip "0" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 936 MovieClip "1" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 938 MovieClip "2" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 940 MovieClip "3" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 942 MovieClip "4" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 944 MovieClip "5" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 946 MovieClip "6" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 948 MovieClip "7" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 950 MovieClip "8" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 952 MovieClip "9" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 954 MovieClip "10" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 956 MovieClip "11" in Symbol 1102 MovieClip Frame 1
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (_root.id != this._name) {
_root[_root.id].gotoAndStop(1);
_root.id = this._name;
} else {
this.gotoAndStop(1);
_root.id = "none";
}
}
Instance of Symbol 978 MovieClip "gp_high" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 980 MovieClip "gp_medium" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 982 MovieClip "gp_low" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 984 MovieClip "gp_shellOn" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 986 MovieClip "gp_shellOff" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 984 MovieClip "gp_bgmOn" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Instance of Symbol 986 MovieClip "gp_bgmOff" in Symbol 1102 MovieClip Frame 2
on (press) {
_root.se_cursol5.start();
trace(this._name + "is clicked");
this.gotoAndStop(2);
if (this._name == "gp_high") {
_root.tempGraphic.qual = "high";
} else if (this._name == "gp_medium") {
_root.tempGraphic.qual = "medium";
} else if (this._name == "gp_low") {
_root.tempGraphic.qual = "low";
} else if (this._name == "gp_shellOn") {
_root.tempGraphic.shell = true;
} else if (this._name == "gp_shellOff") {
_root.tempGraphic.shell = false;
} else if (this._name == "gp_bgmOn") {
_root.tempGraphic.bgm = true;
} else if (this._name == "gp_bgmOff") {
_root.tempGraphic.bgm = false;
} else if (this._name == "gp_okusenmanOn") {
_root.tempGraphic.okusenman = true;
} else if (this._name == "gp_okusenmanOff") {
_root.tempGraphic.okusenman = false;
}
_root.refleshGraphicState();
}
Symbol 1108 Button
on (release) {
switch (_root.choiceMenu) {
case 0 :
_root.id = "none";
i = 0;
while (i < 12) {
_root.optionMainMC[i].gotoAndStop(1);
_root.keySetting["cf" + i] = _root.tempSetting["cf" + i];
_root.keySetting["char" + i] = _root.tempSetting["char" + i];
_root.data_so.data.keySetting["cf" + i] = _root.tempSetting["cf" + i];
_root.data_so.data.keySetting["char" + i] = _root.tempSetting["char" + i];
i++;
}
break;
case 1 :
_global.qual = _root.tempGraphic.qual;
_global.shell = _root.tempGraphic.shell;
_quality = _global.qual;
_global.bgm = _root.tempGraphic.bgm;
_global.okusenman = _root.tempGraphic.okusenman;
_root.data_so.data.qual = _root.tempGraphic.qual;
_root.data_so.data.shell = _root.tempGraphic.shell;
_root.data_so.data.bgm = _root.tempGraphic.bgm;
_root.data_so.data.okusenman = _root.tempGraphic.okusenman;
if (_global.bgm) {
_root.bgm_title.start();
} else {
_root.bgm_title.stop("bgm_title");
}
break;
case 2 :
_global.unarmedMode = _root.tempBonus.unarmedMode;
_global.samuraiMode = _root.tempBonus.samuraiMode;
_global.bombermanMode = _root.tempBonus.bombermanMode;
_global.enhancedMode = _root.tempBonus.enhancedMode;
_global.beamSaber = _root.tempBonus.beamSaber;
_global.grenadeMachinegun = _root.tempBonus.grenadeMachinegun;
_global.busterRifle = _root.tempBonus.busterRifle;
_root.data_so.data.unarmedMode = _root.tempBonus.unarmedMode;
_root.data_so.data.samuraiMode = _root.tempBonus.samuraiMode;
_root.data_so.data.bombermanMode = _root.tempBonus.bombermanMode;
_root.data_so.data.enhancedMode = _root.tempBonus.enhancedMode;
_root.data_so.data.beamSaber = _root.tempBonus.beamSaber;
_root.data_so.data.grenadeMachinegun = _root.tempBonus.grenadeMachinegun;
_root.data_so.data.busterRifle = _root.tempBonus.busterRifle;
break;
case 3 :
break;
default :
trace("ERROR in bt_save this settingsMC: _root.choiceMenu=" + _root.choiceMenu);
}
}
Symbol 1113 Button
on (release) {
if (_root.choiceMenu == 0) {
_root.id = "none";
i = 0;
while (i < 12) {
_root.optionMainMC[i].gotoAndStop(1);
_root.keySetting["cf" + i] = _root.init["cf" + i];
_root.keySetting["char" + i] = _root.init["char" + i];
_root.tempSetting["cf" + i] = _root.init["cf" + i];
_root.tempSetting["char" + i] = _root.init["char" + i];
_root.data_so.data.keySetting["cf" + i] = _root.init["cf" + i];
_root.data_so.data.keySetting["char" + i] = _root.init["char" + i];
i++;
}
_root.dispKeyState();
} else if (_root.choiceMenu == 1) {
_global.qual = "high";
_global.shell = true;
_global.bgm = true;
_global.okusenman = false;
_root.data_so.data.qual = _global.qual;
_root.data_so.data.shell = _global.shell;
_root.data_so.data.bgm = _global.bgm;
_root.data_so.data.okusenman = _global.okusenman;
_root.bgm_title.stop("bgm_title");
_root.dispGraphicState();
} else if (_root.choiceMenu == 2) {
_global.unarmedMode = false;
_global.samuraiMode = false;
_global.bombermanMode = false;
_global.enhancedMode = false;
_global.beamSaber = false;
_global.grenadeMachinegun = false;
_global.busterRifle = false;
_root.data_so.data.unarmedMode = _global.unarmedMode;
_root.data_so.data.samuraiMode = _global.samuraiMode;
_root.data_so.data.bombermanMode = _global.bombermanMode;
_root.data_so.data.enhancedMode = _global.enhancedMode;
_root.data_so.data.beamSaber = _global.beamSaber;
_root.data_so.data.grenadeMachinegun = _global.grenadeMachinegun;
_root.data_so.data.busterRifle = _global.busterRifle;
_root.dispBonusState();
} else if (_root.choiceMenu == 3) {
}
}
Symbol 1116 Button
on (release) {
if (_root.choiceMenu != 0) {
_parent.mk = mykakudo;
_root.choiceMenu = 0;
}
}
Symbol 1121 Button
on (release) {
if (_root.choiceMenu != 1) {
_parent.mk = mykakudo;
_root.choiceMenu = 1;
_root.id = "none";
}
}
Symbol 1125 Button
on (release) {
if (_root.choiceMenu != 2) {
_parent.mk = mykakudo;
_root.choiceMenu = 2;
_root.id = "none";
}
}
Symbol 1129 Button
on (release) {
if (_root.choiceMenu != 3) {
_parent.mk = mykakudo;
_root.choiceMenu = 3;
_root.id = "none";
}
}
Instance of Symbol 1118 MovieClip in Symbol 1131 MovieClip Frame 1
onClipEvent (load) {
mykakudo = 1;
}
onClipEvent (enterFrame) {
theRadian = (kakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = (Math.sin(theRadian) * _parent.R) * _parent.henpei;
yy = 100 + (((this._y - _parent.maxY) * (_parent.minS - 100)) / (-(_parent.maxY * 2)));
this._alpha = (this._xscale = (this._yscale = yy));
this.swapDepths(yy);
kakudo = _parent.speed + mykakudo;
}
Instance of Symbol 1122 MovieClip in Symbol 1131 MovieClip Frame 1
onClipEvent (load) {
mykakudo = 91;
}
onClipEvent (enterFrame) {
theRadian = (kakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = (Math.sin(theRadian) * _parent.R) * _parent.henpei;
yy = 100 + (((this._y - _parent.maxY) * (_parent.minS - 100)) / (-(_parent.maxY * 2)));
this._alpha = (this._xscale = (this._yscale = yy));
this.swapDepths(yy);
kakudo = _parent.speed + mykakudo;
}
Instance of Symbol 1126 MovieClip in Symbol 1131 MovieClip Frame 1
onClipEvent (load) {
mykakudo = 271;
}
onClipEvent (enterFrame) {
theRadian = (kakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = (Math.sin(theRadian) * _parent.R) * _parent.henpei;
yy = 100 + (((this._y - _parent.maxY) * (_parent.minS - 100)) / (-(_parent.maxY * 2)));
this._alpha = (this._xscale = (this._yscale = yy));
this.swapDepths(yy);
kakudo = _parent.speed + mykakudo;
}
Instance of Symbol 1130 MovieClip in Symbol 1131 MovieClip Frame 1
onClipEvent (load) {
mykakudo = 181;
}
onClipEvent (enterFrame) {
theRadian = (kakudo * Math.PI) / 180;
this._x = Math.cos(theRadian) * _parent.R;
this._y = (Math.sin(theRadian) * _parent.R) * _parent.henpei;
yy = 100 + (((this._y - _parent.maxY) * (_parent.minS - 100)) / (-(_parent.maxY * 2)));
this._alpha = (this._xscale = (this._yscale = yy));
this.swapDepths(yy);
kakudo = _parent.speed + mykakudo;
}