Frame 1
stop();
Frame 2
stop();
Frame 3
stop();
_global.newFight = "true";
trace(_root.endWinGame._x);
this.statusBar.removeMovieClip();
this.endWinGame.removeMovieClip();
endWinGame._alpha = 0;
trace(_root.endWinGame._x);
if (gameBeat == true) {
gnome.gotoAndStop(2);
}
fadeOut.removeMovieClip();
Frame 13
onEnterFrame = function () {
};
fadeOut.removeMovieClip();
level.removeMovieClip();
statusBar.removeMovieClip();
_global.charName = ["Barbarian", "Cave Dweller", "Horny Witch", "Gnome King", "Dark Wizard", "The Gnome"];
_global.playerChar = "fighter" + charSelect;
if (newFight == "true") {
_global.fighterLineUp = [];
i = 0;
while (i < 6) {
if (i != charSelect) {
fighterLineUp.push([i]);
}
i++;
}
_global.newFight = "false";
}
fighterUp = "fighter" + fighterLineUp[0];
_global.ground = 250;
bground = "background" + fighterLineUp[0];
this.attachMovie(bground, "level", -10, {_x:-100, _y:0});
this.attachMovie("statusBar", "statusBar", 10, {_x:20, _y:10});
statusBar.timer = 60;
statusBar.playerName = charName[charSelect];
statusBar.compName = charName[fighterLineUp[0]];
level.attachMovie("debugArrow", "arrow1", level.getNextHighestDepth(), {_x:40, _y:40});
level.arrow1._x = (level._width / 2) - 100;
level.attachMovie(playerChar, "player", 10);
level.player._y = ground - level.player._height;
level.player._x = level.arrow1._x - (level.player._width / 2);
level.player.energy = 100;
level.attachMovie("debugArrow", "arrow2", level.getNextHighestDepth(), {_x:200, _y:40});
level.arrow2._x = (level._width / 2) + 100;
level.attachMovie(fighterUp, "comp", 9);
level.comp._y = ground - level.comp._height;
level.comp._x = level.arrow2._x - (level.comp._width / 2);
level.comp._xscale = -100;
level.comp._x = level.comp._x + level.comp._width;
level.comp.energy = 100;
attachMovie("startScreen", "startScreen", this.getNextHighestDepth());
Frame 14
function switchChars() {
if (charFacing == "right") {
level.player._xscale = -100;
level.player._x = level.player._x + level.player._width;
level.comp._xscale = 100;
level.comp._x = level.comp._x - level.comp._width;
} else {
level.player._xscale = 100;
level.player._x = level.player._x - level.player._width;
level.comp._xscale = -100;
level.comp._x = level.comp._x + level.comp._width;
}
}
stop();
jumpVar = false;
jumpVarSound = false;
jumpHeight = 40;
moveable = true;
charFacing = "right";
var charGap = 200;
attack = "ok";
attackTimer = 0;
attackDelay = 5;
keyReleased = "true";
walkTimer = 0;
compActionArray = ["forward", "backward", "nothing", "attack"];
controlArray = ["player", "comp"];
playerEnergyTracker = 100;
compEnergyTracker = 100;
gameTimer = 60;
subTimer = 30;
var kick = new Sound();
kick.attachSound("kick");
var punch = new Sound();
punch.attachSound("punch");
var jump = new Sound();
jump.attachSound("jump");
level.attachMovie("debugArrow", "camArrow", level.getNextHighestDepth(), {_x:0, _y:100});
level.camArrow._yscale = -100;
onEnterFrame = function () {
if (subTimer <= 0) {
subTimer = 30;
gameTimer = gameTimer - 1;
} else {
subTimer = subTimer - 1;
}
statusBar.timer = gameTimer;
level.camArrow._x = camPoint;
level._x = level._x - (((camPoint + level._x) - 250) / 4);
if (level._x >= 0) {
level._x = 0;
} else if (level._x <= -200) {
level._x = -200;
}
i = 0;
while (i < 3) {
quickRef = controlArray[i];
if (level[quickRef]._x <= 0) {
level[quickRef]._x = 0;
} else if ((level[quickRef]._x >= (700 - (level[quickRef]._width / 2))) && (charFacing == "right")) {
level[quickRef]._x = 700 - (level[quickRef]._width / 2);
} else if ((level[quickRef]._x >= 700) && (charFacing == "left")) {
level[quickRef]._x = 700;
}
i++;
}
if ((charGap >= 400) || (charGap <= -400)) {
if (charFacing == "right") {
level.player._x = level.player._x + 3;
} else {
level.player._x = level.player._x - 3;
}
}
playerEnergyTracker = playerEnergyTracker - Math.ceil(playerEnergyTracker - level.player.energy);
statusBar.playerEnergy.gotoAndStop(100 - playerEnergyTracker);
compEnergyTracker = compEnergyTracker - Math.ceil(compEnergyTracker - level.comp.energy);
statusBar.compEnergy.gotoAndStop(100 - compEnergyTracker);
if ((jumpVar == true) && (level.player._y >= jumpHeight)) {
level.player._y = level.player._y - 16;
if (jumpVarSound == false) {
jump.start(0, 0);
jumpVarSound = true;
}
} else {
jumpVar = false;
jumpVarSound = false;
}
if ((jumpVar == false) && ((level.player._y + level.player._height) != ground)) {
level.player._y = level.player._y + 16;
}
if ((Key.isDown(39) && (moveable == true)) && (attackTimer == 0)) {
if ((charGap >= -400) && (charGap <= 400)) {
level.player._x = level.player._x + level.player.speed;
}
level.player.gotoAndStop("walk");
} else if ((Key.isDown(37) && (moveable == true)) && (attackTimer == 0)) {
if ((charGap >= -400) && (charGap <= 400)) {
level.player._x = level.player._x - level.player.speed;
}
level.player.gotoAndStop("walk");
} else if (attackTimer == 0) {
level.player.gotoAndStop("stand");
}
if ((Key.isDown(90) && (attackTimer == 0)) && (keyReleased == "true")) {
level.player.gotoAndStop("punch");
attackTimer = attackDelay;
keyReleased = "false";
if (jumpVar == false) {
moveable = false;
}
if (level.player.attackBox.hitTest(level.comp.hitBox)) {
if (charFacing == "right") {
level.comp._x = level.comp._x + 20;
} else {
level.comp._x = level.comp._x - 20;
}
level.comp.energy = level.comp.energy - (level.player.power / 2);
punch.start(0, 1);
}
} else if ((Key.isDown(88) && (attackTimer == 0)) && (keyReleased == "true")) {
level.player.gotoAndStop("kick");
attackTimer = attackDelay;
keyReleased = "false";
if (jumpVar == false) {
moveable = false;
}
if (level.player.attackBox.hitTest(level.comp.hitBox)) {
if (charFacing == "right") {
level.comp._x = level.comp._x + 25;
} else {
level.comp._x = level.comp._x - 25;
}
level.comp.energy = level.comp.energy - level.player.power;
kick.start(0, 1);
}
} else {
moveable = true;
}
if (attackTimer > 0) {
attackTimer = attackTimer - 1;
}
if (Key.isDown(38)) {
if ((level.player._y + level.player._height) >= ground) {
jumpVar = true;
}
}
if (charGap >= 0) {
if (charFacing != "right") {
switchChars();
}
charGap = level.arrow2._x - level.arrow1._x;
level.arrow1._x = level.player._x + (level.player._width / 2);
level.arrow2._x = level.comp._x - (level.comp._width / 2);
charFacing = "right";
camPoint = level.arrow1._x + (charGap / 2);
} else {
if (charFacing != "left") {
switchChars();
}
charGap = level.arrow2._x - level.arrow1._x;
level.arrow1._x = level.player._x - (level.player._width / 2);
level.arrow2._x = level.comp._x + (level.comp._width / 2);
charFacing = "left";
camPoint = level.arrow2._x - (charGap / 2);
}
if (walkTimer <= 0) {
walkTimer = walkTimer + (Math.random() * 30);
randNum = Math.floor(Math.random() * compActionArray.length);
compAction = compActionArray[randNum];
preformedAction = "false";
} else {
walkTimer = walkTimer - 1;
}
if (compAction == "forward") {
if ((charGap >= -400) && (charGap <= 400)) {
level.comp._x = level.comp._x - level.comp.speed;
}
level.comp.gotoAndStop("walk");
} else if (compAction == "backward") {
if ((charGap >= -400) && (charGap <= 400)) {
level.comp._x = level.comp._x + level.comp.speed;
}
level.comp.gotoAndStop("walk");
}
if (compAction == "attack") {
attackNum = Math.floor(Math.random() * 2);
if ((attackNum == 0) && (preformedAction == "false")) {
level.comp.gotoAndStop("punch");
if (level.comp.attackBox.hitTest(level.player.hitBox)) {
if (charFacing == "right") {
level.player._x = level.player._x - 20;
level.player.energy = level.player.energy - (level.comp.power / 2);
} else {
level.player._x = level.player._x + 20;
level.player.energy = level.player.energy - (level.comp.power / 2);
}
punch.start(0, 1);
}
preformedAction = "true";
walkTimer = attackDelay;
} else if ((attackNum == 1) && (preformedAction == "false")) {
level.comp.gotoAndStop("kick");
if (level.comp.attackBox.hitTest(level.player.hitBox)) {
if (charFacing == "right") {
level.player._x = level.player._x - 25;
level.player.energy = level.player.energy - level.comp.power;
} else {
level.player._x = level.player._x + 25;
level.player.energy = level.player.energy - level.comp.power;
}
kick.start(0, 1);
}
preformedAction = "true";
walkTimer = attackDelay;
}
}
if (compAction == "nothing") {
level.comp.gotoAndStop("stand");
}
if (level.player.energy <= 0) {
if (charFacing == "right") {
level.player._rotation = -90;
} else {
level.player._rotation = 90;
}
level.player.gotoAndStop("stand");
level.player._y = ground;
level.comp._y = ground - level.comp._height;
level.player.gotoAndStop("stand");
gotoAndStop ("endGame");
} else if (level.comp.energy <= 0) {
if (charFacing == "right") {
_global.charFacing = "right";
level.comp._rotation = 90;
level.comp._x = level.comp._x + 50;
} else {
_global.charFacing = "left";
level.comp._rotation = -90;
level.comp._x = level.comp._x - 50;
}
level.comp._y = ground;
level.player.gotoAndStop("stand");
level.player._y = ground - level.player._height;
level.comp.gotoAndStop("stand");
statusBar.compEnergy.gotoAndStop(100);
gotoAndPlay ("win");
}
if (gameTimer == 0) {
if (level.player.energy > level.comp.energy) {
level.comp.energy = 0;
} else if (level.player.energy < level.comp.energy) {
level.player.energy = 0;
} else if (level.player.energy == level.comp.energy) {
level.player.energy = 0;
}
}
};
var myListener = new Object();
myListener.onKeyUp = function () {
if ((Key.getCode() == 88) && (keyReleased == "false")) {
keyReleased = "true";
} else if ((Key.getCode() == 90) && (keyReleased == "false")) {
keyReleased = "true";
}
};
Key.addListener(myListener);
Frame 18
stop();
stopAllSounds();
var endFight = new Sound();
endFight.attachSound("endFight");
endFight.start();
fighterLineUp.shift();
removeListener(myListener);
lastWords = [["How did that feel?", "I've had better."], ["I fight cause I don't know how to love.. Especially myself.", "I lost cause I do drugs"], ["Don't try this at home kids, we're professionals", "We also dropped-out of school and are buried in debt"], ["Oh my the Gods! What I have done?", "Congratulations, you are now a bastard"], ["I have won the battle, yet I still feel like a loser", "That's because fighting doesn't solve anything cholo."], ["Goddamn!! What a work out!", "I can totally feel it in my kicked ass. So it is written."], ["What were we fighting about again?", "Evolution. I was for it, and I believe, you were for it as well."], ["Hey, you alright man?", "I haven't been alright since the Reagan administration."], ["Nice moves. Wanna come up for some 'coffee'?", "I thought you'd never ask."], ["Ho-boy, I've worked up an appetite", "May I suggest a healthy vegetable?"], ["We are all winners here.", "I did the best I could and had fun in the process."], ["That feld good. Now I feel like I can do anything!", "You can first kiss my ass."], ["Oh No! The girl I have a crush on was watching me fight.", "Don't worry, she's crazy and has no taste in men."]];
phraseTimer = 70;
endTimer = phraseTimer * 2;
swapped = "false";
endPlaced = "false";
phraseNum = Math.floor(Math.random() * lastWords.length);
level.attachMovie("speechBox", "speechBox", this.getNextHighestDepth());
level.speechBox._y = (ground - level.player._height) - 40;
if (charFacing == "right") {
level.speechBox._x = (level.player._x + (level.player._width / 2)) - (level.speechBox._width / 2);
} else {
level.speechBox._x = level.player._x - (level.player._width * 2);
}
if (level.speechBox._x <= 0) {
level.speechBox._x = 10;
} else if (level.speechBox._x > 400) {
level.speechBox._x = 400;
}
level.speechBox.phrase = lastWords[phraseNum][0];
onEnterFrame = function () {
endTimer = endTimer - 1;
if (phraseTimer > 0) {
phraseTimer = phraseTimer - 1;
}
if ((phraseTimer <= 0) && (swapped == "false")) {
level.speechBox.removeMovieClip();
level.attachMovie("speechBox", "speechBox", this.getNextHighestDepth());
level.speechBox._y = 140;
if (charFacing == "right") {
level.speechBox._x = level.comp._x - (level.comp._width * 2);
} else {
level.speechBox._x = level.comp._x - level.comp._width;
}
if (level.speechBox._x <= 0) {
level.speechBox._x = 10;
} else if (level.speechBox._x > 400) {
level.speechBox._x = 400;
}
level.speechBox.phrase = lastWords[phraseNum][1];
swapped = "true";
trace("----------------");
trace(level.speechBox._x);
trace((level._x * -1) + level.speechBox._x);
trace("----------------");
}
if ((endTimer <= 0) && (endPlaced == "false")) {
removeMovieClip(speechBox);
this.attachMovie("fadeOut", "fadeOut", this.getNextHighestDepth());
endPlaced = "true";
}
statusBar._y = statusBar._y - 1;
};
Frame 30
level.attachMovie("loseClip", "loseClip", level.getNextHighestDepth - 1);
level.loseClip._x = level._x * -1;
trace(level._x);
trace(level.loseClip._x);
trace("atta");
onEnterFrame = function () {
statusBar._x = statusBar._x - 1;
};
Frame 51
_global.gameBeat = true;
trace("arrived at endWinGame");
removeMovieClip(level);
_root.attachMovie("endWinGame", "endWinGame", 100);
trace(_root.endWinGame._x);
onEnterFrame = function () {
};
Symbol 15 MovieClip [background4] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelFive");
levelOne.start(0, 99999999);
Symbol 18 MovieClip [background5] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelSix");
levelOne.start(0, 99999999);
Symbol 21 MovieClip [background3] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelFour");
levelOne.start(0, 99999999);
Symbol 24 MovieClip [background2] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelThree");
levelOne.start(0, 99999999);
Symbol 27 MovieClip [background1] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelTwo");
levelOne.start(0, 99999999);
Symbol 30 MovieClip [background0] Frame 1
var levelOne = new Sound();
levelOne.attachSound("levelOne");
levelOne.start(0, 99999999);
Symbol 47 MovieClip [fighter0] Frame 1
stop();
this.speed = 4;
this.power = 7;
Symbol 59 MovieClip [fighter3] Frame 1
stop();
this.speed = 6;
this.power = 2;
Symbol 73 MovieClip [fighter2] Frame 1
stop();
this.speed = 3;
this.power = 3;
Symbol 85 MovieClip [fighter5] Frame 1
stop();
this.speed = 10;
this.power = 15;
Symbol 97 MovieClip [fighter4] Frame 1
stop();
this.speed = 5;
this.power = 10;
Symbol 111 MovieClip [fighter1] Frame 1
stop();
this.speed = 3;
this.power = 10;
Symbol 115 MovieClip Frame 1
stop();
Symbol 134 MovieClip [loseClip] Frame 1
stopAllSounds();
var endFight = new Sound();
endFight.attachSound("endFight");
endFight.start();
Symbol 134 MovieClip [loseClip] Frame 34
losePhraseArray = ["Damn son! That was like watching six steven seagal movies in a row..wickid but so stupid. No wait, it just sucked.", "Hey y'all, I'm back! They opened a new Juicy store at the mall. Does this new Juicy toga make me look like a dumb, skanky ho?", "Sorry I couldn't watch you guys fight. Ever have that urge to poo but it goes away and all you do is fart alot?"];
numbGen = Math.floor(Math.random() * losePhraseArray.length);
losePhrase = losePhraseArray[numbGen];
Symbol 134 MovieClip [loseClip] Frame 301
_root.gotoAndPlay("charSelect");
Symbol 142 MovieClip [startScreen] Frame 124
_parent.play();
Symbol 142 MovieClip [startScreen] Frame 157
_parent.startScreen.removeMovieClip();
Symbol 144 MovieClip [fadeOut] Frame 25
_root.removeMovieClip(fadeOut);
stop();
if (fighterLineUp.length != 0) {
_root.gotoAndStop("fight");
} else {
_root.gotoAndStop("endWinGame");
trace("going to endWinGame");
}
Symbol 162 MovieClip [endWinGame] Frame 1
var musax = new Sound();
musax.attachSound("endGameSong");
musax.start(0, 999999999);
this.createEmptyMovieClip("clip", 1);
clip.attachMovie(playerChar, "playerChar", 1);
trace(playerChar);
clip._x = 250 - (clip._width / 2);
clip._y = 225;
clip.playerChar.gotoAndStop("up");
Symbol 162 MovieClip [endWinGame] Frame 345
clip.removeMovieClip();
Symbol 162 MovieClip [endWinGame] Frame 858
stopAllSounds();
_root.gotoAndPlay("charSelect");
_root.endWinGame.removeMovieClip();
Symbol 174 MovieClip Frame 72
_root.play();
Symbol 197 MovieClip Frame 1
var introSound = new Sound();
introSound.attachSound("introMusic");
Symbol 197 MovieClip Frame 235
stop();
Symbol 198 Button
on (release) {
this.play();
}
Symbol 213 Button
on (release) {
_global.charSelect = 0;
_root.gotoAndStop("fight");
}
Symbol 214 Button
on (release) {
_global.charSelect = 1;
_root.gotoAndStop("fight");
}
Symbol 215 Button
on (release) {
_global.charSelect = 2;
_root.gotoAndStop("fight");
}
Symbol 216 Button
on (release) {
_global.charSelect = 3;
_root.gotoAndStop("fight");
}
Symbol 217 Button
on (release) {
_global.charSelect = 4;
_root.gotoAndStop("fight");
}
Symbol 222 Button
on (release) {
_global.charSelect = 5;
_root.gotoAndStop("fight");
}
Symbol 223 MovieClip Frame 1
stop();