Frame 1
load_txt.text = ((Math.round(getBytesLoaded() / 1000) + "k/") + Math.round(getBytesTotal() / 1000)) + "k";
load2_txt.text = Math.round((getBytesLoaded() / getBytesTotal()) * 100) + "%";
load_bar._width = (getBytesLoaded() / getBytesTotal()) * 400;
if ((getBytesLoaded() / getBytesTotal()) >= 1) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
classes = {};
classes.warrior = [4, 4, 2, 2, {range:100, specMP:5}];
classes.ranger = [2, 4, 4, 2, {range:100, specMP:3}];
classes.warlock = [2, 2, 4, 4, {range:100, specMP:3}];
classes.necromancer = [2, 4, 2, 4, {range:100, specMP:5}];
classes.q3 = [6, 2, 2, 2, {range:100, specMP:3}];
classes.mage = [2, 2, 2, 6, {range:100, specMP:3}];
classes.thief = [2, 2, 6, 2, {range:100, specMP:4}];
classes.berserker = [2, 6, 2, 2, {range:100, specMP:4}];
classes.chronomancer = [4, 2, 2, 4, {range:100, specMP:5}];
loading = false;
Instance of Symbol 65 MovieClip [player] "warrior" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "mage" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "ranger" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "berserker" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "chronomancer" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "thief" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "warlock" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Instance of Symbol 65 MovieClip [player] "necromancer" in Frame 3
onClipEvent (load) {
this.cl = this._name;
this.gotoAndStop(this.cl);
this.weapon.gotoAndStop(this.cl);
}
on (release) {
_root.pclass = this.cl;
_root.nextFrame();
}
Frame 4
function watcher(prop, oldVal, newVal) {
if (prop == "xp") {
xpdisp = (newVal + "/") + mxp;
xbar._width = (150 * newVal) / mxp;
} else if (prop == "mxp") {
xpdisp = (xp + "/") + newVal;
xbar._width = (150 * xp) / newVal;
} else if (prop == "strength") {
strdisp = "str:" + newVal;
} else if (prop == "agility") {
agidisp = "agi:" + newVal;
} else if (prop == "intellect") {
intdisp = "int:" + newVal;
mmp = mmp + ((1 + newVal) - (oldVal ? (oldVal) : 0));
mp = mp + ((1 + newVal) - (oldVal ? (oldVal) : 0));
} else if (prop == "vitality") {
vitdisp = "vit:" + newVal;
mhp = mhp + ((1 + newVal) - (oldVal ? (oldVal) : 0));
hp = hp + ((1 + newVal) - (oldVal ? (oldVal) : 0));
} else if (prop == "level") {
classdisp = (("Lv" + newVal) + " ") + pclass;
} else if (prop == "hp") {
hpdisp = (newVal + "/") + mhp;
hbar._xscale = (100 * newVal) / mhp;
} else if (prop == "mhp") {
hpdisp = (hp + "/") + newVal;
} else if (prop == "mp") {
mpdisp = (newVal + "/") + mmp;
mbar._xscale = (100 * newVal) / mmp;
} else if (prop == "mmp") {
mpdisp = (mp + "/") + newVal;
}
return(newVal);
}
function levelUp() {
xp = xp - mxp;
mxp = mxp + xppl;
level++;
vitality = vitality + (classes[pclass][0] / 2);
strength = strength + (classes[pclass][1] / 2);
agility = agility + (classes[pclass][2] / 2);
intellect = intellect + (classes[pclass][3] / 2);
showText(200, 200, "ding!");
}
function melee() {
if ((getTimer() - lastMelee) < 200) {
return(undefined);
}
lastMelee = getTimer();
if (pclass == "ranger") {
spawnMissile("sarrow", strength * 0.75, true);
return(undefined);
}
if (getTimer() < stealth) {
stealth = 0;
modCrit = 3;
}
player.swipe();
slice.gotoAndPlay(1);
}
function spawnMissile(id, dmg, dontRemove, angle, knockback) {
var _local1 = enemies.attachMovie(id, id + l, l++);
_local1._x = 200 - enemies._x;
_local1._y = 200 - enemies._y;
_local1._rotation = player._rotation + ((angle != undefined) ? (angle) : 0);
_local1.id = p.length;
_local1.dontRemove = dontRemove;
_local1.struck = [];
_local1.knockback = knockback;
_local1.mdmg = Math.round(dmg * 3) + 1;
_local1.dmg = Math.round(dmg);
p.push(_local1);
}
function special() {
if (((getTimer() - lastSpecial) < 500) || (mp < classes[pclass][4].specMP)) {
return(undefined);
}
if ((pclass == "thief") && (getTimer() < stealth)) {
return(undefined);
}
lastSpecial = getTimer();
mp = mp - classes[pclass][4].specMP;
if (pclass == "thief") {
stealth = getTimer() + 4000;
} else if (pclass == "mage") {
spawnMissile("frostbolt", 0.75 * intellect, true);
} else if (pclass == "ranger") {
spawnMissile("arrow", 1.25 * agility, true);
} else if (pclass == "warrior") {
spawnMissile("charge", 1 * (strength + vitality), true, nil, 24);
} else if (pclass == "berserker") {
spawnMissile("whirlwind", 0.75 * strength, true, nil, 2);
} else if (pclass == "chronomancer") {
spawnMissile("timerift", 0.5 * (vitality + intellect), 2, nil, -0.3);
} else if (pclass == "warlock") {
spawnMissile("shadowbeam", 1 * (agility + intellect), true);
} else if ((pclass = "necromancer")) {
if (hp <= Math.floor(mhp / 4)) {
return(undefined);
}
var _local1 = enemies.attachMovie("minion", "minion" + l, l++);
_local1._x = 200 - enemies._x;
_local1._y = 200 - enemies._y;
hp = hp - Math.floor(mhp / 4);
_local1.dmg = Math.round(strength / 3);
_local1.hp = Math.round(mhp / 2);
_local1.spd = 3.5;
_local1.mhp = Math.round(mhp / 2);
_local1.level = level;
_local1.lastHit = 0;
_local1.spawned = getTimer();
g.push(_local1);
}
}
function spawnEnemies(zone) {
if (_currentframe != 4) {
return(undefined);
}
zone = zones[zone];
for (var _local4 in zone.enemies) {
var _local3 = ((Math.random() * 1598) + (zone.x * 1600)) + 1;
var _local2 = ((Math.random() * 1598) + (zone.y * 1600)) + 1;
while (world2.hitTest(_local3 / 4, (_local2 / 4) + 400, true)) {
_local3 = ((Math.random() * 1598) + (zone.x * 1600)) + 1;
_local2 = ((Math.random() * 1598) + (zone.y * 1600)) + 1;
}
spawnEnemy(_local3, _local2, Math.round(Math.random()) + zone.l, zone.enemies[_local4]);
}
showText(200, 200, "unlocked " + zone.name);
}
function spawnEnemy(x, y, level, mob) {
var _local1 = enemies.attachMovie("enemy", "enemy" + l, l++);
_local1._x = x;
_local1._y = y;
_local1.gotoAndStop(mob);
var _local2 = (3 + (level * 2)) + Math.round(Math.random());
_local1.hp = _local2;
_local1.mhp = _local1.hp;
_local1.xp = _local2;
_local1.level = level;
_local1.lastHit = 0;
_local1.effects = 0;
e.push(_local1);
endisp = (e.length + " enem") + ((e.length == 1) ? "y" : "ies");
}
function fade() {
this._alpha = this._alpha - this.fs;
this._y = this._y - this.speed;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
function showText(x, y, tex, color, speed, fs) {
var _local1 = attachMovie("text", "text" + l, l++);
_local1._x = x;
_local1._y = y;
_local1.fs = ((fs == undefined) ? 1 : (fs));
_local1.speed = ((speed == undefined) ? 1 : (speed));
_local1.disp = tex;
_local1.tex.textColor = ((color == undefined) ? 16777215 : (color));
_local1.onEnterFrame = fade;
}
stop();
ebar._width = 0;
stealth = 0;
lastSpecial = -9999;
lastMelee = -9999;
lastTick = 0;
lastMick = 0;
lastStruck = -9999;
world._width = world._width * 4;
world._height = world._height * 4;
movable = true;
xp = 0;
mxp = 0;
level = 0;
strength = 0;
agililty = 0;
vitality = 0;
intellect = 0;
hp = 0;
mhp = 0;
mp = 0;
mmp = 0;
mp = 5;
mmp = mp;
hp = 5;
mhp = hp;
_root.watch("xp", watcher);
_root.watch("mxp", watcher);
_root.watch("level", watcher);
_root.watch("strength", watcher);
_root.watch("agility", watcher);
_root.watch("vitality", watcher);
_root.watch("intellect", watcher);
_root.watch("hp", watcher);
_root.watch("mp", watcher);
_root.watch("mhp", watcher);
_root.watch("mmp", watcher);
player.gotoAndStop(pclass);
player.weapon.gotoAndStop(pclass);
var bspd = 4;
curzone = 0;
vitality = classes[pclass][0];
strength = classes[pclass][1];
agility = classes[pclass][2];
intellect = classes[pclass][3];
slice._xscale = (slice._yscale = classes[pclass][4].range);
var xppl = 40;
xp = 0;
mxp = xppl;
level = 1;
var g = [];
var e = [];
var p = [];
var t = [];
var l = 0;
var zones = [];
zones[0] = {name:"freaky forest", l:1, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], x:0, y:0};
zones[1] = {name:"painful plains", l:3, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 6, 4, 3], x:1, y:0};
zones[2] = {name:"malevolent marsh", l:5, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], x:2, y:0};
zones[3] = {name:"burned bushland", l:7, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 3, 2, 2, 2, 2], x:3, y:0};
zones[4] = {name:"vicious volcano", l:9, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], x:3, y:1};
zones[5] = {name:"jurassic jungle", l:11, enemies:[1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 3], x:2, y:1};
if (loading) {
curzone = loading.curzone;
var x = world["gate" + curzone];
var dx = (x._x + (20 * Math.cos(((x._rotation + 180) * Math.PI) / 180)));
var dy = (x._y + (20 * Math.sin(((x._rotation + 180) * Math.PI) / 180)));
world._x = (enemies._x = 200 - (dx * 4));
world._y = (enemies._y = 200 - (dy * 4));
var a = 1;
while (a <= curzone) {
if (world["gate" + a]) {
world["gate" + a].gotoAndPlay(500);
}
a++;
}
xp = loading.xp;
mxp = xppl * loading.level;
pclass = loading.pclass;
level = loading.level;
vitality = classes[pclass][0] * (0.5 + (level / 2));
strength = classes[pclass][1] * (0.5 + (level / 2));
intellect = classes[pclass][3] * (0.5 + (level / 2));
agility = classes[pclass][2] * (0.5 + (level / 2));
mp = loading.mp;
hp = loading.hp;
player.gotoAndStop(pclass);
player.weapon.gotoAndStop(pclass);
}
spawnEnemies(curzone);
onEnterFrame = function () {
spd = bspd;
if (world.hitTest(200, 200, true)) {
spd = spd * 4;
}
if (getTimer() < stealth) {
spd = spd / 2;
}
if ((movable && (Key.isDown(37) || (Key.isDown(65)))) && (!world.hitTest(200 - spd, 200, true))) {
world._x = world._x + spd;
}
if ((movable && (Key.isDown(39) || (Key.isDown(68)))) && (!world.hitTest(200 + spd, 200, true))) {
world._x = world._x - spd;
}
if ((movable && (Key.isDown(38) || (Key.isDown(87)))) && (!world.hitTest(200, 200 - spd, true))) {
world._y = world._y + spd;
}
if ((movable && (Key.isDown(40) || (Key.isDown(83)))) && (!world.hitTest(200, 200 + spd, true))) {
world._y = world._y - spd;
}
if ((getTimer() - lastTick) > 4000) {
hp = Math.min(mhp, hp + Math.round(vitality / 6));
lastTick = Math.floor(getTimer() / 4000) * 4000;
}
if ((getTimer() - lastMick) > 8000) {
mp = Math.min(mmp, mp + Math.round(intellect / 6));
lastMick = Math.floor(getTimer() / 8000) * 8000;
}
hspark._x = 2 + (((getTimer() - lastTick) / 4000) * 96);
mspark._x = 2 + (((getTimer() - lastMick) / 8000) * 96);
enemies._x = world._x;
enemies._y = world._y;
var _local10 = Math.atan2(_ymouse - player._y, _xmouse - player._x);
if (movable) {
slice._rotation = (player._rotation = (_local10 * 180) / Math.PI);
}
var _local18 = getTimer() - endf;
var _local19 = 1000 / _local18;
fpsdisp = Math.round(_local19) + " fps";
endf = getTimer();
player._alpha = ((getTimer() < stealth) ? 50 : 100);
var _local1 = 0;
while (_local1 < g.length) {
var _local12 = player._rotation + ((Math.pow(-1, _local1) * 40) * Math.ceil(_local1 / 2));
var _local17 = Math.round(Math.cos((_local12 / 180) * Math.PI) * 24);
var _local16 = Math.round(Math.sin((_local12 / 180) * Math.PI) * 24);
var _local14 = ((g[_local1]._x - 200) - _local17) + enemies._x;
var _local13 = ((g[_local1]._y - 200) - _local16) + enemies._y;
if ((Math.abs(_local14) > 2) || (Math.abs(_local13) > 2)) {
var _local15 = Math.sqrt((_local14 * _local14) + (_local13 * _local13));
_local10 = Math.atan2(-_local13, -_local14);
var _local4 = Math.cos(_local10) * g[_local1].spd;
var _local3 = Math.sin(_local10) * g[_local1].spd;
var _local6 = g[_local1]._x + enemies._x;
var _local5 = g[_local1]._y + enemies._y;
g[_local1]._rotation = (_local10 * 180) / Math.PI;
if (!world.hitTest(_local6 + _local4, _local5, true)) {
g[_local1]._x = g[_local1]._x + _local4;
}
if (!world.hitTest(_local6, _local5 + _local3, true)) {
g[_local1]._y = g[_local1]._y + _local3;
}
} else {
g[_local1]._rotation = _local12;
}
if ((g[_local1].hp <= 0) || ((getTimer() - g[_local1].spawned) > 24000)) {
g[_local1].removeMovieClip();
g.splice(_local1, 1);
}
_local1++;
}
_local1 = 0;
while (_local1 < e.length) {
var _local14 = (e[_local1]._x - 200) + enemies._x;
var _local13 = (e[_local1]._y - 200) + enemies._y;
var _local15 = Math.sqrt((_local14 * _local14) + (_local13 * _local13));
_local10 = Math.atan2(-_local13, -_local14);
var _local4 = Math.cos(_local10) * e[_local1].spd;
var _local3 = Math.sin(_local10) * e[_local1].spd;
var _local6 = e[_local1]._x + enemies._x;
var _local5 = e[_local1]._y + enemies._y;
if (e[_local1].mobile && (getTimer() > stealth)) {
e[_local1]._rotation = (_local10 * 180) / Math.PI;
if (_local15 < 300) {
if (!world.hitTest(_local6 + _local4, _local5, true)) {
e[_local1]._x = e[_local1]._x + _local4;
}
if (!world.hitTest(_local6, _local5 + _local3, true)) {
e[_local1]._y = e[_local1]._y + _local3;
}
}
}
var _local2 = 0;
while (_local2 < g.length) {
if ((getTimer() - g[_local2].lastHit) > 1000) {
if (com.gskinner.sprites.CollisionDetection.checkForCollision(g[_local2], e[_local1], 255)) {
g[_local2].lastHit = getTimer();
e[_local1].hp = e[_local1].hp - g[_local2].dmg;
showText(e[_local1]._x + enemies._x, e[_local1]._y + enemies._y, g[_local2].dmg);
g[_local2].swipe();
var _local7 = 3;
if (!world.hitTest((_local6 - _local4) - ((_local4 / e[_local1].spd) * _local7), _local5, true)) {
e[_local1]._x = e[_local1]._x - (_local4 + ((_local4 / e[_local1].spd) * _local7));
}
if (!world.hitTest(_local6, (_local5 - _local3) - ((_local3 / e[_local1].spd) * _local7), true)) {
e[_local1]._y = e[_local1]._y - (_local3 + ((_local3 / e[_local1].spd) * _local7));
}
}
}
_local2++;
}
if ((((getTimer() - lastStruck) > 500) && (e[_local1].dmg)) && (com.gskinner.sprites.CollisionDetection.checkForCollision(player, e[_local1], 255))) {
lastStruck = getTimer();
if (g.length > 0) {
g[0].hp = g[0].hp - e[_local1].dmg;
} else {
hp = hp - e[_local1].dmg;
}
showText(200, 160, "-" + e[_local1].dmg, 16711680);
if (hp <= 0) {
gotoAndStop (3);
}
}
_local2 = 0;
while (_local2 < p.length) {
var _local8 = com.gskinner.sprites.CollisionDetection.checkForCollision(p[_local2], e[_local1], 255);
if (_local8) {
if (p[_local2].knockback != undefined) {
if (!world.hitTest((_local6 - _local4) - ((_local4 / e[_local1].spd) * p[_local2].knockback), _local5, true)) {
e[_local1]._x = e[_local1]._x - (_local4 + ((_local4 / e[_local1].spd) * p[_local2].knockback));
}
if (!world.hitTest(_local6, (_local5 - _local3) - ((_local3 / e[_local1].spd) * p[_local2].knockback), true)) {
e[_local1]._y = e[_local1]._y - (_local3 + ((_local3 / e[_local1].spd) * p[_local2].knockback));
}
}
if (p[_local2].struck[e[_local1]] == undefined) {
var _local11 = Math.min(p[_local2].mdmg, p[_local2].dmg);
if (Math.random() < ((0.02 * agility) + (modCrit ? (modCrit) : 0))) {
crit = true;
}
if (crit) {
_local11 = _local11 * (2 + (modCrit ? (modCrit - 1) : 0));
}
e[_local1].hp = e[_local1].hp - _local11;
p[_local2].mdmg = p[_local2].mdmg - _local11;
ebar._width = (Math.max(0, e[_local1].hp) / e[_local1].mhp) * 400;
if (_local11 != 0) {
showText(e[_local1]._x + enemies._x, e[_local1]._y + enemies._y, _local11);
}
if (crit) {
modCrit = 0;
crit = false;
if (_local11 != 0) {
showText(e[_local1]._x + enemies._x, (e[_local1]._y + enemies._y) + 20, "crit!");
}
}
p[_local2].struck[e[_local1]] = e[_local1];
if (p[_local2].effects) {
e[_local1].effects = e[_local1].effects | p[_local2].effects;
}
if ((!p[_local2].dontRemove) || (((p[_local2].dontRemove == 2) ? 1 : (p[_local2].mdmg)) <= 0)) {
movable = true;
p[_local2].removeMovieClip();
p.splice(_local2, 1);
}
}
}
_local2++;
}
if ((getTimer() - e[_local1].lastHit) > 200) {
if (com.gskinner.sprites.CollisionDetection.checkForCollision(slice, e[_local1], 255)) {
e[_local1].lastHit = getTimer();
var _local11 = Math.max(Math.round(strength * 0.75), 1);
if (Math.random() < ((0.02 * agility) + (modCrit ? (modCrit) : 0))) {
crit = true;
}
if (crit) {
_local11 = _local11 * (2 + (modCrit ? (modCrit - 1) : 0));
}
e[_local1].hp = e[_local1].hp - _local11;
ebar._width = (Math.max(0, e[_local1].hp) / e[_local1].mhp) * 400;
showText(e[_local1]._x + enemies._x, e[_local1]._y + enemies._y, _local11);
var _local7 = 5;
if (crit) {
_local7 = _local7 * 2;
}
if (!world.hitTest((_local6 - _local4) - ((_local4 / e[_local1].spd) * _local7), _local5, true)) {
e[_local1]._x = e[_local1]._x - (_local4 + ((_local4 / e[_local1].spd) * _local7));
}
if (!world.hitTest(_local6, (_local5 - _local3) - ((_local3 / e[_local1].spd) * _local7), true)) {
e[_local1]._y = e[_local1]._y - (_local3 + ((_local3 / e[_local1].spd) * _local7));
}
if (crit) {
modCrit = 0;
crit = false;
showText(e[_local1]._x + enemies._x, (e[_local1]._y + enemies._y) + 20, "crit!");
}
}
}
if (e[_local1].onFrame) {
e[_local1].onFrame(_local15);
}
if (e[_local1].hp <= 0) {
xp = xp + e[_local1].xp;
if (xp > mxp) {
levelUp();
}
var _local9 = e[_local1];
e.splice(_local1, 1);
endisp = (e.length + " enem") + ((e.length == 1) ? "y" : "ies");
if (e.length == 0) {
curzone++;
spawnEnemies(curzone);
world["gate" + curzone].play();
}
if (_local9.onDie) {
_local9.onDie();
}
_local9.removeMovieClip();
}
_local1++;
}
};
onMouseDown = melee;
var kl = {};
kl.onKeyDown = function () {
if (Key.getCode() == 81) {
special();
}
};
Key.addListener(kl);
Frame 5
function retry() {
gotoAndStop (1);
}
stop();
showText = undefined;
Symbol 14 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 28 MovieClip [enemy] Frame 1
function go(r) {
gotoAndStop(r);
weapon.gotoAndStop(r);
}
function swipe() {
if (weapon._y < 0) {
weapon._y = weppos;
weapon._xscale = -100;
} else {
weapon._y = -weppos;
weapon._xscale = 100;
}
slice.play();
}
stop();
mobile = true;
spd = 1;
dmg = level + 1;
wepspd = 2000;
nextStrike = (getTimer() + wepspd) + (Math.random() * 1000);
weppos = 8;
onFrame = function (dist) {
if (_currentframe > 1) {
return(undefined);
}
if (((dist < 110) && (slice._currentframe == 1)) && (getTimer() > nextStrike)) {
swipe();
nextStrike = (getTimer() + wepspd) + (Math.random() * 500);
}
};
Symbol 28 MovieClip [enemy] Frame 2
stop();
mobile = true;
spd = 2;
dmg = Math.floor((level / 2) + 0.5);
Symbol 28 MovieClip [enemy] Frame 3
stop();
mobile = false;
spd = 2;
dmg = 0;
hp = hp * 3;
mhp = hp;
xp = xp * 3;
Symbol 28 MovieClip [enemy] Frame 4
stop();
mobile = true;
spd = 0.5;
dmg = level * 2;
hp = hp * 9;
mhp = hp;
xp = xp * 3;
wepspd = 3000;
weppos = 12;
slice._xscale = (slice._yscale = 150);
nextStrike = (getTimer() + wepspd) + (Math.random() * 1000);
onFrame = function (dist) {
if (((dist < 165) && (slice._currentframe == 1)) && (getTimer() > nextStrike)) {
swipe();
nextStrike = (getTimer() + wepspd) + (Math.random() * 750);
}
};
Symbol 28 MovieClip [enemy] Frame 5
stop();
mobile = true;
spd = 3;
dmg = level * 2;
hp = hp * 15;
mhp = hp;
xp = xp * 5;
onFrame = function (dist) {
if ((dist < 300) && (getTimer() > _root.stealth)) {
l1.play();
l2.play();
l3.play();
l4.play();
} else {
l1.stop();
l2.stop();
l3.stop();
l4.stop();
}
};
Symbol 28 MovieClip [enemy] Frame 6
stop();
mobile = true;
spd = -3;
Symbol 28 MovieClip [enemy] Frame 12
stop();
Symbol 35 MovieClip [shockwave] Frame 49
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 37 MovieClip [whirlwind] Frame 60
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 40 MovieClip [hellfire] Frame 135
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 43 MovieClip [charge] Frame 1
var dx = (Math.cos((_rotation * Math.PI) / 180) * 20);
var dy = (Math.sin((_rotation * Math.PI) / 180) * 20);
_root.movable = false;
onEnterFrame = function () {
if (!_root.world.hitTest(200 + dx, 200 + dy, true)) {
_root.world._x = _root.world._x - dx;
_root.world._y = _root.world._y - dy;
for (var _local3 in struck) {
if (struck[_local3]) {
struck[_local3]._x = (_x + (dx * _currentframe)) + dx;
struck[_local3]._y = (_y + (dy * _currentframe)) + dy;
}
}
} else {
_root.movable = true;
_root.p.splice(this.id, 1);
this.removeMovieClip();
}
};
Symbol 43 MovieClip [charge] Frame 11
_root.movable = true;
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 44 MovieClip [frostbolt] Frame 20
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 46 MovieClip [sarrow] Frame 10
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 6
_parent.kill();
stop();
Symbol 49 MovieClip [arrow] Frame 1
function kill() {
_root.p.splice(this.id, 1);
this.removeMovieClip();
}
onEnterFrame = function () {
for (i in struck) {
arrow.play();
break;
}
};
Symbol 49 MovieClip [arrow] Frame 20
kill();
Symbol 52 MovieClip [shadowbeam] Frame 25
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 54 MovieClip [timerift] Frame 300
_root.p.splice(this.id, 1);
this.removeMovieClip();
Symbol 56 MovieClip [minion] Frame 1
function swipe() {
if (weapon._y < 0) {
weapon._y = 8;
weapon._xscale = -100;
} else {
weapon._y = -8;
weapon._xscale = 100;
}
slice.play();
}
Symbol 65 MovieClip [player] Frame 1
function go(r) {
gotoAndStop(r);
weapon.gotoAndStop(r);
}
function swipe() {
if (weapon._y < 0) {
weapon._y = 8;
weapon._xscale = -100;
} else {
weapon._y = -8;
weapon._xscale = 100;
}
}
stop();
Symbol 65 MovieClip [player] Frame 10
stop();
Symbol 65 MovieClip [player] Frame 20
stop();
Symbol 65 MovieClip [player] Frame 30
stop();
Symbol 65 MovieClip [player] Frame 40
stop();
Symbol 65 MovieClip [player] Frame 50
stop();
Symbol 65 MovieClip [player] Frame 60
stop();
Symbol 90 MovieClip [__Packages.com.gskinner.sprites.CollisionDetection] Frame 0
class com.gskinner.sprites.CollisionDetection
{
function CollisionDetection () {
}
static function checkForCollision(p_clip1, p_clip2, p_alphaTolerance) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
var _local4 = p_clip1.getBounds(_root);
var _local3 = p_clip2.getBounds(_root);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local5 = p_clip2.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 2
ox = _x;
oy = _y;
onEnterFrame = function () {
_x = (ox + (Math.random() * 1));
_y = (oy + (Math.random() * 1));
};
Symbol 77 MovieClip Frame 600
stop();
onEnterFrame = nil;
Symbol 89 Button
on (release) {
retry();
}