Frame 2
percent_done = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
LBack._xscale = percent_done;
if (percent_done == 100) {
gotoAndStop (3);
} else {
gotoAndPlay (1);
}
Frame 3
function doSomething() {
getURL ("http://www.myroidtypecomics.com", _blank);
}
function doSomething2() {
getURL ("http://www.MoFunZone.com/", _blank);
}
function doSomething3() {
getURL ("http://www.violentacres.com", _blank);
}
_global.g_perfects = 0;
_global.g_swordlevel = 0;
_global.g_armorlevel = 0;
_global.g_gold = 0;
_global.g_nextlevel = 0;
_global.g_L1ene = 0;
_global.g_L2ene = 0;
_global.g_L3ene = 0;
_global.g_L4ene = 0;
g_perfects = 0;
g_swordlevel = 0;
g_armorlevel = 0;
g_gold = 0;
g_nextlevel = 0;
g_L1ene = 0;
g_L2ene = 0;
g_L3ene = 0;
g_L4ene = 0;
MENU.customItems.push(Functioned3);
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("Visit Myroid-Type Comics", doSomething);
Functioned3 = new ContextMenuItem("Visit Violent Acres", doSomething3);
Functioned2 = new ContextMenuItem("Visit MoFunZone", doSomething2);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned3);
MENU.customItems.push(Functioned2);
_root.menu = MENU;
stopAllSounds();
Frame 1813
stopAllSounds();
Frame 1992
stopAllSounds();
Frame 2817
stopAllSounds();
Frame 3068
stopAllSounds();
Frame 3069
stop();
Frame 3072
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 19;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene17.health < Ene17.maxhealth) && (Ene17.health > 0)) {
Ene17.health = Ene17.maxhealth;
}
if (Ene18.alive) {
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -1960;
Floor._y = -622;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
} else {
Floor.gotoAndStop(2);
Fore.gotoAndStop(2);
Before.gotoAndStop(2);
Floor._x = -950;
Floor._y = -50;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 1360;
Ene0._y = Floor._y + 800;
Ene1.active = true;
Ene1._x = Floor._x + 650;
Ene1._y = Floor._y + 992;
Ene2.active = true;
Ene2._x = Floor._x + 520;
Ene2._y = Floor._y + 608;
Ene3.active = true;
Ene3._x = Floor._x + 2140;
Ene3._y = Floor._y + 384;
Ene4.active = true;
Ene4._x = Floor._x + 100;
Ene4._y = Floor._y + 320;
Ene5.active = true;
Ene5._x = Floor._x + 660;
Ene5._y = Floor._y + 192;
} else if (Floor._currentframe == 2) {
Ene6.active = true;
Ene6._x = Floor._x + 716;
Ene6._y = Floor._y + 992;
Ene7.active = true;
Ene7._x = Floor._x + 1820;
Ene7._y = Floor._y + 992;
Ene8.active = true;
Ene8._x = Floor._x + 1260;
Ene8._y = Floor._y + 544;
Ene9.active = true;
Ene9._x = Floor._x + 1920;
Ene9._y = Floor._y + 320;
Ene18.active = true;
Ene18._x = Floor._x + 1180;
Ene18._y = Floor._y + 320;
}
Frame 3073
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 2) * multiplier);
} else {
EneObj.health = EneObj.health - (Millie.atk * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 4) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round(Millie.atk * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 2) * multiplier);
} else {
EneObj.health = EneObj.health - (Millie.atk * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 6) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round(Millie.velocity * 2) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round(Millie.velocity) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Millie.atk * 20) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow(Millie.rage / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow(Millie.rage / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (EneObj.atimer == 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
Millie.flicker = 10;
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round(EneObj.atk / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - EneObj.atk;
Millie.rage = Millie.rage + 5;
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
if (Floor._currentframe == 3) {
if (WaterLev._visible) {
WaterFore._y = Floor._y + 700;
} else {
WaterFore._y = Floor._y + 1000;
}
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 1360;
Ene0._y = Floor._y + 800;
Ene1.active = true;
Ene1._x = Floor._x + 650;
Ene1._y = Floor._y + 992;
Ene2.active = true;
Ene2._x = Floor._x + 520;
Ene2._y = Floor._y + 608;
Ene3.active = true;
Ene3._x = Floor._x + 2140;
Ene3._y = Floor._y + 384;
Ene4.active = true;
Ene4._x = Floor._x + 100;
Ene4._y = Floor._y + 320;
Ene5.active = true;
Ene5._x = Floor._x + 660;
Ene5._y = Floor._y + 192;
} else if (Floor._currentframe == 2) {
Ene6.active = true;
Ene6._x = Floor._x + 716;
Ene6._y = Floor._y + 992;
Ene7.active = true;
Ene7._x = Floor._x + 1820;
Ene7._y = Floor._y + 992;
Ene8.active = true;
Ene8._x = Floor._x + 1260;
Ene8._y = Floor._y + 544;
Ene9.active = true;
Ene9._x = Floor._x + 1920;
Ene9._y = Floor._y + 320;
Ene18.active = true;
Ene18._x = Floor._x + 1180;
Ene18._y = Floor._y + 320;
} else if (Floor._currentframe == 3) {
Ene10.active = true;
Ene10._x = Floor._x + 920;
Ene10._y = Floor._y + 992;
Ene11.active = true;
Ene11._x = Floor._x + 1240;
Ene11._y = Floor._y + 352;
Ene12.active = true;
Ene12._x = Floor._x + 2140;
Ene12._y = Floor._y + 576;
Ene13.active = true;
Ene13._x = Floor._x + 80;
Ene13._y = Floor._y + 480;
} else if (Floor._currentframe == 4) {
Ene14.active = true;
Ene14._x = Floor._x + 380;
Ene14._y = Floor._y + 512;
Ene15.active = true;
Ene15._x = Floor._x + 670;
Ene15._y = Floor._y + 576;
Ene16.active = true;
Ene16._x = Floor._x + 1950;
Ene16._y = Floor._y + 352;
Ene17.active = true;
Ene17._x = Floor._x + 2180;
Ene17._y = Floor._y + 896;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 3074
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 4;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 30;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene17.alive == false) && (Note._visible)) {
Note._x = Ene17._x;
Note._y = Ene17._y - Ene17._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (3073);
}
Frame 3075
enekilled = 0;
bonusgold = 0;
i = 0;
while (i < 17) {
if (_root["Ene" + i].alive == false) {
enekilled = enekilled + 1;
}
i++;
}
enestats.text = ((enekilled + "/17 - ") + Math.round((enekilled / 17) * 100)) + "%";
bonusgold = enekilled * 30;
if (enekilled < 17) {
perf.text = "";
} else {
g_perfects = g_perfects + 1;
bonusgold = bonusgold + 200;
}
g_L1ene = enekilled;
g_gold = g_gold + bonusgold;
earnedgold.text = bonusgold + "g";
stop();
Frame 3076
stopAllSounds();
Frame 3164
snomoney = new Sound();
snomoney.attachSound("nomoney");
spotion = new Sound();
spotion.attachSound("potion");
senchant = new Sound();
senchant.attachSound("enchant");
Frame 3165
switch (g_swordlevel) {
case -3 :
q1.gotoAndStop(3);
q2.gotoAndStop(3);
q3.gotoAndStop(3);
q4.gotoAndStop(2);
break;
case -2 :
q2.gotoAndStop(3);
q3.gotoAndStop(3);
q4.gotoAndStop(2);
break;
case -1 :
q3.gotoAndStop(3);
q4.gotoAndStop(2);
break;
case 0 :
q4.gotoAndStop(2);
break;
case 1 :
q4.gotoAndStop(2);
q5.gotoAndStop(3);
break;
case 2 :
q4.gotoAndStop(2);
q5.gotoAndStop(3);
q6.gotoAndStop(3);
break;
case 3 :
q4.gotoAndStop(2);
q5.gotoAndStop(3);
q6.gotoAndStop(3);
q7.gotoAndStop(3);
}
switch (g_armorlevel) {
case -3 :
w1.gotoAndStop(3);
w2.gotoAndStop(3);
w3.gotoAndStop(3);
w4.gotoAndStop(2);
break;
case -2 :
w2.gotoAndStop(3);
w3.gotoAndStop(3);
w4.gotoAndStop(2);
break;
case -1 :
w3.gotoAndStop(3);
w4.gotoAndStop(2);
break;
case 0 :
w4.gotoAndStop(2);
break;
case 1 :
w4.gotoAndStop(2);
w5.gotoAndStop(3);
break;
case 2 :
w4.gotoAndStop(2);
w5.gotoAndStop(3);
w6.gotoAndStop(3);
break;
case 3 :
w4.gotoAndStop(2);
w5.gotoAndStop(3);
w6.gotoAndStop(3);
w7.gotoAndStop(3);
}
gamount.text = g_gold;
stop();
Frame 3240
stopAllSounds();
switch (g_nextlevel) {
case 1 :
gotoAndPlay (3241);
break;
case 2 :
gotoAndPlay (4305);
break;
case 3 :
gotoAndPlay (4954);
break;
case 4 :
gotoAndPlay (6018);
break;
default :
gotoAndPlay (1);
}
Frame 4300
stopAllSounds();
Frame 4301
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 25;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene24.health < Ene24.maxhealth) && (Ene24.health > 0)) {
Ene24.health = Ene24.maxhealth;
}
if (Ene23.alive) {
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -100;
Floor._y = -600;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
} else {
Floor.gotoAndStop(3);
Fore.gotoAndStop(3);
Before.gotoAndStop(3);
Floor._x = -10;
Floor._y = -996;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 710;
Ene0._y = Floor._y + 928;
Ene1.active = true;
Ene1._x = Floor._x + 705;
Ene1._y = Floor._y + 672;
Ene2.active = true;
Ene2._x = Floor._x + 572;
Ene2._y = Floor._y + 288;
Ene3.active = true;
Ene3._x = Floor._x + 1374;
Ene3._y = Floor._y + 416;
Ene4.active = true;
Ene4._x = Floor._x + 1780;
Ene4._y = Floor._y + 864;
Ene5.active = true;
Ene5._x = Floor._x + 2240;
Ene5._y = Floor._y + 256;
Ene6.active = true;
Ene6._x = Floor._x + 1440;
Ene6._y = Floor._y + 864;
Ene7.active = true;
Ene7._x = Floor._x + 1790;
Ene7._y = Floor._y + 352;
} else if (Floor._currentframe == 3) {
Ene12.active = true;
Ene12._x = Floor._x + 620;
Ene12._y = Floor._y + 768;
Ene13.active = true;
Ene13._x = Floor._x + 812;
Ene13._y = Floor._y + 320;
Ene14.active = true;
Ene14._x = Floor._x + 1750;
Ene14._y = Floor._y + 416;
Ene15.active = true;
Ene15._x = Floor._x + 2190;
Ene15._y = Floor._y + 384;
Ene16.active = true;
Ene16._x = Floor._x + 1215;
Ene16._y = Floor._y + 672;
Ene17.active = true;
Ene17._x = Floor._x + 1280;
Ene17._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 2020;
Ene18._y = Floor._y + 864;
Ene23.active = true;
Ene23._x = Floor._x + 124;
Ene23._y = Floor._y + 896;
Millie._x = Floor._x + 124;
Millie._y = Floor._y + 796;
}
Frame 4302
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 4) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round((Millie.atk + fierydmg) * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 1;
break;
case 2 :
fierydmg = 3;
break;
case 3 :
fierydmg = 5;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 6) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round((Millie.velocity + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.velocity + fierydmg) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 20) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 20;
break;
case 2 :
fierydmg = 50;
break;
case 3 :
fierydmg = 100;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (EneObj.atimer == 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
Millie.flicker = 10;
mitigator = 1;
switch (g_armorlevel) {
case -1 :
mitigator = 0.75;
break;
case -2 :
mitigator = 0.5;
break;
case -3 :
mitigator = 0.25;
}
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round((EneObj.atk * mitigator) / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - Math.round(EneObj.atk * mitigator);
Millie.rage = Millie.rage + 5;
}
switch (g_armorlevel) {
case 1 :
EneObj.health = EneObj.health - Math.round(EneObj.atk / 2);
break;
case 2 :
EneObj.health = EneObj.health - EneObj.atk;
break;
case 3 :
EneObj.health = EneObj.health - (EneObj.atk * 2);
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
if (Floor._currentframe == 4) {
WaterFore._y = Floor._y + 672;
} else {
WaterFore._y = Floor._y + 1024;
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = Floor._y + 1028;
WaterFore._yscale = 100;
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 710;
Ene0._y = Floor._y + 928;
Ene1.active = true;
Ene1._x = Floor._x + 705;
Ene1._y = Floor._y + 672;
Ene2.active = true;
Ene2._x = Floor._x + 572;
Ene2._y = Floor._y + 288;
Ene3.active = true;
Ene3._x = Floor._x + 1374;
Ene3._y = Floor._y + 416;
Ene4.active = true;
Ene4._x = Floor._x + 1780;
Ene4._y = Floor._y + 864;
Ene5.active = true;
Ene5._x = Floor._x + 2240;
Ene5._y = Floor._y + 256;
Ene6.active = true;
Ene6._x = Floor._x + 1440;
Ene6._y = Floor._y + 864;
Ene7.active = true;
Ene7._x = Floor._x + 1790;
Ene7._y = Floor._y + 352;
} else if (Floor._currentframe == 2) {
Ene8.active = true;
Ene8._x = Floor._x + 610;
Ene8._y = Floor._y + 576;
Ene9.active = true;
Ene9._x = Floor._x + 1290;
Ene9._y = Floor._y + 608;
Ene10.active = true;
Ene10._x = Floor._x + 2050;
Ene10._y = Floor._y + 896;
Ene11.active = true;
Ene11._x = Floor._x + 2350;
Ene11._y = Floor._y + 480;
} else if (Floor._currentframe == 3) {
Ene12.active = true;
Ene12._x = Floor._x + 620;
Ene12._y = Floor._y + 768;
Ene13.active = true;
Ene13._x = Floor._x + 812;
Ene13._y = Floor._y + 320;
Ene14.active = true;
Ene14._x = Floor._x + 1750;
Ene14._y = Floor._y + 416;
Ene15.active = true;
Ene15._x = Floor._x + 2190;
Ene15._y = Floor._y + 384;
Ene16.active = true;
Ene16._x = Floor._x + 1215;
Ene16._y = Floor._y + 672;
Ene17.active = true;
Ene17._x = Floor._x + 1280;
Ene17._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 2020;
Ene18._y = Floor._y + 864;
Ene23.active = true;
Ene23._x = Floor._x + 124;
Ene23._y = Floor._y + 896;
} else if (Floor._currentframe == 4) {
Ene19.active = true;
Ene19._x = Floor._x + 1090;
Ene19._y = Floor._y + 256;
Ene20.active = true;
Ene20._x = Floor._x + 1660;
Ene20._y = Floor._y + 288;
Ene21.active = true;
Ene21._x = Floor._x + 1760;
Ene21._y = Floor._y + 960;
Ene22.active = true;
Ene22._x = Floor._x + 1232;
Ene22._y = Floor._y + 800;
Ene24.active = true;
Ene24._x = Floor._x + 660;
Ene24._y = Floor._y + 960;
WaterFore._y = Floor._y + 672;
WaterFore._yscale = 150;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 4303
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 4;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 30;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene24.alive == false) && (Note._visible)) {
Note._x = Ene24._x;
Note._y = Ene24._y - Ene24._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (4302);
}
Frame 4304
enekilled = 0;
bonusgold = 0;
i = 0;
while (i < 23) {
if (_root["Ene" + i].alive == false) {
enekilled = enekilled + 1;
}
i++;
}
enestats.text = ((enekilled + "/23 - ") + Math.round((enekilled / 23) * 100)) + "%";
bonusgold = enekilled * 40;
if (enekilled < 23) {
perf.text = "";
} else {
g_perfects = g_perfects + 1;
bonusgold = bonusgold + 300;
}
g_L2ene = enekilled;
g_gold = g_gold + bonusgold;
earnedgold.text = bonusgold + "g";
stop();
Frame 4949
stopAllSounds();
Frame 4950
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 20;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene16.health < Ene16.maxhealth) && (Ene16.health > 0)) {
Ene16.health = Ene16.maxhealth;
}
if (Ene18.alive == false) {
Floor.gotoAndStop(3);
Fore.gotoAndStop(3);
Before.gotoAndStop(3);
Floor._x = -10;
Floor._y = -10;
Fore._x = Floor._x;
Fore._y = Floor._y;
} else if (Ene17.alive == false) {
Floor.gotoAndStop(2);
Fore.gotoAndStop(2);
Before.gotoAndStop(2);
Floor._x = -10;
Floor._y = -10;
Fore._x = Floor._x;
Fore._y = Floor._y;
} else {
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -10;
Floor._y = -10;
Fore._x = Floor._x;
Fore._y = Floor._y;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 185;
Ene0._y = Floor._y + 832;
Ene1.active = true;
Ene1._x = Floor._x + 1592;
Ene1._y = Floor._y + 864;
Ene2.active = true;
Ene2._x = Floor._x + 2044;
Ene2._y = Floor._y + 832;
Ene3.active = true;
Ene3._x = Floor._x + 1285;
Ene3._y = Floor._y + 320;
} else if (Floor._currentframe == 2) {
Ene4.active = true;
Ene4._x = Floor._x + 1808;
Ene4._y = Floor._y + 672;
Ene5.active = true;
Ene5._x = Floor._x + 1225;
Ene5._y = Floor._y + 320;
Ene6.active = true;
Ene6._x = Floor._x + 1632;
Ene6._y = Floor._y + 352;
Ene7.active = true;
Ene7._x = Floor._x + 2270;
Ene7._y = Floor._y + 384;
Ene17.active = true;
Ene17._x = Floor._x + 368;
Ene17._y = Floor._y + 320;
} else if (Floor._currentframe == 3) {
Ene8.active = true;
Ene8._x = Floor._x + 980;
Ene8._y = Floor._y + 736;
Ene9.active = true;
Ene9._x = Floor._x + 1188;
Ene9._y = Floor._y + 320;
Ene10.active = true;
Ene10._x = Floor._x + 1640;
Ene10._y = Floor._y + 384;
Ene11.active = true;
Ene11._x = Floor._x + 1980;
Ene11._y = Floor._y + 448;
Ene12.active = true;
Ene12._x = Floor._x + 1620;
Ene12._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 320;
Ene18._y = Floor._y + 384;
}
Frame 4951
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 4) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round((Millie.atk + fierydmg) * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 1;
break;
case 2 :
fierydmg = 3;
break;
case 3 :
fierydmg = 5;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 6) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round((Millie.velocity + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.velocity + fierydmg) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 20) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 20;
break;
case 2 :
fierydmg = 50;
break;
case 3 :
fierydmg = 100;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (EneObj.atimer == 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
Millie.flicker = 10;
mitigator = 1;
switch (g_armorlevel) {
case -1 :
mitigator = 0.75;
break;
case -2 :
mitigator = 0.5;
break;
case -3 :
mitigator = 0.25;
}
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round((EneObj.atk * mitigator) / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - Math.round(EneObj.atk * mitigator);
Millie.rage = Millie.rage + 5;
}
switch (g_armorlevel) {
case 1 :
EneObj.health = EneObj.health - Math.round(EneObj.atk / 2);
break;
case 2 :
EneObj.health = EneObj.health - EneObj.atk;
break;
case 3 :
EneObj.health = EneObj.health - (EneObj.atk * 2);
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 185;
Ene0._y = Floor._y + 832;
Ene1.active = true;
Ene1._x = Floor._x + 1592;
Ene1._y = Floor._y + 864;
Ene2.active = true;
Ene2._x = Floor._x + 2044;
Ene2._y = Floor._y + 832;
Ene3.active = true;
Ene3._x = Floor._x + 1285;
Ene3._y = Floor._y + 320;
} else if (Floor._currentframe == 2) {
Ene4.active = true;
Ene4._x = Floor._x + 1808;
Ene4._y = Floor._y + 672;
Ene5.active = true;
Ene5._x = Floor._x + 1225;
Ene5._y = Floor._y + 320;
Ene6.active = true;
Ene6._x = Floor._x + 1632;
Ene6._y = Floor._y + 352;
Ene7.active = true;
Ene7._x = Floor._x + 2270;
Ene7._y = Floor._y + 384;
Ene17.active = true;
Ene17._x = Floor._x + 368;
Ene17._y = Floor._y + 320;
} else if (Floor._currentframe == 3) {
Ene8.active = true;
Ene8._x = Floor._x + 980;
Ene8._y = Floor._y + 736;
Ene9.active = true;
Ene9._x = Floor._x + 1188;
Ene9._y = Floor._y + 320;
Ene10.active = true;
Ene10._x = Floor._x + 1640;
Ene10._y = Floor._y + 384;
Ene11.active = true;
Ene11._x = Floor._x + 1980;
Ene11._y = Floor._y + 448;
Ene12.active = true;
Ene12._x = Floor._x + 1620;
Ene12._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 320;
Ene18._y = Floor._y + 384;
} else if (Floor._currentframe == 4) {
Ene13.active = true;
Ene13._x = Floor._x + 868;
Ene13._y = Floor._y + 448;
Ene14.active = true;
Ene14._x = Floor._x + 1360;
Ene14._y = Floor._y + 576;
Ene15.active = true;
Ene15._x = Floor._x + 900;
Ene15._y = Floor._y + 704;
Ene16.active = true;
Ene16._x = Floor._x + 2300;
Ene16._y = Floor._y + 608;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 4952
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 4;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 30;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene16.alive == false) && (Note._visible)) {
Note._x = Ene16._x;
Note._y = Ene16._y - Ene16._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (4951);
}
Frame 4953
enekilled = 0;
bonusgold = 0;
i = 0;
while (i < 16) {
if (_root["Ene" + i].alive == false) {
enekilled = enekilled + 1;
}
i++;
}
enestats.text = ((enekilled + "/16 - ") + Math.round((enekilled / 16) * 100)) + "%";
bonusgold = enekilled * 50;
if (enekilled < 16) {
perf.text = "";
} else {
g_perfects = g_perfects + 1;
bonusgold = bonusgold + 500;
}
g_L3ene = enekilled;
g_gold = g_gold + bonusgold;
earnedgold.text = bonusgold + "g";
stop();
Frame 6013
stopAllSounds();
Frame 6014
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 25;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene22.health < Ene22.maxhealth) && (Ene22.health > 0)) {
Ene22.health = Ene22.maxhealth;
}
if (Ene24.alive == false) {
Floor.gotoAndStop(3);
Fore.gotoAndStop(3);
Before.gotoAndStop(3);
Floor._x = -730;
Floor._y = -10;
Fore._x = Floor._x;
Fore._y = Floor._y;
} else if (Ene23.alive == false) {
Floor.gotoAndStop(2);
Fore.gotoAndStop(2);
Before.gotoAndStop(2);
Floor._x = -1520;
Floor._y = -692;
Fore._x = Floor._x;
Fore._y = Floor._y;
} else {
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -10;
Floor._y = -10;
Fore._x = Floor._x;
Fore._y = Floor._y;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 525;
Ene0._y = Floor._y + 480;
Ene1.active = true;
Ene1._x = Floor._x + 820;
Ene1._y = Floor._y + 448;
Ene2.active = true;
Ene2._x = Floor._x + 2370;
Ene2._y = Floor._y + 448;
Ene3.active = true;
Ene3._x = Floor._x + 460;
Ene3._y = Floor._y + 736;
Ene4.active = true;
Ene4._x = Floor._x + 460;
Ene4._y = Floor._y + 960;
} else if (Floor._currentframe == 2) {
Ene5.active = true;
Ene5._x = Floor._x + 280;
Ene5._y = Floor._y + 576;
Ene6.active = true;
Ene6._x = Floor._x + 330;
Ene6._y = Floor._y + 832;
Ene7.active = true;
Ene7._x = Floor._x + 1020;
Ene7._y = Floor._y + 896;
Ene8.active = true;
Ene8._x = Floor._x + 1750;
Ene8._y = Floor._y + 992;
Ene9.active = true;
Ene9._x = Floor._x + 1220;
Ene9._y = Floor._y + 704;
Ene10.active = true;
Ene10._x = Floor._x + 590;
Ene10._y = Floor._y + 320;
Ene11.active = true;
Ene11._x = Floor._x + 1310;
Ene11._y = Floor._y + 448;
Ene12.active = true;
Ene12._x = Floor._x + 2170;
Ene12._y = Floor._y + 224;
Ene13.active = true;
Ene13._x = Floor._x + 2350;
Ene13._y = Floor._y + 384;
Ene23.active = true;
Ene23._x = Floor._x + 1740;
Ene23._y = Floor._y + 992;
} else if (Floor._currentframe == 3) {
Ene14.active = true;
Ene14._x = Floor._x + 1640;
Ene14._y = Floor._y + 480;
Ene15.active = true;
Ene15._x = Floor._x + 2030;
Ene15._y = Floor._y + 352;
Ene16.active = true;
Ene16._x = Floor._x + 1980;
Ene16._y = Floor._y + 736;
Ene17.active = true;
Ene17._x = Floor._x + 2080;
Ene17._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 970;
Ene18._y = Floor._y + 608;
Ene24.active = true;
Ene24._x = Floor._x + 950;
Ene24._y = Floor._y + 224;
}
Frame 6015
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 4) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round((Millie.atk + fierydmg) * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 1;
break;
case 2 :
fierydmg = 3;
break;
case 3 :
fierydmg = 5;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 6) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round((Millie.velocity + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.velocity + fierydmg) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 20) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 20;
break;
case 2 :
fierydmg = 50;
break;
case 3 :
fierydmg = 100;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (EneObj.atimer == 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
Millie.flicker = 10;
mitigator = 1;
switch (g_armorlevel) {
case -1 :
mitigator = 0.75;
break;
case -2 :
mitigator = 0.5;
break;
case -3 :
mitigator = 0.25;
}
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round((EneObj.atk * mitigator) / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - Math.round(EneObj.atk * mitigator);
Millie.rage = Millie.rage + 5;
}
switch (g_armorlevel) {
case 1 :
EneObj.health = EneObj.health - Math.round(EneObj.atk / 2);
break;
case 2 :
EneObj.health = EneObj.health - EneObj.atk;
break;
case 3 :
EneObj.health = EneObj.health - (EneObj.atk * 2);
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 525;
Ene0._y = Floor._y + 480;
Ene1.active = true;
Ene1._x = Floor._x + 820;
Ene1._y = Floor._y + 448;
Ene2.active = true;
Ene2._x = Floor._x + 2370;
Ene2._y = Floor._y + 448;
Ene3.active = true;
Ene3._x = Floor._x + 460;
Ene3._y = Floor._y + 736;
Ene4.active = true;
Ene4._x = Floor._x + 460;
Ene4._y = Floor._y + 960;
} else if (Floor._currentframe == 2) {
Ene5.active = true;
Ene5._x = Floor._x + 280;
Ene5._y = Floor._y + 576;
Ene6.active = true;
Ene6._x = Floor._x + 330;
Ene6._y = Floor._y + 832;
Ene7.active = true;
Ene7._x = Floor._x + 1020;
Ene7._y = Floor._y + 896;
Ene8.active = true;
Ene8._x = Floor._x + 1750;
Ene8._y = Floor._y + 992;
Ene9.active = true;
Ene9._x = Floor._x + 1220;
Ene9._y = Floor._y + 704;
Ene10.active = true;
Ene10._x = Floor._x + 590;
Ene10._y = Floor._y + 320;
Ene11.active = true;
Ene11._x = Floor._x + 1310;
Ene11._y = Floor._y + 448;
Ene12.active = true;
Ene12._x = Floor._x + 2170;
Ene12._y = Floor._y + 224;
Ene13.active = true;
Ene13._x = Floor._x + 2350;
Ene13._y = Floor._y + 384;
Ene23.active = true;
Ene23._x = Floor._x + 1740;
Ene23._y = Floor._y + 992;
} else if (Floor._currentframe == 3) {
Ene14.active = true;
Ene14._x = Floor._x + 1640;
Ene14._y = Floor._y + 480;
Ene15.active = true;
Ene15._x = Floor._x + 2030;
Ene15._y = Floor._y + 352;
Ene16.active = true;
Ene16._x = Floor._x + 1980;
Ene16._y = Floor._y + 736;
Ene17.active = true;
Ene17._x = Floor._x + 2080;
Ene17._y = Floor._y + 992;
Ene18.active = true;
Ene18._x = Floor._x + 970;
Ene18._y = Floor._y + 608;
Ene24.active = true;
Ene24._x = Floor._x + 950;
Ene24._y = Floor._y + 224;
} else if (Floor._currentframe == 4) {
Ene19.active = true;
Ene19._x = Floor._x + 370;
Ene19._y = Floor._y + 448;
Ene20.active = true;
Ene20._x = Floor._x + 780;
Ene20._y = Floor._y + 224;
Ene21.active = true;
Ene21._x = Floor._x + 1140;
Ene21._y = Floor._y + 192;
Ene22.active = true;
Ene22._x = Floor._x + 2000;
Ene22._y = Floor._y + 416;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 6016
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 6;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 4;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 30;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene22.alive == false) && (Note._visible)) {
Note._x = Ene22._x;
Note._y = Ene22._y - Ene22._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (6015);
}
Frame 6017
enekilled = 0;
bonusgold = 0;
i = 0;
while (i < 22) {
if (_root["Ene" + i].alive == false) {
enekilled = enekilled + 1;
}
i++;
}
enestats.text = ((enekilled + "/22 - ") + Math.round((enekilled / 22) * 100)) + "%";
bonusgold = enekilled * 60;
if (enekilled < 22) {
perf.text = "";
} else {
g_perfects = g_perfects + 1;
bonusgold = bonusgold + 650;
}
g_L4ene = enekilled;
g_gold = g_gold + bonusgold;
earnedgold.text = bonusgold + "g";
stop();
Frame 7907
stopAllSounds();
stopAllSounds();
Frame 7908
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 1;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene0.health < Ene0.maxhealth) && (Ene0.health > 0)) {
Ene0.health = Ene0.maxhealth;
}
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -1000;
Floor._y = -400;
Fore._x = Floor._x;
Fore._y = Floor._y;
Ene0.active = true;
Ene0._x = Floor._x + 1700;
Ene0._y = Floor._y + 736;
Frame 7909
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 4) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round((Millie.atk + fierydmg) * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 1;
break;
case 2 :
fierydmg = 3;
break;
case 3 :
fierydmg = 5;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 6) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round((Millie.velocity + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.velocity + fierydmg) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 20) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 20;
break;
case 2 :
fierydmg = 50;
break;
case 3 :
fierydmg = 100;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (Millie._x < (Floor._x + 540)) {
Millie.runspeed = -30;
Millie.velocity = -20;
spunchhit.start();
}
if (Millie._x > (Floor._x + 1940)) {
Millie.runspeed = 30;
Millie.velocity = -20;
spunchhit.start();
}
if (EneObj.atimer == 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
Millie.flicker = 10;
mitigator = 1;
switch (g_armorlevel) {
case -1 :
mitigator = 0.75;
break;
case -2 :
mitigator = 0.5;
break;
case -3 :
mitigator = 0.25;
}
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round((EneObj.atk * mitigator) / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - Math.round(EneObj.atk * mitigator);
Millie.rage = Millie.rage + 5;
}
switch (g_armorlevel) {
case 1 :
EneObj.health = EneObj.health - Math.round(EneObj.atk / 2);
break;
case 2 :
EneObj.health = EneObj.health - EneObj.atk;
break;
case 3 :
EneObj.health = EneObj.health - (EneObj.atk * 2);
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 1700;
Ene0._y = Floor._y + 736;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 7910
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 10;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 3;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 2;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 20;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene0.alive == false) && (Note._visible)) {
Note._x = Ene0._x;
Note._y = Ene0._y - Ene0._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (7909);
}
Frame 7911
stop();
Frame 8701
stopAllSounds();
if (g_perfects < 4) {
gotoAndPlay (9956);
}
Frame 9281
stopAllSounds();
Frame 9282
M_STAND = 1;
M_WALK = 3;
M_RUN = 5;
M_SKID = 7;
M_JUMP = 9;
M_FALL = 11;
M_STAB = 13;
M_RSTAB = 15;
M_JSTAB = 17;
M_CHARGE = 19;
M_FLURRY = 21;
M_DIE = 23;
M_SIT = 25;
M_HS = 27;
M_FLIP = 29;
M_SKYDIVE = 31;
M_BLOODTHIRST = 33;
M_EXECUTE = 35;
B_WIDTH = 480;
B_HEIGHT = 400;
sSwipe = new Sound();
sSwipe.attachSound("Swipe");
sSwipe2 = new Sound();
sSwipe2.attachSound("Swipe2");
ssteprun2 = new Sound();
ssteprun2.attachSound("steprun2");
sskidshort = new Sound();
sskidshort.attachSound("skidshort");
sWhirlwind = new Sound();
sWhirlwind.attachSound("Whirlwind");
sSword2 = new Sound();
sSword2.attachSound("Sword2");
sSword3 = new Sound();
sSword3.attachSound("Sword3");
sOdead = new Sound();
sOdead.attachSound("Odead");
sHdead = new Sound();
sHdead.attachSound("Hdead");
sow1 = new Sound();
sow1.attachSound("orcow_1");
sow2 = new Sound();
sow2.attachSound("orcow_2");
sow3 = new Sound();
sow3.attachSound("orcow_3");
shitmetal = new Sound();
shitmetal.attachSound("hitmetal");
sneedmorerage1 = new Sound();
sneedmorerage1.attachSound("orcrage_1");
sneedmorerage2 = new Sound();
sneedmorerage2.attachSound("orcrage_2");
sBloodlust = new Sound();
sBloodlust.attachSound("Bloodlust");
spunchhit = new Sound();
spunchhit.attachSound("punchhit");
spunchhit2 = new Sound();
spunchhit2.attachSound("punchhit2");
ssplash = new Sound();
ssplash.attachSound("splash");
sBubbles = new Sound();
sBubbles.attachSound("Bubbles");
sbang1 = new Sound();
sbang1.attachSound("bang1");
simpale = new Sound();
simpale.attachSound("impale");
sbthirst = new Sound();
sbthirst.attachSound("bthirst");
scrit = new Sound();
scrit.attachSound("crit");
ssupercrit = new Sound();
ssupercrit.attachSound("supercrit");
ENEINDEX = 1;
soundtimer = 0;
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
WaterFore._y = 600;
WaterFore._yscale = 100;
Millie._x = 230;
Millie._y = 270;
Millie.health = 100;
Millie.alive = true;
Millie.rage = 0;
Millie.berserk = false;
Millie.runspeed = 0;
Millie.velocity = 0;
Millie.ready = 0;
Millie.breath = 360;
if ((Ene0.health < Ene0.maxhealth) && (Ene0.health > 0)) {
Ene0.health = Ene0.maxhealth;
}
Floor.gotoAndStop(1);
Fore.gotoAndStop(1);
Before.gotoAndStop(1);
Floor._x = -1000;
Floor._y = -400;
Fore._x = Floor._x;
Fore._y = Floor._y;
Ene0.active = true;
Ene0._x = Floor._x + 1700;
Ene0._y = Floor._y + 736;
Frame 9283
function MillieEvents() {
Millie._x = int(Millie._x);
if (Millie.velocity == 0) {
while ((Floor.hitTest(Millie._x, Millie._y + 1, true) == false) && (Floor.hitTest(dDown_x, dDown_y, true) == true)) {
Millie._y = Millie._y + 1;
}
while (Floor.hitTest(Millie._x, Millie._y, true)) {
Millie._y = Millie._y - 1;
}
}
if (WaterFore.hitTest(Millie._x, Millie._y, true) && (Millie.watermult == 1)) {
Millie.watermult = 0.5;
if (Millie.velocity > 6) {
Millie.velocity = 2;
}
ssplash.start();
} else if ((WaterFore.hitTest(Millie._x, Millie._y, true) == false) && (Millie.watermult == 0.5)) {
Millie.watermult = 1;
ssplash.start();
}
if ((Floor.hitTest(dDown_x, dDown_y, true) == false) && (Millie.velocity == 0)) {
Millie.velocity = 2;
}
if (Key.isDown(37) && (Key.isDown(40) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed > 5)) {
Millie.gotoAndStop(M_SKID);
sskidshort.start();
}
} else if (Millie.runspeed > -8) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
} else if ((Millie.runspeed > -15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed - Millie.rconst;
}
if ((Millie.runspeed < -8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed + 1;
}
Millie.dir = true;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != (M_WALK + 1)) && (Millie.runspeed >= -8)) && (Millie.runspeed <= 0)) {
Millie.gotoAndStop(M_WALK + 1);
} else if ((Millie._currentframe != (M_RUN + 1)) && (Millie.runspeed < -8)) {
Millie.gotoAndStop(M_RUN + 1);
}
}
} else if (Key.isDown(39) && (Key.isDown(40) == false)) {
if (Millie.runspeed < 0) {
Millie.runspeed = Millie.runspeed + (Millie.rconst * 2);
if ((Millie.velocity == 0) && (Millie.runspeed < -5)) {
Millie.gotoAndStop(M_SKID + 1);
sskidshort.start();
}
} else if (Millie.runspeed < 8) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
} else if ((Millie.runspeed < 15) && (Millie.rage >= 25)) {
Millie.runspeed = Millie.runspeed + Millie.rconst;
}
if ((Millie.runspeed > 8) && (Millie.rage < 25)) {
Millie.runspeed = Millie.runspeed - 1;
}
Millie.dir = false;
if (((Millie.velocity == 0) && (Key.isDown(68) == false)) && (Millie.atktype != 6)) {
if (((Millie._currentframe != M_WALK) && (Millie.runspeed >= 0)) && (Millie.runspeed <= 8)) {
Millie.gotoAndStop(M_WALK);
}
if ((Millie._currentframe != M_RUN) && (Millie.runspeed > 8)) {
Millie.gotoAndStop(M_RUN);
}
}
}
if (Millie.runspeed != 0) {
a = 0;
while (a < ENEINDEX) {
if ((_root["Ene" + a].hitTest(Millie._x - (Millie._width / 2), Millie._y - (Millie._height / 2), true) || (_root["Ene" + a].hitTest(Millie._x + (Millie._width / 2), Millie._y - (Millie._height / 2), true))) && (_root["Ene" + a].alive)) {
if (Millie.dir && (_root["Ene" + a]._x < Millie._x)) {
Millie.runspeed = 0;
}
if ((Millie.dir == false) && (_root["Ene" + a]._x > Millie._x)) {
Millie.runspeed = 0;
}
}
a++;
}
if ((Floor.hitTest(dLeft_x, dLeft_y, true) && (Millie.runspeed < 0)) || (Floor.hitTest(dRight_x, dRight_y, true) && (Millie.runspeed > 0))) {
Millie.runspeed = 0;
}
if (Millie.runspeed < 0) {
if ((Floor._x >= -10) || (Millie._x >= 240)) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if (Millie.runspeed > 0) {
if ((Millie._x <= 240) || (Floor._x <= ((-Floor._width) + 490))) {
Millie._x = Millie._x + (Millie.runspeed * Millie.watermult);
} else {
MoveEverything((-Millie.runspeed) * Millie.watermult, 0);
}
}
if ((Key.isDown(37) == false) && (Key.isDown(39) == false)) {
if (Millie.runspeed > 0) {
Millie.runspeed = Millie.runspeed - 1;
} else {
Millie.runspeed = Millie.runspeed + 1;
}
if ((Math.abs(Millie.runspeed) > 0) && (Math.abs(Millie.runspeed) < 1)) {
Millie.runspeed = 0;
}
if ((Millie.velocity == 0) && (Math.abs(Millie.runspeed) > 10)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SKID + 1);
} else {
Millie.gotoAndStop(M_SKID);
}
sskidshort.start();
}
}
}
if (((Key.isDown(40) && (Key.isDown(68) == false)) && (Millie.runspeed == 0)) && (Millie.velocity == 0)) {
if (Millie.dir) {
Millie.gotoAndStop(M_SIT + 1);
} else {
Millie.gotoAndStop(M_SIT);
}
}
if ((Key.isDown(83) && (Millie.velocity == 0)) && (Key.isDown(40) == false)) {
Millie.velocity = -15;
sSwipe2.start();
}
if (Millie.velocity < 0) {
if (Floor._y <= -10) {
MoveEverything(0, (-Millie.velocity) / Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity / Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.ready == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_JUMP + 1);
} else {
Millie.gotoAndStop(M_JUMP);
}
} else if (Millie.dir) {
Millie.gotoAndStop(M_FLIP + 1);
} else {
Millie.gotoAndStop(M_FLIP);
}
}
}
if (((((Millie.ready == 0) && (Key.isDown(83))) && (Millie.velocity > -4)) && (Millie.atktype == 0)) && (Millie.rage >= 50)) {
Millie.velocity = -20;
sSwipe.start();
Millie.ready = 1;
}
if ((Millie.velocity < 0) && (Floor.hitTest(dUp_x, dUp_y, true))) {
Millie.velocity = 2;
}
if (Floor.hitTest(Millie._x, Millie._y, true) && (Millie.velocity > 0)) {
Millie.velocity = 0;
Millie.ready = 0;
if (Millie.dir == false) {
Millie.gotoAndStop(M_STAND);
} else {
Millie.gotoAndStop(M_STAND + 1);
}
ssteprun2.start();
Millie.ready = 0;
}
if (Millie.velocity > 0) {
if (Floor._y > ((-Floor._height) + 410)) {
MoveEverything(0, (-Millie.velocity) * Millie.watermult);
} else {
Millie._y = Millie._y + (Millie.velocity * Millie.watermult);
}
if (Millie.atktype == 0) {
if (Millie.dir) {
Millie.gotoAndStop(M_FALL + 1);
} else {
Millie.gotoAndStop(M_FALL);
}
}
}
if (Key.isDown(68)) {
if (((Millie.velocity == 0) && (Key.isDown(40) == false)) && (Key.isDown(38) == false)) {
if ((Math.abs(Millie.runspeed) > 10) && (Millie.rage >= 25)) {
if (Millie.atktype != 3) {
Millie.atktype = 3;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_CHARGE + 1);
} else {
Millie.gotoAndStop(M_CHARGE);
}
} else if (Math.abs(Millie.runspeed) > 5) {
if (Millie.atktype != 2) {
Millie.atktype = 2;
Millie.atimer = 1;
sSwipe.start();
}
if (Millie.dir) {
Millie.gotoAndStop(M_RSTAB + 1);
} else {
Millie.gotoAndStop(M_RSTAB);
}
} else if ((Millie.rage >= 75) && (Millie.runspeed == 0)) {
if (Millie.atktype != 5) {
Millie.atktype = 5;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_FLURRY + 1);
} else {
Millie.gotoAndStop(M_FLURRY);
}
} else {
if (Millie.atktype != 1) {
Millie.atktype = 1;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_STAB + 1);
} else {
Millie.gotoAndStop(M_STAB);
}
}
} else if (Millie.velocity == 0) {
if (Key.isDown(38)) {
if (Millie.rage < 10) {
if (Millie.atktype == 6) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 6) {
Millie.atktype = 6;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_HS + 1);
} else {
Millie.gotoAndStop(M_HS);
}
} else if (Key.isDown(40)) {
if (Millie.rage < 50) {
if (Millie.atktype == 8) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
Millie.atktype = 0;
}
if (soundtimer == 0) {
soundtimer = 40;
if ((Math.random() * 2) > 1) {
sneedmorerage1.start();
} else {
sneedmorerage2.start();
}
}
return(undefined);
}
if (Millie.atktype != 8) {
Millie.atktype = 8;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_BLOODTHIRST + 1);
} else {
Millie.gotoAndStop(M_BLOODTHIRST);
}
}
} else if (((Millie.velocity != 0) && (Millie.rage >= 75)) && (Key.isDown(40) == false)) {
if (Millie.atktype != 4) {
sWhirlwind.start();
Millie.atktype = 4;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_JSTAB + 1);
} else {
Millie.gotoAndStop(M_JSTAB);
}
} else if (Millie.velocity != 0) {
if (Key.isDown(40) == false) {
if (Millie.atktype != 7) {
Millie.atktype = 7;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_SKYDIVE + 1);
} else {
Millie.gotoAndStop(M_SKYDIVE);
}
} else if (Key.isDown(40)) {
if (Millie.atktype != 9) {
sSwipe.start();
Millie.atktype = 9;
Millie.atimer = 1;
}
if (Millie.dir) {
Millie.gotoAndStop(M_EXECUTE + 1);
} else {
Millie.gotoAndStop(M_EXECUTE);
}
}
}
if (((Millie.atktype == 1) || (Millie.atktype == 2)) && (Millie.atimer == 10)) {
sSwipe.start();
}
if ((Millie.atktype == 5) && ((Millie.atimer == 1) || (Millie.atimer == 7))) {
sSwipe.start();
}
if ((Millie.atimer == 8) && (Millie.atktype == 6)) {
sSwipe.start();
}
}
if (((((((Key.isDown(37) == false) && (Key.isDown(39) == false)) && (Key.isDown(40) == false)) && (Millie.velocity == 0)) && (Millie.runspeed == 0)) && (Key.isDown(68) == false)) && (Key.isDown(70) == false)) {
if (Millie.dir) {
Millie.gotoAndStop(M_STAND + 1);
} else {
Millie.gotoAndStop(M_STAND);
}
}
while (((Millie._y < 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
while (((Millie._y > 240) && (Floor._y < -10)) && (Floor._y > ((-Floor._height) + 410))) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._x > -10) {
Millie._x = Millie._x - 1;
MoveEverything(-1, 0);
}
while (Floor._x < (-(Floor._width - 490))) {
Millie._x = Millie._x + 1;
MoveEverything(1, 0);
}
while (Floor._y > -10) {
Millie._y = Millie._y - 1;
MoveEverything(0, -1);
}
while (Floor._y < ((-Floor._height) + 410)) {
Millie._y = Millie._y + 1;
MoveEverything(0, 1);
}
if (Millie.flicker > 0) {
Millie.flicker = Millie.flicker - 1;
if (Millie._visible) {
Millie._visible = false;
} else {
Millie._visible = true;
}
}
if ((Millie.flicker == 0) && (Millie._visible == false)) {
Millie._visible = true;
}
if ((((Millie.health <= 0) || (Millie.breath <= 0)) || (Millie._y > ((Floor._y + Floor._height) + Millie._height))) && (Millie.alive == true)) {
if (Millie.breath > 0) {
sow3.start();
} else {
sBubbles.start();
}
Millie.health = 0;
Millie.rage = 0;
Millie.flicker = 0;
Millie._visible = true;
Millie.alive = false;
if (Millie.dir) {
Millie.gotoAndStop(M_DIE + 1);
} else {
Millie.gotoAndStop(M_DIE);
}
}
}
function EnemyEvents(EneObj) {
if (EneObj.hitTest(Millie) && (Millie.alive)) {
if (((EneObj._x < Millie._x) && (Millie.dir)) || ((EneObj._x > Millie._x) && (Millie.dir == false))) {
multiplier = 1;
if (((Millie.atktype == 1) && (Millie.atimer == 14)) || ((Millie.atktype == 2) && (Millie.atimer == 17))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 5;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 3) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 4) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 4) && (EneObj.flicker == 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
} else {
EneObj.health = EneObj.health - (Math.round((Millie.atk + fierydmg) * 1.5) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 2;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 5) && ((Millie.atimer == 2) || (Millie.atimer == 8))) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 1;
break;
case 2 :
fierydmg = 3;
break;
case 3 :
fierydmg = 5;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.atk + fierydmg) * multiplier);
}
EneObj.flicker = 10;
if (Millie.berserk == false) {
Millie.rage = Millie.rage + 2;
}
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 6) && (Millie.atimer == 10)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 6) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 3) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage - 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if (((Millie.atktype == 7) && (EneObj.flicker == 0)) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (Math.round((Millie.velocity + fierydmg) * 2) * multiplier);
} else {
EneObj.health = EneObj.health - ((Millie.velocity + fierydmg) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = Millie.rage + 10;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 8) && (Millie.atimer == 5)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 2;
break;
case 2 :
fierydmg = 5;
break;
case 3 :
fierydmg = 10;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 20) * multiplier);
} else {
EneObj.health = EneObj.health - (((Millie.atk + fierydmg) * 10) * multiplier);
}
sbthirst.start();
EneObj.flicker = 10;
Millie.rage = Millie.rage - 50;
Millie.health = Millie.health + 30;
if ((Math.random() * 2) > 1) {
sSword2.start();
} else {
sSword3.start();
}
} else if ((Millie.atktype == 9) && (Millie.velocity > 0)) {
crit = Math.round(Math.random() * 100);
if (crit < 5) {
multiplier = 10;
} else if (crit >= 90) {
multiplier = 2;
} else {
multiplier = 1;
}
fierydmg = 0;
switch (g_swordlevel) {
case 1 :
fierydmg = 20;
break;
case 2 :
fierydmg = 50;
break;
case 3 :
fierydmg = 100;
}
switch (g_swordlevel) {
case -1 :
Millie.health = Millie.health + 1;
break;
case -2 :
Millie.health = Millie.health + 2;
break;
case -3 :
Millie.health = Millie.health + 5;
}
if (Millie.berserk) {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 500) * multiplier);
} else {
EneObj.health = EneObj.health - ((Math.pow((Millie.rage + fierydmg) / 100, 2) * 200) * multiplier);
}
EneObj.flicker = 10;
Millie.rage = 0;
if (Millie.berserk) {
simpale.start();
} else {
sbthirst.start();
}
}
if (Millie.atktype != 0) {
if (multiplier == 2) {
scrit.start();
} else if (multiplier == 10) {
ssupercrit.start();
}
}
}
if ((EneObj._x < Millie._x) && (EneObj.dir)) {
EneObj.dir = false;
} else if ((EneObj._x > Millie._x) && (EneObj.dir == false)) {
EneObj.dir = true;
}
if (EneObj.canattack) {
if (EneObj.atimer == 0) {
if ((((EneObj._x < (Floor._x + 550)) && (EneObj.dir)) || ((EneObj._x > (Floor._x + 1350)) && (EneObj.dir == false))) || (Millie.velocity > 0)) {
EneObj.atktype = 3;
EneObj.astrike = 7;
EneObj.amax = 11;
if (EneObj.dir) {
EneObj.gotoAndStop(8);
} else {
EneObj.gotoAndStop(7);
}
} else if (EneObj.dir != Millie.dir) {
EneObj.atktype = 1;
EneObj.astrike = 12;
EneObj.amax = 20;
if (EneObj.dir) {
EneObj.gotoAndStop(4);
} else {
EneObj.gotoAndStop(3);
}
} else if (EneObj.dir == Millie.dir) {
sWhirlwind.start();
EneObj.atktype = 2;
EneObj.astrike = 10;
EneObj.amax = 21;
if (EneObj.dir) {
EneObj.gotoAndStop(10);
} else {
EneObj.gotoAndStop(9);
}
}
EneObj.atimer = 1;
}
if (EneObj.atimer == EneObj.astrike) {
if (EneObj.atktype == 1) {
Millie.flicker = 10;
mitigator = 1;
switch (g_armorlevel) {
case -1 :
mitigator = 0.75;
break;
case -2 :
mitigator = 0.5;
break;
case -3 :
mitigator = 0.25;
}
if (((Millie.atktype == 0) && (Millie._currentframe != M_SIT)) && (Millie._currentframe != (M_SIT + 1))) {
shitmetal.start();
if ((Math.random() * 100) < 80) {
Millie.health = Millie.health - Math.round((EneObj.atk * mitigator) / 2);
}
Millie.rage = Millie.rage + 3;
} else {
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - Math.round(EneObj.atk * mitigator);
Millie.rage = Millie.rage + 5;
}
switch (g_armorlevel) {
case 1 :
EneObj.health = EneObj.health - Math.round(EneObj.atk / 2);
break;
case 2 :
EneObj.health = EneObj.health - EneObj.atk;
break;
case 3 :
EneObj.health = EneObj.health - (EneObj.atk * 2);
}
} else if (EneObj.atktype == 2) {
Millie.velocity = -30;
} else if (EneObj.atktype == 3) {
spunchhit.start();
Millie.velocity = -20;
if (Millie._x < EneObj._x) {
Millie.runspeed = -30;
} else {
Millie.runspeed = 30;
}
randnum = Math.random() * 3;
if (randnum > 2) {
sow1.start();
} else if (randnum > 1) {
sow2.start();
} else {
sow3.start();
}
Millie.health = Millie.health - 15;
Millie.rage = Millie.rage + 5;
}
}
}
} else {
EneObj.act(Floor);
}
if (EneObj.atimer > 0) {
EneObj.atimer = EneObj.atimer + 1;
}
if (EneObj.atimer > EneObj.amax) {
if (EneObj.dir) {
EneObj.gotoAndStop(2);
} else {
EneObj.gotoAndStop(1);
}
EneObj.atimer = 0;
}
if (EneObj.flicker > 0) {
EneObj.flicker = EneObj.flicker - 1;
if (EneObj._visible) {
EneObj._visible = false;
} else {
EneObj._visible = true;
}
}
if ((EneObj.flicker == 0) && (EneObj._visible == false)) {
EneObj._visible = true;
}
if (EneObj.health <= 0) {
if (EneObj.dir) {
EneObj.gotoAndStop(6);
} else {
EneObj.gotoAndStop(5);
}
EneObj.alive = false;
EneObj.flicker = 0;
EneObj._visible = true;
EneObj.health = 0;
_root["s" + EneObj.deathnoise].start();
}
}
function MoveEverything(xmove, ymove) {
Floor._x = Floor._x + xmove;
Floor._y = Floor._y + ymove;
Fore._x = Floor._x;
Fore._y = Floor._y;
Before._x = Floor._x;
Before._y = Floor._y;
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].active) {
_root["Ene" + i]._x = _root["Ene" + i]._x + xmove;
_root["Ene" + i]._y = _root["Ene" + i]._y + ymove;
}
i++;
}
}
function DetEvents() {
dDown_x = Millie._x;
dDown_y = Millie._y + 10;
dUp_x = Millie._x;
dUp_y = Millie._y - Millie._height;
dLeft_x = Millie._x - 24;
dLeft_y = Millie._y - 40;
dRight_x = Millie._x + 24;
dRight_y = Millie._y - 40;
}
function Parallax() {
if ((Floor._x < -11) && (Floor._x > ((-Floor._width) + 491))) {
var _local1 = ((Millie._x + 0) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x > -11) {
var _local1 = ((B_WIDTH / 2) - Floor._x) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
} else if (Floor._x < ((-Floor._width) + 491)) {
var _local1 = (Floor._width - (B_WIDTH / 2)) / (Floor._width + 0);
para1._x = (-_local1) * (para1._width - B_WIDTH);
para2._x = (-_local1) * (para2._width - B_WIDTH);
}
if ((Floor._y < -11) && (Floor._y > ((-Floor._height) + 411))) {
var _local2 = ((Millie._y + 0) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y > -11) {
var _local2 = ((B_HEIGHT / 2) - Floor._y) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
} else if (Floor._y < ((-Floor._height) + 411)) {
var _local2 = (Floor._height - (B_HEIGHT / 2)) / (Floor._height + 0);
para1._y = (-_local2) * (para1._height - B_HEIGHT);
para2._y = (-_local2) * (para2._height - B_HEIGHT);
}
}
function CheckStageChange() {
if ((Millie._x > 0) && (Millie._x < 480)) {
return(undefined);
}
if (Millie._x < 0) {
Floor.gotoAndStop(Floor._currentframe - 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 475;
Floor._x = (-Floor._width) + 490;
Fore._x = Floor._x;
Before._x = Floor._x;
} else if (Millie._x > 480) {
Floor.gotoAndStop(Floor._currentframe + 1);
Fore.gotoAndStop(Floor._currentframe);
Before.gotoAndStop(Floor._currentframe);
Millie._x = 5;
Floor._x = -10;
Fore._x = -10;
Before._x = -10;
}
i = 0;
while (i < ENEINDEX) {
_root["Ene" + i]._x = -1000;
_root["Ene" + i]._y = -1000;
_root["Ene" + i].active = false;
i++;
}
if (Floor._currentframe == 1) {
Ene0.active = true;
Ene0._x = Floor._x + 1700;
Ene0._y = Floor._y + 736;
}
}
if (Millie.alive) {
MillieEvents();
}
i = 0;
while (i < ENEINDEX) {
if (_root["Ene" + i].alive) {
EnemyEvents(_root["Ene" + i]);
}
i++;
}
DetEvents();
Parallax();
CheckStageChange();
if (Key.isDown(16)) {
if (Math.round(Math.random() * 100) < 5) {
}
}
Frame 9284
if ((Millie.velocity != 0) && (Millie.velocity < 30)) {
Millie.velocity = Millie.velocity + Millie.gconst;
}
if ((Millie.atimer > 0) && (Millie.atktype != 0)) {
Millie.atimer = Millie.atimer + 1;
}
if ((Millie.atimer > 18) && ((Millie.atktype == 1) || (Millie.atktype == 6))) {
Millie.atimer = 1;
}
if ((Millie.atimer > 20) && (Millie.atktype == 2)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 12) && (Millie.atktype == 5)) {
Millie.atimer = 1;
}
if ((Millie.atimer > 14) && (Millie.atktype == 8)) {
Millie.atimer = 1;
}
if (Key.isDown(68) == false) {
Millie.atimer = 0;
Millie.atktype = 0;
}
if (Millie.ragecounter > 0) {
Millie.ragecounter = Millie.ragecounter - 1;
}
if ((Millie.rage > 0) && (Millie.ragecounter == 0)) {
if (Millie.berserk == true) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 8;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 10;
} else {
Millie.rage = Millie.rage - 1;
Millie.ragecounter = 20;
}
}
if (Millie.rage < 0) {
Millie.rage = 0;
}
if (Millie.healthcounter > 0) {
Millie.healthcounter = Millie.healthcounter - 1;
}
if (((Millie.health < 100) && (Millie.healthcounter == 0)) && (Millie.alive)) {
if (Millie.berserk) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 3;
} else if ((Millie._currentframe == M_SIT) || (Millie._currentframe == (M_SIT + 1))) {
Millie.health = Millie.health + 1;
Millie.healthcounter = 2;
} else {
Millie.health = Millie.health + 1;
Millie.healthcounter = 20;
}
}
if (Millie.health > 100) {
Millie.health = 100;
}
if (Millie.health < 0) {
Millie.health = 0;
}
if ((Millie.rage <= 0) && (Millie.berserk == true)) {
Millie.berserk = false;
nPlate.gotoAndStop(1);
}
if (Millie.rage >= 100) {
if (Millie.berserk == false) {
sBloodlust.start();
Millie.berserk = true;
nPlate.gotoAndStop(2);
}
Millie.rage = 100;
}
if (Millie.alive == false) {
nPlate.gotoAndStop(3);
} else if (Millie.alive && (Millie.berserk == false)) {
nPlate.gotoAndStop(1);
}
if (soundtimer > 0) {
soundtimer = soundtimer - 1;
}
if (Millie.alive == false) {
mBack._x = 126;
mBack._y = 168;
mBtn._x = mBack._x + 67;
mBtn._y = mBack._y + 30;
} else {
mBack._x = -500;
mBack._y = -500;
mBtn._x = -500;
mBtn._y = -500;
}
if (WaterFore.hitTest(Millie._x, Millie._y - (Millie._height * 0.75), true) && (Millie.alive)) {
breathback._x = 144;
breathback._y = 188;
breathbar._x = 147;
breathbar._y = 191;
Millie.breath = Millie.breath - 1;
breathbar._xscale = Millie.breath / 3.6;
} else {
breathbar._x = -500;
breathbar._y = -500;
breathback._x = -500;
breathback._y = -500;
Millie.breath = 360;
}
if ((Ene0.alive == false) && (Note._visible)) {
Note._x = Ene0._x;
Note._y = Ene0._y - Ene0._height;
}
if (Note.hitTest(Millie) && (Note._visible)) {
sSwipe.start();
Note._visible = false;
}
bHealth._xscale = Millie.health;
hText.text = Millie.health + "/100";
bRage._xscale = Millie.rage;
rText.text = Millie.rage + "/100";
if (Note._visible) {
gotoAndPlay (9283);
}
Frame 9285
stop();
Frame 9956
out1.text = ((g_L1ene + "/17 - ") + Math.round((g_L1ene / 17) * 100)) + "%";
out2.text = ((g_L2ene + "/23 - ") + Math.round((g_L1ene / 23) * 100)) + "%";
out3.text = ((g_L3ene + "/16 - ") + Math.round((g_L1ene / 16) * 100)) + "%";
out4.text = ((g_L4ene + "/22 - ") + Math.round((g_L1ene / 22) * 100)) + "%";
totalkilled = ((g_L1ene + g_L2ene) + g_L3ene) + g_L4ene;
out5.text = ((totalkilled + "/78 - ") + Math.round((totalkilled / 78) * 100)) + "%";
if (g_L1ene < 17) {
p1.text = "";
}
if (g_L2ene < 23) {
p2.text = "";
}
if (g_L3ene < 16) {
p3.text = "";
}
if (g_L4ene < 22) {
p4.text = "";
}
if (totalkilled < 78) {
p5.text = "";
}
stop();
Frame 10421
stop();
Symbol 19 MovieClip Frame 8
stop();
Symbol 20 MovieClip Frame 8
stop();
Symbol 92 MovieClip Frame 22
stop();
Symbol 93 MovieClip Frame 15
stop();
Symbol 107 MovieClip [MillieContainer] Frame 1
#initclip 14
Object.registerClass("MillieContainer", Warrior);
#endinitclip
stop();
Symbol 120 Button
on (release) {
getURL ("http://www.MoFunZone.com/", _blank);
}
Symbol 126 Button
on (release) {
getURL ("http://www.violentacres.com", _blank);
}
Symbol 132 Button
on (release) {
getURL ("http://www.myroidtypecomics.com", _blank);
}
Symbol 1216 MovieClip [__Packages.Warrior] Frame 0
class Warrior extends MovieClip
{
function Warrior () {
super();
}
var health = 100;
var healthcounter = 0;
var rage = 0;
var ragecounter = 0;
var alive = true;
var atk = 10;
var flicker = 0;
var velocity = 0;
var gconst = 1;
var watermult = 1;
var breath = 360;
var runspeed = 0;
var rconst = 1;
var dir = false;
var ready = 0;
var atimer = 0;
var atktype = 0;
var berserk = false;
}
Symbol 1217 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
function Enemy () {
super();
}
function act(floorobj) {
}
var health = 10;
var maxhealth = 10;
var alive = true;
var active = true;
var canattack = true;
var deathnoise = "";
var dir = false;
var walkspeed = 0;
var flicker = 0;
var atk = 10;
var atimer = 0;
var amax = 10;
var astrike = 0;
}
Symbol 1218 MovieClip [__Packages.WaterElem] Frame 0
class WaterElem extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function WaterElem () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 50;
var walkspeed = 4;
var deathnoise = "splash";
var atk = 8;
var atimer = 0;
var amax = 30;
var astrike = 12;
}
Symbol 1219 MovieClip [__Packages.Gatekeeper] Frame 0
class Gatekeeper extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Gatekeeper () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 800;
var maxhealth = 800;
var walkspeed = 3;
var atk = 20;
var atimer = 0;
var amax = 60;
var astrike = 11;
var deathnoise = "Odead";
}
Symbol 1220 MovieClip [__Packages.Switch] Frame 0
class Switch extends Enemy
{
function Switch () {
super();
}
function act(floorobj) {
}
var health = 1;
var walkspeed = 0;
var canattack = false;
var deathnoise = "bang1";
}
Symbol 1221 MovieClip [__Packages.Spider] Frame 0
class Spider extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Spider () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 40;
var walkspeed = 3;
var atk = 8;
var atimer = 0;
var amax = 30;
var astrike = 13;
var deathnoise = "Odead";
}
Symbol 1222 MovieClip [__Packages.Naga] Frame 0
class Naga extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Naga () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 90;
var walkspeed = 4;
var deathnoise = "Odead";
var atk = 8;
var atimer = 0;
var amax = 18;
var astrike = 12;
}
Symbol 1223 MovieClip [__Packages.BossNaga] Frame 0
class BossNaga extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function BossNaga () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 1200;
var maxhealth = 1200;
var walkspeed = 3;
var atk = 30;
var atimer = 0;
var amax = 60;
var astrike = 46;
var deathnoise = "Odead";
}
Symbol 1224 MovieClip [__Packages.VoidBoss] Frame 0
class VoidBoss extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function VoidBoss () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 2000;
var maxhealth = 2000;
var walkspeed = 3;
var atk = 10;
var atimer = 0;
var amax = 20;
var astrike = 9;
var deathnoise = "Odead";
}
Symbol 1225 MovieClip [__Packages.DarkDouble] Frame 0
class DarkDouble extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function DarkDouble () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 2500;
var maxhealth = 2500;
var walkspeed = 5;
var atk = 20;
var atimer = 0;
var amax = 18;
var astrike = 15;
var deathnoise = "Odead";
}
Symbol 1226 MovieClip [__Packages.Wraith] Frame 0
class Wraith extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Wraith () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 150;
var maxhealth = 150;
var walkspeed = 4;
var atk = 20;
var atimer = 0;
var amax = 30;
var astrike = 22;
var deathnoise = "Odead";
}
Symbol 1227 MovieClip [__Packages.Tenebrae] Frame 0
class Tenebrae extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Tenebrae () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 4000;
var walkspeed = 6;
var atk = 15;
var atimer = 0;
var amax = 20;
var astrike = 15;
var deathnoise = "Odead";
}
Symbol 1228 MovieClip [__Packages.Master] Frame 0
class Master extends Enemy
{
var dir, _width, _x, _y, _height, gotoAndStop;
function Master () {
super();
}
function act(floorobj) {
if (dir) {
if ((floorobj.hitTest(_x - (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x - (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(1));// not popped
dir = false;
} else {
(gotoAndStop(2));// not popped
_x = _x - walkspeed;
}
} else if (dir == false) {
if ((floorobj.hitTest(_x + (_width / 2), _y + 5, true) == false) || (floorobj.hitTest(_x + (_width / 2), _y - (_height * 0.5), true))) {
(gotoAndStop(2));// not popped
dir = true;
} else {
(gotoAndStop(1));// not popped
_x = _x + walkspeed;
}
}
}
var health = 5000;
var maxhealth = 5000;
var walkspeed = 5;
var atk = 15;
var atimer = 0;
var amax = 20;
var astrike = 12;
var deathnoise = "Odead";
}
Symbol 146 Button
on (release) {
gotoAndPlay (34);
}
Symbol 151 Button
on (release) {
gotoAndStop (10421);
}
Symbol 156 Button
on (release) {
getURL ("http://www.MoFunZone.com/", _blank);
}
Symbol 233 Button
on (release) {
stopAllSounds();
gotoAndPlay (1814);
}
Symbol 291 Button
on (release) {
stopAllSounds();
gotoAndStop (3069);
}
Symbol 342 MovieClip Frame 20
stop();
Symbol 358 Button
on (release) {
gotoAndStop (3070);
}
Symbol 384 Button
on (release) {
gotoAndStop (3071);
}
Symbol 387 Button
on (release) {
stopAllSounds();
play();
}
Symbol 390 Button
on (release) {
getURL ("http://www.MoFunZone.com/", _blank);
}
Symbol 399 Button
on (release) {
gotoAndPlay (3072);
}
Symbol 408 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 10
stop();
Symbol 456 MovieClip [Ene_SpiderContainer] Frame 1
#initclip 19
Object.registerClass("Ene_SpiderContainer", Spider);
#endinitclip
stop();
Symbol 489 MovieClip Frame 11
stop();
Symbol 490 MovieClip [Ene_WaterElemContainer] Frame 1
#initclip 15
Object.registerClass("Ene_WaterElemContainer", WaterElem);
#endinitclip
stop();
Symbol 524 MovieClip Frame 13
stop();
Symbol 525 MovieClip [Boss_GatekeeperCon] Frame 1
#initclip 16
Object.registerClass("Boss_GatekeeperCon", Gatekeeper);
#endinitclip
Symbol 528 MovieClip [Obj_Grave] Frame 1
#initclip 17
Object.registerClass("Obj_Grave", Switch);
#endinitclip
stop();
Symbol 531 MovieClip Frame 10
stop();
Symbol 532 MovieClip Frame 10
stop();
Symbol 571 MovieClip Frame 20
stop();
Symbol 579 MovieClip Frame 13
stop();
Symbol 580 MovieClip Frame 9
stop();
Symbol 582 MovieClip Frame 9
stop();
Symbol 583 MovieClip [KilzekContainer] Frame 1
#initclip 18
Object.registerClass("KilzekContainer", Warrior);
#endinitclip
Symbol 588 MovieClip Frame 1
stop();
Symbol 593 MovieClip Frame 20
stop();
Symbol 597 Button
on (release) {
g_nextlevel = 1;
gotoAndPlay (3076);
}
Symbol 610 Button
on (release) {
if (g_armorlevel <= 0) {
if (g_gold >= 100) {
g_gold = g_gold - 100;
g_armorlevel = 1;
spotion.start();
w5.gotoAndStop(3);
w4.gotoAndStop(2);
w3.gotoAndStop(1);
w2.gotoAndStop(1);
w1.gotoAndStop(1);
} else {
snomoney.start();
}
} else if (g_armorlevel == 1) {
if (g_gold >= 500) {
g_gold = g_gold - 500;
g_armorlevel = 2;
spotion.start();
w6.gotoAndStop(3);
w5.gotoAndStop(3);
w4.gotoAndStop(2);
} else {
snomoney.start();
}
} else if (g_armorlevel == 2) {
if (g_gold >= 2000) {
g_gold = g_gold - 2000;
g_armorlevel = 3;
spotion.start();
w7.gotoAndStop(3);
w6.gotoAndStop(3);
w5.gotoAndStop(3);
w4.gotoAndStop(2);
} else {
snomoney.start();
}
}
gamount.text = g_gold;
}
Symbol 615 Button
on (release) {
if (g_armorlevel >= 0) {
if (g_gold >= 100) {
g_gold = g_gold - 100;
g_armorlevel = -1;
spotion.start();
w3.gotoAndStop(3);
w4.gotoAndStop(2);
w5.gotoAndStop(1);
w6.gotoAndStop(1);
w7.gotoAndStop(1);
} else {
snomoney.start();
}
} else if (g_armorlevel == -1) {
if (g_gold >= 500) {
g_gold = g_gold - 500;
g_armorlevel = -2;
spotion.start();
w2.gotoAndStop(3);
w3.gotoAndStop(3);
w4.gotoAndStop(2);
} else {
snomoney.start();
}
} else if (g_armorlevel == -2) {
if (g_gold >= 2000) {
g_gold = g_gold - 2000;
g_armorlevel = -3;
spotion.start();
w1.gotoAndStop(3);
w2.gotoAndStop(3);
w3.gotoAndStop(3);
w4.gotoAndStop(2);
} else {
snomoney.start();
}
}
gamount.text = g_gold;
}
Symbol 620 Button
on (release) {
if (g_swordlevel <= 0) {
if (g_gold >= 100) {
g_gold = g_gold - 100;
g_swordlevel = 1;
senchant.start();
q5.gotoAndStop(3);
q4.gotoAndStop(2);
q3.gotoAndStop(1);
q2.gotoAndStop(1);
q1.gotoAndStop(1);
} else {
snomoney.start();
}
} else if (g_swordlevel == 1) {
if (g_gold >= 500) {
g_gold = g_gold - 500;
g_swordlevel = 2;
senchant.start();
q6.gotoAndStop(3);
q5.gotoAndStop(3);
q4.gotoAndStop(2);
} else {
snomoney.start();
}
} else if (g_swordlevel == 2) {
if (g_gold >= 2000) {
g_gold = g_gold - 2000;
g_swordlevel = 3;
senchant.start();
q7.gotoAndStop(3);
q6.gotoAndStop(3);
q5.gotoAndStop(3);
q4.gotoAndStop(2);
} else {
snomoney.start();
}
}
gamount.text = g_gold;
}
Symbol 625 Button
on (release) {
if (g_swordlevel >= 0) {
if (g_gold >= 100) {
g_gold = g_gold - 100;
g_swordlevel = -1;
senchant.start();
q3.gotoAndStop(3);
q4.gotoAndStop(2);
q5.gotoAndStop(1);
q6.gotoAndStop(1);
q7.gotoAndStop(1);
} else {
snomoney.start();
}
} else if (g_swordlevel == -1) {
if (g_gold >= 500) {
g_gold = g_gold - 500;
g_swordlevel = -2;
senchant.start();
q2.gotoAndStop(3);
q3.gotoAndStop(3);
q4.gotoAndStop(2);
} else {
snomoney.start();
}
} else if (g_swordlevel == -2) {
if (g_gold >= 2000) {
g_gold = g_gold - 2000;
g_swordlevel = -3;
senchant.start();
q1.gotoAndStop(3);
q2.gotoAndStop(3);
q3.gotoAndStop(3);
q4.gotoAndStop(2);
} else {
snomoney.start();
}
}
gamount.text = g_gold;
}
Symbol 634 Button
on (release) {
play();
}
Symbol 640 MovieClip Frame 1
stop();
Symbol 649 Button
on (release) {
stopAllSounds();
gotoAndPlay (4301);
}
Symbol 674 Button
on (release) {
gotoAndPlay (4301);
}
Symbol 685 MovieClip Frame 1
stop();
Symbol 763 MovieClip Frame 15
stop();
Symbol 764 MovieClip [Boss_AnetteContainer] Frame 1
#initclip 21
Object.registerClass("Boss_AnetteContainer", BossNaga);
#endinitclip
Symbol 821 MovieClip Frame 15
stop();
Symbol 822 MovieClip [Ene_NagaContainer] Frame 1
#initclip 20
Object.registerClass("Ene_NagaContainer", Naga);
#endinitclip
Symbol 827 MovieClip Frame 1
stop();
Symbol 832 MovieClip Frame 1
stop();
Symbol 839 Button
on (release) {
g_nextlevel = 2;
gotoAndPlay (3076);
}
Symbol 842 Button
on (release) {
stopAllSounds();
gotoAndPlay (4950);
}
Symbol 856 Button
on (release) {
gotoAndPlay (4950);
}
Symbol 863 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 11
stop();
Symbol 900 MovieClip [Boss_VoidwalkerCon] Frame 1
#initclip 22
Object.registerClass("Boss_VoidwalkerCon", VoidBoss);
#endinitclip
stop();
Symbol 905 MovieClip Frame 1
stop();
Symbol 912 Button
on (release) {
g_nextlevel = 3;
gotoAndPlay (3076);
}
Symbol 915 Button
on (release) {
stopAllSounds();
gotoAndPlay (6014);
}
Symbol 934 Button
on (release) {
gotoAndPlay (6014);
}
Symbol 941 MovieClip Frame 1
stop();
Symbol 1000 MovieClip Frame 21
stop();
Symbol 1001 MovieClip [Ene_WraithCon] Frame 1
#initclip 24
Object.registerClass("Ene_WraithCon", Wraith);
#endinitclip
stop();
Symbol 1002 MovieClip [Boss_DarkDoubleContainer] Frame 1
#initclip 23
Object.registerClass("Boss_DarkDoubleContainer", DarkDouble);
#endinitclip
Symbol 1007 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 1
stop();
Symbol 1015 Button
on (release) {
g_nextlevel = 4;
gotoAndPlay (3076);
}
Symbol 1018 Button
on (release) {
stopAllSounds();
gotoAndPlay (7908);
}
Symbol 1048 Button
on (release) {
gotoAndPlay (7908);
}
Symbol 1052 MovieClip Frame 1
stop();
Symbol 1063 MovieClip [Boss_TeneCon] Frame 1
#initclip 25
Object.registerClass("Boss_TeneCon", Tenebrae);
#endinitclip
stop();
Symbol 1065 MovieClip Frame 1
stop();
Symbol 1096 Button
on (release) {
gotoAndPlay (9282);
}
Symbol 1126 MovieClip Frame 10
stop();
Symbol 1151 MovieClip [Boss_GMContainer] Frame 1
#initclip 26
Object.registerClass("Boss_GMContainer", Master);
#endinitclip
stop();
Symbol 1160 Button
on (release) {
if (g_perfects < 4) {
gotoAndStop (10421);
} else {
play();
}
}
Symbol 1210 Button
on (release) {
gotoAndPlay (1);
}