Frame 1
_fglv = new LoadVars();
_fglv.gid = 263;
_fglv.url = _root._url;
_fglv.sendAndLoad("http://www.freegamesforyourwebsite.com/stats.php", _fglv, "POST");
delete _fglv;
stop();
_quality = "medium";
Stage.showMenu = false;
var debug = true;
var gameID = 266;
var gameName = "soul-of-the-katana";
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) > 99) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
if (!okToPlay) {
gotoAndStop (2);
}
Frame 16
function sfxListener() {
_root.punch = new Sound();
_root.punch.attachSound("slice");
_root.punch2 = new Sound();
_root.punch2.attachSound("slice2");
_root.kick = new Sound();
_root.kick.attachSound("kick");
_root.hit = new Sound();
_root.hit.attachSound("hit");
_root.clash = new Sound();
_root.clash.attachSound("clash");
_root.whip = new Sound();
_root.whip.attachSound("whip");
_root.splash = new Sound();
_root.splash.attachSound("splash");
_root.smoke = new Sound();
_root.smoke.attachSound("smoke");
_root.woosh = new Sound();
_root.woosh.attachSound("woosh");
_root.goon_die = new Sound();
_root.goon_die.attachSound("goon_die");
_root.goon_die_stab = new Sound();
_root.goon_die_stab.attachSound("goon_die_stab");
_root.m_hurt = new Sound();
_root.m_hurt.attachSound("m_hurt");
_root.m_hurt.onSoundComplete = function () {
_root.m_hurt_sound = false;
};
_root.coin_flink = new Sound();
_root.coin_flink.attachSound("coin_flink");
_root.duck_sound = new Sound();
_root.duck_sound.attachSound("duck_sound");
_root.bonus_sound = new Sound();
_root.bonus_sound.attachSound("bonusscratch");
_root.scratch_half = new Sound();
_root.scratch_half.attachSound("scratch_half");
_root.run_sound = new Sound();
_root.run_sound.attachSound("shoes_loud");
_root.run_sound.onSoundComplete = function () {
_root.running_sound = false;
};
cs1Listener();
}
function cs1Listener() {
_root.createEmptyMovieClip("firstbgmTarget", _root.getNextHighestDepth());
firstbgmTarget.attachMovie("sc7", "sc7", this.getNextHighestDepth());
}
function fbgmListener() {
_root.createEmptyMovieClip("bgmTarget", _root.getNextHighestDepth());
}
function bgmListener() {
}
function cs2Listener() {
}
function cs3Listener() {
}
function cs4Listener() {
_root.attachMovie("cs_win", "cswinTarget", _root.getNextHighestDepth());
_root.cswinTarget._x = -80;
_root.cswinTarget._y = -1000;
}
function cswinListener() {
_root.attachMovie("cscMovie", "cscTarget", _root.getNextHighestDepth());
_root.cscTarget._x = -40;
_root.cscTarget._y = -1000;
}
function cscListener() {
_root.attachMovie("cs_go", "csgoTarget", _root.getNextHighestDepth());
_root.csgoTarget._x = -40;
_root.csgoTarget._y = -1000;
}
function randRange(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
function randRange(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
sfxListener();
_root.debug = false;
_root.coins = 0;
_root.hitCount = 0;
_root.running_sound = false;
_root.water_run_sound = new Sound();
_root.water_run_sound.attachSound("watersteps");
_root.water_run_sound.onSoundComplete = function () {
_root.running_sound = false;
};
_root.beep = new Sound();
_root.beep.attachSound("beep");
_global.volumeLevel = new Sound();
_global.volumeLevel.setVolume(100);
_root.muteSounds = false;
fbgmListener();
bgmListener();
cs2Listener();
cs3Listener();
cs4Listener();
cswinListener();
cscListener();
_root.debug = false;
_root.coins = 0;
_root.hitCount = 0;
_root.running_sound = false;
_root.water_run_sound = new Sound();
_root.water_run_sound.attachSound("watersteps");
_root.water_run_sound.onSoundComplete = function () {
_root.running_sound = false;
};
_root.beep = new Sound();
_root.beep.attachSound("beep");
_global.volumeLevel = new Sound();
_global.volumeLevel.setVolume(100);
_root.muteSounds = false;
_global.checkGround = function (character, height, loop) {
if (loop < 12) {
loop++;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y + height) + _root.game._y, true)) {
character._y = character._y - 1;
_root.playerDy = 0;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y + height) + _root.game._y, true)) {
_global.checkGround(character, height, loop);
}
return(true);
}
if (_root.onPlatform) {
return(true);
}
return(false);
}
};
_global.checkGround_boss = function (character, height, loop) {
if (loop < 12) {
loop++;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y + height) + _root.game._y, true)) {
character._y = character._y - 1;
character.dy = 0;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y + height) + _root.game._y, true)) {
_global.checkGround_boss(character, height, loop);
}
return(true);
}
return(false);
}
};
_global.checkCeiling = function (character, height, loop) {
if (loop < 12) {
loop++;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y - height) + _root.game._y, true) && (!_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y + height) + _root.game._y, true))) {
character._y = character._y + 1;
_root.playerDy = 0;
if (_root.game.level.ground.hitTest(character._x + _root.game._x, (character._y - height) + _root.game._y, true)) {
_global.checkCeiling(character, height, loop);
}
return(true);
}
return(false);
}
};
_global.checkEdge = function (character, height, dx) {
if (_root.game.level.ground.hitTest((character._x + _root.game._x) + dx, (character._y + height) + _root.game._y, true)) {
return(true);
}
return(false);
};
_global.checkEdge_boss = function (character, height, dx) {
if (_root.game.level.ground.hitTest((character._x + _root.game._x) + dx, (character._y + height) + _root.game._y, false)) {
if (character._name == "boss") {
}
return(true);
}
if (character._name == "boss") {
}
return(false);
};
_global.checkWall = function (character, height, dx) {
if (_root.game.level.ground.hitTest((character._x + _root.game._x) + dx, (character._y + (height / 2)) + _root.game._y, true)) {
return(true);
}
return(false);
};
_global.checkWallatt = function (character, height, dx) {
if (_root.game.level.ground.hitTest((character._x + _root.game._x) + dx, (character._y + (height / 2)) + _root.game._y, true)) {
return(true);
}
return(false);
};
_global.checkPlayer = function (character, dir, offset) {
if (offset == undefined) {
offset = 0;
}
if (_root.game.player.hitTest(((character._x + _root.game._x) + (_root.playerWidth * dir)) + _root.playerDx, (character._y + _root.game._y) + offset, false)) {
return(true);
}
return(false);
};
_global.checkPlayer_tengu = function (character, dir, offset) {
if (offset == undefined) {
offset = 0;
}
if (_root.game.player.hitTest(((character._x + _root.game._x) + (_root.playerWidth * dir)) + _root.playerDx, (character._y + _root.game._y) + offset, true)) {
return(true);
}
return(false);
};
_global.checkPlayer_boss = function (character, dir, offset) {
dir = dir * -1;
if (offset == undefined) {
offset = 0;
}
if (_root.game.player.hitTest(character)) {
return(true);
}
return(false);
};
_global.radiansToDegrees = function (radians) {
degrees = int(radians * 57.29578);
if (degrees < 0) {
degrees = degrees + 360;
}
return(degrees);
};
_global.degreesToRadians = function (degrees) {
radians = degrees * 0.01745329;
return(radians);
};
_global.followPlayer = function () {
this._x = _root.game.player._x;
this._y = _root.game.player._y;
};
_global.cameraLogic = function () {
_root.frameCount++;
if ((_root.frameCount > 15) && (!_root.fpsSet)) {
this.tick = getTimer() - this.lastTime;
_root.FPS = int(((1 / this.tick) * 1000) * _root.frameCount);
_root.frameCount = 0;
this.lastTime = getTimer();
}
bgDiff = this.bg._x + this._x;
if (bgDiff > 0) {
this.bg._x = this.bg._x - (this.bg._width / 2);
} else if (bgDiff < ((-this.bg._width) / 2)) {
this.bg._x = this.bg._x + (this.bg._width / 2);
}
if (_root.playerDir > 0) {
targetX = 125;
} else {
targetX = 475;
}
targetY = 300;
playerPositionX = _root.game.player._x + this._x;
playerPositionY = _root.game.player._y + this._y;
if ((_root.game.player._x > _root.camMin) && (_root.game.player._x < _root.camMax)) {
_root.cameraMoving = true;
if (Math.abs(playerPositionX - targetX) > 4) {
ease = int((playerPositionX - targetX) / 5);
this._x = this._x - ease;
this.bg._x = this.bg._x + (ease / 2);
this.bg2._x = this.bg2._x + (ease / 3);
this.fg._x = this.fg._x - (ease / 2);
}
} else {
_root.cameraMoving = false;
}
if (_root.playerJumping) {
this._y = (_root.camHeight - this.player._y) / _root.camJump;
this.bg._y = ((((this.player._y / 2) - (_root.camHeight / 1.5)) / _root.camJump) - _root.camOffset) - 40;
this.bg2._y = ((((this.player._y / 4) - (_root.camHeight / 1.5)) / _root.camJump) - _root.camOffset) + 300;
} else if (Math.abs((this._y + this.player._y) - 150) > 1) {
this._y = this._y + int((((_root.camHeight - this.player._y) / _root.camJump) - this._y) / 4);
}
};
_global.cameraLogic2 = function () {
_root.frameCount++;
if ((_root.frameCount > 15) && (!_root.fpsSet)) {
this.tick = getTimer() - this.lastTime;
_root.FPS = int(((1 / this.tick) * 1000) * _root.frameCount);
_root.frameCount = 0;
this.lastTime = getTimer();
}
if (!_root.onPlatform) {
if (_root.playerDir > 0) {
targetX = 125;
} else {
targetX = 475;
}
} else if ((_root.gotoLast == "level2a") || (_root.gotoLast == "level2b")) {
targetX = 300 + (_root.game.player._x - _root.currentPlatform._x);
} else if (_root.playerDir > 0) {
targetX = 175;
} else {
targetX = 425;
}
targetY = 300;
playerPositionX = _root.game.player._x + this._x;
playerPositionY = _root.game.player._y + this._y;
if ((_root.game.player._x > _root.camMin) && (_root.game.player._x < _root.camMax)) {
_root.cameraMoving = true;
if (Math.abs(playerPositionX - targetX) > 4) {
ease = int((playerPositionX - targetX) / 5);
this._x = this._x - ease;
_root.bg._x = _root.bg._x - (ease / 25);
_root.bgScroll = _root.bgScroll + (ease / 2);
}
if (Math.abs(playerPositionY - targetY) > 4) {
}
} else {
_root.cameraMoving = false;
}
if (_root.playerJumping) {
this._y = _root.camHeight - this.player._y;
} else {
this._y = _root.camHeight - this.player._y;
}
};
_global.cameraLogic3 = function () {
_root.frameCount++;
if ((_root.frameCount > 15) && (!_root.fpsSet)) {
this.tick = getTimer() - this.lastTime;
_root.FPS = int(((1 / this.tick) * 1000) * _root.frameCount);
_root.frameCount = 0;
this.lastTime = getTimer();
}
if (_root.playerDir > 0) {
if (_root.runCounter > 0) {
var _local4 = 125;
} else {
var _local4 = 125;
}
} else if (_root.runCounter > 0) {
var _local4 = 475;
} else {
var _local4 = 475;
}
var _local5 = _root.game.player._x;
if (_local5 < 4375) {
_root.camMin = -50;
_root.camMax = 4170;
_root.camHeight = -285;
if (_root.game.door1._currentframe == 2) {
_root.game.door1.gotoAndStop(1);
this._x = this._x + 200;
_global.snowStop();
} else {
_root.game.door2.gotoAndStop(2);
}
} else if (_local5 < 6308) {
_root.camMin = 4600;
_root.camMax = 6100;
_root.camHeight = -500;
if (_root.game.door1._currentframe == 1) {
_root.game.door1.gotoAndStop(2);
this._x = this._x - 200;
_global.snowStart();
}
if (_root.game.door2._currentframe == 1) {
_root.game.door2.gotoAndStop(2);
this._x = this._x + 300;
_global.snowStart();
}
} else if (_local5 < 10915) {
_root.camMin = 6580;
_root.camMax = 10700;
_root.camHeight = -470;
if (_root.game.door2._currentframe == 2) {
_root.game.door2.gotoAndStop(1);
this._x = this._x - 300;
_global.snowStop();
}
if (_root.game.door3._currentframe == 2) {
_root.game.door3.gotoAndStop(1);
this._x = this._x + 300;
_global.snowStop();
}
} else if (_local5 < 12850) {
_root.camMin = 11115;
_root.camMax = 12600;
_root.camHeight = -650;
if (_root.game.door3._currentframe == 1) {
_root.game.door3.gotoAndStop(2);
this._x = this._x - 300;
_global.snowStart();
}
if (_root.game.door4._currentframe == 1) {
_root.game.door4.gotoAndStop(2);
this._x = this._x + 300;
_global.snowStart();
}
} else {
_root.camMin = 13000;
_root.camMax = 14110;
_root.camHeight = -600;
if (_root.playerDir > 0) {
var _local4 = 175;
} else {
var _local4 = 425;
}
if (_root.game.door4._currentframe == 2) {
_root.game.door4.gotoAndStop(1);
this._x = this._x - 300;
_global.snowStop();
}
}
var _local7 = _local5 + this._x;
var _local8 = _root.game.player._y + this._y;
if ((_local5 > _root.camMin) && (_local5 < _root.camMax)) {
_root.cameraMoving = true;
if (Math.abs(_local7 - _local4) > 4) {
var _local6 = int((_local7 - _local4) / 5);
this._x = this._x - _local6;
_root.bgScroll = _root.bgScroll + (_local6 / 2);
}
} else {
_root.cameraMoving = false;
}
if (_root.playerJumping) {
this._y = (_root.camHeight - this.player._y) / _root.camJump;
} else if (Math.abs((this._y + this.player._y) - 150) > 1) {
this._y = this._y + int(((((_root.camHeight - this.player._y) / _root.camJump) + _root.camOffset) - this._y) / 4);
}
};
_global.cameraLogic4 = function () {
_root.frameCount++;
if ((_root.frameCount > 15) && (!_root.fpsSet)) {
this.tick = getTimer() - this.lastTime;
_root.FPS = int(((1 / this.tick) * 1000) * _root.frameCount);
_root.frameCount = 0;
this.lastTime = getTimer();
}
if (_root.playerDir > 0) {
if (_root.runCounter > 0) {
var _local3 = 125;
} else {
var _local3 = 125;
}
} else if (_root.runCounter > 0) {
var _local3 = 475;
} else {
var _local3 = 475;
}
var _local4 = _root.game.player._x;
var _local6 = _local4 + this._x;
var _local7 = _root.game.player._y + this._y;
if ((_local4 > _root.camMin) && (_local4 < _root.camMax)) {
_root.cameraMoving = true;
if (Math.abs(_local6 - _local3) > 4) {
var _local5 = int((_local6 - _local3) / 5);
this._x = this._x - _local5;
_root.bgScroll = _root.bgScroll + (_local5 / 2);
}
} else {
_root.cameraMoving = false;
}
if (_root.playerJumping) {
this._y = (_root.camHeight - this.player._y) / _root.camJump;
} else if (Math.abs((this._y + this.player._y) - 150) > 1) {
this._y = this._y + int(((((_root.camHeight - this.player._y) / _root.camJump) + _root.camOffset) - this._y) / 4);
}
};
_global.cameraLogic5 = function () {
_root.frameCount++;
if ((_root.frameCount > 15) && (!_root.fpsSet)) {
this.tick = getTimer() - this.lastTime;
_root.FPS = int(((1 / this.tick) * 1000) * _root.frameCount);
_root.frameCount = 0;
this.lastTime = getTimer();
}
if (_root.playerDir > 0) {
if (_root.runCounter > 0) {
var _local4 = 125;
} else {
var _local4 = 125;
}
} else if (_root.runCounter > 0) {
var _local4 = 475;
} else {
var _local4 = 475;
}
var _local6 = 225;
var _local5 = _root.game.player._x;
var _local7 = _local5 + this._x;
var _local8 = _root.game.player._y + this._y;
if ((_local5 > _root.camMin) && (_local5 < _root.camMax)) {
_root.cameraMoving = true;
if (Math.abs(_local7 - _local4) > 4) {
var _local3 = int((_local7 - _local4) / 5);
this._x = this._x - _local3;
_root.bgScroll = _root.bgScroll + (_local3 / 2);
}
} else {
_root.cameraMoving = false;
}
if (_root.playerJumping) {
var _local3 = int((_local8 - _local6) / 6);
this._y = this._y - _local3;
} else if (Math.abs((this._y + this.player._y) - 150) > 1) {
var _local3 = int((_local8 - _local6) / 2);
this._y = this._y - _local3;
}
};
_global.playerLogic = function () {
var _local4 = 0;
while (_local4 < _root.bitmapMemory.length) {
if ((_root.bitmapMemory[_local4][1] < (this._x + _root.portalMax)) && (_root.bitmapMemory[_local4][1] > (this._x - _root.portalMin))) {
_root.bitmapMemory[_local4][0].cacheAsBitmap = true;
_root.bitmapMemory[_local4][0]._visible = true;
} else {
_root.bitmapMemory[_local4][0]._visible = false;
_root.bitmapMemory[_local4][0].cacheAsBitmap = false;
}
_local4++;
}
if (_root.playerState == "stand") {
if (!Key.isDown(90)) {
_root.key_z = false;
}
if (!Key.isDown(88)) {
_root.key_x = false;
}
if (!Key.isDown(67)) {
_root.key_c = false;
}
this.attackTime = 10000000000;
_root.playerAttacking = false;
if ((_root.showSplash || (_root.showSplash2)) && (_root.game.player._y > 0)) {
}
} else if (((((((_root.playerState == "run") || (_root.playerState == "jump")) || (_root.playerState == "land")) || (_root.playerState == "duck")) || (_root.playerState == "stillducking")) || (_root.playerState == "standingup")) || (_root.playerState == "fall")) {
if (!Key.isDown(90)) {
_root.key_z = false;
}
if (!Key.isDown(88)) {
_root.key_x = false;
}
if (!Key.isDown(67)) {
_root.key_c = false;
}
}
if (_root.playerState != "stand") {
}
_root.comboCounter++;
if (_root.playerHealth > 0) {
_root.HUD.sword.health.gotoAndStop((100 - _root.playerHealth) + 1);
this.dieCount = 0;
}
if (_root.playerHealth <= 0) {
_root.playerState = "die";
if (this.dieCount > 36) {
if (!dead) {
dead = true;
if (_root.lives > 0) {
_root.lives--;
if (_root.lives > 4) {
_root.HUD.livesBar.gotoAndStop(5);
} else {
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
}
_root.playerHealth = 0;
_root.gotoNext = "continue";
} else {
_root.gotoLast = "start";
_root.gotoNext = "gameover";
}
if (_root.levelNum == "level2") {
_global.snowStop();
} else if (_root.levelNum == "level3") {
_global.stopFog();
} else if (_root.levelNum == "level4") {
_global.rainStop();
}
_root.fadeout.play();
}
} else {
this.dieCount++;
}
} else {
dead = false;
if (_root.playerInvincible) {
myflash++;
if ((myflash % 4) < 2) {
}
if (myflash > 30) {
_root.playerInvincible = false;
}
} else {
myflash = 0;
}
}
if ((this._xscale > 0) && (_root.playerDir < 0)) {
this._xscale = -this._xscale;
_root.game.combo._alpha = 0;
_root.score = _root.score + (_root.hitCount * 10);
_root.hitCount = 0;
_root.comboMeter = false;
} else if ((this._xscale < 0) && (_root.playerDir > 0)) {
this._xscale = -this._xscale;
_root.score = _root.score + (_root.hitCount * 10);
_root.hitCount = 0;
_root.comboMeter = false;
}
this.gotoAndStop(_root.playerState);
if (_root.playerState != "run") {
_root.runCounter = 0;
if (_root.showSplash || (_root.showSplash2)) {
if (_root.water_run_sound.position > 0) {
_root.water_run_sound.stop("watersteps");
_root.running_sound = false;
}
} else if (_root.run_sound.position > 0) {
_root.run_sound.stop("shoes_loud");
_root.running_sound = false;
}
_root.game.runsplash.removeMovieClip();
_root.game.runsplash2.removeMovieClip();
} else {
_root.runCounter++;
}
if (!_global.checkWall(this, _root.playerHeight, _root.playerDx)) {
if (_root.gotoNext == "level2intro") {
if (_root.game.boss_holder.boss.state != "waiting") {
if ((this._x + _root.playerDx) < 17250) {
} else {
this._x = this._x + _root.playerDx;
}
} else {
this._x = this._x + _root.playerDx;
}
} else {
this._x = this._x + _root.playerDx;
}
}
this._y = this._y + _root.playerDy;
if (_root.platforming) {
if ((!_global.checkGround(this, _root.playerHeight, 0)) && (!_global.checkGround(this, _root.playerHeight * 1.3, 0))) {
_root.playerDy = _root.playerDy + _root.gravity;
if ((((_root.playerState == "run") || (_root.playerState == "walk")) || (_root.playerState == "stand")) && (_root.playerDy > 24)) {
_root.playerJumping = true;
_root.playerState = "fall";
}
if ((((_root.playerJumping && (_root.playerDy > 5)) && (_root.playerState != "jumpkick")) && (_root.playerState != "jumppunch")) && (_root.playerState != "vert_jumppunch")) {
_root.playerState = "fall";
_root.gravity = _root.globalGravity;
}
} else if (_root.playerJumping) {
_root.playerJumping = false;
if (_root.playerDx != 0) {
_root.playerState = "land";
} else {
_root.playerState = "standingup";
}
walkCount = 12;
_root.playerDx = 0;
_root.playerDy = 0;
_root.gravity = _root.globalGravity;
}
} else if (!_global.checkGround(this, _root.playerHeight, 0)) {
_root.playerDy = _root.playerDy + _root.gravity;
if ((((_root.playerState == "run") || (_root.playerState == "walk")) || (_root.playerState == "stand")) && (_root.playerDy > 24)) {
_root.playerJumping = true;
_root.playerState = "fall";
}
if ((((_root.playerJumping && (_root.playerDy > 5)) && (_root.playerState != "jumpkick")) && (_root.playerState != "jumppunch")) && (_root.playerState != "vert_jumppunch")) {
_root.playerState = "fall";
_root.gravity = _root.globalGravity;
}
} else if (_root.playerJumping) {
_root.playerJumping = false;
if (_root.playerDx != 0) {
_root.playerState = "land";
} else {
_root.playerState = "standingup";
}
walkCount = 12;
_root.playerDx = 0;
_root.playerDy = 0;
_root.gravity = _root.globalGravity;
}
if ((_root.playerState != "duck") && (_root.playerState != "stillducking")) {
if ((!_root.playerJumping) && (((((_root.playerState == "walk") || (_root.playerState == "run")) || (_root.playerState == "duck")) || (_root.playerState == "up")) || (_root.playerState == "die"))) {
_root.playerState = "stand";
_root.playerAttacking = false;
}
} else if (_root.playerState == "stillducking") {
if (Key.isDown(40)) {
_root.playerState = "stillducking";
} else {
_root.playerState = "standingup";
}
} else {
_root.playerState = "standingup";
_root.playerAttacking = false;
}
if ((((_root.playerState != "highpunch") && (_root.playerState != "vert_highpunch")) && (_root.playerState != "highkick")) && (_root.playerState != "capespin")) {
_root.playerDx = 0;
}
if (_root.playerState == "capespin") {
_root.superComboCount++;
if (_root.superComboCount > 14) {
_root.playerDx = 0;
}
}
if ((_root.playerState == "highpunch") || (_root.playerState == "vert_highpunch")) {
_root.playerDx = _root.playerDir * 2;
} else if (_root.playerState == "highkick") {
_root.playerDx = _root.playerDir * 5;
} else if (_root.playerState == "hurt") {
_root.playerDx = (-_root.playerDir) * 4;
} else if (_root.playerState == "hurt2") {
_root.playerDx = _root.playerDir * 4;
}
if (_root.playerHealth > 0) {
if (((((!_root.isPaused) && (_root.playerState != "electro")) && (_root.playerState != "hurt")) && (_root.playerState != "hurt2")) && (_root.playerState != "capespin")) {
if (Key.isDown(40)) {
if (((!_root.key_z) && (!_root.key_x)) && (!_root.key_c)) {
if ((((((!_root.playerJumping) && (_root.playerState != "vert_punch")) && (_root.playerState != "vert_jumppunch")) && (_root.playerState != "vert_lowpunch")) && (_root.playerState != "lowkick")) && (_root.playerState != "lowpunch")) {
if (_root.playerState == "stillducking") {
} else {
if ((((((!this.duckSound) && (_root.playerDx == 0)) && (_root.playerState != "duck")) && (_root.playerState != "stillducking")) && (_root.playerState != "standingup")) && (_root.playerState != "run")) {
_root.duck_sound.start();
this.duckSound = true;
}
_root.playerState = "duck";
}
}
}
} else {
this.duckSound = false;
}
if (Key.isDown(37) && (!Key.isDown(39))) {
this.duckSound = true;
if ((((((((_root.playerState != "punch") && (_root.playerState != "lowpunch")) && (_root.playerState != "highpunch")) && (_root.playerState != "lowkick")) && (_root.playerState != "highkick")) && (_root.playerState != "vert_punch")) && (_root.playerState != "vert_lowpunch")) && (_root.playerState != "vert_highpunch")) {
if ((((!_root.playerJumping) && (_root.playerState != "kick")) && (_root.playerState != "jumppunch")) && (_root.playerState != "vert_jumppunch")) {
_root.playerState = "run";
_root.playerWalkSpeed = 6;
if ((_root.showSplash || (_root.showSplash2)) && (_root.game.player._y > 100)) {
if (!_root.running_sound) {
_root.water_run_sound.start();
_root.running_sound = true;
}
_root.game.runsplash.removeMovieClip();
_root.playerDx = (-_root.playerSpeed) + 4;
_root.game.runSpawn2.duplicateMovieClip("runsplash2", _root.game.getNextHighestDepth());
_root.game.runsplash2._x = _root.game.player._x + 15;
_root.game.runsplash2._y = _root.game.player._y - 40;
} else {
if (!_root.running_sound) {
_root.run_sound.start();
_root.running_sound = true;
}
_root.playerDx = -_root.playerSpeed;
_root.game.runsplash2.removeMovieClip();
}
} else if ((_root.playerState == "kick") || (_root.playerState == "capespin")) {
_root.playerDx = (-_root.playerSpeed) / 2;
_root.playerWalkSpeed = 6;
} else if (_root.playerState == "highkick") {
_root.playerDx = (-_root.playerSpeed) / 4;
_root.playerWalkSpeed = 6;
} else if ((_root.playerState == "jumppunch") || (_root.playerState == "vert_jumppunch")) {
_root.playerDx = (-_root.playerSpeed) / 1.4;
_root.playerWalkSpeed = 6;
} else {
_root.playerDx = -_root.playerSpeed;
_root.playerWalkSpeed = 6;
}
_root.playerDir = -1;
}
}
if (Key.isDown(39) && (!Key.isDown(37))) {
this.duckSound = true;
if ((((((((_root.playerState != "vert_punch") && (_root.playerState != "vert_lowpunch")) && (_root.playerState != "vert_highpunch")) && (_root.playerState != "punch")) && (_root.playerState != "lowpunch")) && (_root.playerState != "highpunch")) && (_root.playerState != "lowkick")) && (_root.playerState != "highkick")) {
if ((((!_root.playerJumping) && (_root.playerState != "kick")) && (_root.playerState != "jumppunch")) && (_root.playerState != "vert_jumppunch")) {
_root.playerState = "run";
_root.playerWalkSpeed = 6;
if ((_root.showSplash || (_root.showSplash2)) && (_root.game.player._y > 100)) {
if (!_root.running_sound) {
_root.water_run_sound.start();
_root.running_sound = true;
}
_root.playerDx = _root.playerSpeed - 4;
_root.game.runsplash2.removeMovieClip();
_root.game.runSpawn.duplicateMovieClip("runsplash", _root.game.getNextHighestDepth());
_root.game.runsplash._x = _root.game.player._x - 15;
_root.game.runsplash._y = _root.game.player._y - 40;
} else {
if (!_root.running_sound) {
_root.run_sound.start();
_root.running_sound = true;
}
_root.playerDx = _root.playerSpeed;
_root.game.runsplash.removeMovieClip();
}
} else if (_root.playerState == "kick") {
_root.playerDx = _root.playerSpeed / 2;
_root.playerWalkSpeed = 6;
} else if (_root.playerState == "highkick") {
_root.playerDx = (-_root.playerSpeed) / 4;
_root.playerWalkSpeed = 6;
} else if ((_root.playerState == "jumppunch") || (_root.playerState == "vert_jumppunch")) {
_root.playerDx = _root.playerSpeed / 1.4;
_root.playerWalkSpeed = 6;
} else {
_root.playerDx = _root.playerSpeed;
_root.playerWalkSpeed = 6;
}
_root.playerDir = 1;
}
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
walkCount = 0;
_root.playerWalkSpeed = 6;
}
if (Key.isDown(67)) {
if (!_root.key_c) {
_root.superCombo = true;
}
if (((!_root.key_z) && (!_root.key_x)) && (!_root.key_c)) {
_root.key_c = true;
_root.camDelay = 0;
_root.playerWalkSpeed = 6;
if (_root.playerJumping) {
if (_root.playerDy > -32) {
_root.playerState = "jumpkick";
}
} else if ((_root.runCounter > 4) || ((Key.isDown(39) || (Key.isDown(37))) && (Key.isDown(38)))) {
_root.playerState = "capespin";
_root.superCombo = true;
_root.superComboCount = 0;
_root.runCounter = 0;
} else if (Key.isDown(38)) {
_root.playerState = "highkick";
} else if (Key.isDown(40)) {
_root.playerState = "lowkick";
} else {
_root.playerState = "kick";
}
this.attackTime = getTimer();
_root.playerAttacking = true;
walkCount = 0;
}
}
if (Key.isDown(88)) {
if (!_root.key_x) {
_root.ultraCombo = true;
}
if (((!_root.key_z) && (!_root.key_x)) && (!_root.key_c)) {
_root.key_x = true;
_root.camDelay = 0;
_root.playerWalkSpeed = 6;
if (_root.playerJumping) {
_root.playerState = "jumppunch";
} else if ((_root.playerState == "run") && (_root.runCounter > 12)) {
_root.playerJumping = true;
_root.playerDy = -25;
_root.gravity = _root.globalGravity;
_root.playerState = "jumppunch";
} else if (Key.isDown(38)) {
_root.playerState = "highpunch";
} else if (Key.isDown(40)) {
_root.playerState = "lowpunch";
} else {
_root.playerState = "punch";
_root.ultraCombo = true;
}
this.attackTime = getTimer();
if (this.attackTime >= 999999999) {
_root.zen.play();
}
_root.playerAttacking = true;
walkCount = 0;
}
}
if (Key.isDown(90)) {
if (!_root.key_z) {
_root.ultraCombo = true;
}
if (((!_root.key_z) && (!_root.key_x)) && (!_root.key_c)) {
_root.key_z = true;
_root.camDelay = 0;
_root.playerWalkSpeed = 6;
if (_root.playerJumping) {
_root.playerState = "vert_jumppunch";
} else if ((_root.playerState == "run") && (_root.runCounter > 12)) {
_root.playerJumping = true;
_root.playerDy = -25;
_root.gravity = _root.globalGravity;
_root.playerState = "vert_jumppunch";
} else if (Key.isDown(38)) {
_root.playerState = "vert_highpunch";
} else if (Key.isDown(40)) {
_root.playerState = "vert_lowpunch";
} else {
_root.playerState = "vert_punch";
_root.ultraCombo = true;
}
this.attackTime = getTimer();
_root.playerAttacking = true;
walkCount = 0;
}
}
if (Key.isDown(32)) {
if (!_root.key_space) {
_root.key_space = true;
if (!_root.playerJumping) {
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerState = "jump";
_root.playerDy = -52;
_root.gravity = _root.globalGravity;
walkCount = 12;
}
}
} else {
_root.key_space = false;
}
if (Key.isDown(83)) {
if (!key_s) {
_global.cheat = "S";
key_s = true;
}
} else {
key_s = false;
}
if (Key.isDown(85)) {
if (!key_u) {
_global.cheat = _global.cheat + "U";
key_u = true;
}
} else {
key_u = false;
}
if (Key.isDown(78)) {
if (!key_n) {
_global.cheat = _global.cheat + "N";
key_n = true;
}
} else {
key_n = false;
}
if (Key.isDown(70)) {
if (!key_f) {
_global.cheat = _global.cheat + "F";
key_f = true;
}
} else {
key_f = false;
}
if (Key.isDown(76)) {
if (!key_l) {
_global.cheat = _global.cheat + "L";
key_l = true;
}
} else {
key_l = false;
}
if (Key.isDown(79)) {
if (!key_o) {
_global.cheat = _global.cheat + "O";
key_o = true;
}
} else {
key_o = false;
}
if (Key.isDown(87)) {
if (!key_w) {
_global.cheat = _global.cheat + "W";
key_w = true;
}
} else {
key_w = false;
}
if (Key.isDown(69)) {
if (!key_e) {
_global.cheat = _global.cheat + "E";
key_e = true;
}
} else {
key_e = false;
}
if (Key.isDown(82)) {
if (!key_r) {
if (_global.cheat == "SUNFLOWE") {
_root.playerHealth = 100;
_root.bonus_sound.start();
}
key_r = true;
}
} else {
key_r = false;
}
} else if (Key.isDown(67)) {
if (!_root.key_c) {
_root.key_c = true;
_root.superCombo = true;
}
} else {
_root.key_c = false;
}
}
};
_global.tenguAI = function () {
this.gotoAndStop(this.state);
if (this.range < 200) {
}
if (this.health > 0) {
if (this.invincibleCounter > 0) {
if ((this.invincibleCounter % 4) > 2) {
this._visible = false;
} else {
this._visible = true;
}
this.invincibleCounter = this.invincibleCounter + 3;
}
if (this.invincibleCounter > 12) {
this.invincible = false;
this.invincibleCounter = 0;
this._visible = true;
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (((this.range > 400) || ((this.range > 700) && (this.state == "retreat"))) && (this.rangey < 120)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((this.range < (280 + random(40))) && (this.range > 50)) {
if (((((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "jump")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
if (this.range < 240) {
this.state = "attack";
this.attackTime = getTimer();
this.sfxCount = 0;
} else {
if ((this._parent._y > 200) && (random(2) == 0)) {
if (!_global.checkWallatt(this._parent, -50, 300 * this._parent.dir)) {
this.state = "jump";
this.sfxCount = 0;
}
} else {
this.state = "attack";
this.attackTime = getTimer();
this.sfxCount = 0;
}
this.attackTime = getTimer();
}
this.attackCount = 0;
}
} else if ((this.range < 50) && (this.rangey < 200)) {
if (this.state == "walk") {
this.state = "retreat";
}
} else if ((this.range < (240 - random(20))) && (this.rangey < 200)) {
if (((((this.attackCount > 10) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
this.sfxCount = 0;
} else {
this.attackCount++;
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 200)) {
this.state = "stand";
}
} else if (this.state == "stand") {
if (this.range < 350) {
this.state = "walk";
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, (this.speed * 2) * this._parent.dir)) && (_global.checkEdge(this._parent, 50, ((this.speed * 2) * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
} else {
this._parent.dir = this._parent.dir * -1;
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
} else {
this._parent.dir = this._parent.dir * -1;
}
this.attackCount++;
if (((this.range < 250) && (this.range < 150)) && (random(6) == 0)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
this.sfxCount = 0;
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this._parent, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (5 * this._parent.dir);
}
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 9) {
this.stunCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
} else if (this.state == "attack") {
if (this.sfxCount > 6) {
_root.woosh.start();
this.sfxCount = -6;
} else {
this.sfxCount++;
}
} else if (this.state == "jump") {
if (this.sfxCount > 8) {
_root.woosh.start();
this.sfxCount = -6;
} else {
this.sfxCount++;
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker) || (this.jump.attack.spear_tip.hitTest(_root.game.player.hitChecker))) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (_global.checkPlayer(this._parent, this._parent.dir, 0) || (_global.checkPlayer(this._parent, this._parent.dir * -1, 0))) {
if ((this.state == "attack") && (this._parent.dir != _root.playerDir)) {
_root.playerDx = 0;
}
if (((_root.playerAttacking && (this.attackTime >= _root.game.player.attackTime)) && (this.state != "hurt")) && (this.state != "hurt_blood")) {
_root.playerDx = 0;
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 18;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
} else if (((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) || (_root.playerState == "capespin")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
this.state = "stun";
this.stunCount = 0;
_root.kick.start();
this.health = this.health - 22;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 18;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
this._visible = true;
}
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 30) {
if ((this.flash % 5) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.samuraiAI = function () {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.health > 0) {
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (this.state != "retreat") {
if ((this.range > (125 + random(150))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
} else if ((this.range > (25 + random(25))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((this.range < (240 + random(40))) && (this.range > (75 + random(25)))) {
if (((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) {
if ((this.range > 80) && (this.state != "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
trace("\u00B9\u00A5\u00BB\u00F7");
} else if ((this.range > (160 + random(50))) && (this.state == "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
trace("\u00B9\u00A5\u00BB\u00F72");
}
}
} else if ((this.range < (80 - random(20))) && (this.rangey < 400)) {
if ((((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) {
if (random(18) == 0) {
this.state = "retreat";
}
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "stand") {
if (this.range < 350) {
this.state = "walk";
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x - (this.speed * this._parent.dir);
}
this.attackCount++;
if (this.range > (200 + random(50))) {
this.state = "walk";
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 9) {
this.stunCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) {
_root.playerDx = 0;
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 2500;
this.state = "die";
}
} else if ((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) && (this.attackCount > 10)) {
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.samuraiAIs = function () {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.health > 0) {
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (this.state != "retreat") {
if ((this.range > (125 + random(150))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
} else if ((this.range > (25 + random(25))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((this.range < (240 + random(40))) && (this.range > (75 + random(25)))) {
if (((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) {
if ((this.range > 80) && (this.state != "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
trace("\u00B9\u00A5\u00BB\u00F7");
} else if ((this.range > (160 + random(50))) && (this.state == "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
trace("\u00B9\u00A5\u00BB\u00F72");
}
}
} else if ((this.range < (80 - random(20))) && (this.rangey < 400)) {
if ((((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) {
if (random(18) == 0) {
this.state = "retreat";
}
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "stand") {
if (this.range < 350) {
this.state = "walk";
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x - (this.speed * this._parent.dir);
}
this.attackCount++;
if (this.range > (200 + random(50))) {
this.state = "walk";
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 9) {
this.stunCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) {
_root.playerDx = 0;
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 2500;
this.state = "die";
}
} else if ((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) && (this.attackCount > 10)) {
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.samuraiAI2 = function () {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.health > 0) {
if ((this.rangey > 75) && (this.state == "walk")) {
this.state = "stand";
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (this.state != "retreat") {
if ((this.range > (125 + random(150))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
} else if ((this.range > (25 + random(25))) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((this.range < (100 + random(40))) && (this.range > (50 + random(25)))) {
if (((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) {
if ((this.range > 50) && (this.state != "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
} else if ((this.range > (120 + random(50))) && (this.state == "retreat")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch.start();
}
}
} else if ((this.range < (80 - random(20))) && (this.rangey < 400)) {
if ((((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) {
if (random(18) == 0) {
this.state = "retreat";
}
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "stand") {
if ((this.range < (350 + random(25))) && (this.rangey < 75)) {
this.state = "walk";
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x - (this.speed * this._parent.dir);
}
this.attackCount++;
if (this.range > (160 + random(90))) {
this.state = "walk";
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 8) {
this.stunCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) {
_root.playerDx = 0;
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
this._parent._x = this._parent._x - (4 * this._parent.dir);
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
this._parent._x = this._parent._x - (4 * this._parent.dir);
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
this._parent._x = this._parent._x - (4 * this._parent.dir);
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.samurai.play();
this._parent._x = this._parent._x - (4 * this._parent.dir);
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 7500;
this.state = "die";
}
} else if ((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) && (this.attackCount > 10)) {
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_root.starCount = 0;
_global.makeNinjaStar = function (ninja) {
if (!_root.isPaused) {
_root.game.ninjastar.duplicateMovieClip("star" + _root.starCount, _root.getNextHighestDepth());
_root.game["star" + _root.starCount]._xscale = -35 * ninja.dir;
_root.game["star" + _root.starCount]._yscale = 35;
_root.game["star" + _root.starCount]._x = ninja._x + (15 * ninja.dir);
_root.game["star" + _root.starCount]._y = ninja._y - 100;
_root.game["star" + _root.starCount].dir = ninja.dir;
_root.game["star" + _root.starCount].speed = 39;
_root.game["star" + _root.starCount].strength = 3;
_root.game["star" + _root.starCount].onEnterFrame = function () {
if ((this._x > 30000) || (this._x < -30000)) {
this.removeMovieClip();
}
this._x = this._x + (this.speed * this.dir);
if (this.hitTest(_root.game.player.hitChecker)) {
if ((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (!_root.playerInvincible)) && (!_root.playerJumping)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
};
_root.starCount++;
}
};
_global.ninjaAI = function () {
if (_root.isPaused) {
this.gotoAndStop("stand");
this._parent.dir = 1;
} else {
this.gotoAndStop(this.state);
if (this.dy != 0) {
this._y = this._y + this.dy;
this.dy = this.dy + _root.gravity;
if (this._y > this.defaulty) {
this._y = this.defaulty;
this.dy = 0;
this.state = "land";
this.attackTime = 100000000000;
}
}
if (this.range < 600) {
}
if (this.health > 0) {
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (((((this.range > 300) && (this.range < 425)) && (this.rangey < 400)) && (this.dy == 0)) && (random(5) == 0)) {
this.attackCount++;
if (this.attackCount > 24) {
this.state = "throw";
this.attackCount = 0;
_root.woosh.start();
}
}
if (((((((this.range > (300 + random(100))) && (this.rangey < 400)) && (random(5) == 0)) && (this.state != "jump")) && (this.state != "fall")) && (this.state != "land")) && (this.state != "throw")) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if (((this.range < (440 - random(60))) && (this.range > 320)) && (random(3) == 0)) {
if (((((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "jump")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
if ((this._parent._y > 700) && (this._parent._y < 1900)) {
if (this.attackCount > 18) {
this.state = "throw";
this.attackCount = 0;
_root.woosh.start();
}
this.attackCount++;
} else if (!_global.checkWallatt(this._parent, -50, 300 * this._parent.dir)) {
this.state = "jump";
this.dy = -40;
} else if (this.attackCount > 10) {
this.state = "throw";
this.attackCount = 0;
_root.woosh.start();
} else {
this.attackCount++;
}
}
} else if ((this.range < 100) && (this.rangey < 400)) {
if ((((((((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.state != "jump")) && (this.state != "land")) && (this.state != "punch")) && (this.state != "throw")) && (this.state != "die")) {
if ((this._parent._y > 700) && (this._parent._y < 1900)) {
} else if (random(4) == 0) {
this.state = "retreat";
this._parent.dir = this._parent.dir * -1;
}
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
this.defaulty = this._y;
if ((this.range < 600) && (this.rangey < 400)) {
this.state = "throw";
this.attackCount = 0;
_root.woosh.start();
}
} else if (this.state == "stand") {
if (this.range < 400) {
if ((this._parent._y > 700) && (this._parent._y < 1900)) {
} else {
this.state = "walk";
}
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
} else {
this._parent.dir = this._parent.dir * -1;
}
this.attackCount++;
if ((this.range < 120) && (this.attackCount > 12)) {
this.state = "throw";
this.attackCount = 0;
_root.woosh.start();
}
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
} else if (random(4) == 0) {
this._parent.dir = this._parent.dir * -1;
}
this.attackCount++;
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this, -50, -6 * this._parent.dir)) {
}
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 9) {
this.stunCount = 0;
_root.comboCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
} else if (this.state == "jump") {
this._parent._x = this._parent._x + (18 * this._parent.dir);
if (this.dy > 0) {
this.state = "punch";
this.attackTime = getTimer();
this.attackCount = 0;
_root.woosh.start();
}
} else if (this.state == "fall") {
this.attackTime = 100000000000;
} else if (this.state == "punch") {
this._parent._x = this._parent._x + (36 * this._parent.dir);
}
if ((this.state == "jump") || (this.state == "punch")) {
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if (_root.playerAttacking) {
if (!_root.playerJumping) {
_root.playerDx = 0;
}
if (_root.playerAttacking && (this.state != "fall")) {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
this.dy = 12;
this.attackTime = 100000000000;
}
}
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if ((((((_root.playerAttacking && (this.state != "jump")) && (this.state != "fall")) && (this.state != "punch")) && (this.state != "land")) && (this.state != "hurt")) && (this.state != "hurt_blood")) {
if (!_root.playerJumping) {
_root.playerDx = 0;
}
if (_root.playerAttacking && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.ninja.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch2.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.ninja.play();
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.ninja.play();
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 15;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.ninja.play();
}
}
}
if (this.health <= 0) {
if (this.dy != 0) {
this._y = this._y + this.dy;
this.dy = this.dy + _root.gravity;
if (this._y > this.defaulty) {
this._y = this.defaulty;
this.dy = 0;
_root.score = _root.score + 1000;
this.state = "die";
}
}
} else if ((((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.state != "jump")) && (this.state != "land")) && (this.state != "punch")) && (this.attackCount > 10)) {
if ((this._parent._y > 700) && (this._parent._y < 1900)) {
} else {
this.state = "retreat";
this.attackCount = 0;
this._parent.dir = this._parent.dir * -1;
}
}
}
}
} else {
if (!this.flash) {
if (this._y != this.defaulty) {
this._y = this._y + this.dy;
this.dy = this.dy + _root.gravity;
if (this._y > this.defaulty) {
this._y = this.defaulty;
this.dy = 0;
_root.score = _root.score + 1000;
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
this.gotoAndStop(this.state);
}
} else {
_root.score = _root.score + 5000;
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
this.gotoAndStop(this.state);
}
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
}
};
_global.samuraiAI_OLD = function () {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.health > 0) {
if (this.invincibleCounter > 0) {
if (this.invincibleCounter > 15) {
this.invincible = true;
if ((this.invincibleCounter % 4) > 2) {
this._visible = false;
} else {
this._visible = true;
}
}
this.invincibleCounter++;
}
if (this.invincibleCounter > 40) {
this.invincible = false;
this.invincibleCounter = 0;
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if ((this.range > 175) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
} else if ((this.range < 100) && (this.range > 10)) {
if (((((((((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "jump")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
}
} else if ((this.range < 30) && (this.rangey < 400)) {
if (((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
this.state = "retreat";
this._parent.dir = this._parent.dir * -1;
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "stand") {
if (this.range < 350) {
this.state = "walk";
}
this.attackCount++;
} else if (this.state == "walk") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this._parent, -50, this.speed * this._parent.dir)) && (_global.checkEdge(this._parent, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this._parent, -50, -6 * this._parent.dir)) {
}
}
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (!_root.playerInvincible)) && (!_root.playerJumping)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (((_global.checkPlayer(this._parent, this._parent.dir, -20) || (_global.checkPlayer(this._parent, this._parent.dir, -120))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -20))) || (_global.checkPlayer(this._parent, this._parent.dir * -1, -120))) {
if (_root.playerAttacking) {
_root.playerDx = 0;
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if (_root.lastHit1 != _root.playerState) {
if (_root.lastHit1 == "") {
this.invincibleCounter = 1;
_root.comboCounter = 0;
} else if (_root.lastHit2 == "") {
this.invincibleCounter = 1;
} else if (_root.lastHit3 == "") {
this.invincibleCounter = 1;
}
_root.lastHit3 = _root.lastHit2;
_root.lastHit2 = _root.lastHit1;
_root.lastHit1 = _root.playerState;
_root.kick.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if (_root.lastHit1 != _root.playerState) {
if (_root.lastHit1 == "") {
this.invincibleCounter = 1;
_root.comboCounter = 0;
} else if (_root.lastHit2 == "") {
this.invincibleCounter = 1;
} else if (_root.lastHit3 == "") {
this.invincibleCounter = 1;
}
_root.lastHit3 = _root.lastHit2;
_root.lastHit2 = _root.lastHit1;
_root.lastHit1 = _root.playerState;
_root.punch2.start();
this.health = this.health - 15;
this.state = "hurt_blood";
fallCount = 0;
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if (_root.lastHit1 != _root.playerState) {
if (_root.lastHit1 == "") {
this.invincibleCounter = 1;
_root.comboCounter = 0;
} else if (_root.lastHit2 == "") {
this.invincibleCounter = 1;
} else if (_root.lastHit3 == "") {
this.invincibleCounter = 1;
}
_root.lastHit3 = _root.lastHit2;
_root.lastHit2 = _root.lastHit1;
_root.lastHit1 = _root.playerState;
this.state = "hurt_blood";
_root.punch.start();
this.health = this.health - 15;
fallCount = 0;
}
} else if (_root.playerState == "capespin") {
if (_root.lastHit1 != _root.playerState) {
if (_root.lastHit1 == "") {
this.invincibleCounter = 1;
_root.comboCounter = 0;
} else if (_root.lastHit2 == "") {
this.invincibleCounter = 1;
} else if (_root.lastHit3 == "") {
this.invincibleCounter = 1;
}
_root.lastHit3 = _root.lastHit2;
_root.lastHit2 = _root.lastHit1;
_root.lastHit1 = _root.playerState;
_root.kick.start();
this.health = this.health - 15;
this.state = "hurt_blood";
fallCount = 0;
}
}
}
if (_root.comboCounter >= _root.COMBOTIME) {
_root.comboCounter = 0;
_root.lastHit1 = "";
_root.lastHit2 = "";
_root.lastHit3 = "";
} else {
var _local4 = _global.checkForCombo();
if (_local4 > 0) {
_global.showCombo(_local4);
_root.comboCounter = 0;
_root.lastHit1 = "";
_root.lastHit2 = "";
_root.lastHit3 = "";
this.health = 0;
}
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
} else if (((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "retreat";
this.attackCount = 0;
}
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.nishiAI = function () {
if (this.health > 0) {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.invincibleCounter > 0) {
if (this.invincibleCounter > 1) {
this.invincible = true;
}
this.invincibleCounter++;
}
if (this.invincibleCounter > 38) {
this.invincible = false;
this.invincibleCounter = 0;
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if ((this.state == "waiting") || (this.state == "reveal")) {
if (this.range < 300) {
if (_root.bossOverlay._currentframe == 1) {
_root.bossOverlay.play();
}
}
} else {
if (((this.range > 170) && (this.rangey < 400)) && (this.range > 50)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((this.range < 600) && ((this.state == "stand") || (this.state == "retreat"))) {
this.state = "run";
this.attackCount++;
} else if (this.state == "run") {
if ((((((((this.range < 400) && (((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1)))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "jump")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
if ((this.range > 280) && (random(2) == 0)) {
this.state = "chain";
this.attackTime = getTimer();
this.attackCount = 0;
_root.whip.start();
}
if ((this.range > 160) && (random(5) == 0)) {
this.state = "whip";
this.attackTime = getTimer();
this.attackCount = 0;
_root.whip.start();
} else if ((this.range > 100) && (random(5) == 0)) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch2.start();
}
}
if ((!_global.checkWall(this, -50, this.speed * this._parent.dir)) && (_global.checkEdge_boss(this, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
if (this.range > 600) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "retreat") {
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (6 * this._parent.dir);
} else if ((this.range < 50) && (this.rangey < 400)) {
if (((((this.state != "attack") && (this.state != "retreat")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "die")) {
}
}
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 9) {
this.stunCount = 0;
_root.comboCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
if (_root.hitCount > (3 + random(4))) {
_root.comboCount = 0;
this.invincibleCounter = 1;
this.stunCount = 0;
if (random(2) == 0) {
this.state = "whip";
this.attackTime = getTimer() - 1000;
this.attackCount = 0;
_root.whip.start();
} else {
this.state = "break";
this.attackTime = getTimer() - 1000;
this.attackCount = 0;
_root.clash.start();
}
}
}
this._parent._xscale = (this._parent.dir * -1) * Math.abs(this._parent._xscale);
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (_root.game.player.hitTest(this._parent)) {
var _local5 = Math.floor(this.health / 2.6);
var _local4 = 100 - _local5;
_root.sword.health.gotoAndStop(_local4);
if (_root.playerAttacking) {
_root.playerDx = 0;
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
if (this.range > 40) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch2.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
} else if (_root.playerState == "capespin") {
if (((this.state != "stun") && (_root.hitCount < 4)) || (_root.hitCount < 4)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 15000;
this.state = "die";
}
} else if (((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.attackCount > 10)) {
}
}
}
} else {
this.gotoAndStop("die");
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.rtenguAI = function () {
if (this.health > 0) {
if (this.invincibleCounter > 0) {
this.invincible = true;
if ((this.invincibleCounter % 4) > 2) {
}
this.invincibleCounter = this.invincibleCounter + 1;
}
if (this.invincibleCounter > 64) {
this.invincible = false;
this.invincibleCounter = 0;
}
this.gotoAndStop(this.state);
if (this.dy != 0) {
this._parent._y = this._parent._y + this.dy;
this.dy = this.dy + _root.gravity;
if (this._parent._y > this.defaulty) {
this._parent._y = this.defaulty;
this.dy = 0;
this.state = "land";
this.attackTime = 100000000000;
}
}
if (this.range < 1500) {
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if ((this.state == "waiting") || (this.state == "reveal")) {
if (this.range < 350) {
if (_root.bossOverlay._currentframe == 1) {
_root.bossOverlay.play();
}
}
} else {
if (this.range > 300) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
if (this.state != "run") {
this.sfxCount = 0;
}
if (this.state == "stand") {
if ((this.range > 10) && (this.range < 600)) {
this.state = "run_start";
this.attackCount++;
}
} else if (this.state == "run") {
if (this.sfxCount > (2 + random(2))) {
_root.woosh.start();
this.sfxCount = 0;
} else {
this.sfxCount++;
}
if (((this.range < 320) && (this.attackCount > 16)) && (((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1)))) {
this.attackCount++;
if (((this.range < 200) && (this.range > 150)) && (random(8) == 0)) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch2.start();
} else if (((this.range > 260) && (this._parent._x > 17450)) && (random(8) == 0)) {
this.state = "jump";
this.dy = -40;
}
} else {
this.attackTime = getTimer();
}
if (this._parent._x < 17300) {
_root.flipCounter++;
if (_root.flipCounter > 5) {
this._parent._x = this._parent._x + this.speed;
this._parent.dir = 1;
_root.flipCounter = 0;
}
} else if (this._parent._x > 18250) {
this._parent._x = this._parent._x - this.speed;
this._parent.dir = -1;
} else {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
if (this.range > 600) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "retreat") {
this.state = "stand";
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(_parent, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (6 * this._parent.dir);
}
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 10) {
this.stunCount = 0;
_root.comboCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
if (_root.hitCount > (3 + random(6))) {
_root.comboCount = 0;
this.invincibleCounter = 1;
this.stunCount = 0;
if (random(3) == 0) {
this.state = "break";
this.attackTime = getTimer() - 1000;
this.attackCount = 0;
_root.clash.start();
} else {
this.state = "jump";
this.dy = -40;
}
}
} else if (this.state == "jump") {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
if (this.dy > 0) {
if (random(4) == 0) {
this.state = "fall";
} else {
this.state = "spear";
this.attackTime = getTimer();
this.attackCount = 0;
_root.punch2.start();
}
}
} else if (this.state == "fall") {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
} else if (this.state == "spear") {
this._parent._x = this._parent._x + ((this.speed * this._parent.dir) * 1.8);
this.attackTime = getTimer();
}
this._parent._xscale = (this._parent.dir * -1) * Math.abs(this._parent._xscale);
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker) || (this.jump.attack.spear_tip.hitTest(_root.game.player.hitChecker))) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (_root.game.player.hitTest(this._parent)) {
var _local5 = Math.floor(this.health / 1.2);
var _local6 = 100 - _local5;
_root.sword.health.gotoAndStop(_local6);
trace("\u00C9\u00CB\u00BA\u00A6" + _local5);
if (_root.playerAttacking && (this._parent._y == this.defaulty)) {
_root.playerDx = 0;
if (_root.playerAttacking && (this.attackTime >= _root.game.player.attackTime)) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (!_global.checkWall(_parent, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (6 * this._parent.dir);
}
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (!_global.checkWall(_parent, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (6 * this._parent.dir);
}
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.tengu.play();
if (!_global.checkWall(_parent, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (6 * this._parent.dir);
}
}
}
}
if (this.health <= 0) {
_root.score = _root.score + 10000;
this.state = "die";
}
} else if ((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "stun")) && (this.state != "fall")) && (this.attackCount > 10)) {
}
}
}
} else {
this.gotoAndStop("die");
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_root.kiCount = 0;
_global.makeKi = function (boss, fast) {
_root.splash.start();
_root.game.kiSpawn.duplicateMovieClip("ki" + _root.kiCount, _root.getNextHighestDepth());
_root.game["ki" + _root.kiCount]._xscale = 140;
_root.game["ki" + _root.kiCount]._yscale = 120;
_root.game["ki" + _root.kiCount]._x = boss._x + (15 * boss.dir);
_root.game["ki" + _root.kiCount]._y = boss._y + 105;
_root.game["ki" + _root.kiCount].dir = boss.dir;
if (fast) {
_root.game["ki" + _root.kiCount].speed = 36;
} else {
_root.game["ki" + _root.kiCount].speed = 36;
}
_root.game["ki" + _root.kiCount].strength = 6;
_root.game["ki" + _root.kiCount]._xscale = boss.dir * Math.abs(_root.game["ki" + _root.kiCount]._xscale);
_root.game["ki" + _root.kiCount].onEnterFrame = function () {
if ((this._x > 30000) || (this._x < -30000)) {
this.removeMovieClip();
}
this._x = this._x + (this.speed * this.dir);
if (this.hitBox.hitTest(_root.game.player.hitChecker)) {
if ((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
};
_root.kiCount++;
};
_global.shyAI = function () {
if (this.health > 0) {
this.gotoAndStop(this.state);
if (this.range < 400) {
}
if (this.invincibleCounter > 0) {
if (this.invincibleCounter > 10) {
this.invincible = true;
}
this.invincibleCounter++;
}
if (this.invincibleCounter > 24) {
this.invincible = false;
this.invincibleCounter = 0;
}
if (this.falling) {
this.state = "fall";
if (this._parent._y < 450) {
this.dy = this.dy + 2;
this._parent._y = this._parent._y + this.dy;
} else {
this._parent._y = 450;
this.falling = false;
this.dy = 0;
this.state = "land";
_root.isPaused = false;
}
} else {
this.dy = 26;
}
this.range = Math.abs(this._parent._x - _root.game.player._x);
this.rangey = Math.abs(this._parent._y - _root.game.player._y);
if (!_root.bridgeFell) {
if (this.range < 240) {
if ((_root.bossOverlay._currentframe == 1) && (!_root.bossedOnce)) {
_root.bossOverlay.play();
}
}
} else {
if ((this.range > 250) && (this.rangey < 400)) {
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
this.flipCount = 0;
} else if (this._parent._x < _root.game.player._x) {
this.flipCount = 0;
this._parent.dir = 1;
}
} else if (this.range < 10) {
}
if ((this.range < 500) && (((this.state == "stand") || (this.state == "waiting")) || (this.state == "retreat"))) {
this.state = "run";
this.attackCount++;
} else if (this.state == "run") {
if ((((((((this.range < 350) && (((this._parent._x > _root.game.player._x) && (this._parent.dir == -1)) || ((this._parent._x < _root.game.player._x) && (this._parent.dir == 1)))) && (this.attackCount > 10)) && (this.state != "attack")) && (this.state != "jump")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
if ((this.range > 200) && (random(4) == 0)) {
this.state = "far_attack";
this.attackTime = getTimer();
this.attackCount = 0;
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
} else if ((this.range > 150) && (random(4) == 0)) {
this.state = "attack";
this.attackTime = getTimer();
this.attackCount = 0;
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
}
if ((!_global.checkWall(this, -50, this.speed * this._parent.dir)) && (_global.checkEdge_boss(this, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
if (this.range > 500) {
this.state = "stand";
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this, -50, this.speed * this._parent.dir)) && (_global.checkEdge_boss(this, 50, (this.speed * this._parent.dir) * 5))) {
this._parent._x = this._parent._x + (this.speed * this._parent.dir);
}
this.attackCount++;
if (this.range > 300) {
this.state = "run";
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (18 * this._parent.dir);
}
} else if (this.state == "block") {
if (_root.playerAttacking && (this.blockCount > 3)) {
if (_global.checkPlayer_boss(this, this._parent.dir, 0) || _global.checkPlayer_boss(this, this._parent.dir * -1, -120)) {
if (!_global.checkWall(this, -50, -6 * this._parent.dir)) {
this._parent._x = this._parent._x - (10 * this._parent.dir);
}
this.blockCount = 0;
}
}
this.blockCount++;
if ((this.blockCount > 16) || (random(24) == 0)) {
this.state = "break";
this.attackTime = getTimer() - 1000;
this.attackCount = 0;
this.invincible = true;
this.invincibleCounter = 1;
_root.clash.start();
}
} else if (this.state == "stun") {
this.stunCount++;
if (this.stunCount > 10) {
this.stunCount = 0;
_root.comboCount = 0;
_root.hitCount = 0;
this.state = "hurt_blood";
}
if (_root.hitCount > (2 + random(4))) {
_root.comboCount = 0;
this.stunCount = 0;
if (random(12) == 0) {
this.state = "break";
this.attackTime = getTimer() - 1000;
this.attackCount = 0;
_root.clash.start();
} else {
this.state = "block";
this.blockCount = 0;
}
}
if (this._parent._x > _root.game.player._x) {
this._parent.dir = -1;
} else if (this._parent._x < _root.game.player._x) {
this._parent.dir = 1;
}
}
this._parent._xscale = this._parent.dir * Math.abs(this._parent._xscale);
if (this.attack.spear_tip.hitTest(_root.game.player.hitChecker)) {
if (((((_root.playerState != "hurt") && (_root.playerState != "hurt2")) && (_root.playerState != "hurt3")) && (!_root.playerInvincible)) && (this.attackTime < _root.game.player.attackTime)) {
if (!_root.m_hurt_sound) {
_root.m_hurt.start();
_root.m_hurt_sound = true;
}
if (!_root.playerJumping) {
if (((this._parent._x > _root.game.player._x) && (_root.playerDir == 1)) || ((this._parent._x < _root.game.player._x) && (_root.playerDir == -1))) {
_root.playerState = "hurt";
} else {
_root.playerState = "hurt2";
}
} else {
_root.playerState = "hurt3";
}
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
}
if (_global.checkPlayer_boss(this, this._parent.dir, 0) || (_global.checkPlayer_boss(this, this._parent.dir * -1, -120))) {
if ((_root.playerAttacking && (!this.invincible)) && (this.attackTime >= _root.game.player.attackTime)) {
_root.playerDx = 0;
if (((((((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.state != "block")) && (this.state != "land")) && (this.state != "break")) && (!this.invincible)) {
trace("\u00C9\u00CB\u00BA\u00A6");
var _local6 = Math.floor(this.health / 2.5);
var _local5 = 100 - _local6;
_root.sword.health.gotoAndStop(_local5);
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.stun.play();
}
}
if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch2.start();
this.health = this.health - 6;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.stun.play();
}
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.punch.start();
this.health = this.health - 8;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.stun.play();
}
} else if (_root.playerState == "capespin") {
if ((this.state != "stun") || (this.stunCount > 6)) {
_root.kick.start();
this.health = this.health - 5;
this.state = "stun";
this.stunCount = 0;
fallCount = 0;
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
this.stun.play();
}
}
}
if (_root.comboCounter >= _root.COMBOTIME) {
_root.comboCounter = 0;
_root.lastHit1 = "";
_root.lastHit2 = "";
_root.lastHit3 = "";
} else {
var _local4 = _global.checkForCombo();
if (_local4 > 0) {
_global.showCombo(_local4);
_root.comboCounter = 0;
_root.lastHit1 = "";
_root.lastHit2 = "";
_root.lastHit3 = "";
}
}
if (this.health <= 0) {
_root.score = _root.score + 25000;
this.state = "die";
}
} else if (((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.attackCount > 10)) {
if (this.range < 30) {
this.state = "retreat";
this.attackCount = 0;
}
}
}
}
} else {
this.gotoAndStop("die");
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.ATTACK_RANGE = 80;
_global.ATTACK_RANGE = 100;
_global.goonAI = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
this.rangey = Math.abs(this._y - _root.game.player._y);
if ((this.range > 180) && (this.rangey < 400)) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
} else if ((((this.range < 180) && (this.rangey < 400)) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if (((((((this.range < _global.ATTACK_RANGE) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
} else if ((((((this.range < 50) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
this.state = "retreat";
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
} else if (this.state == "stand") {
this.attackCount++;
rand = Math.random() - Math.random();
if (((this.range < 100) && (this.attackCount > 5)) && (rand > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 8)) {
rand = Math.random() - Math.random();
if (rand > 0) {
this.state = "retreat";
this.attackCount = int((-Math.random()) * 10);
if (rand > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "walk";
}
} else if ((this.attackCount > ((Math.random() * 20) + 25)) || (this.range > 300)) {
this.state = "walk";
}
} else if (this.state == "walk") {
if ((!_global.checkWall(this, -50, this.speed * this.dir)) && (_global.checkEdge(this, 50, (this.speed * this.dir) * 5))) {
this._x = this._x + (this.speed * this.dir);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this, -50, (-this.speed) * this.dir)) && (_global.checkEdge(this, 50, ((-this.speed) * this.dir) * 5))) {
this._x = this._x - (this.speed * this.dir);
}
this.attackCount++;
if ((this.attackCount > 5) || (this.range > ((Math.random() * 100) + 250))) {
rand = Math.random() - Math.random();
if (rand > 0.5) {
this.state = "walk";
} else {
this.state = "attack";
this.attackCount = 0;
}
}
} else if ((this.state == "hurt") || (this.state == "hurt_blood")) {
if (!_global.checkWall(this, -50, -6 * this.dir)) {
this._x = this._x - (6 * this.dir);
}
} else if ((this.state == "fall") && (fallCount < 6)) {
if (!_global.checkWall(this, -50, -10 * this.dir)) {
this._x = this._x - (10 * this.dir);
}
this.fallCount++;
}
if (_global.checkPlayer(this, this.dir, -20)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
this.invincible = true;
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
this.state = "hurt_blood";
fallCount = 0;
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
this.state = "hurt_blood";
fallCount = 0;
}
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root.m_hurt.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if (((((this.state != "attack") && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer(this, this.dir, -120)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "hurt_blood")) && (this.state != "fall")) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
this.state = "hurt_blood";
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
this.state = "hurt_blood";
}
this.invincible = true;
fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
}
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
}
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.goonAI_mod = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
this.rangey = Math.abs(this._y - _root.game.player._y);
if ((this.range > 180) && (this.rangey < 400)) {
if (this._x > _root.game.player._x) {
this.dir = 1;
} else if (this._x < _root.game.player._x) {
this.dir = -1;
}
} else if ((((this.range < 200) && (this.rangey < 400)) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x < _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x > _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if ((((((this.range < 200) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
} else if (((((this.range < 75) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) {
this.state = "retreat";
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "waiting") {
if (this.range < 250) {
this.state = "reveal";
}
} else if (this.state == "stand") {
this.attackCount++;
rand = Math.random() - Math.random();
if (((this.range < 240) && (this.attackCount > 5)) && (rand > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 8)) {
rand = Math.random() - Math.random();
if (rand > 0) {
this.attackCount = int((-Math.random()) * 10);
if (rand > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "run_start";
}
} else if ((this.attackCount > ((Math.random() * 20) + 25)) || (this.range > 300)) {
this.state = "run_start";
}
} else if ((this.state == "run") || (this.state == "run_start")) {
if ((!_global.checkWall(this, -50, this.speed * this.dir)) && (_global.checkEdge_boss(this, 50, (this.speed * this.dir) * 5))) {
this._x = this._x + ((this.speed * this.dir) * -1);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this, -50, (-this.speed) * this.dir)) && (_global.checkEdge_boss(this, 50, ((-this.speed) * this.dir) * 5))) {
this._x = this._x - ((this.speed * this.dir) * -1);
}
this.attackCount++;
if ((this.attackCount > 5) || (this.range > ((Math.random() * 100) + 250))) {
rand = Math.random() - Math.random();
if (rand > 0.5) {
this.state = "run_start";
} else {
this.state = "attack";
this.attackCount = 0;
}
}
} else if (this.state == "hurt") {
if (!_global.checkWall(this, -50, -6 * this.dir)) {
this._x = this._x - ((6 * this.dir) * -1);
}
}
if (_global.checkPlayer_boss(this, this.dir, -20)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) && (this.range < 160)) {
this.invincible = true;
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root.m_hurt.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer_boss(this, this.dir, 180)) {
_root.playerDx = 0;
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
}
this.state = "hurt";
this.invincible = true;
fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 250;
this.state = "die";
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root.m_hurt.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (global.checkPlayer_boss(this, this.dir, 0)) {
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.goonAI_mod2 = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
this.rangey = Math.abs(this._y - _root.game.player._y);
if ((this.range > 180) && (this.rangey < 400)) {
if (this._x > _root.game.player._x) {
this.dir = 1;
} else if (this._x < _root.game.player._x) {
this.dir = -1;
}
} else if ((((this.range < 200) && (this.rangey < 400)) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x < _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x > _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if ((((((this.range < 200) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
} else if (((((this.range < 75) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) {
this.state = "retreat";
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "waiting") {
if (this.range < 250) {
this.state = "reveal";
}
} else if (this.state == "stand") {
this.attackCount++;
rand = Math.random() - Math.random();
if (((this.range < 240) && (this.attackCount > 5)) && (rand > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 8)) {
rand = Math.random() - Math.random();
if (rand > 0) {
this.attackCount = int((-Math.random()) * 10);
if (rand > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "run_start";
}
} else if ((this.attackCount > ((Math.random() * 20) + 25)) || (this.range > 300)) {
this.state = "run_start";
}
} else if ((this.state == "run") || (this.state == "run_start")) {
if ((!_global.checkWall(this, -50, this.speed * this.dir)) && (_global.checkEdge_boss(this, 50, (this.speed * this.dir) * 5))) {
this._x = this._x + ((this.speed * this.dir) * -1);
}
this.attackCount++;
} else if (this.state == "retreat") {
if ((!_global.checkWall(this, -50, (-this.speed) * this.dir)) && (_global.checkEdge_boss(this, 50, ((-this.speed) * this.dir) * 5))) {
this._x = this._x - ((this.speed * this.dir) * -1);
}
this.attackCount++;
if ((this.attackCount > 5) || (this.range > ((Math.random() * 100) + 250))) {
rand = Math.random() - Math.random();
if (rand > 0.5) {
this.state = "run_start";
} else {
this.state = "attack";
this.attackCount = 0;
}
}
} else if (this.state == "hurt") {
if (!_global.checkWall(this, -50, -6 * this.dir)) {
this._x = this._x - ((6 * this.dir) * -1);
}
}
if (_global.checkPlayer_boss(this, this.dir, -20)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) && (this.range < 160)) {
this.invincible = true;
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root.m_hurt.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer_boss(this, this.dir, 180)) {
_root.playerDx = 0;
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) {
if ((((_root.playerState == "kick") || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.kick.start();
this.health = this.health - 15;
} else if ((((_root.playerState == "highpunch") || (_root.playerState == "lowpunch")) || (_root.playerState == "punch")) || (_root.playerState == "jumppunch")) {
_root.punch2.start();
this.health = this.health - 15;
} else if ((((_root.playerState == "vert_highpunch") || (_root.playerState == "vert_lowpunch")) || (_root.playerState == "vert_punch")) || (_root.playerState == "vert_jumppunch")) {
_root.punch.start();
this.health = this.health - 15;
}
this.state = "hurt";
this.invincible = true;
fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 250;
this.state = "die";
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root.m_hurt.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (global.checkPlayer_boss(this, this.dir, 0)) {
}
} else {
if (!this.flash) {
this.flash = 1;
if (((((_root.playerState == "capespin") || (_root.playerState == "kick")) || (_root.playerState == "highkick")) || (_root.playerState == "lowkick")) || (_root.playerState == "jumpkick")) {
_root.goon_die.start();
} else {
_root.goon_die_stab.start();
}
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.maidAI = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
this.rangey = Math.abs(this._y - _root.game.player._y);
if ((this.range > 180) && (this.rangey < 400)) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
this.attackCount = 0;
} else if ((((this.range < 180) && (this.rangey < 400)) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if (((((((this.range < 80) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
} else if ((((((this.range < 50) && (this.rangey < 400)) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "hurt")) && (this.state != "fall")) {
this.state = "retreat";
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "idle") {
if ((this.range < 400) && (this.rangey < 400)) {
this.state = "stand";
}
} else if (this.state == "stand") {
this.attackCount++;
this.rand = Math.random() - Math.random();
if (((this.range < 100) && (this.attackCount > 5)) && (rand > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 8)) {
this.rand = Math.random() - Math.random();
if (this.rand > 0) {
this.state = "retreat";
this.attackCount = int((-Math.random()) * 10);
if (rand > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "walk";
}
} else if (this.range > 180) {
this.state = "walk";
}
} else if (this.state == "walk") {
if ((!_global.checkWall(this, -50, this.speed * this.dir)) && (_global.checkEdge(this, 50, (this.speed * this.dir) * 5))) {
this._x = this._x + (this.speed * this.dir);
}
this.attackCount++;
if ((((this.range > 180) && (this.rangey < 220)) && (this.attackCount < 2)) && (!this.whipped)) {
this.state = "attack2";
}
} else if (this.state == "retreat") {
if ((!_global.checkWall(this, -50, (-this.speed) * this.dir)) && (_global.checkEdge(this, 50, ((-this.speed) * this.dir) * 5))) {
this._x = this._x - (this.speed * this.dir);
}
this.attackCount++;
if ((this.attackCount > 5) || (this.range > ((Math.random() * 100) + 250))) {
rand = Math.random() - Math.random();
if (rand > 0) {
this.state = "walk";
} else if (!this.whipped) {
this.state = "attack2";
} else {
this.state = "attack";
}
}
} else if (this.state == "attack2") {
if (this.range < 400) {
if ((((this.maid.hitBox.hitTest(_root.game.player) && (this.attackCount < 2)) && (_root.playerState != "hurt")) && (!_root.playerInvincible)) && (!this.whipped)) {
this.whipped = true;
_root.punch.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
this.attackCount++;
}
} else {
this.state = "stand";
}
} else if (this.state == "hurt") {
if (!_global.checkWall(this, -50, -6 * this.dir)) {
this._x = this._x - (6 * this.dir);
}
} else if ((this.state == "fall") && (fallCount < 6)) {
if (!_global.checkWall(this, -50, -10 * this.dir)) {
this._x = this._x - (10 * this.dir);
}
this.fallCount++;
}
if (_global.checkBatarang(this)) {
if ((this.state != "hurt") && (this.state != "fall")) {
this.health = this.health - 5;
this.state = "hurt";
_root.kick.start();
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
}
if (_global.checkPlayer(this, this.dir, -20)) {
_root.playerDx = 0;
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) {
this.whipped = false;
if (_root.playerState == "lowkick") {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
} else if (_root.playerState == "highpunch") {
_root.punch2.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
} else if (_root.playerState == "highkick") {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
} else {
_root.punch.start();
this.health = this.health - 10;
this.state = "hurt";
}
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root["metal" + Math.ceil(Math.random() * 3)].start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer(this, this.dir, -120)) {
_root.playerDx = 0;
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) {
_root.punch2.start();
this.health = this.health - 20;
this.state = "fall";
fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
}
}
} else {
if (!this.flash) {
this.flash = 1;
_root.goon_die.start();
this.state = "die";
} else {
this.flash++;
}
if (this.flash > 50) {
if ((this.flash % 4) < 2) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
_root.eKills++;
delete this.onEnterFrame;
}
}
};
_global.penguinAI = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
if (this._x > 2300) {
this.dir = 1;
this.state = "dodge";
this.dy = -12;
} else if (this._x < 0) {
this.dir = -1;
this.state = "dodge";
this.dy = -12;
}
if (this.state != "dodge") {
if (Math.abs(this._y - this.enemy_y) > 5) {
this._y = this._y - ((this._y - this.enemy_y) * 0.3);
} else {
this._y = this.enemy_y;
}
}
this.range = Math.abs(this._x - _root.game.player._x);
if ((this.range > 180) && (this.range < 320)) {
if (this.state != "dodge") {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
if ((((((this.attackCount < 3) && (this.state != "attack2")) && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "dodge")) && (this.state != "block")) {
this.state = "attack2";
this.attackCount++;
}
}
} else if ((this.range < 180) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.dir = this.dir * -1;
}
if (this.range > 360) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
this.attackCount = 0;
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "walk") {
if (!_global.checkWall(this, -50, this.speed * this.dir)) {
this._x = this._x + (this.speed * this.dir);
}
} else if (this.state == "dodge") {
if (this._y <= this.enemy_y) {
this._y = this._y + this.dy;
this.dy = this.dy + _root.globalGravity;
if (this._x > 2100) {
this.dir = 1;
this._x = this._x - (15 * this.dir);
} else if (this._x < 100) {
this.dir = -1;
this._x = this._x - (15 * this.dir);
} else if (!_global.checkWall(this, -50, this.speed * (-this.dir))) {
this._x = this._x - (15 * this.dir);
}
} else {
this.dy = 0;
this._y = this.enemy_y;
this.state = "stand";
}
this.fallCount++;
if (this.fallCount >= 20) {
this.dy = 0;
this._y = this.enemy_y;
this.state = "stand";
}
} else if (this.state == "hurt") {
if (!_global.checkWall(this, -50, this.speed * this.dir)) {
this._x = this._x - (6 * this.dir);
}
} else if ((this.state == "fall") && (this.fallCount < 6)) {
if (!_global.checkWall(this, -50, this.speed * this.dir)) {
this._x = this._x - (6 * this.dir);
}
this.fallCount++;
} else if (this.state == "attack2") {
if (_root.game.player.hitTest(this.laser.hitBox)) {
if (!done) {
done = true;
if (((_root.playerState != "capespin") && (_root.playerState != "electro")) && (!_root.playerInvincible)) {
_root.playerState = "electro";
_root.playerHealth = _root.playerHealth - this.stength;
}
}
} else {
done = false;
}
}
if (_global.checkBatarang(this)) {
if ((((this.state != "hurt") && (this.state != "fall")) && (this.state != "block")) && (this.state != "dodge")) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
rand = Math.random() * 5;
if (rand > 2) {
this.state = "block";
} else {
this.health = this.health - 5;
this.state = "hurt";
if (this.health <= 0) {
_root.score = _root.score + 500;
this.state = "die";
}
}
}
}
if (_global.checkPlayer(this, this.dir)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "attack")) {
if (_root.playerState == "lowkick") {
this.health = this.health - 15;
this.state = "fall";
this.fallCount = 0;
_root.kick.start();
_root.hitCount++;
_root.comboCount = 50;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
} else if (((_root.playerState == "punch") || (_root.playerState == "lowpunch")) || (_root.playerState == "kick")) {
this.health = this.health - 10;
this.state = "hurt";
_root.punch.start();
_root.hitCount++;
_root.comboCount = 50;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
}
if (this.health <= 0) {
_root.score = _root.score + 500;
this.state = "die";
}
} else if (((((this.state == "attack") || (this.state == "attack2")) && (_root.playerState != "hurt")) && (_root.playerState != "fall")) && (!_root.playerInvincible)) {
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.stength;
_root.playerInvincible = true;
} else if (((((this.state != "dodge") && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "hurt")) && (this.state != "fall")) {
this.state = "attack";
this.fallCount = 0;
}
} else if (_global.checkPlayer(this, this.dir, -120)) {
_root.playerDx = 0;
if (((((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "dodge")) && (this.state != "attack")) && (this.state != "attack2")) {
_root.punch2.start();
this.health = this.health - 20;
this.state = "fall";
this.fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
}
_root.hitCount++;
_root.comboCount = 10;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
}
} else if (((((((!_global.checkWall(this, this.enemyHeight)) && (this.state != "dodge")) && (this.state != "block")) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "hurt")) && (this.state != "fall")) {
this.state = "walk";
}
} else {
_root.gotoLast = "start";
_root.gotoNext = "card:escape";
_root.fadeout.play();
if (!bammed) {
_root.bam.start();
bammed = true;
}
}
};
_global.kabukiAI = function () {
this.gotoAndStop(this.state);
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
if ((this.range > 180) && (this.range < 240)) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
} else if ((((this.range < 180) && (this.state != "jumpOver")) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if (((((((this.range < 80) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) && (this.state == "jump")) && (this.state != "jumpOver")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
} else if (((((this.range < 50) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "jumpOver")) {
this.state = "retreat";
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "idle") {
if (this.range < 320) {
this.state = "greet";
}
} else if (this.state == "stand") {
this.attackCount++;
this.attackCount = this.attackCount - random(1);
rand = Math.random() - Math.random();
if (((this.range < 100) && (this.attackCount > 15)) && (rand > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 18)) {
rand = Math.random() - Math.random();
if (rand > 0.5) {
this.state = "retreat";
this.attackCount = int((-Math.random()) * 30);
if (rand > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "walk";
}
} else if ((this.attackCount > ((Math.random() * 20) + 25)) || (this.range > 300)) {
this.state = "walk";
}
} else if (this.state == "walk") {
this._x = this._x + (this.speed * this.dir);
this.attackCount++;
} else if (this.state == "retreat") {
this._x = this._x - ((this.speed * this.dir) * 1.3);
if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
this.state = "jumpOver";
this.dy = 32;
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
this.state = "jumpOver";
this.dy = 32;
}
this.attackCount++;
if ((this.attackCount > 25) || (this.range > ((Math.random() * 100) + 250))) {
rand = Math.random() - Math.random();
if (rand > 0) {
this.state = "walk";
} else {
this.state = "jump";
this.dy = 32;
}
}
} else if (this.state == "duck") {
if (this.jumping) {
this._x = this._x - (this.speed * this.dir);
if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
}
}
} else if (this.state == "jump") {
if (this.jumping) {
this._x = this._x - ((this.speed * this.dir) * -1.4);
this._y = this._y - this.dy;
this.dy = this.dy - 3;
if (this._y > this.ground) {
this.state = "land";
this.jumping = false;
this._y = this.ground;
}
if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
}
}
} else if (this.state == "jumpOver") {
if (this.jumping) {
this._x = this._x - ((this.speed * this.dir) * -1.8);
this._y = this._y - this.dy;
this.dy = this.dy - 3;
if (this._y > this.ground) {
this.state = "land";
this.jumping = false;
this._y = this.ground;
}
if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
}
}
} else if (this.state == "hurt") {
if ((this._x < this.xMax) && (this._x > this.xMin)) {
this._x = this._x - (12 * this.dir);
} else if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
this.state = "jumpOver";
this.dy = 32;
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
this.state = "jumpOver";
this.dy = 32;
}
} else if ((this.state == "fall") && (fallCount < 6)) {
if ((this._x < this.xMax) && (this._x > this.xMin)) {
this._x = this._x - (10 * this.dir);
this.fallCount++;
} else if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
}
}
if (this.state != "jump") {
if (this._y < this.ground) {
this._y = this._y - ((this._y - this.ground) * 0.3);
if ((this.ground - this._y) < 1) {
this.jumping = false;
this._y = this.ground;
}
}
}
if (_global.checkBatarang(this)) {
if ((((((((this.state != "hurt") && (this.state != "fall")) && (this.state != "retreat")) && (this.state != "duck")) && (this.state != "block")) && (this.state != "jumpOver")) && (this.state != "idle")) && (this.state != "greet")) {
rand = random(10);
if (rand > 6) {
this.state = "block";
} else if (rand > 3) {
this.state = "duck";
} else {
this.health = this.health - 5;
this.state = "fall";
_root.kick.start();
}
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
}
}
if (_global.checkPlayer(this, this.dir, -20)) {
_root.playerDx = 0;
if (((this.state != "jumpOver") && (this.state != "idle")) && (this.state != "greet")) {
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) {
this.invincible = true;
if (_root.playerState == "lowkick") {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
} else if ((_root.playerState == "highpunch") && (this.state != "duck")) {
rand = random(5);
if (rand > 2) {
this.state = "duck";
} else {
_root.punch2.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
}
} else if ((_root.playerState == "highkick") && (this.state != "duck")) {
rand = random(5);
if (rand > 2) {
this.state = "duck";
} else {
_root.kick.start();
this.health = this.health - 15;
this.state = "fall";
fallCount = 0;
}
} else if ((_root.playerState == "punch") && (this.state != "duck")) {
rand = random(5);
if (rand > 2) {
this.state = "duck";
} else {
_root.kick.start();
this.health = this.health - 10;
this.state = "hurt";
fallCount = 0;
}
} else {
_root.punch.start();
this.health = this.health - 10;
this.state = "hurt";
}
_root.hitCount++;
_root.comboCount = 50;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
_root.hitCount = 0;
}
} else if (((this.state == "attack") && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root["metal" + Math.ceil(Math.random() * 3)].start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if ((((((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "jump")) && (this.state != "jumpOver")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer(this, this.dir, -160)) {
_root.playerDx = 0;
if (((_root.playerAttacking && (this.state != "hurt")) && (this.state != "fall")) && (this.state != "jumpOver")) {
_root.punch2.start();
this.health = this.health - 20;
this.state = "fall";
this.invincible = true;
fallCount = 0;
if (this.health <= 0) {
_root.score = _root.score + 100;
this.state = "die";
}
}
}
} else if ((((!_global.checkWall(this, this._height)) && (this.state != "attack")) && (this.state != "hurt")) && (this.state != "fall")) {
} else if (((this.state != "attack") && (this.state != "hurt")) && (this.state != "fall")) {
if (this.dir > 0) {
}
}
} else {
this.gotoAndStop("die");
if (this._y < this.ground) {
this._y = this._y - ((this._y - this.ground) * 0.3);
if ((this.ground - this._y) < 1) {
this.jumping = false;
this._y = this.ground;
}
}
if (!this.flash) {
this.flash = 1;
_root.bam.start();
} else {
this.flash++;
}
if (this.flash > 60) {
if ((this.flash % 6) < 3) {
this._visible = false;
} else {
this._visible = true;
}
}
if (this.flash > 100) {
this._visible = false;
delete this.onEnterFrame;
}
}
};
_global.roboAI = function () {
this.gotoAndStop(this.state);
var _local5 = Math.ceil((300 - this.health) / 50) + 1;
if (_local5 > this.robo.glass._currentframe) {
this.robo.glass.gotoAndStop(_local5);
}
if (this.health > 0) {
this.range = Math.abs(this._x - _root.game.player._x);
if ((this.range > 180) && (this.range < 240)) {
if (((this.state != "attack") && (this.state != "attack2")) && (this.state != "attack3")) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
var _local4 = random(10);
if (_local4 > 3) {
this.state = "attack";
this.attackCount = 0;
} else if (_local4 > 7) {
this.state = "attack2";
this.attackCount = 0;
} else {
this.state = "retreat";
}
}
} else if (((((this.range > 240) && (this.state == "stand")) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "attack3")) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
var _local4 = random(10);
if (_local4 > 3) {
this.state = "attack2";
this.attackCount = 0;
} else if (_local4 > 8) {
this.state = "attack3";
this.attackCount = 0;
this.dx = 2;
}
} else if (((this.range < 180) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.state = "attack";
this.attackCount = 0;
this.dir = this.dir * -1;
} else if ((((((this.range < 80) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "attack3")) && (this.state != "hurt")) && (this.attackCount > 10)) {
var _local4 = random(10);
if (_local4 > 5) {
this.state = "attack";
this.attackCount = 0;
} else {
this.state = "retreat";
}
} else if (((((this.range < 50) && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "attack3")) && (this.state != "hurt")) {
this.state = "retreat";
}
if (this.range > 400) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
}
this._xscale = this.dir * Math.abs(this._xscale);
if (this.state == "idle") {
if (this.range < 320) {
this.state = "attack";
}
} else if (this.state == "stand") {
this.attackCount++;
this.attackCount = this.attackCount - random(1);
var _local4 = Math.random() - Math.random();
if (((this.range < 100) && (this.attackCount > 15)) && (_local4 > 0.7)) {
this.state = "attack";
this.attackCount = 0;
} else if ((this.range < 150) && (this.attackCount < 18)) {
_local4 = Math.random() - Math.random();
if (_local4 > 0.5) {
this.state = "retreat";
this.attackCount = int((-Math.random()) * 30);
if (_local4 > 0.5) {
this.dir = this.dir * -1;
}
} else {
this.state = "walk";
}
} else if ((this.attackCount > ((Math.random() * 20) + 25)) || (this.range > 300)) {
this.state = "walk";
}
} else if (this.state == "walk") {
this._x = this._x + (this.speed * this.dir);
this.attackCount++;
} else if (this.state == "retreat") {
this._x = this._x - ((this.speed * this.dir) * 1.3);
if (this._x > this.xMax) {
this.dir = -1;
this.state = "attack3";
this.dx = 2;
} else if (this._x < this.xMin) {
this.dir = 1;
this.state = "attack3";
this.dx = 2;
} else {
this.state = "attack";
this.attackCount = 0;
}
this.attackCount++;
if ((this.attackCount > 25) || (this.range > ((Math.random() * 100) + 250))) {
var _local4 = Math.random() - Math.random();
if (_local4 > 0) {
this.state = "walk";
}
}
} else if (this.state == "attack3") {
if (this.roboFlying) {
if (this.dx > 0) {
if ((this._x > 100) && (this._x < 2100)) {
this._x = this._x + ((this.speed + this.dx) * this.dir);
} else if (this._x < 100) {
this.dir = 1;
this._x = this._x + ((this.speed + this.dx) * this.dir);
} else if (this._x > 2100) {
this.dir = -1;
this._x = this._x + ((this.speed + this.dx) * this.dir);
}
if (flipped) {
this.dx = this.dx - 4;
} else {
this.dx = this.dx + 3;
}
if ((((this.dx > 100) || (this.dx < -100)) || (this.range > 1000)) && (!flipped)) {
flipped = true;
this.dir = this.dir * -1;
}
} else if (flipped) {
flipped = false;
this.dx = 0;
this.robo.play();
this.roboFlying = false;
}
}
if ((this.hitTest(_root.game.player) && (!_root.playerInvincible)) && (_root.playerState != "hurt")) {
_root["metal" + Math.ceil(Math.random() * 3)].start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
} else if (this.state == "hurt") {
if ((this._x < this.xMax) && (this._x > this.xMin)) {
this._x = this._x - (8 * this.dir);
} else if (this._x > this.xMax) {
this._x = this._x - ((this._x - this.xMax) / 2);
} else if (this._x < this.xMin) {
this._x = this._x - ((this._x - this.xMin) / 2);
}
}
if (this.hitTest(_root.game.player)) {
if ((((((((_root.playerState == "jumppunch") || (_root.playerState == "jumpkick")) && (_root.playerAttacking)) && (_root.playerJumping)) && (this.state != "hurt")) && (this.state != "attack2")) && (this.state != "attack3")) && (this.state != "idle")) {
this.health = this.health - 5;
this.state = "hurt";
_root["metal" + Math.ceil(Math.random() * 3)].start();
if (this.health <= 0) {
_root.score = _root.score + 3000;
this.state = "die";
}
}
}
if (((this.robo.hitBox.hitTest(_root.game.player) && ((this.state == "attack") || (this.state == "attack2"))) && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root["metal" + Math.ceil(Math.random() * 3)].start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
}
if (_global.checkBatarang(this)) {
if ((((((this.state != "hurt") && (this.state != "attack")) && (this.state != "attack2")) && (this.state != "attack3")) && (this.state != "block")) && (this.state != "idle")) {
var _local4 = random(10);
if (_local4 > 3) {
this.state = "block";
_root["metal" + Math.ceil(Math.random() * 3)].start();
} else {
this.health = this.health - 5;
this.state = "hurt";
_root["metal" + Math.ceil(Math.random() * 3)].start();
}
}
if (this.health <= 0) {
_root.score = _root.score + 3000;
this.state = "die";
}
}
if (_global.checkPlayer(this, this.dir, -20)) {
_root.playerDx = 0;
if ((((this.state != "idle") && (!((this.state == "attack") && (this.robo._currentframe > 6)))) && (this.state != "attack2")) && (this.state != "attack3")) {
if (_root.playerAttacking && (this.state != "hurt")) {
this.invincible = true;
if (_root.playerState == "lowkick") {
_root["metal" + Math.ceil(Math.random() * 3)].start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if (_root.playerState == "highpunch") {
_root["metal" + Math.ceil(Math.random() * 3)].start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else if (_root.playerState == "highkick") {
_root["metal" + Math.ceil(Math.random() * 3)].start();
this.health = this.health - 15;
this.state = "hurt";
fallCount = 0;
} else {
_root["metal" + Math.ceil(Math.random() * 3)].start();
this.health = this.health - 10;
this.state = "hurt";
}
_root.hitCount++;
_root.comboCount = 50;
if (_root.hitCount > 2) {
_root.comboMeter = true;
}
if (this.health <= 0) {
_root.score = _root.score + 3000;
this.state = "die";
_root.hitCount = 0;
}
}
if (((((this.state == "attack") || (this.state == "attack2")) || (this.state == "attack3")) && (_root.playerState != "hurt")) && (!_root.playerInvincible)) {
_root["metal" + Math.ceil(Math.random() * 3)].start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - this.strength;
_root.playerInvincible = true;
} else if (((((this.state != "attack") && (this.state == "attack2")) && (this.state == "attack3")) && (this.state != "hurt")) && (this.attackCount > 10)) {
this.state = "attack";
this.attackCount = 0;
}
} else if (_global.checkPlayer(this, this.dir, -100)) {
_root.playerDx = 0;
if (_root.playerAttacking && (this.state != "hurt")) {
_root.punch2.start();
this.health = this.health - 20;
this.state = "hurt";
this.invincible = true;
if (this.health <= 0) {
_root.score = _root.score + 3000;
this.state = "die";
}
}
}
} else if (((!_global.checkWall(this, this._height)) && (this.state != "attack")) && (this.state != "hurt")) {
} else if ((this.state != "attack") && (this.state != "hurt")) {
if (this.dir > 0) {
}
}
} else {
if (!this.flash) {
this.gotoAndStop("die");
this.flash = 1;
} else {
this.flash++;
}
if (this.flash > 100) {
_root.gotoNext = "card:end";
_root.fadeout.play();
if (!played) {
_root.ignition.start();
played = true;
}
this._visible = true;
delete this.onEnterFrame;
}
}
};
_global.birdAI = function () {
this._xscale = this.dir * Math.abs(this._xscale);
this.range = Math.abs(this._x - _root.game.player._x);
if (((this.range > 180) && (this.range < 240)) && (this.state != "die")) {
if (this.turnBack) {
this.turnBack = false;
this.state = "fly";
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
}
} else if (((this.range < 180) && (_root.playerAttacking)) && ((((this.dir == 1) && (_root.playerDir == 1)) && (this._x > _root.game.player._x)) || (((this.dir == -1) && (_root.playerDir == -1)) && (this._x < _root.game.player._x)))) {
this.dir = this.dir * -1;
} else if (this.range > 500) {
if (this._x > _root.game.player._x) {
this.dir = -1;
} else if (this._x < _root.game.player._x) {
this.dir = 1;
}
} else if ((this.range > 320) && (this.state != "die")) {
this.state = "glide";
this.attackCount = 0;
}
this.gotoAndStop(this.state);
if (this.state == "fly") {
this._x = this._x + ((random(this.speed) + this.speed) * this.dir);
this._y = this._y - ((random(9) - random(6)) + (((this._y - _root.game.player._y) + 45) / 16));
this.flyCount++;
if (this.flyCount > 10) {
this.attackCount = 0;
}
if (this.flyCount > 30) {
this.state = "glide";
this.flyCount = 0;
}
} else if (this.state == "glide") {
this._x = this._x + (((random(this.speed) + (this.speed * 2)) + 5) * this.dir);
this._y = this._y - ((((this._y - _root.game.player._y) + 65) / 16) + random(3));
this.flyCount++;
if (this.flyCount > 30) {
this.state = "fly";
this.flyCount = 0;
}
} else if (this.state == "die") {
this._y = this._y + this.dy;
this.dy++;
this.dieCount++;
if (this.dieCount > 200) {
this._x = _root.game.player._x + (1000 * _root.playerDir);
this._y = _root.game.player._y - 1000;
this.health = 30;
this.state = "glide";
this.flyCount = 0;
this.attackCount = 0;
birdSfx = false;
}
}
if ((this._x < (_root.game.player._x + 700)) || (this._x > (_root.game.player._x - 700))) {
if (!birdSfx) {
birdSfx = true;
_root.eagle.start();
}
}
if (_global.checkPlayer(this, this.dir, 40)) {
if ((_root.playerAttacking && (this.state != "hurt")) && (this.state != "die")) {
_root.kick.start();
this.health = this.health - 10;
if (this.health > 0) {
this.state = "hurt";
_root.kick.start();
} else {
this.state = "die";
this.dieCount = 0;
this.dy = 3;
_root.score = _root.score + 100;
}
} else if (((_root.playerState != "hurt") && (this.state != "hurt")) && (this.state != "die")) {
if (this.attackCount == 0) {
if (this.state == "fly") {
this.state = "attack";
this.flyCount = 0;
}
_root.kick.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - 10;
_root.playerInvincible = true;
}
this.attackCount++;
}
}
if (_global.checkBatarang(this)) {
if ((this.state != "hurt") && (this.state != "die")) {
this.health = this.health - 10;
if (this.health > 0) {
this.state = "hurt";
_root.kick.start();
} else {
this.dieCount = 0;
this.state = "die";
this.dy = 3;
_root.score = _root.score + 100;
}
}
}
};
_global.respawn = function () {
if ((_root.eKills > 0) && ((_root.eKills % _root.enemies.length) == 0)) {
i = 0;
while (i < _root.enemies.length) {
if (_root.enemies[i]._name.substring(0, 4) == "goon") {
_root.enemies[i].onEnterFrame = _global.goonAI;
_root.enemies[i].speed = 9;
_root.enemies[i].attackCount = 0;
}
if (_root.enemies[i]._name.substring(0, 4) == "maid") {
_root.enemies[i].onEnterFrame = _global.maidAI;
_root.enemies[i].speed = 12;
_root.enemies[i].whipped = true;
_root.enemies[i].attackCount = 5;
}
_root.enemies[i].state = "walk";
_root.enemies[i].health = 80;
_root.enemies[i].fallCount = 0;
_root.enemies[i].flash = 0;
_root.enemies[i]._visible = true;
rand = random(10);
if (rand > 4) {
_root.enemies[i]._x = (_root.game.player._x + 500) + random(600);
_root.enemies[i].dir = -1;
} else {
_root.enemies[i]._x = (_root.game.player._x - 500) - random(600);
_root.enemies[i].dir = 1;
}
i++;
}
_root.respawned++;
_root.eKills = 0;
}
if (_root.respawned > 3) {
_root.camHeight = _root.camHeight + 4;
_root.gotoNext = "level4b";
_root.fadeout.play();
}
};
_global.respawn2 = function () {
if (((_root.respawned == 0) && (_root.eKills > 0)) && ((_root.eKills % _root.enemies.length) == 0)) {
_root.overlay.gotoAndPlay("fight");
i = 0;
while (i < 8) {
_root.enemies[i].onEnterFrame = _global.goonAI;
_root.enemies[i].state = "walk";
_root.enemies[i].health = 50;
_root.enemies[i].speed = 9;
_root.enemies[i].dir = -1;
_root.enemies[i].attackCount = 0;
_root.enemies[i].fallCount = 0;
_root.enemies[i].flash = 0;
_root.enemies[i]._visible = true;
rand = random(10);
if (rand > 4) {
_root.enemies[i]._x = (_root.game.player._x + 500) + random(600);
_root.enemies[i].dir = -1;
} else {
_root.enemies[i]._x = (_root.game.player._x - 500) - random(600);
_root.enemies[i].dir = 1;
}
i++;
}
_root.eKills = 0;
_root.respawned++;
}
if ((_root.respawned > 0) && (_root.eKills == 8)) {
_root.camHeight = _root.camHeight + 15;
_root.gotoNext = "card:bank";
_root.fadeout.play();
}
};
_global.comboLogic = function () {
if (_root.comboMeter) {
this.gotoAndStop(_root.hitCount);
targetx = _root.game.player._x - (_root.playerDir * 70);
targety = _root.game.player._y - 20;
_root.comboCount--;
if (_root.comboCount < 0) {
this._alpha = this._alpha - 10;
if (this._alpha < 0) {
_root.comboMeter = false;
_root.score = _root.score + (_root.hitCount * 100);
_root.hitCount = 0;
}
} else if (this._alpha < 100) {
this._alpha = this._alpha + ((100 - this._alpha) / 4);
}
} else {
this._alpha = 0;
targetx = _root.game.player._x + (_root.playerDir * 70);
targety = _root.game.player._y - 20;
}
this._x = this._x + ((targetx - this._x) * 1.8);
this._y = this._y + ((targety - this._y) * 1.8);
};
_global.itemLogic = function () {
if (!this.collected) {
if (this.hitTest(_root.game.player)) {
_root.coins = _root.coins + 1;
_root.score = _root.score + 50;
this.collected = true;
_root.coin_flink.start();
if (_root.coins >= 100) {
_root.lives++;
_root.coins = 0;
_root.score = _root.score + 5000;
_root.bonus_sound.start();
if (_root.lives > 4) {
_root.HUD.livesBar.gotoAndStop(5);
} else {
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
}
}
}
} else if (this._visible) {
this._visible = false;
delete this.onEnterFrame;
}
};
_global.lifeLogic = function () {
if (!this.collected) {
if (this.hitTest(_root.game.player)) {
_root.playerHealth = 100;
_root.score = _root.score + 50;
this.collected = true;
_root.item.start();
}
} else if (this._visible) {
this._visible = false;
delete this.onEnterFrame;
}
};
_global.bgTouch = function () {
if (!this.hit) {
if (this.hitTest(_root.game.player)) {
this.play();
this.hit = true;
delete this.onEnterFrame;
}
}
};
_global.bgHit = function () {
if (!this.hit) {
if (this.hitTest(_root.game.player) && (_root.playerAttacking)) {
_root.metal1.start();
this.play();
this.hit = true;
delete this.onEnterFrame;
}
}
};
_global.bgLight = function () {
if (!this.hit) {
if (this.hitTest(_root.game.player) && (_root.playerAttacking)) {
_root.metal1.start();
this.hit = true;
this.dy = 4;
}
} else if (this._y < -50) {
this._y = this._y + this.dy;
this.dy = this.dy + 1;
} else {
this.play();
delete this.onEnterFrame;
}
};
_global.bgCage = function () {
if (!this.hit) {
if (this.hitTest(_root.game.player) && (_root.playerAttacking)) {
_root.metal1.start();
this.hit = true;
this.dy = 14;
}
} else if (this._y < 170) {
this._y = this._y + this.dy;
this.dy = this.dy + 2;
} else {
this.play();
delete this.onEnterFrame;
}
};
_global.clockTimer = function () {
if ((!this.startTimer) && (_root.playerState != "die")) {
this.startTimer = getTimer();
this.lastTimer = getTimer();
this.secs = 90;
this.millisecs = 99;
}
if (this.secs > 0) {
this.curTimer = getTimer();
if ((this.curTimer - this.lastTimer) > 1000) {
this.lastTimer = this.curTimer;
this.secs--;
}
this.millisecs = this.curTimer % 100;
if (this.secs > 9) {
this.display.text = [(this.secs + " :") + this.millisecs];
} else {
this.display.text = [(("0" + this.secs) + " :") + this.millisecs];
}
} else if (!this.exploded) {
this.exploded = true;
this.display.text = "00 :00";
_root.playerHealth = 0;
_root.playerState = "die";
_root.explode.start();
_root.game.halo.gotoAndPlay("fire");
this.startTimer = false;
delete this.onEnterFrame;
}
};
_global.pitLogic = function () {
if (this.hitTest(_root.game.player)) {
if (!done) {
done = true;
if (_root.lives > 0) {
_root.lives--;
_root.gotoNext = "continue";
} else {
_root.gotoNext = "gameover";
_root.gotoLast = "start";
}
_root.fadeout.play();
}
} else {
done = false;
}
};
_global.lavaLogic = function () {
if (this.hitTest(_root.game.player)) {
if (!this.done) {
_root.punch2.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - 10;
_root.playerInvincible = true;
this.done = true;
}
} else {
this.done = false;
}
};
_global.highwayLogic = function () {
if (this.hitTest(_root.game.player)) {
if (!done) {
done = true;
if (_root.lives < 0) {
_root.gotoNext = "gameover";
_root.gotoLast = "start";
} else {
_root.lives--;
_root.gotoNext = "continue";
}
_root.fadeout.play();
}
_root.playerHealth = -1;
_root.playerState = "die";
_root.game.player._x = _root.game.player._x + 18;
} else {
done = false;
}
};
_global.elevatorLogic = function () {
if (!_root.onPlatform) {
if (this.hitBox.hitTest(_root.game.player) && (_root.playerDy >= 0)) {
if (this._y != this.limit) {
this.moving = true;
}
if (this._y < this.limit) {
this.dy = 12;
} else {
_root.game.player._y = _root.game.player._y - 32;
this.dy = -12;
}
_root.currentPlatform = this;
_root.onPlatform = true;
}
} else if (_root.currentPlatform == this) {
if (this.hitBox.hitTest(_root.game.player)) {
_root.onPlatform = true;
if (!_root.playerJumping) {
_root.playerDy = this.dy;
_root.gravity = 0;
if (this.dy > 0) {
_root.game.player._y = _root.game.player._y - (((_root.game.player._y - this._y) + _root.playerHeight) + 20);
} else {
_root.game.player._y = _root.game.player._y - (((_root.game.player._y - this._y) + _root.playerHeight) + 40);
}
} else {
_root.onPlatform = false;
_root.currentPlatform = 0;
_root.playerDy = -36 + (this.dy / 3);
_root.gravity = _root.globalGravity;
}
} else if (_root.currentPlatform == this) {
if (Math.abs(_root.game.player._y - this._y) > 160) {
_root.onPlatform = false;
} else if (_root.playerJumping) {
_root.onPlatform = false;
}
}
if (this.dy > 0) {
if (this._y >= this.limit) {
this.dy = 0;
_root.onPlatform = false;
_root.currentPlatform = 0;
_root.playerDy = 0;
_root.gravity = _root.globalGravity;
this._y = this.limit;
delete this.onEnterFrame;
}
} else if (this.dy < 0) {
if (this._y <= this.limit) {
this.dy = 0;
_root.onPlatform = false;
_root.currentPlatform = 0;
_root.playerDy = 0;
_root.gravity = _root.globalGravity;
this._y = this.limit;
delete this.onEnterFrame;
}
}
}
if (((this.dy < 0) && (this._y > this.limit)) || ((this.dy > 0) && (this._y < this.limit))) {
this._y = this._y + this.dy;
}
};
_global.liftLogic = function () {
this.distx = Math.abs(this._x - _root.game.player._x);
if (this._currentFrame <= 50) {
this.dy = -6;
} else {
this.dy = 6;
}
if (!_root.onPlatform) {
if (this.hitBox.hitTest(_root.game.player) && (this.distx < 300)) {
if (this.hitBox2.hitTest(_root.game.player)) {
_root.currentPlatform = this;
_root.onPlatform = true;
_root.playerDy = this.dy;
_root.gravity = 0;
}
}
} else if (_root.currentPlatform == this) {
if (this.hitBox.hitTest(_root.game.player)) {
if (!_root.playerJumping) {
_root.game.player._y = _root.game.player._y - 6;
_root.gravity = 0;
_root.playerDy = this.dy;
_root.onPlatform = true;
} else {
_root.onPlatform = false;
_root.currentPlatform = 0;
_root.playerDy = -36;
_root.gravity = _root.globalGravity;
}
if (this.distx > 300) {
_root.playerDy = 7;
_root.onPlatform = false;
_root.gravity = _root.globalGravity;
_root.currentPlatform = 0;
}
} else if ((this.distx < 300) && (!_root.playerJumping)) {
if (this.hitBox2.hitTest(_root.game.player)) {
_root.onPlatform = true;
_root.playerDy = this.dy;
if (this.hitBox3.hitTest(_root.game.player)) {
_root.game.player._y = _root.game.player._y + 3;
}
}
} else {
if (!_root.playerJumping) {
_root.playerDy = 7;
}
_root.onPlatform = false;
_root.gravity = _root.globalGravity;
_root.currentPlatform = 0;
}
}
};
_global.beltLogic = function () {
if (this.hitTest(_root.game.player)) {
_root.game.player._x = _root.game.player._x + this.dx;
}
};
_global.stompLogic = function () {
if (this.hitTest(_root.game.player) && (this._currentframe < 30)) {
if (!this.done) {
_root.punch2.start();
_root.playerState = "hurt";
_root.playerHealth = _root.playerHealth - 10;
_root.playerInvincible = true;
this.done = true;
}
} else {
this.done = false;
}
};
_global.doorOpen = function () {
if (this.hitTest(_root.game.player)) {
if (this.door._currentframe == 1) {
this.door.gotoAndPlay("open");
}
} else if (this.door._currentframe == 10) {
this.door.gotoAndPlay("close");
}
};
_root.snowing = false;
var snowCount = 100;
var speed = 2;
_global.snowStart = function () {
var _local8 = new Array();
var _local4 = 5;
var _local6 = 5;
var _local7 = 1;
var _local5 = new flash.filters.BlurFilter(_local4, _local6, _local7);
_local8.push(_local5);
if (!_root.snowing) {
_root.snowing = true;
var _local3 = 0;
while (_local3 < snowCount) {
_root.snow.duplicateMovieClip("snow" + _local3, _root.getNextHighestDepth() + _local3);
_root["snow" + _local3]._x = randRange(0, 600);
_root["snow" + _local3]._y = randRange(0, 410);
if ((_local3 % 2) == 0) {
_root["snow" + _local3].movingRight = -1;
_root["snow" + _local3].moveCount = 10;
} else {
_root["snow" + _local3].movingRight = 1;
_root["snow" + _local3].moveCount = 0;
}
_root["snow" + _local3].cacheAsBitmap = true;
_root["snow" + _local3].onEnterFrame = function () {
this._y = this._y + (speed + Math.random());
if (_root.cameraMoving) {
this._x = this._x - (_root.playerDx * 0.8);
}
if (_root.playerJumping) {
this._y = this._y - (_root.playerDy / 2);
}
if (this.movingRight == 1) {
this._x = this._x + (speed + Math.random());
this.moveCount = this.moveCount + Math.random();
if (this.moveCount > 10) {
this.movingRight = -1;
}
} else {
this._x = this._x - (speed + Math.random());
this.moveCount = this.moveCount - Math.random();
if (this.moveCount < 0) {
this.movingRight = 1;
}
}
if (this._y > 410) {
this._y = randRange(0, 20);
}
if (this._x > 650) {
this._x = -50;
} else if (this._x < -50) {
this._x = 650;
}
};
_local3++;
}
}
};
_global.snowStop = function () {
if (_root.snowing) {
var _local2 = 0;
while (_local2 < snowCount) {
removeMovieClip(_root["snow" + _local2]);
_local2++;
}
_root.snowing = false;
}
};
_root.dropCount = 50;
_root.raining = false;
_root.movingRight = true;
_root.rainSpeed = 15;
_global.rainStart = function () {
var _local7 = new Array();
var _local4 = 2;
var _local6 = 2;
var _local8 = 1;
var _local9 = 75;
var _local5 = new flash.filters.BlurFilter(_local4, _local6, _local8);
_local7.push(_local5);
if (!_root.raining) {
_root.raining = true;
var _local3 = 0;
while (_local3 < _root.dropCount) {
_root.drop.duplicateMovieClip("rain" + _local3, _root.getNextHighestDepth());
_root["rain" + _local3]._x = randRange(0, 590);
_root["rain" + _local3]._y = randRange(0, 400);
_root["rain" + _local3]._xscale = _root["rain" + _local3]._xscale * -1;
_root["rain" + _local3].onEnterFrame = function () {
this._y = this._y + (_root.rainSpeed + Math.random());
if (_root.movingRight) {
this._x = this._x - (_root.rainSpeed + Math.random());
} else {
this._x = this._x + (_root.rainSpeed + Math.random());
}
if (_root.cameraMoving) {
this._x = this._x - (_root.playerDx * 0.8);
}
if (_root.playerJumping) {
this._y = this._y - (_root.playerDy / 2);
}
if (this._y > 400) {
this._y = Math.random() * 8;
}
if (this._x < 0) {
this._x = 600 + (Math.random() * 8);
} else if (this._x > 610) {
this._x = Math.random() * 8;
}
};
_local3++;
}
}
};
_global.rainStop = function () {
if (_root.raining) {
var _local2 = 0;
while (_local2 < _root.dropCount) {
removeMovieClip(_root["rain" + _local2]);
_local2++;
}
_root.raining = false;
}
_root.rainfall.stop();
};
var windSpeed = 1;
var puffCount = 100;
var foggy = false;
var fogQuality = 1;
var fogFilters1 = new Array();
var blur1 = 31;
var fogBlur1 = (new flash.filters.BlurFilter(blur1, blur1, fogQuality));
fogFilters1.push(fogBlur1);
var fogFilters2 = new Array();
var blur2 = 32;
var fogBlur2 = (new flash.filters.BlurFilter(blur2, blur2, fogQuality));
fogFilters2.push(fogBlur2);
var blur3 = 19;
var fogFilters3 = new Array();
var fogBlur3 = (new flash.filters.BlurFilter(blur3, blur3, fogQuality));
fogFilters3.push(fogBlur3);
var fog_alpha = 30;
_global.startFog = function () {
};
_global.stopFog = function () {
if (_root.foggy) {
var _local2 = 0;
while (_local2 <= (puffCount + 3)) {
removeMovieClip(_root["fog" + _local2]);
_local2++;
}
_root.foggy = false;
}
_root.windSound.stop("windy");
};
Frame 17
stop();
_root.cscTarget._y = 1000;
_root.cswinTarget._y = 1000;
_root.csgoTarget._y = 1000;
if ((_root.score == undefined) || (_root.lives == 0)) {
_root.lives = 2;
_root.score = 0;
}
_root.showSplash = false;
_root.showSplash2 = false;
_root.hitCount = 0;
_root.batarangs = 0;
_root.gotoNextScene = function (scene) {
switch (scene) {
case "instructions" :
gotoAndStop (18);
break;
case "start" :
gotoAndStop (17);
break;
case "title" :
gotoAndStop (17);
break;
case "level1intro" :
gotoAndStop (19);
break;
case "level1" :
gotoAndStop (20);
break;
case "level2intro" :
gotoAndStop (21);
break;
case "level2" :
gotoAndStop (22);
break;
case "level3intro" :
gotoAndStop (23);
break;
case "level3" :
gotoAndStop (24);
break;
case "level4intro" :
gotoAndStop (25);
break;
case "level4" :
gotoAndStop (26);
break;
case "levl5intro" :
gotoAndStop (27);
break;
case "level5" :
gotoAndStop (28);
break;
case "win" :
gotoAndStop (31);
break;
case "continue" :
gotoAndStop (29);
break;
case "gameover" :
gotoAndStop (30);
break;
default :
_root.play();
}
};
_root.intro.start.onRelease = function () {
_root.gotoNext = "level1intro";
_root.gotoLast = "level1";
fadeout.play();
var _local2 = new Date().getTime();
};
_root.intro.instruct.onRelease = function () {
_root.gotoNext = "instructions";
fadeout.play();
};
_root.intro.fgfyw_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=263&area=menu", "_blank");
};
_root.intro.viewscores_btn.onRelease = function () {
gotoAndPlay ("scoreboard");
};
lev1.onRelease = function () {
_root.gotoNext = "level1";
fadeout.play();
};
lev2.onRelease = function () {
_root.gotoNext = "level2";
fadeout.play();
};
lev3.onRelease = function () {
_root.gotoNext = "level3";
fadeout.play();
};
lev4.onRelease = function () {
_root.gotoNext = "level4";
fadeout.play();
};
card1.onRelease = function () {
_root.gotoNext = "level1intro";
fadeout.play();
};
card2.onRelease = function () {
_root.gotoNext = "level2intro";
fadeout.play();
};
card3.onRelease = function () {
_root.gotoNext = "level3intro";
fadeout.play();
};
card4.onRelease = function () {
_root.gotoNext = "level4intro";
fadeout.play();
};
card3.onRelease = function () {
_root.gotoNext = "level3intro";
fadeout.play();
};
cardwin.onRelease = function () {
_root.gotoNext = "win";
fadeout.play();
};
cardgo.onRelease = function () {
_root.gotoNext = "gameover";
_root.gotoLast = "start";
fadeout.play();
};
Frame 18
_root.gotoNext = "level1intro";
_root.instructions_mc.start_holder.onRelease = function () {
_root.gotoLast = "level1";
_root.fadeout.play();
};
Frame 19
_root.fadeout.swapDepths(_root.getNextHighestDepth());
trace(_root.cs1Target.intro.topc);
_root.gotoNext = "level1";
_root.fadeout.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
stopAllSounds();
_root.gotoNextScene(_root.gotoNext);
Frame 20
function tenguListener(target_mc) {
if (target_mc._name == "goon1") {
var _local3 = 1;
while (_local3 <= goonCount) {
if ((_local3 % 3) != 0) {
_root.game["goon" + _local3].attachMovie("tengu", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.tenguAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 65;
_root.game["goon" + _local3].goon.strength = 4;
_root.game["goon" + _local3].goon.speed = 15;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
_root.game["goon" + _local3].goon.fallCount = 0;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
} else {
_root.game["goon" + _local3].attachMovie("samurai", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 75;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon.speed = 16;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
}
_local3++;
}
}
}
function rtListener() {
_root.game.boss_holder.attachMovie("red_tengu", "boss", _root.game.getNextHighestDepth());
_root.game.boss_holder._width = 150;
_root.game.boss_holder._height = 191.4;
_root.game.boss_holder._x = 17678;
_root.game.boss_holder._y = 190;
_root.game.red_mask._visible = false;
_root.game.boss_holder.boss.state = "waiting";
_root.game.boss_holder.boss.health = 120;
_root.game.boss_holder.boss.strength = 5;
_root.game.boss_holder.boss.speed = 15;
_root.game.boss_holder.boss.retreatCount = 0;
_root.game.boss_holder.boss.dy = 0;
_root.game.boss_holder.boss.defaulty = 190;
_root.game.boss_holder.dir = -1;
_root.game.boss_holder.boss.attackCount = 0;
_root.game.boss_holder.boss.fallCount = 0;
_root.game.boss_holder.boss.invincible = false;
_root.game.boss_holder.boss.invincibleCounter = 0;
_root.game.boss_holder.boss.attackTime = 10000000000;
_root.game.boss_holder.boss.stop();
_root.game.boss_holder.boss.onEnterFrame = _global.rtenguAI;
}
_root.game.onEnterFrame = _global.cameraLogic;
_root.game.player.onEnterFrame = _global.playerLogic;
_root.game.combo.onEnterFrame = _global.comboLogic;
_root.levelPercent = 0;
_root.enemyPercent = 0;
_root.loadingLevel._visible = false;
_root.itemCounter = 0;
_root.numCached = 0;
_root.totalItems = 0;
_root.cachedItems = 0;
_root.itemCounter = 0;
_root.portalMin = 1800;
_root.portalMax = 1200;
_root.bitmapMemory = [];
_root.sword._visible = false;
_root.sword.health.gotoAndStop(1);
for (n in _root.game.level.gfx) {
if (n.toString().substring(0, 8) == "instance") {
_root.totalItems++;
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.itemCounter == 0) {
_root.itemCounter = _root.lastCNum;
}
var bitmapVars = [_root.game.level.gfx[n], (_root.game.level.gfx[n]._x + _root.game.level.gfx._x) + _root.game.level._x];
_root.game.level.gfx[n]._visible = false;
_root.bitmapMemory.push(bitmapVars);
}
}
_root.numCached = _root.lastCNum;
var loadedGoons = 0;
var goonCount = 29;
tenguListener(_root.game.goon1);
_root.bg.a1.cacheAsBitmap = true;
_root.bg.a2.cacheAsBitmap = true;
_root.bg.a3.cacheAsBitmap = true;
_root.bg.a4.cacheAsBitmap = true;
_root.bg.a5.cacheAsBitmap = true;
_root.bg.a6.cacheAsBitmap = true;
_root.enemies = new Array();
_root.eKills = 0;
_root.respawned = 0;
_root.dotted = false;
for (n in _root.game) {
if (n.substring(0, 9) == "item_coin") {
_root.game[n].onEnterFrame = _global.itemLogic;
}
}
stop();
_root.gotoNext = "level2intro";
_root.gotoLast = "level1";
rtListener();
_root.BGM = new Sound(_level0.firstbgmTarget);
_root.BGM.attachSound("bxs");
if (!_root.muteSounds) {
_root.BGM.start(0, 9999);
}
_root.bossBGM = new Sound(_level0.bgmTarget);
_root.bossBGM.attachSound("bss");
_root.coins = 0;
_root.cs1Target.intro.topc.gotoAndStop(1);
_root.cs1Target.intro.bottomc.gotoAndStop(1);
_root.cs1Target.intro.scene.mugen.gotoAndStop(1);
_root.cs1Target.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cscTarget.intro.topc.gotoAndStop(1);
_root.cscTarget.intro.bottomc.gotoAndStop(1);
_root.cscTarget.intro.scene.mugen.gotoAndStop(1);
_root.cscTarget.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cs1Target._y = 1000;
_root.cscTarget._y = 1000;
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
_root.gravity = 7;
_root.globalGravity = 7;
_root.FPS = 0;
_root.fpsSet = false;
_root.frameCount = 0;
_root.camDelay = 0;
_root.camHeight = 160;
_root.camJump = 1.25;
_root.camMin = -1350;
_root.camMax = 20275;
_root.camZoom = 100;
_root.camOffset = 0;
_root.game.player.attackTime = 10000000000;
_root.playerDx = 0;
_root.playerDy = 0;
_root.playerDir = 1;
_root.playerSpeed = 28;
_root.playerWalkSpeed = 6;
_root.playerState = "fall";
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerInvincible = false;
_root.playerStrength = 15;
_root.playerHeight = 75;
_root.playerWidth = 50;
if ((_root.playerHealth == undefined) || (_root.playerHealth <= 0)) {
_root.playerHealth = 100;
}
_root.bgScroll = 6;
_root.key_z = false;
_root.key_x = false;
_root.key_c = false;
_root.bossShown = false;
_root.comboCounter = 0;
_root.isPaused = true;
_root.flipCounter = 0;
_root.game.checkpoint_1_cache.onEnterFrame = function () {
if (_root.fadein._currentframe == 45) {
if (_root.start_dia._currentframe == 1) {
_root.start_dia.play();
}
var _local2 = 0;
while (_local2 < 3) {
if ((_root.numCached <= _root.itemCounter) && ((_root.cachedItems - 50) <= _root.totalItems)) {
if ((_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == false) || (_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == undefined)) {
}
_root.numCached++;
_root.cachedItems++;
_root.cachedItems = _root.totalItems;
_root.levelPercent = 100 * (_root.cachedItems / _root.totalItems);
if (_root.levelPercent >= 100) {
_root.levelPercent = 100;
}
var _local4 = _root.levelPercent / 2;
var _local5 = _root.enemyPercent / 2;
var _local3 = Math.floor((_local4 + _local5) / 5);
_root.loadingLevel.loader.gotoAndStop(_local3);
}
_local2++;
}
}
};
Frame 21
stop();
_root.fadeout.swapDepths(_root.getNextHighestDepth());
_root.gotoNext = "level2";
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
stopAllSounds();
_root.gotoNextScene(_root.gotoNext);
Frame 22
function samuraiListener(target_mc) {
if (target_mc._name == "goon1") {
var _local3 = 1;
while (_local3 <= goonCount) {
if ((_local3 % 3) != 0) {
_root.game["goon" + _local3].attachMovie("samurai2", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3]._xscale = 110;
_root.game["goon" + _local3]._yscale = 110;
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI2;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 75;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon.speed = 16;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
} else {
_root.game["goon" + _local3].attachMovie("ninja", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.ninjaAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 100;
_root.game["goon" + _local3].goon.strength = 6;
_root.game["goon" + _local3].goon.speed = 32;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
}
_local3++;
}
}
}
function rtListener() {
_root.game.boss_holder.attachMovie("newboss", "boss", _root.game.getNextHighestDepth());
_root.game.boss_holder._width = 110;
_root.game.boss_holder._height = 96.2;
_root.game.boss_holder._x = 13465.8;
_root.game.boss_holder._y = 450;
_root.game.boss_holder._xscale = 140;
_root.game.boss_holder._yscale = 140;
_root.game.boss_holder.boss.state = "waiting";
_root.game.boss_holder.boss.health = 260;
_root.game.boss_holder.boss.strength = 4;
_root.game.boss_holder.boss.speed = 20;
_root.game.boss_holder.dir = -1;
_root.game.boss_holder.boss.attackCount = 0;
_root.game.boss_holder.boss.fallCount = 0;
_root.game.boss_holder.boss.invincible = false;
_root.game.boss_holder.boss.invincibleCounter = 0;
_root.game.boss_holder.boss.attackTime = 10000000000;
_root.game.boss_holder.boss.stop();
_root.game.boss_holder.boss.onEnterFrame = _global.nishiAI;
}
_root.game.onEnterFrame = _global.cameraLogic3;
_root.game.player.onEnterFrame = _global.playerLogic;
_root.game.combo.onEnterFrame = _global.comboLogic;
_root.levelPercent = 0;
_root.enemyPercent = 0;
_root.loadingLevel._visible = false;
_root.itemCounter = 0;
_root.numCached = 0;
_root.totalItems = 0;
_root.cachedItems = 0;
_root.bitmapMemory = [];
_root.portalMin = 1800;
_root.portalMax = 1200;
_root.sword._visible = false;
_root.sword.health.gotoAndStop(1);
for (n in _root.game.level.gfx) {
_root.totalItems++;
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.itemCounter == 0) {
_root.itemCounter = _root.lastCNum;
}
var bitmapVars = [_root.game.level.gfx[n], (_root.game.level.gfx[n]._x + _root.game.level.gfx._x) + _root.game.level._x];
_root.game.level.gfx[n]._visible = false;
_root.bitmapMemory.push(bitmapVars);
}
_root.numCached = _root.lastCNum;
var loadedGoons = 0;
var goonCount = 17;
samuraiListener(_root.game.goon1);
for (n in _root.game) {
if (n.substring(0, 9) == "item_coin") {
_root.game[n].onEnterFrame = _global.itemLogic;
}
}
stop();
_root.levelNum = "level2";
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
_root.gotoNext = "level3intro";
_root.gotoLast = "level2";
_root.cs2Target.removeMovieClip();
_root.cscTarget._y = 1000;
_root.cs2Target.intro.topc.gotoAndStop(1);
_root.cs2Target.intro.bottomc.gotoAndStop(1);
_root.cs2Target.intro.scene.mugen.gotoAndStop(1);
_root.cs2Target.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cscTarget.intro.topc.gotoAndStop(1);
_root.cscTarget.intro.bottomc.gotoAndStop(1);
_root.cscTarget.intro.scene.mugen.gotoAndStop(1);
_root.cscTarget.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
rtListener();
_root.BGM = new Sound(_level0.bgmTarget);
_root.BGM.attachSound("bxs");
_root.BGM.setVolume(80);
_root.bossBGM = new Sound(_level0.bgmTarget);
_root.bossBGM.attachSound("bss");
_root.gravity = 7;
_root.globalGravity = 7;
_root.FPS = 0;
_root.fpsSet = false;
_root.frameCount = 0;
_root.camDelay = 0;
_root.camHeight = -300;
_root.camJump = 3.2;
_root.camMin = -50;
_root.camMax = 15275;
_root.camZoom = 100;
_root.camOffset = 0;
_root.game.player.attackTime = 10000000000;
_root.playerDx = 0;
_root.playerDy = 0;
_root.playerDir = 1;
_root.playerSpeed = 28;
_root.playerWalkSpeed = 6;
_root.playerState = "fall";
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerInvincible = false;
_root.playerStrength = 15;
_root.playerHeight = 75;
_root.playerWidth = 50;
if ((_root.playerHealth == undefined) || (_root.playerHealth <= 0)) {
_root.playerHealth = 100;
}
_root.bgScroll = 6;
_root.key_z = false;
_root.key_x = false;
_root.key_c = false;
_root.bossShown = false;
if (!_root.muteSounds) {
_root.BGM.start(0, 9999);
}
_root.comboCounter = 0;
_root.isPaused = true;
_root.game.checkpoint_2_cache.onEnterFrame = function () {
if (_root.fadein._currentframe == 45) {
var _local2 = 0;
while (_local2 < 3) {
if (_root.numCached <= _root.itemCounter) {
if ((_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == false) || (_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == undefined)) {
}
_root.numCached++;
_root.cachedItems++;
_root.cachedItems = _root.totalItems;
_root.levelPercent = 100 * (_root.cachedItems / _root.totalItems);
if (_root.levelPercent >= 100) {
_root.levelPercent = 100;
}
var _local4 = _root.levelPercent / 2;
var _local5 = _root.enemyPercent / 2;
var _local3 = Math.floor((_local4 + _local5) / 5);
_root.loadingLevel.loader.gotoAndStop(_local3);
}
_local2++;
}
}
if ((_root.levelPercent >= 100) && (_root.enemyPercent >= 100)) {
if (_root.start_dia._currentframe == 1) {
_root.start_dia.play();
_root.loadingLevel._visible = false;
}
}
};
_root.game.checkpoint_2_snow_start.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_snow_start2.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_snow_stop.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_boss.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
Frame 23
stop();
_root.fadeout.swapDepths(_root.getNextHighestDepth());
_root.gotoNext = "level3";
_root.cs2Target._y = -82;
_root.cs2Target.intro.topc.play();
_root.cs2Target.intro.bottomc.play();
_root.cs2Target.intro.scene.mugen.play();
_root.cs2Target.intro.scene.levelnumtext.play();
_root.cs2Target.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
stopAllSounds();
_root.gotoNextScene(_root.gotoNext);
Frame 24
function samuraiListener(target_mc) {
if (target_mc._name == "goon1") {
var _local3 = 1;
while (_local3 <= goonCount) {
if ((_local3 % 3) != 0) {
_root.game["goon" + _local3].attachMovie("samurai", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 75;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon.speed = 16;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
} else {
_root.game["goon" + _local3].attachMovie("samurai2", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3]._xscale = 110;
_root.game["goon" + _local3]._yscale = 110;
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI2;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 75;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon.speed = 16;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
}
_local3++;
}
}
}
function rtListener() {
_root.game.boss_holder.attachMovie("nishimatsu", "boss", _root.game.getNextHighestDepth());
_root.game.boss_holder._width = 110;
_root.game.boss_holder._height = 96.2;
_root.game.boss_holder._x = 13465.8;
_root.game.boss_holder._y = 515;
_root.game.boss_holder._xscale = 110;
_root.game.boss_holder._yscale = 110;
_root.game.boss_holder.boss.state = "waiting";
_root.game.boss_holder.boss.health = 260;
_root.game.boss_holder.boss.strength = 4;
_root.game.boss_holder.boss.speed = 20;
_root.game.boss_holder.dir = -1;
_root.game.boss_holder.boss.attackCount = 0;
_root.game.boss_holder.boss.fallCount = 0;
_root.game.boss_holder.boss.invincible = false;
_root.game.boss_holder.boss.invincibleCounter = 0;
_root.game.boss_holder.boss.attackTime = 10000000000;
_root.game.boss_holder.boss.stop();
_root.game.boss_holder.boss.onEnterFrame = _global.nishiAI;
}
_root.game.onEnterFrame = _global.cameraLogic3;
_root.game.player.onEnterFrame = _global.playerLogic;
_root.game.combo.onEnterFrame = _global.comboLogic;
_root.levelPercent = 0;
_root.enemyPercent = 0;
_root.loadingLevel._visible = false;
_root.itemCounter = 0;
_root.numCached = 0;
_root.totalItems = 0;
_root.cachedItems = 0;
_root.bitmapMemory = [];
_root.portalMin = 1800;
_root.portalMax = 1200;
_root.sword._visible = false;
_root.sword.health.gotoAndStop(1);
for (n in _root.game.level.gfx) {
_root.totalItems++;
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.itemCounter == 0) {
_root.itemCounter = _root.lastCNum;
}
var bitmapVars = [_root.game.level.gfx[n], (_root.game.level.gfx[n]._x + _root.game.level.gfx._x) + _root.game.level._x];
_root.game.level.gfx[n]._visible = false;
_root.bitmapMemory.push(bitmapVars);
}
_root.numCached = _root.lastCNum;
var loadedGoons = 0;
var goonCount = 17;
samuraiListener(_root.game.goon1);
for (n in _root.game) {
if (n.substring(0, 9) == "item_coin") {
_root.game[n].onEnterFrame = _global.itemLogic;
}
}
stop();
_root.levelNum = "level3";
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
_root.gotoNext = "level4intro";
_root.gotoLast = "level3";
_root.cs2Target.removeMovieClip();
_root.cscTarget._y = 1000;
_root.cs2Target.intro.topc.gotoAndStop(1);
_root.cs2Target.intro.bottomc.gotoAndStop(1);
_root.cs2Target.intro.scene.mugen.gotoAndStop(1);
_root.cs2Target.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cscTarget.intro.topc.gotoAndStop(1);
_root.cscTarget.intro.bottomc.gotoAndStop(1);
_root.cscTarget.intro.scene.mugen.gotoAndStop(1);
_root.cscTarget.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
rtListener();
_root.BGM = new Sound(_level0.bgmTarget);
_root.BGM.attachSound("bxs");
_root.BGM.setVolume(80);
_root.bossBGM = new Sound(_level0.bgmTarget);
_root.bossBGM.attachSound("bss");
_root.gravity = 7;
_root.globalGravity = 7;
_root.FPS = 0;
_root.fpsSet = false;
_root.frameCount = 0;
_root.camDelay = 0;
_root.camHeight = -300;
_root.camJump = 3.2;
_root.camMin = -50;
_root.camMax = 15275;
_root.camZoom = 100;
_root.camOffset = 0;
_root.game.player.attackTime = 10000000000;
_root.playerDx = 0;
_root.playerDy = 0;
_root.playerDir = 1;
_root.playerSpeed = 28;
_root.playerWalkSpeed = 6;
_root.playerState = "fall";
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerInvincible = false;
_root.playerStrength = 15;
_root.playerHeight = 75;
_root.playerWidth = 50;
if ((_root.playerHealth == undefined) || (_root.playerHealth <= 0)) {
_root.playerHealth = 100;
}
_root.bgScroll = 6;
_root.key_z = false;
_root.key_x = false;
_root.key_c = false;
_root.bossShown = false;
if (!_root.muteSounds) {
_root.BGM.start(0, 9999);
}
_root.comboCounter = 0;
_root.isPaused = true;
_root.game.checkpoint_2_cache.onEnterFrame = function () {
if (_root.fadein._currentframe == 45) {
var _local2 = 0;
while (_local2 < 3) {
if (_root.numCached <= _root.itemCounter) {
if ((_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == false) || (_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == undefined)) {
}
_root.numCached++;
_root.cachedItems++;
_root.cachedItems = _root.totalItems;
_root.levelPercent = 100 * (_root.cachedItems / _root.totalItems);
if (_root.levelPercent >= 100) {
_root.levelPercent = 100;
}
var _local4 = _root.levelPercent / 2;
var _local5 = _root.enemyPercent / 2;
var _local3 = Math.floor((_local4 + _local5) / 5);
_root.loadingLevel.loader.gotoAndStop(_local3);
}
_local2++;
}
}
if ((_root.levelPercent >= 100) && (_root.enemyPercent >= 100)) {
if (_root.start_dia._currentframe == 1) {
_root.start_dia.play();
_root.loadingLevel._visible = false;
}
}
};
_root.game.checkpoint_2_snow_start.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_snow_start2.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_snow_stop.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_2_boss.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
Frame 25
stop();
_root.fadeout.swapDepths(_root.getNextHighestDepth());
_root.gotoNext = "level4";
_root.cs3Target._y = -82;
_root.cs3Target.intro.topc.play();
_root.cs3Target.intro.bottomc.play();
_root.cs3Target.intro.scene.mugen.play();
_root.cs3Target.intro.scene.levelnumtext.play();
_root.cs3Target.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
stopAllSounds();
_root.gotoNextScene(_root.gotoNext);
Frame 26
function ninjaListener(target_mc) {
if (target_mc._name == "goon1") {
var _local3 = 1;
while (_local3 <= goonCount) {
if ((_local3 % 3) != 0) {
_root.game["goon" + _local3].attachMovie("ninja", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.ninjaAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 100;
_root.game["goon" + _local3].goon.strength = 6;
_root.game["goon" + _local3].goon.speed = 32;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
} else {
_root.game["goon" + _local3].attachMovie("samurai", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 75;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon._xscale = 90;
_root.game["goon" + _local3].goon._yscale = 90;
_root.game["goon" + _local3].goon.speed = 16;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
}
_local3++;
}
}
}
_root.game.onEnterFrame = _global.cameraLogic4;
_root.game.player.onEnterFrame = _global.playerLogic;
_root.game.combo.onEnterFrame = _global.comboLogic;
_root.levelPercent = 0;
_root.enemyPercent = 0;
_root.loadingLevel._visible = false;
_root.itemCounter = 0;
_root.numCached = 0;
_root.totalItems = 0;
_root.cachedItems = 0;
_root.portalMin = 1800;
_root.portalMax = 1200;
_root.bitmapMemory = [];
for (n in _root.game.level.gfx) {
if (n.toString().substring(0, 8) == "instance") {
_root.totalItems++;
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.itemCounter == 0) {
_root.itemCounter = _root.lastCNum;
}
var bitmapVars = [_root.game.level.gfx[n], (_root.game.level.gfx[n]._x + _root.game.level.gfx._x) + _root.game.level._x];
_root.game.level.gfx[n]._visible = false;
_root.bitmapMemory.push(bitmapVars);
}
}
_root.numCached = _root.lastCNum;
_root.numCahced = Number(_root.numCached);
_root.itemCounter = Number(_root.itemCounter);
var loadedGoons = 0;
var goonCount = 27;
ninjaListener(_root.game.goon1);
for (n in _root.game) {
if (n.substring(0, 9) == "item_coin") {
_root.game[n].onEnterFrame = _global.itemLogic;
}
}
stop();
_root.gotoNext = "level5intro";
_root.gotoLast = "level4";
_root.levelNum = "level4";
_root.BGM = new Sound(_level0.bgmTarget);
_root.BGM.attachSound("bxs");
if (!_root.muteSounds) {
_root.BGM.start(0, 9999);
}
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
_root.cs3Target.removeMovieClip();
_root.cscTarget._y = 1000;
_root.cs3Target.intro.topc.gotoAndStop(1);
_root.cs3Target.intro.bottomc.gotoAndStop(1);
_root.cs3Target.intro.scene.mugen.gotoAndStop(1);
_root.cs3Target.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cscTarget.intro.topc.gotoAndStop(1);
_root.cscTarget.intro.bottomc.gotoAndStop(1);
_root.cscTarget.intro.scene.mugen.gotoAndStop(1);
_root.cscTarget.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.gravity = 7;
_root.globalGravity = 7;
_root.FPS = 0;
_root.fpsSet = false;
_root.frameCount = 0;
_root.camDelay = 0;
_root.camHeight = -300;
_root.camJump = 3.2;
_root.camMin = -175;
_root.camMax = 9150;
_root.camZoom = 100;
_root.camOffset = 0;
_root.game.player.attackTime = 10000000000;
_root.playerDx = 0;
_root.playerDy = 0;
_root.playerDir = 1;
_root.playerSpeed = 28;
_root.playerWalkSpeed = 6;
_root.playerState = "fall";
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerInvincible = false;
_root.playerStrength = 15;
_root.playerHeight = 75;
_root.playerWidth = 50;
if ((_root.playerHealth == undefined) || (_root.playerHealth <= 0)) {
_root.playerHealth = 100;
}
_root.bgScroll = 6;
_root.bossShown = false;
_root.key_z = false;
_root.key_x = false;
_root.key_c = false;
_root.comboCounter = 0;
_root.lastHit1 = "";
_root.lastHit2 = "";
_root.lastHit3 = "";
_root.game.level.gfx.wood.onEnterFrame = function () {
this._y = this._y + _root.gravity;
};
_root.game.level.gfx.wood._visible = false;
_root.landing = false;
_root.isPaused = true;
_root.platforming = false;
_root.game.checkpoint_3_cache.onEnterFrame = function () {
if (_root.fadein._currentframe == 45) {
if (_root.start_dia._currentframe == 1) {
_root.start_dia.play();
}
var _local2 = 0;
while (_local2 < 3) {
if (_root.numCached <= _root.itemCounter) {
if ((_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == false) || (_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == undefined)) {
}
_root.numCached++;
_root.cachedItems++;
_root.cachedItems = _root.totalItems;
_root.levelPercent = 100 * (_root.numCached / _root.itemCounter);
if (_root.levelPercent >= 100) {
_root.levelPercent = 100;
}
var _local4 = _root.levelPercent / 2;
var _local5 = _root.enemyPercent / 2;
var _local3 = Math.floor((_local4 + _local5) / 5);
_root.loadingLevel.loader.gotoAndStop(_local3);
}
_local2++;
}
}
};
_root.game.checkpoint_3_levelend.onEnterFrame = function () {
if (this.hitTest(_root.game.player.hitChecker)) {
if (_root.fuuDia._currentframe == 1) {
_root.fuuDia.play();
}
}
};
_root.game.checkpoint_3_fuu.onEnterFrame = function () {
if (this.hitTest(_root.game.player.hitChecker)) {
if (_root.fuuDia._currentframe == 1) {
_root.fuuDia.play();
}
}
};
_root.game.checkpoint_3_fall.onEnterFrame = function () {
if (this.hitTest(_root.game.player.hitChecker) && (!this.alreadyPlayed)) {
this.alreadyPlayed = true;
_root.camMin = 9500;
_root.camMax = 19200;
_global.stopFog();
_root.game.level.gfx.floor_fall.play();
_root.game.level.ground.ground_fall_wall._y = _root.game.level.ground.ground_fall_wall._y - 150;
_root.game.onEnterFrame = _global.cameraLogic5;
_root.portalMin = 2200;
_root.portalMax = 1600;
}
};
_root.game.checkpoint_3_land.onEnterFrame = function () {
if (this.hitTest(_root.game.player.hitChecker)) {
_root.platforming = true;
if (!_root.landing) {
_root.playerState = "stand";
_root.game.landing.play();
_root.landing = true;
_root.smoke.start();
}
_root.game.onEnterFrame = _global.cameraLogic5;
}
};
Frame 27
stop();
_root.fadeout.swapDepths(_root.getNextHighestDepth());
_root.gotoNext = "level5";
_root.cs4Target._y = -82;
_root.cs4Target.intro.topc.play();
_root.cs4Target.intro.bottomc.play();
_root.cs4Target.intro.scene.mugen.play();
_root.cs4Target.intro.scene.levelnumtext.play();
_root.cs4Target.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
stopAllSounds();
_root.gotoNextScene(_root.gotoNext);
Frame 28
function samurai2Listener(target_mc) {
if (target_mc._name == "goon1") {
var _local3 = 2;
while (_local3 <= goonCount) {
if ((_local3 % 3) != 0) {
_root.game["goon" + _local3].attachMovie("samurai2", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.samuraiAI2;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 120;
_root.game["goon" + _local3].goon.strength = 5;
_root.game["goon" + _local3].goon.speed = 20;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.invincibleCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 999999999 /* 0x3B9AC9FF */;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
} else {
_root.game["goon" + _local3].attachMovie("ninja", "goon", _root.game.getNextHighestDepth());
_root.game["goon" + _local3].goon.onEnterFrame = _global.ninjaAI;
_root.game["goon" + _local3].goon.state = "idle";
_root.game["goon" + _local3].goon.health = 100;
_root.game["goon" + _local3].goon.strength = 6;
_root.game["goon" + _local3].goon.speed = 32;
_root.game["goon" + _local3].goon.dir = 1;
_root.game["goon" + _local3].goon.attackCount = 0;
_root.game["goon" + _local3].goon.fallCount = 0;
_root.game["goon" + _local3].goon.attackTime = 10000000000;
loadedGoons++;
_root.enemyPercent = (loadedGoons / goonCount) * 100;
}
_local3++;
}
}
}
function shyListener() {
_root.game.boss_holder.attachMovie("shouryuu", "boss", _root.game.getNextHighestDepth());
_root.game.boss_holder._width = 136.2;
_root.game.boss_holder._height = 188.5;
_root.game.boss_holder._x = 13635.9;
_root.game.boss_holder._y = -130;
_root.game.boss_holder.boss.state = "waiting";
_root.game.boss_holder.boss.falling = false;
_root.game.boss_holder.boss.dy;
_root.game.boss_holder.boss.health = 250;
_root.game.boss_holder.boss.strength = 6;
_root.game.boss_holder.boss.speed = 20;
_root.game.boss_holder.dir = -1;
_root.game.boss_holder._xscale = _root.game.boss_holder._xscale * -1;
_root.game.boss_holder.boss.attackCount = 0;
_root.game.boss_holder.boss.fallCount = 0;
_root.game.boss_holder.boss.flipCount = 0;
_root.game.boss_holder.boss.invincible = false;
_root.game.boss_holder.boss.invincibleCounter = 0;
_root.game.boss_holder.boss.attackTime = 10000000000;
_root.game.boss_holder.boss.stop();
_root.game.boss_holder.boss.onEnterFrame = _global.shyAI;
}
_root.game.onEnterFrame = _global.cameraLogic;
_root.game.player.onEnterFrame = _global.playerLogic;
_root.game.combo.onEnterFrame = _global.comboLogic;
_root.levelPercent = 0;
_root.enemyPercent = 0;
_root.loadingLevel._visible = true;
_root.itemCounter = 0;
_root.numCached = 0;
_root.totalItems = 0;
_root.cachedItems = 0;
_root.portalMin = 2400;
_root.portalMax = 1600;
_root.bitmapMemory = [];
_root.sword._visible = false;
_root.sword.health.gotoAndStop(1);
for (n in _root.game.level.gfx) {
if (n.toString().substring(0, 8) == "instance") {
_root.totalItems++;
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.itemCounter == 0) {
_root.itemCounter = _root.lastCNum;
}
var bitmapVars = [_root.game.level.gfx[n], (_root.game.level.gfx[n]._x + _root.game.level.gfx._x) + _root.game.level._x];
_root.game.level.gfx[n]._visible = false;
_root.bitmapMemory.push(bitmapVars);
}
}
_root.numCached = _root.lastCNum;
var loadedGoons = 0;
var goonCount = 16;
samurai2Listener(_root.game.goon1);
for (n in _root.game) {
if (n.substring(0, 9) == "item_coin") {
_root.game[n].onEnterFrame = _global.itemLogic;
}
}
stop();
_root.levelNum = "level4";
if (_root.lives > 4) {
_root.HUD.livesBar.gotoAndStop(5);
} else {
_root.HUD.livesBar.gotoAndStop(_root.lives + 1);
}
_root.platforming = false;
_root.cs4Target.removeMovieClip();
_root.cscTarget._y = 1000;
_root.cs4Target.intro.topc.gotoAndStop(1);
_root.cs4Target.intro.bottomc.gotoAndStop(1);
_root.cs4Target.intro.scene.mugen.gotoAndStop(1);
_root.cs4Target.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
_root.cscTarget.intro.topc.gotoAndStop(1);
_root.cscTarget.intro.bottomc.gotoAndStop(1);
_root.cscTarget.intro.scene.mugen.gotoAndStop(1);
_root.cscTarget.intro.scene.levelnumtext.gotoAndStop(1);
_root.cscTarget.intro.scene.bg.gotoAndStop(1);
shyListener();
_root.BGM = new Sound(_level0.bgmTarget);
_root.BGM.attachSound("bxs");
_root.rainfall = new Sound(_level0.bgmTarget);
_root.rainfall.attachSound("rainfall");
if (!_root.muteSounds) {
_root.BGM.start(0, 9999);
_root.rainfall.start(0, 9999);
}
_root.bossBGM = new Sound(_level0.bgmTarget);
_root.bossBGM.attachSound("bss");
_global.rainStart();
_root.fadein.swapDepths(_root.getNextHighestDepth());
_root.isPaused = true;
if (_root.start_dia._currentframe == 1) {
_root.start_dia.waitTimer = 38;
} else {
_root.isPaused = false;
}
_root.showSplash = false;
_root.showSplash2 = false;
_root.gravity = 7;
_root.globalGravity = 7;
_root.FPS = 0;
_root.fpsSet = false;
_root.frameCount = 0;
_root.gotoLast = "level5";
_root.gotoNext = "win";
_root.camDelay = 0;
_root.camHeight = 150;
_root.camJump = 1.25;
_root.camMin = 50;
_root.camMax = 15275;
_root.camZoom = 100;
_root.camOffset = 0;
_root.game.player.attackTime = 10000000000;
_root.playerDx = 0;
_root.playerDy = 0;
_root.playerDir = 1;
_root.playerSpeed = 28;
_root.playerWalkSpeed = 6;
_root.playerState = "fall";
_root.playerJumping = true;
_root.playerAttacking = false;
_root.playerInvincible = false;
_root.playerStrength = 15;
_root.playerHeight = 75;
_root.playerWidth = 50;
if ((_root.playerHealth == undefined) || (_root.playerHealth <= 0)) {
_root.playerHealth = 100;
}
_root.bgScroll = 6;
_root.key_z = false;
_root.key_x = false;
_root.key_c = false;
_root.bossShown = false;
_root.bridgeFell = false;
_root.comboCounter = 0;
_root.bossedOnce = false;
_root.game.checkpoint_4_cache.onEnterFrame = function () {
if (_root.fadein._currentframe == 45) {
if (_root.start_dia._currentframe == 1) {
_root.start_dia.play();
}
var _local2 = 0;
while (_local2 < 3) {
if (_root.numCached <= _root.itemCounter) {
if ((_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == false) || (_root.game.level.gfx["instance" + _root.numCached].cacheAsBitmap == undefined)) {
}
_root.numCached++;
_root.cachedItems++;
_root.cachedItems = _root.totalItems;
_root.levelPercent = 100 * (_root.cachedItems / _root.totalItems);
if (_root.levelPercent >= 100) {
_root.levelPercent = 100;
}
var _local4 = _root.levelPercent / 2;
var _local5 = _root.enemyPercent / 2;
var _local3 = Math.floor((_local4 + _local5) / 5);
_root.loadingLevel.loader.gotoAndStop(_local3);
}
_local2++;
}
}
};
_root.game.checkpoint_4_bridge.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
_root.showSplash = true;
} else {
_root.showSplash = false;
}
};
_root.game.checkpoint_4_bridge_water.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
_root.showSplash2 = true;
} else {
_root.showSplash2 = false;
}
};
_root.game.checkpoint_4_bridge_stop.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
_root.game.checkpoint_4_bridge2.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
if (((!_root.bridgeFell) && (_root.bossOverlay._currentframe == 1)) && (_root.bossedOnce)) {
}
} else if ((_root.game.level.gfx.bridge2._currentframe == 117) && (!_root.game.level.gfx.bridge2.cacheAsBitmap)) {
_root.game.level.gfx.bridge2.cacheAsBitmap = true;
}
};
_root.game.checkpoint_4_bridge2_stop.onEnterFrame = function () {
if (this.hitTest(_root.game.player)) {
}
};
Instance of Symbol 2900 MovieClip "start_dia" in Frame 28
onClipEvent (enterFrame) {
if (this.waitTimer == 0) {
_root.start_dia.gotoAndStop(2);
this.waitTimer = -1;
} else {
this.waitTimer--;
}
}
Frame 29
stop();
_root.gotoNext = _root.gotoLast;
_root.cscTarget._y = 0;
_root.cscTarget.intro.topc.play();
_root.cscTarget.intro.bottomc.play();
_root.cscTarget.intro.scene.mugen.play();
_root.cscTarget.intro.scene.levelnumtext.play();
_root.cscTarget.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
Frame 30
stop();
_root.gotoNext = _root.gotoLast;
_root.csgoTarget._x = -112.2;
_root.csgoTarget._y = -90;
_root.csgoTarget.intro.topc.play();
_root.csgoTarget.intro.bottomc.play();
_root.csgoTarget.intro.scene.mugen.play();
_root.csgoTarget.intro.scene.levelnumtext.play();
_root.csgoTarget.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
_root.cscTarget._y = -1000;
Frame 31
stop();
_root.gotoNext = "start";
_root.cswinTarget._y = -105;
_root.cswinTarget._x = -130;
_root.cswinTarget.intro.white.play();
_root.cswinTarget.intro.topc.play();
_root.cswinTarget.intro.bottomc.play();
_root.cswinTarget.intro.scene.mugen.play();
_root.cswinTarget.intro.scene.levelnumtext.play();
_root.cswinTarget.intro.scene.bg.play();
if (!_root.muteSounds) {
music_mc.gotoAndStop(2);
}
_root.cscTarget._y = -1000;
_root.csgoTarget._y = -1000;
Frame 32
_root.cscTarget.removeMovieClip();
_root.csgoTarget.removeMovieClip();
_root.cswinTarget.removeMovieClip();
Frame 33
stop();
gotomain_btn.onRelease = function () {
_root.gotoAndStop(17);
};
Instance of Symbol 2933 MovieClip [TMP6pbk6uzm9i] in Frame 33
//component parameters
onClipEvent (construct) {
gameID = 266;
}
Instance of Symbol 2939 MovieClip [TMP6ojzjuzm8i] in Frame 33
//component parameters
onClipEvent (construct) {
gameID = 266;
}
Symbol 15 MovieClip Frame 19
stop();
_parent.state = "stand";
Symbol 71 MovieClip Frame 36
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 91 MovieClip Frame 10
_parent.attackTime = getTimer();
Symbol 91 MovieClip Frame 23
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 103 MovieClip Frame 1
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 110 MovieClip Frame 4
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 117 MovieClip Frame 6
_parent.state = "stand";
Symbol 122 MovieClip Frame 2
stop();
Symbol 122 MovieClip Frame 4
stop();
Symbol 137 MovieClip Frame 40
stop();
Symbol 144 MovieClip Frame 6
_parent.state = "stand";
Symbol 158 MovieClip Frame 81
stop();
_root.fadeout.play();
Symbol 198 MovieClip Frame 16
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 207 MovieClip Frame 18
_parent.state = "stand";
_parent.state = "stand";
Symbol 213 MovieClip Frame 40
stop();
Symbol 222 MovieClip Frame 17
_parent.state = "stand";
Symbol 229 MovieClip Frame 2
stop();
Symbol 229 MovieClip Frame 4
stop();
Symbol 237 MovieClip Frame 6
stop();
Symbol 264 MovieClip Frame 31
stop();
Symbol 269 MovieClip Frame 4
stop();
Symbol 275 MovieClip Frame 5
stop();
Symbol 283 MovieClip Frame 7
stop();
this._parent.state = "stand";
Symbol 295 MovieClip Frame 7
_global.makeNinjaStar(this._parent._parent);
_parent.attackCount = 0;
Symbol 295 MovieClip Frame 11
_parent.attackCount = 0;
_parent.state = "stand";
Symbol 308 MovieClip Frame 40
stop();
Symbol 317 MovieClip Frame 13
_parent.state = "stand";
Symbol 337 MovieClip Frame 13
stop();
Symbol 345 MovieClip Frame 11
_parent._parent.state = "stand";
_parent._parent.attackTime = 10000000000;
_parent._parent._parent._x = _parent._parent._parent._x + (145 * _parent._parent._parent.dir);
Symbol 361 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=263&area=loader", "_blank");
}
Symbol 422 MovieClip Frame 1
stop();
var tagctr = (random(55) + 1);
gotoAndStop(tagctr);
Symbol 423 MovieClip Frame 105
stop();
Instance of Symbol 439 MovieClip "mcNotice" in Symbol 476 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 476 MovieClip Frame 120
stop();
if ((_url.indexOf("freeonlinegames.com") >= 0) && (_url.indexOf("file:") == -1)) {
_root.okToPlay = true;
_root.play();
} else if (_root.debug) {
_root.okToPlay = true;
_root.play();
} else {
_root.mcTaglines._visible = false;
mcNotice._visible = true;
}
Symbol 477 MovieClip Frame 71
stop();
var fogsound = new Sound();
fogsound.onSoundComplete = function () {
_root.okToPlay = true;
_root.play();
};
fogsound.attachSound("fogaudio");
fogsound.start(0, 1);
Symbol 480 MovieClip Frame 1
_root.earl223 = function (val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
};
Symbol 487 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 1
stop();
Symbol 552 MovieClip Frame 78
stop();
_root.fadeout.play();
Symbol 553 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 81
stop();
Symbol 555 MovieClip Frame 1
stop();
Symbol 555 MovieClip Frame 43
stop();
Symbol 562 MovieClip Frame 54
stop();
Symbol 565 MovieClip Frame 1
stop();
Symbol 565 MovieClip Frame 13
stop();
Symbol 566 MovieClip Frame 4
stop();
Symbol 569 MovieClip Frame 1
stop();
Symbol 576 MovieClip Frame 1
stop();
Symbol 576 MovieClip Frame 87
stop();
_root.fadeout.play();
_root.cs3_endTarget._visible = false;
Symbol 583 MovieClip Frame 1
stop();
Symbol 583 MovieClip Frame 13
stop();
Symbol 584 MovieClip Frame 4
stop();
Symbol 611 MovieClip Frame 1
stop();
Symbol 651 MovieClip Frame 69
stop();
_root.fadeout.play();
Symbol 652 MovieClip Frame 1
stop();
Symbol 652 MovieClip Frame 79
stop();
Symbol 654 MovieClip Frame 1
stop();
Symbol 654 MovieClip Frame 44
stop();
Symbol 661 MovieClip Frame 50
stop();
Symbol 663 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 13
stop();
Symbol 664 MovieClip Frame 4
stop();
Symbol 683 MovieClip [blood] Frame 40
stop();
_root.game.removeMovieClip(_root.game.eblood_holder);
Symbol 722 MovieClip Frame 17
_parent.state = "stand";
_parent.attackTime = 999999999 /* 0x3B9AC9FF */;
Symbol 723 MovieClip Frame 29
stop();
Symbol 742 MovieClip Frame 18
stop();
_parent._parent.state = "stand";
_parent._parent._parent._x = _parent._parent._parent._x + (195.7 * _parent._parent._parent.dir);
_parent._parent.attackTime = 10000000000;
Symbol 743 MovieClip Frame 16
stop();
Symbol 751 MovieClip Frame 12
_parent.state = "stand";
_parent.invincible = false;
Symbol 763 MovieClip Frame 12
_parent.state = "stand";
_parent.invincible = false;
Symbol 768 MovieClip Frame 4
stop();
Symbol 768 MovieClip Frame 8
stop();
Symbol 769 MovieClip Frame 16
stop();
Symbol 782 MovieClip Frame 15
stop();
Symbol 795 MovieClip Frame 33
stop();
_parent.state = "stand";
_root.game.red_mask._visible = true;
Symbol 805 MovieClip Frame 5
_parent.state = "run";
Symbol 848 MovieClip Frame 21
_parent._parent.state = "stand";
trace("_dir=======" + _parent._parent._parent.dir);
_parent._parent.attackTime = 10000000000;
_parent._parent._parent._x = _parent._parent._parent._x + (398.3 * _parent._parent._parent.dir);
Symbol 849 MovieClip Frame 25
stop();
Symbol 863 MovieClip Frame 22
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 871 MovieClip Frame 17
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 881 MovieClip Frame 12
_parent.state = "stand";
Symbol 888 MovieClip Frame 40
stop();
Symbol 897 MovieClip Frame 12
_parent.state = "stand";
Symbol 902 MovieClip Frame 4
stop();
Symbol 902 MovieClip Frame 8
stop();
Symbol 915 MovieClip Frame 30
stop();
_root.fadeout.play();
Symbol 916 MovieClip Frame 30
_parent.state = "stand";
Symbol 920 MovieClip Frame 1
stop();
Symbol 944 MovieClip Frame 85
stop();
_root.fadeout.play();
Symbol 945 MovieClip Frame 1
stop();
Symbol 945 MovieClip Frame 76
stop();
Symbol 947 MovieClip Frame 1
stop();
Symbol 947 MovieClip Frame 49
stop();
Symbol 954 MovieClip Frame 54
stop();
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 13
stop();
Symbol 957 MovieClip Frame 4
stop();
Symbol 960 MovieClip Frame 1
stop();
Symbol 963 MovieClip Frame 1
stop();
Symbol 963 MovieClip Frame 136
stop();
_root.fadeout.play();
_root.cs1_endTarget._visible = false;
Symbol 970 MovieClip Frame 162
stop();
Symbol 972 MovieClip Frame 1
stop();
Symbol 972 MovieClip Frame 13
stop();
Symbol 973 MovieClip Frame 4
stop();
Symbol 976 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 56
stop();
_root.fadeout.play();
Symbol 985 MovieClip Frame 4
stop();
Symbol 988 MovieClip Frame 1
stop();
Symbol 991 MovieClip Frame 1
stop();
Symbol 991 MovieClip Frame 71
stop();
_root.fadeout.play();
_root.cs2_endTarget._visible = false;
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 13
stop();
Symbol 998 MovieClip Frame 4
stop();
Symbol 1019 MovieClip Frame 19
stop();
_parent.state = "stand";
Symbol 1042 MovieClip Frame 19
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1056 MovieClip Frame 10
_parent.attackTime = getTimer();
Symbol 1056 MovieClip Frame 23
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1058 MovieClip Frame 1
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1060 MovieClip Frame 4
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1066 MovieClip Frame 6
_parent.state = "stand";
Symbol 1071 MovieClip Frame 2
stop();
Symbol 1071 MovieClip Frame 4
stop();
Symbol 1077 MovieClip Frame 40
stop();
Symbol 1083 MovieClip Frame 6
_parent.state = "stand";
Symbol 1117 MovieClip Frame 81
stop();
_root.fadeout.play();
Symbol 1121 MovieClip Frame 1
stop();
Symbol 1217 MovieClip Frame 68
stop();
_root.fadeout.play();
Symbol 1218 MovieClip Frame 1
stop();
Symbol 1218 MovieClip Frame 66
stop();
Symbol 1220 MovieClip Frame 1
stop();
Symbol 1220 MovieClip Frame 38
stop();
Symbol 1226 MovieClip Frame 54
stop();
Symbol 1228 MovieClip Frame 1
stop();
Symbol 1228 MovieClip Frame 13
stop();
Symbol 1229 MovieClip Frame 4
stop();
Symbol 1232 MovieClip Frame 1
stop();
Symbol 1259 MovieClip [TMPd4lzhusf84] Frame 1
function earl223(val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
}
mcButtonMain.mcButton.FOG.swapDepths(0);
mcButtonMain.mcButton.attachMovie(btnMC, "btnMC", 0);
mcButtonMain.mcButton.btnMC.onRelease = function () {
var _local2 = new LoadVars();
_local2.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local2.score = Score;
_local2.score2 = earl223(String(Score));
_local2.gamer = gameID;
_local2.id = random(9999999);
_local2.toString();
_local2.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local2, "POST");
delete this.onRelease;
};
Symbol 1265 MovieClip Frame 101
stop();
Symbol 1266 MovieClip Frame 1
stop();
submitMe.Score = _root.score;
playmore_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=263&area=gameover", "_blank");
};
continue_btn.onRelease = function () {
_root.fadeout.play();
play();
};
Instance of Symbol 1259 MovieClip [TMPd4lzhusf84] "submitMe" in Symbol 1266 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
btnMC = "submitScore";
gameID = 266;
}
Symbol 1266 MovieClip Frame 200
stop();
Symbol 1268 MovieClip Frame 1
stop();
Symbol 1268 MovieClip Frame 114
stop();
Symbol 1277 MovieClip Frame 1
stop();
Symbol 1277 MovieClip Frame 264
stop();
_root.fadeout.play();
Symbol 1278 MovieClip Frame 4
stop();
Symbol 1281 MovieClip Frame 1
stop();
Symbol 1284 MovieClip Frame 1
stop();
Symbol 1284 MovieClip Frame 63
stop();
submitMe.Score = _root.score;
playmore_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=263&area=gameover", "_blank");
};
continue_btn.onRelease = function () {
_root.fadeout.play();
play();
};
Instance of Symbol 1259 MovieClip [TMPd4lzhusf84] "submitMe" in Symbol 1284 MovieClip Frame 63
//component parameters
onClipEvent (construct) {
btnMC = "submitScore";
gameID = 266;
}
Symbol 1290 MovieClip Frame 4
stop();
Symbol 1384 MovieClip Frame 11
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1415 MovieClip Frame 17
_parent.state = "stand";
Symbol 1421 MovieClip Frame 40
stop();
Symbol 1450 MovieClip Frame 17
_parent.state = "stand";
Symbol 1461 MovieClip Frame 2
stop();
Symbol 1461 MovieClip Frame 4
stop();
Symbol 1484 MovieClip Frame 11
stop();
Symbol 1509 MovieClip Frame 7
_global.makeKi(this._parent._parent, true);
Symbol 1509 MovieClip Frame 24
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1519 MovieClip Frame 5
_global.makeKi(this._parent._parent, false);
Symbol 1519 MovieClip Frame 19
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1528 MovieClip Frame 12
_parent.state = "run";
_parent.attackTime = 10000000000;
Symbol 1536 MovieClip Frame 4
stop();
Symbol 1536 MovieClip Frame 7
_parent.state = "stand";
_parent.attackTime = 10000000000;
Symbol 1539 MovieClip Frame 2
stop();
Symbol 1545 MovieClip Frame 9
_parent.state = "stand";
Symbol 1552 MovieClip Frame 2
stop();
Symbol 1552 MovieClip Frame 4
stop();
Symbol 1558 MovieClip Frame 40
stop();
Symbol 1566 MovieClip Frame 7
_parent.state = "land";
Symbol 1590 MovieClip Frame 73
stop();
_root.gotoNext = "win";
_root.gotoLast = "start";
_global.rainStop();
_root.fadeout.play();
Symbol 1592 MovieClip Frame 15
stop();
Symbol 1657 MovieClip Frame 4
stop();
Instance of Symbol 1638 MovieClip in Symbol 1658 MovieClip Frame 1
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=263&area=minilogo", "_blank");
}
Symbol 1661 MovieClip Frame 1
stop();
Symbol 1661 MovieClip Frame 27
stopAllSounds();
Symbol 1661 MovieClip Frame 28
stop();
_root.camZoom = 100;
_root.xscale = 100;
_root.yscale = 100;
_root.onEnterFrame = function () {
if (_root.camZoom > 100) {
if ((_root.camZoom - 100) > 1) {
_root.camZoom = _root.camZoom - ((_root.camZoom - 100) * 0.2);
} else {
_root.camZoom = 100;
}
}
_root._xscale = _root._xscale - ((_root._xscale - _root.camZoom) * 0.3);
_root._yscale = _root._yscale - ((_root._xscale - _root.camZoom) * 0.3);
_root._x = (_root._xscale - 100) * -3;
_root._y = (_root._yscale - 100) * -3;
};
_root.gotoNextScene(_root.gotoNext);
this.gotoAndStop(1);
Symbol 1665 MovieClip Frame 4
stop();
Symbol 1668 MovieClip Frame 1
stop();
Symbol 1668 MovieClip Frame 2
stop();
Symbol 1753 MovieClip Frame 12
stop();
Symbol 1754 MovieClip Frame 2
stop();
Symbol 1757 MovieClip Frame 6
stop();
Symbol 1758 MovieClip Frame 4
if (!_root.playerJumping) {
if (_root.playerDx != 0) {
_root.playerState = "run";
} else {
_root.playerState = "stand";
}
}
Symbol 1766 MovieClip Frame 6
stop();
Symbol 1767 MovieClip Frame 1
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
Symbol 1769 MovieClip Frame 6
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.playerAttacking = false;
Symbol 1776 MovieClip Frame 1
_root.ultraCombo = false;
_root.punch.start();
Symbol 1776 MovieClip Frame 6
if (_root.ultraCombo) {
_root.ultraCombo = false;
_root.ultraComboCount++;
if (_root.ultraComboCount < 3) {
_root.playerState = "vert_punch";
} else {
_root.playerState = "vert_highpunch";
_root.ultraComboCount = 0;
}
}
Symbol 1776 MovieClip Frame 9
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1776 MovieClip Frame 10
if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 1792 MovieClip Frame 4
_root.punch.start();
Symbol 1792 MovieClip Frame 9
_root.punch2.start();
Symbol 1792 MovieClip Frame 13
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1792 MovieClip Frame 16
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1799 MovieClip Frame 2
_root.punch.start();
Symbol 1799 MovieClip Frame 9
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1806 MovieClip Frame 1
_root.punch.start();
Symbol 1806 MovieClip Frame 7
_root.playerState = "fall";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1808 MovieClip Frame 4
_root.woosh.start();
Symbol 1808 MovieClip Frame 10
_root.superCombo = false;
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1808 MovieClip Frame 13
if (_root.superCombo) {
_root.superCombo = false;
_root.superComboCount++;
_root.playerState = "lowkick";
} else if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 1819 MovieClip Frame 4
_root.woosh.start();
Symbol 1819 MovieClip Frame 7
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1819 MovieClip Frame 11
if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 1826 MovieClip Frame 6
_root.woosh.start();
Symbol 1826 MovieClip Frame 14
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1826 MovieClip Frame 17
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
Symbol 1829 MovieClip Frame 3
_root.woosh.start();
Symbol 1829 MovieClip Frame 11
_root.playerState = "fall";
_root.playerAtacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1852 MovieClip Frame 2
_root.punch2.start();
Symbol 1852 MovieClip Frame 4
_root.ultraCombo = false;
Symbol 1852 MovieClip Frame 8
if (_root.ultraCombo) {
_root.ultraCombo = false;
_root.ultraComboCount++;
if (_root.ultraComboCount < 3) {
_root.playerState = "punch";
} else {
_root.playerState = "vert_highpunch";
_root.ultraComboCount = 0;
}
}
Symbol 1852 MovieClip Frame 9
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1852 MovieClip Frame 10
if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 1854 MovieClip Frame 3
_root.punch.start();
Symbol 1854 MovieClip Frame 9
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1868 MovieClip Frame 3
_root.punch2.start();
Symbol 1868 MovieClip Frame 9
_root.playerState = "fall";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1874 MovieClip Frame 5
_root.superCombo = false;
_root.punch2.start();
Symbol 1874 MovieClip Frame 10
if (!_root.superCombo) {
_root.playerState = "standingup";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
}
Symbol 1874 MovieClip Frame 14
_root.woosh.start();
Symbol 1874 MovieClip Frame 19
_root.woosh.start();
Symbol 1874 MovieClip Frame 23
_root.superCombo = false;
Symbol 1874 MovieClip Frame 28
if (!_root.superCombo) {
_root.playerState = "standingup";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
}
Symbol 1874 MovieClip Frame 29
_root.punch.start();
Symbol 1874 MovieClip Frame 33
_root.woosh.start();
Symbol 1874 MovieClip Frame 38
_root.woosh.start();
Symbol 1874 MovieClip Frame 50
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.superCombo = false;
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 1901 MovieClip Frame 11
_root.playerState = "stand";
Symbol 1902 MovieClip Frame 13
_root.playerState = "stand";
Symbol 1905 MovieClip Frame 4
stop();
Symbol 1951 MovieClip Frame 115
stop();
Symbol 1966 MovieClip Frame 23
_root.playerState = "stand";
Symbol 2060 MovieClip Frame 1
stop();
Symbol 2060 MovieClip Frame 2
stop();
Symbol 2060 MovieClip Frame 3
stop();
Symbol 2060 MovieClip Frame 4
stop();
Symbol 2060 MovieClip Frame 5
stop();
Symbol 2060 MovieClip Frame 6
stop();
Symbol 2060 MovieClip Frame 7
stop();
Symbol 2060 MovieClip Frame 8
stop();
Symbol 2060 MovieClip Frame 9
stop();
Symbol 2060 MovieClip Frame 10
stop();
Symbol 2060 MovieClip Frame 11
stop();
Symbol 2060 MovieClip Frame 12
stop();
Symbol 2060 MovieClip Frame 13
stop();
Symbol 2060 MovieClip Frame 14
stop();
Symbol 2060 MovieClip Frame 15
stop();
Symbol 2060 MovieClip Frame 16
stop();
Symbol 2060 MovieClip Frame 17
stop();
Symbol 2060 MovieClip Frame 18
stop();
Symbol 2060 MovieClip Frame 19
stop();
Symbol 2060 MovieClip Frame 20
stop();
Symbol 2060 MovieClip Frame 21
stop();
Symbol 2060 MovieClip Frame 22
stop();
Symbol 2060 MovieClip Frame 23
stop();
Symbol 2060 MovieClip Frame 24
stop();
Symbol 2060 MovieClip Frame 25
stop();
Symbol 2060 MovieClip Frame 26
stop();
Symbol 2060 MovieClip Frame 27
stop();
Symbol 2060 MovieClip Frame 28
stop();
Symbol 2060 MovieClip Frame 29
stop();
Symbol 2060 MovieClip Frame 30
stop();
Symbol 2060 MovieClip Frame 31
stop();
Symbol 2060 MovieClip Frame 32
stop();
Symbol 2060 MovieClip Frame 33
stop();
Symbol 2060 MovieClip Frame 34
stop();
Symbol 2060 MovieClip Frame 35
stop();
Symbol 2060 MovieClip Frame 36
stop();
Symbol 2060 MovieClip Frame 37
stop();
Symbol 2060 MovieClip Frame 38
stop();
Symbol 2060 MovieClip Frame 39
stop();
Symbol 2060 MovieClip Frame 40
stop();
Symbol 2067 MovieClip Frame 1
stop();
Symbol 2067 MovieClip Frame 29
stop();
Symbol 2082 MovieClip Frame 1
stop();
Symbol 2082 MovieClip Frame 2
stop();
Symbol 2082 MovieClip Frame 3
stop();
Instance of Symbol 2082 MovieClip "musicBox" in Symbol 2087 MovieClip Frame 1
on (release) {
if (this._currentframe == 1) {
stopAllSounds();
this.gotoAndStop(2);
_root.muteSounds = true;
} else if (_root.levelNum != "level3") {
if (_root.game.boss_holder.boss.state != "waiting") {
_root.bossBGM.start(0, 9999);
} else {
_root.BGM.start(0, 9999);
}
if (_root.raining) {
_root.rainfall.start(0, 9999);
}
if (_root.foggy) {
_root.windSound.start(0, 9999);
}
this.gotoAndStop(1);
} else {
_root.BGM.start(0, 9999);
this.gotoAndStop(1);
_root.muteSounds = false;
}
}
Symbol 2093 MovieClip Frame 1
stop();
Symbol 2093 MovieClip Frame 154
stop();
Symbol 2099 MovieClip Frame 1
stop();
Symbol 2108 MovieClip Frame 1
this.skipped = true;
Symbol 2108 MovieClip Frame 20
this.skipped = false;
Symbol 2108 MovieClip Frame 65
this.skipped = true;
Symbol 2108 MovieClip Frame 81
stop();
_root.levelTitle.play();
_root.isPaused = false;
Instance of Symbol 2108 MovieClip "popup" in Symbol 2109 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2110 MovieClip Frame 1
stop();
Symbol 2110 MovieClip Frame 2
stop();
_root.isPaused = true;
Symbol 2136 MovieClip Frame 21
stop();
Symbol 2137 MovieClip Frame 1
this.skipped = true;
Symbol 2137 MovieClip Frame 3
_root.bossBGM.setVolume(140);
if (!_root.muteSounds) {
_root.bossBGM.start(0, 1000);
}
Symbol 2137 MovieClip Frame 23
this.skipped = false;
Symbol 2137 MovieClip Frame 217
this.skipped = true;
Symbol 2137 MovieClip Frame 238
stop();
_root.isPaused = false;
_root.game.boss_holder.boss.state = "reveal";
_root.sword._visible = true;
Instance of Symbol 2137 MovieClip in Symbol 2138 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2139 MovieClip Frame 1
stop();
Symbol 2139 MovieClip Frame 2
stop();
stopAllSounds();
_root.isPaused = true;
Symbol 2140 MovieClip Frame 54
stop();
Symbol 2178 MovieClip Frame 40
stop();
_root.game.removeMovieClip(_root.game.eblood_holder);
Symbol 2182 MovieClip Frame 10
stop();
Symbol 2183 MovieClip Frame 6
stop();
Symbol 2184 MovieClip Frame 4
if (!_root.playerJumping) {
if (_root.playerDx != 0) {
_root.playerState = "run";
} else {
_root.playerState = "stand";
}
}
Symbol 2185 MovieClip Frame 6
stop();
Symbol 2186 MovieClip Frame 2
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
Symbol 2187 MovieClip Frame 6
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.playerAttacking = false;
Symbol 2188 MovieClip Frame 1
_root.ultraCombo = false;
_root.punch.start();
Symbol 2188 MovieClip Frame 5
if (_root.ultraCombo) {
_root.ultraCombo = false;
_root.ultraComboCount++;
if (_root.ultraComboCount < 3) {
_root.playerState = "vert_punch";
} else {
_root.playerState = "vert_highpunch";
_root.ultraComboCount = 0;
}
}
Symbol 2188 MovieClip Frame 9
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2188 MovieClip Frame 10
if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 2189 MovieClip Frame 4
_root.punch.start();
Symbol 2189 MovieClip Frame 9
_root.punch2.start();
Symbol 2189 MovieClip Frame 14
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2189 MovieClip Frame 18
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2195 MovieClip Frame 4
_root.punch.start();
Symbol 2195 MovieClip Frame 16
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2196 MovieClip Frame 1
_root.punch.start();
Symbol 2196 MovieClip Frame 7
_root.playerState = "fall";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2197 MovieClip Frame 5
_root.woosh.start();
Symbol 2197 MovieClip Frame 10
_root.superCombo = false;
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2197 MovieClip Frame 14
if (_root.superCombo) {
_root.superCombo = false;
_root.superComboCount++;
_root.playerState = "lowkick";
} else if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 2198 MovieClip Frame 4
Symbol 2198 MovieClip Frame 7
Symbol 2198 MovieClip Frame 11
_root.playerState = "stand";
Symbol 2199 MovieClip Frame 6
_root.woosh.start();
Symbol 2199 MovieClip Frame 14
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2199 MovieClip Frame 17
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
Symbol 2200 MovieClip Frame 3
_root.woosh.start();
Symbol 2200 MovieClip Frame 11
_root.playerState = "fall";
_root.playerAtacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2201 MovieClip Frame 2
_root.punch2.start();
Symbol 2201 MovieClip Frame 4
_root.ultraCombo = false;
Symbol 2201 MovieClip Frame 8
if (_root.ultraCombo) {
_root.ultraCombo = false;
_root.ultraComboCount++;
if (_root.ultraComboCount < 3) {
_root.playerState = "punch";
} else {
_root.playerState = "vert_highpunch";
_root.ultraComboCount = 0;
}
}
Symbol 2201 MovieClip Frame 9
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2201 MovieClip Frame 10
if (!_root.playerJumping) {
_root.playerState = "stand";
}
Symbol 2202 MovieClip Frame 3
_root.punch.start();
Symbol 2202 MovieClip Frame 9
if (!_root.playerJumping) {
_root.playerState = "stillducking";
}
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2203 MovieClip Frame 3
_root.punch2.start();
Symbol 2203 MovieClip Frame 9
_root.playerState = "fall";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2204 MovieClip Frame 5
_root.superCombo = false;
_root.punch2.start();
Symbol 2204 MovieClip Frame 10
if (!_root.superCombo) {
_root.playerState = "standingup";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
}
Symbol 2204 MovieClip Frame 14
_root.woosh.start();
Symbol 2204 MovieClip Frame 19
_root.woosh.start();
Symbol 2204 MovieClip Frame 23
_root.superCombo = false;
Symbol 2204 MovieClip Frame 28
if (!_root.superCombo) {
_root.playerState = "standingup";
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
}
Symbol 2204 MovieClip Frame 29
_root.punch.start();
Symbol 2204 MovieClip Frame 33
_root.woosh.start();
Symbol 2204 MovieClip Frame 38
_root.woosh.start();
Symbol 2204 MovieClip Frame 47
if (!_root.playerJumping) {
_root.playerState = "stand";
}
_root.superCombo = false;
_root.playerAttacking = false;
_root.game.player.attackTime = 10000000000;
Symbol 2205 MovieClip Frame 11
_root.playerState = "stand";
Symbol 2206 MovieClip Frame 4
stop();
Symbol 2207 MovieClip Frame 115
stop();
Symbol 2208 MovieClip Frame 23
_root.playerState = "stand";
Symbol 2214 MovieClip Frame 1
stop();
Symbol 2214 MovieClip Frame 2
stop();
Symbol 2217 MovieClip Frame 1
stop();
Symbol 2217 MovieClip Frame 2
stop();
Symbol 2218 MovieClip Frame 1
stop();
Symbol 2218 MovieClip Frame 2
stop();
Symbol 2218 MovieClip Frame 3
stop();
Symbol 2218 MovieClip Frame 4
stop();
Symbol 2218 MovieClip Frame 5
stop();
Symbol 2218 MovieClip Frame 6
stop();
Symbol 2218 MovieClip Frame 7
stop();
Symbol 2218 MovieClip Frame 8
stop();
Symbol 2218 MovieClip Frame 9
stop();
Symbol 2218 MovieClip Frame 10
stop();
Symbol 2218 MovieClip Frame 11
stop();
Symbol 2218 MovieClip Frame 12
stop();
Symbol 2218 MovieClip Frame 13
stop();
Symbol 2218 MovieClip Frame 14
stop();
Symbol 2218 MovieClip Frame 15
stop();
Symbol 2218 MovieClip Frame 16
stop();
Symbol 2218 MovieClip Frame 17
stop();
Symbol 2218 MovieClip Frame 18
stop();
Symbol 2218 MovieClip Frame 19
stop();
Symbol 2218 MovieClip Frame 20
stop();
Symbol 2218 MovieClip Frame 21
stop();
Symbol 2218 MovieClip Frame 22
stop();
Symbol 2218 MovieClip Frame 23
stop();
Symbol 2218 MovieClip Frame 24
stop();
Symbol 2218 MovieClip Frame 25
stop();
Symbol 2218 MovieClip Frame 26
stop();
Symbol 2218 MovieClip Frame 27
stop();
Symbol 2218 MovieClip Frame 28
stop();
Symbol 2218 MovieClip Frame 29
stop();
Symbol 2218 MovieClip Frame 30
stop();
Symbol 2218 MovieClip Frame 31
stop();
Symbol 2218 MovieClip Frame 32
stop();
Symbol 2218 MovieClip Frame 33
stop();
Symbol 2218 MovieClip Frame 34
stop();
Symbol 2218 MovieClip Frame 35
stop();
Symbol 2218 MovieClip Frame 36
stop();
Symbol 2218 MovieClip Frame 37
stop();
Symbol 2218 MovieClip Frame 38
stop();
Symbol 2218 MovieClip Frame 39
stop();
Symbol 2218 MovieClip Frame 40
stop();
Symbol 2223 MovieClip Frame 1
stop();
Symbol 2223 MovieClip Frame 154
stop();
Symbol 2231 MovieClip Frame 21
stop();
Symbol 2232 MovieClip Frame 1
this.skipped = true;
Symbol 2232 MovieClip Frame 3
_root.bossBGM.setVolume(140);
if (!_root.muteSounds) {
_root.bossBGM.start(0, 1000);
}
Symbol 2232 MovieClip Frame 23
this.skipped = false;
Symbol 2232 MovieClip Frame 217
this.skipped = true;
Symbol 2232 MovieClip Frame 238
stop();
_root.isPaused = false;
_root.game.boss_holder.boss.state = "reveal";
_root.sword._visible = true;
Instance of Symbol 2232 MovieClip in Symbol 2233 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2234 MovieClip Frame 1
stop();
Symbol 2234 MovieClip Frame 2
stop();
stopAllSounds();
_root.isPaused = true;
Symbol 2292 MovieClip Frame 1
stop();
Symbol 2292 MovieClip Frame 2
stop();
Symbol 2292 MovieClip Frame 3
stop();
Instance of Symbol 2292 MovieClip "musicBox" in Symbol 2295 MovieClip Frame 1
on (release) {
if (this._currentframe == 1) {
stopAllSounds();
this.gotoAndStop(2);
_root.muteSounds = true;
} else if (_root.levelNum != "level3") {
if (_root.game.boss_holder.boss.state != "waiting") {
_root.bossBGM.start(0, 9999);
} else {
_root.BGM.start(0, 9999);
}
if (_root.raining) {
_root.rainfall.start(0, 9999);
}
if (_root.foggy) {
_root.windSound.start(0, 9999);
}
this.gotoAndStop(1);
} else {
_root.BGM.start(0, 9999);
this.gotoAndStop(1);
_root.muteSounds = false;
}
}
Symbol 2299 MovieClip Frame 1
stop();
Symbol 2299 MovieClip Frame 154
stop();
Symbol 2308 MovieClip Frame 1
this.skipped = true;
Symbol 2308 MovieClip Frame 22
this.skipped = false;
Symbol 2308 MovieClip Frame 100
this.skipped = true;
Symbol 2308 MovieClip Frame 116
stop();
_root.levelTitle.play();
_root.isPaused = false;
Instance of Symbol 2308 MovieClip in Symbol 2309 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2310 MovieClip Frame 1
stop();
Symbol 2310 MovieClip Frame 2
stop();
Symbol 2316 MovieClip Frame 1
stop();
Symbol 2325 MovieClip Frame 21
stop();
Symbol 2326 MovieClip Frame 1
this.skipped = true;
Symbol 2326 MovieClip Frame 5
_root.bossBGM.setVolume(140);
if (!_root.muteSounds) {
_root.bossBGM.start(0, 1000);
}
Symbol 2326 MovieClip Frame 23
this.skipped = false;
Symbol 2326 MovieClip Frame 158
this.skipped = true;
Symbol 2326 MovieClip Frame 179
stop();
_root.isPaused = false;
_root.game.level.ground.bossstop._y = -150;
_root.game.boss_holder.boss.state = "reveal";
_root.sword._visible = true;
Instance of Symbol 2326 MovieClip in Symbol 2327 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2328 MovieClip Frame 1
stop();
Symbol 2328 MovieClip Frame 2
stop();
stopAllSounds();
_root.isPaused = true;
Symbol 2331 MovieClip Frame 54
stop();
Symbol 2332 MovieClip Frame 1
stop();
Symbol 2332 MovieClip Frame 27
stopAllSounds();
Symbol 2332 MovieClip Frame 28
stop();
_root.camZoom = 100;
_root.xscale = 100;
_root.yscale = 100;
_root.onEnterFrame = function () {
if (_root.camZoom > 100) {
if ((_root.camZoom - 100) > 1) {
_root.camZoom = _root.camZoom - ((_root.camZoom - 100) * 0.2);
} else {
_root.camZoom = 100;
}
}
_root._xscale = _root._xscale - ((_root._xscale - _root.camZoom) * 0.3);
_root._yscale = _root._yscale - ((_root._xscale - _root.camZoom) * 0.3);
_root._x = (_root._xscale - 100) * -3;
_root._y = (_root._yscale - 100) * -3;
};
_root.gotoNextScene(_root.gotoNext);
this.gotoAndStop(1);
Symbol 2410 MovieClip Frame 1
stop();
Symbol 2410 MovieClip Frame 51
_root.game.level.ground.ground_fall_coll.swapDepths(_root.game.getNextHighestDepth());
_root.game.level.ground.ground_fall_coll.removeMovieClip();
_root.game.level.gfx.wood._visible = true;
_root.downlow = true;
Symbol 2410 MovieClip Frame 66
stop();
Symbol 2515 MovieClip Frame 1
stop();
Symbol 2515 MovieClip Frame 36
stop();
Symbol 2518 MovieClip Frame 1
stop();
Symbol 2518 MovieClip Frame 154
stop();
Symbol 2519 MovieClip Frame 1
this.skipped = true;
Symbol 2519 MovieClip Frame 22
this.skipped = false;
Symbol 2519 MovieClip Frame 100
this.skipped = true;
Symbol 2519 MovieClip Frame 116
stop();
_global.startFog();
_root.levelTitle.play();
_root.isPaused = false;
_root.game.level.gfx.minewall.cacheAsBitmap = true;
_root.wallCounter = 0;
for (n in _root.game.level.gfx.minewall) {
_root.lastCNum = n.toString().substring(8, n.length);
if (_root.wallCounter == 0) {
_root.wallCounter = _root.lastCNum;
continue;
}
}
_root.wallCached = _root.lastCNum;
_parent.frameCounter = 0;
_parent.onEnterFrame = function () {
this.frameCounter++;
if ((this.frameCounter % 5) == 0) {
if (_root.wallCached <= _root.wallCounter) {
_root.game.level.gfx.minewall["instance" + _root.wallCached].cacheAsBitmap = true;
_root.wallCached++;
} else {
delete this.onEnterFrame;
}
}
};
if (_root.game.level.gfx.minewall.cacheAsBitmap) {
}
Instance of Symbol 2519 MovieClip in Symbol 2520 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2521 MovieClip Frame 1
stop();
Symbol 2521 MovieClip Frame 2
stop();
_root.isPaused = true;
Symbol 2523 MovieClip Frame 121
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 122
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 123
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 124
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 125
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 126
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 127
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 128
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 129
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 130
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 131
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 132
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 133
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 134
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 135
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 136
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 137
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 138
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 139
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 140
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 141
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 142
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 143
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 144
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 145
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 146
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 147
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 148
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 149
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 150
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 151
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 152
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 153
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 154
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 155
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 156
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 157
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 158
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 159
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 160
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 161
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 162
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 163
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 164
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 165
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 166
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 167
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 168
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 169
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
}
Symbol 2523 MovieClip Frame 170
if (_root.playerHealth < 100) {
_root.playerHealth = _root.playerHealth + 2;
_root.beep.start(0, 1);
}
Symbol 2523 MovieClip Frame 217
_root.playerHealth = 100;
Symbol 2523 MovieClip Frame 240
stop();
_root.fadeout.play();
Instance of Symbol 2523 MovieClip in Symbol 2524 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2525 MovieClip Frame 1
stop();
Symbol 2525 MovieClip Frame 2
stop();
_root.isPaused = true;
Symbol 2530 MovieClip Frame 260
stop();
_root.fadeout.play();
_root.isPaused = false;
Instance of Symbol 2530 MovieClip in Symbol 2531 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2532 MovieClip Frame 1
stop();
Symbol 2532 MovieClip Frame 2
stop();
_root.isPaused = true;
Symbol 2812 MovieClip Frame 1
stop();
Symbol 2812 MovieClip Frame 2
_root.bridgeFell = true;
Symbol 2812 MovieClip Frame 13
_root.bossOverlay.gotoAndStop(1);
_root.game.level.gfx.bridge2.splash.play();
_root.bridgeFell = true;
_root.playerState = "falling";
_root.game.level.ground.bridgeFloorColl.swapDepths(_root.game.getNextHighestDepth());
_root.game.level.ground.bridgeFloorColl.removeMovieClip();
_root.game.boss_holder.boss.falling = true;
Symbol 2812 MovieClip Frame 117
stop();
Symbol 2897 MovieClip Frame 1
stop();
Symbol 2897 MovieClip Frame 154
stop();
Symbol 2898 MovieClip Frame 1
this.skipped = true;
Symbol 2898 MovieClip Frame 20
this.skipped = false;
Symbol 2898 MovieClip Frame 95
this.skipped = true;
Symbol 2898 MovieClip Frame 111
stop();
_root.isPaused = false;
_root.levelTitle.play();
this._parent.gotoAndStop(1);
Instance of Symbol 2898 MovieClip in Symbol 2899 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2900 MovieClip Frame 1
stop();
Symbol 2900 MovieClip Frame 2
stop();
_root.isPaused = true;
Symbol 2902 MovieClip Frame 1
this.skipped = true;
Symbol 2902 MovieClip Frame 5
_root.bossBGM.setVolume(140);
if (!_root.muteSounds) {
_root.bossBGM.start(0, 9999);
}
Symbol 2902 MovieClip Frame 29
this.skipped = false;
Symbol 2902 MovieClip Frame 179
this.skipped = true;
Symbol 2902 MovieClip Frame 200
stop();
_root.game.boss.state = "stand";
_root.game.level.gfx.bridge2.play();
_root.bridgeFell = true;
_root.showSplash2 = true;
_root.smoke.start();
if (!_root.bridgeFell) {
}
_root.sword._visible = true;
this._parent._parent.gotoAndStop(1);
Instance of Symbol 2902 MovieClip in Symbol 2903 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!this.skipped) {
if (((Key.isDown(32) || (Key.isDown(90))) || (Key.isDown(88))) || (Key.isDown(67))) {
this.gotoAndPlay("skip");
this.skipped = true;
}
}
}
Symbol 2904 MovieClip Frame 1
stop();
Symbol 2904 MovieClip Frame 2
stop();
stopAllSounds();
_root.isPaused = true;
_root.bossedOnce = true;
Symbol 2915 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 2916 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 2923 MovieClip Frame 1
stop();
Symbol 2923 MovieClip Frame 2
stop();
Symbol 2933 MovieClip [TMP6pbk6uzm9i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + gameID) + "&rand=") + random(999999)) + "&filt=1");
Symbol 2939 MovieClip [TMP6ojzjuzm8i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));