Frame 1
function clearMenus() {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
var _local3 = new ContextMenuItem("Heli Attack 3 - Produced by squarecircleco.", function () {
getURL ("http://www.squarecircleco.com/", "_BLANK");
});
_local2.customItems.push(_local3);
_root.menu = _local2;
}
function checkVer() {
var _local1 = getVersion().split(" ");
var _local2 = _local1[1].split(",");
return(new Number(_local2[0]));
}
Stage.scaleMode = "noScale";
clearMenus();
gameValid = true;
gameLocation = "miniclip.com";
if (this._url.indexOf("file://") != 0) {
localGame = false;
if (this._url.indexOf(gameLocation) != -1) {
gameValid = true;
}
} else {
gameValid = true;
localGame = true;
}
tabEnabled = false;
_quality = "best";
Mouse.addListener(this);
Key.addListener(this);
endGame();
spw = 448;
sph = 320;
loaderBar._xscale = 0;
loaderBar._yscale = sph;
onEnterFrame = function () {
loaderBar._xscale = (getBytesLoaded() / getBytesTotal()) * spw;
if ((getBytesLoaded() >= getBytesTotal()) && (isFinished)) {
if (checkVer() >= 7) {
gotoAndStop ("init");
} else {
gotoAndStop ("version");
}
delete onEnterFrame;
}
};
onEnterFrame();
Frame 2
stop();
Frame 5
delete onEnterFrame;
Instance of Symbol 101 MovieClip in Frame 5
on (release) {
getURL ("http://www.macromedia.com/go/getflashplayer/");
}
Frame 10
Frame 15
function copyArray(arr, w, h) {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < arr.length) {
_local4[_local2] = new Array();
var _local1 = 0;
while (_local1 < arr[_local2].length) {
_local4[_local2][_local1] = arr[_local2][_local1];
_local1++;
}
_local2++;
}
return(_local4);
}
function blankArray(w, h, l) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < h) {
_local3[_local2] = new Array();
var _local1 = 0;
while (_local1 < w) {
_local3[_local2][_local1] = 0;
_local1++;
}
_local2++;
}
return(_local3);
}
function drawMap(clip, display, collision, clipname, depth, tileset, realMap) {
var _local4 = clip.createEmptyMovieClip(clipname, depth);
var _local5 = display[0].length;
var _local8 = display.length;
if (realMap) {
w = (_local4.w = _local5);
h = (_local4.h = _local8);
} else {
_local4.w = _local5;
_local4.h = _local8;
}
_local4.map = display;
_local4.col = collision;
var _local2 = 0;
while ((_local2 < (sth + 1)) && (_local2 < _local8)) {
var _local1 = 0;
while ((_local1 < (stw + 1)) && (_local1 < _local5)) {
var _local3 = _local4.attachMovie(tileset, (("t_" + _local2) + "_") + _local1, ((_local2 * _local5) + _local1) + 1);
_local3._y = (_local2 * th) - 1;
_local3._x = (_local1 * tw) - 1;
_local3.gotoAndStop(display[_local2][_local1] + 1);
_local1++;
}
_local2++;
}
_local4.x = (_local4.y = 0);
_local4.ox = (_local4.oy = 0);
_local4.pw = _local4.w * tw;
_local4.ph = _local4.h * th;
return(_local4);
}
function scroll(clip) {
clip.x = int((-clip._x) / tw);
while (clip.x != clip.ox) {
var _local5 = clip.y;
var _local7 = (stw + 1) * tw;
if (clip.ox < clip.x) {
var _local11 = clip.ox;
var _local9 = (_local11 + stw) + 1;
var _local2 = _local5;
while (_local2 < ((_local5 + sth) + 1)) {
var _local4 = clip[(("t_" + _local2) + "_") + _local11];
_local4._x = _local4._x + _local7;
_local4.gotoAndStop(clip.map[_local2][_local9] + 1);
_local4._name = (("t_" + _local2) + "_") + _local9;
_local2++;
}
clip.ox++;
}
if (clip.ox > clip.x) {
var _local11 = clip.ox + stw;
var _local9 = (_local11 - stw) - 1;
var _local2 = _local5;
while (_local2 < ((_local5 + sth) + 1)) {
var _local4 = clip[(("t_" + _local2) + "_") + _local11];
_local4._x = _local4._x - _local7;
_local4.gotoAndStop(clip.map[_local2][_local9] + 1);
_local4._name = (("t_" + _local2) + "_") + _local9;
_local2++;
}
clip.ox--;
}
}
clip.y = int((-clip._y) / th);
while (clip.y != clip.oy) {
var _local6 = clip.ox;
var _local7 = (sth + 1) * th;
if (clip.oy < clip.y) {
var _local10 = clip.oy;
var _local8 = (_local10 + sth) + 1;
var _local3 = _local6;
while (_local3 < ((_local6 + stw) + 1)) {
var _local4 = clip[(("t_" + _local10) + "_") + _local3];
_local4._y = _local4._y + _local7;
_local4.gotoAndStop(clip.map[_local8][_local3] + 1);
_local4._name = (("t_" + _local8) + "_") + _local3;
_local3++;
}
clip.oy++;
}
if (clip.oy > clip.y) {
var _local10 = clip.oy + sth;
var _local8 = (_local10 - sth) - 1;
var _local3 = _local6;
while (_local3 < ((_local6 + stw) + 1)) {
var _local4 = clip[(("t_" + _local10) + "_") + _local3];
_local4._y = _local4._y - _local7;
_local4.gotoAndStop(clip.map[_local8][_local3] + 1);
_local4._name = (("t_" + _local8) + "_") + _local3;
_local3++;
}
clip.oy--;
}
}
}
function playerCam(timeStep, move, perc) {
if ((ct == undefined) || (ct == null)) {
ct = dct;
}
var _local2 = (-(ct._x + ct.w2)) + (spw / 2);
var _local1 = ((-((ct._y + ct.h) - 25)) + (sph / 2)) + (ct.h * 1.3);
if (ct.xcamdif != undefined) {
_local2 = _local2 + ct.xcamdif;
}
if (_local2 < ((-clr) + (stw * tw))) {
_local2 = (-clr) + (stw * tw);
}
if (_local2 > (-cll)) {
_local2 = -cll;
}
if (_local1 > 0) {
_local1 = 0;
}
if (ct.ycamdif != undefined) {
_local1 = _local1 + ct.ycamdif;
}
if (_local1 < ((-(h - sth)) * th)) {
_local1 = (-(h - sth)) * th;
}
camshake = Math.max(baseshake, camshake);
if (camshake) {
var _local3 = Math.min(camshake, 50);
if (move) {
camshake--;
csx = ((-_local3) + random(_local3 * 2)) * timeStep;
csy = ((-_local3) + random(_local3 * 2)) * timeStep;
}
_local2 = _local2 + csx;
_local1 = _local1 + csy;
}
if (((_local2 != fg._x) || (perc == 1)) || (levelScroll)) {
var _local5 = (_local2 - fg._x) / perc;
fg._x = fg._x + _local5;
if (stats.drawbg) {
bg._x = bg._x + (_local5 / 2);
bg._x = bg._x - levelScroll;
while (bg._x > 0) {
bg._x = bg._x - ((bg.w / 2) * tw);
}
while (bg._x < ((-(bg.w / 2)) * tw)) {
bg._x = bg._x + ((bg.w / 2) * tw);
}
}
}
if ((_local1 != fg._y) || (perc == 1)) {
var _local8 = (_local1 - fg._y) / perc;
fg._y = fg._y + _local8;
if (stats.drawbg) {
var _local6 = (-(h - sth)) * th;
var _local7 = fg._y - _local6;
bg._y = Math.min(0, ((-(bg.h - sth)) * th) + (_local7 / 2));
}
}
return(1);
}
function drawEntities(clip, ents) {
playerArr = new Array();
enemyArr = new Array();
bulletArr = new Array();
particleArr = new Array();
entityArr = new Array();
powerups = new Array();
timeSink = false;
camshake = 0;
baseshake = 0;
ct = (dct = null);
etw = stw + 1;
eth = sth + 1;
ew = Math.ceil(w / etw);
eh = Math.ceil(h / eth);
entities = new Array();
var _local5 = 0;
while (_local5 < eh) {
var _local6 = 0;
while (_local6 < ew) {
entities[(_local5 * ew) + _local6] = new Array();
_local6++;
}
_local5++;
}
var _local2 = new Array();
_local2 = ents.split("|");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].split(",");
var _local8 = [];
var _local3 = 4;
while (_local3 < _local2[_local1].length) {
_local8.push(_local2[_local1][_local3]);
_local3++;
}
var _local4 = {t:int(_local2[_local1][0]), x:int(_local2[_local1][1]), y:int(_local2[_local1][2]), p:int(_local2[_local1][3]), a:_local8};
var _local6 = int(_local4.x / etw);
_local5 = int(_local4.y / eth);
if (_local4.t & PLAYERSTART) {
spawnEntity(_local4);
} else {
entities[(_local5 * ew) + _local6].push(_local4);
}
_local1++;
}
}
function spawnEntity(o) {
if (o.t & PLAYERSTART) {
player = overgame.attachMovie("player", "player", overgame.getNextHighestDepth());
player.x = o.x;
player.y = o.y;
airdrop = false;
if (o.p & TRAINING) {
setupPlayer(player, true);
} else {
setupPlayer(player, false);
if (o.p & AIRDROP) {
airdrop = true;
}
}
playerArr.push(player);
cam = playerCam;
player.hit._visible = false;
ct = (dct = player);
cll = 0;
clr = w * tw;
cam(1, 1, 1);
return(1);
}
if (o.t & ENEMY) {
return(addEnemy(o));
}
if (o.t & HELISPAWNER) {
return(addSpawner(o));
}
if (o.t & TARGETSPAWNER) {
return(addTargetSpawner(o));
}
if (o.t & TARGET) {
return(addTarget(o));
}
if (o.t & HELPER) {
return(addHelper(o));
}
if (o.t & BUTTON) {
return(addButton(o));
}
if (o.t & LEVELFLAG) {
return(addLevelFlag(o));
}
if (o.t & ENEMYSPAWNER) {
return(addEnemySpawner(o));
}
if (o.t & PICKUP) {
return(addPickup(o));
}
return(0);
}
function entityFrame() {
var _local6 = fg.x;
var _local5 = fg.y;
var _local8 = fg.x + stw;
var _local7 = fg.y + sth;
var _local9 = int(_local6 / etw);
var _local11 = int(_local5 / eth);
var _local10 = int(_local8 / etw);
var _local12 = int(_local7 / eth);
var _local4 = _local11;
while (_local4 <= _local12) {
var _local3 = _local9;
while (_local3 <= _local10) {
var _local2 = (_local4 * ew) + _local3;
for (z in entities[_local2]) {
var _local1 = entities[_local2][z];
if ((((_local1.x >= (_local6 - 2)) && (_local1.x <= (_local8 + 2))) && (_local1.y >= (_local5 - 2))) && (_local1.y <= (_local7 + 2))) {
if (spawnEntity(_local1)) {
entities[_local2].splice(z, 1);
}
}
}
_local3++;
}
_local4++;
}
}
function spawnerFrame() {
if (this.current._x == undefined) {
if (this.num != -1) {
this.num--;
if (this.num < 0) {
cll = 0;
clr = w * tw;
heliSpawner = false;
removeArrayNoClip(this, entityArr);
if (!gameOver) {
nextLevel();
}
return(undefined);
}
}
var _local2;
if ((random(100) > 50) || (this.destroyed == 0)) {
_local2 = {t:ENEMY, x:(fg.x + stw) + 2, y:fg.y + 2, p:this.types};
} else {
_local2 = {t:ENEMY, x:fg.x - 4, y:fg.y + 2, p:this.types};
}
if (this.destroyed == 0) {
if (this.types >= ENEMY_HELI) {
this.nextHealth = 15;
this.dropItemNum = 2;
} else {
this.nextHealth = 30;
this.dropItemNum = 3;
}
}
heliSpawnerKilled = this.destroyed;
this.destroyed++;
if (this.num != 0) {
if ((this.destroyed % this.dropItemNum) == 0) {
_local2.p = _local2.p | ENEMY_DROPITEM;
if (this.destroyed == this.nextHealth) {
this.nextHealth = this.nextHealth * 2;
_local2.a = [-1];
} else {
_local2.a = [-2];
}
}
}
this.current = spawnEntity(_local2);
}
}
function addSpawner(o) {
var _local1 = o.x * tw;
var _local5 = (_local1 + (o.p * tw)) + (stw * tw);
var _local3 = int(o.a[0]);
var _local8 = int(o.a[1]);
if ((-fg._x) >= _local1) {
if (o.p != -1) {
cll = _local1;
clr = _local5;
}
var _local4 = {frame:spawnerFrame, num:_local3, types:_local8, destroyed:0};
entityArr.push(_local4);
heliSpawner = true;
heliSpawnerTotal = _local3;
heliSpawnerKilled = 0;
return(1);
}
return(0);
}
function addButton(o) {
var d = game.getNextHighestDepth();
var t = game.attachMovie("button", "button" + d, d);
if (o.p & BUTTON_HIDDEN) {
t._visible = false;
}
if (o.p & BUTTON_SHOOT) {
var h = t.createEmptyMovieClip("hit", 0);
with (h) {
lineStyle(0, 0, 0);
beginFill(0, 0);
moveTo(0, 0);
lineTo(32, 0);
lineTo(32, 32);
lineTo(0, 32);
lineTo(0, 0);
endFill();
}
}
t.w = 32;
t.h = 32;
t.w2 = t.w / 2;
t.h2 = t.h / 2;
t._x = o.x * tw;
t._y = ((o.y * th) - (t.h - th)) + 1;
t.stop();
t.frame = buttonFrame;
t.o = o;
t.t = 0;
t.stop();
if (t.o.p & BUTTON_SPENT) {
t.touch = 32;
particleArr.push(t);
t.health = Number.POSITIVE_INFINITY;
if (t.o.p & BUTTON_SHOOT) {
t.gotoAndStop(3);
}
t.nextFrame();
} else {
t.touch = 0;
if (t.o.p & BUTTON_SHOOT) {
t.health = 1;
enemyArr.push(t);
t.gotoAndStop(3);
} else {
particleArr.push(t);
t.health = Number.POSITIVE_INFINITY;
}
}
t.blackhole = true;
return(t);
}
function buttonFrame(timeStep, move) {
var _local2 = int((this._y + this.h2) / th);
var _local3 = int((this._x + this.w2) / tw);
if ((this.hitTest(player.hit) || (this.health <= 0)) && (!(this.o.p & BUTTON_SPENT))) {
if (this.health != Number.POSITIVE_INFINITY) {
this.health = Number.POSITIVE_INFINITY;
removeArrayNoClip(this, enemyArr);
particleArr.push(this);
}
var _local6 = this.o.a[5];
destructo(int(this.o.a[1]), int(this.o.a[2]), int(this.o.a[3]), int(this.o.a[4]), int(this.o.a[0]), _local6);
this.o.p = this.o.p | BUTTON_SPENT;
this.nextFrame();
}
_local3 = int(this._x / tw);
_local2 = int(this._y / th);
if ((((_local3 < (fg.x - 4)) || (_local3 > ((fg.x + stw) + 4))) || (_local2 < (fg.y - 4))) || (_local2 > ((fg.y + sth) + 4))) {
var _local5 = int(_local3 / etw);
var _local4 = int(_local2 / eth);
if ((this.o.p & BUTTON_HIDDEN) && (this.o.p & BUTTON_SPENT)) {
} else {
entities[(_local4 * ew) + _local5].push(this.o);
}
if (this.health == Number.POSITIVE_INFINITY) {
removeArray(this, particleArr);
} else {
removeArray(this, enemyArr);
}
}
}
function destructo(x1, y1, x2, y2, timer, type) {
if (type & DESTRUCTO_CRUMBLE) {
var _local1 = new Object();
_local1.t = 0;
_local1.x1 = x1;
_local1.x2 = x2;
_local1.y1 = y1;
_local1.y2 = y2;
_local1.timer = timer;
_local1.type = type;
_local1.frame = collapseFrame;
entityArr.push(_local1);
} else if (DESTRUCTO_FADE) {
var _local2 = convertArea(game, x1, y1, x2, y2, true);
_local2.frame = fadeFrame;
_local2.yspeed = 0;
_local2.rspeed = 5;
_local2.t = 0;
_local2.arr = particleArr;
particleArr.push(_local2);
}
}
function convertArea(clip, x1, y1, x2, y2, clear) {
var _local15 = clip.getNextHighestDepth();
var _local14 = clip.createEmptyMovieClip("area" + _local15, _local15);
var _local6 = _local14.createEmptyMovieClip("gfx", 0);
var _local8 = x1;
var _local7 = y1;
var _local2 = y1;
while (_local2 <= y2) {
var _local1 = x1;
while (_local1 <= x2) {
var _local4 = _local1 - _local8;
var _local3 = _local2 - _local7;
var _local5 = _local6.attachMovie(tileset, (("t_" + _local3) + "_") + _local4, (_local3 * w) + _local4);
_local5._x = _local4 * tw;
_local5._y = _local3 * th;
_local5.gotoAndStop(map[_local2][_local1] + 1);
if (clear) {
map[_local2][_local1] = 0;
col[_local2][_local1] = 0;
fg[(("t_" + _local2) + "_") + _local1].gotoAndStop(1);
}
_local1++;
}
_local2++;
}
var w = _local6._width;
var _local17 = _local6._height;
_local14._x = ((_local8 * tw) - 1) + (w / 2);
_local14._y = ((_local7 * th) - 1) + (w / 2);
_local6._x = (-w) / 2;
_local6._y = (-w) / 2;
return(_local14);
}
function collapseFrame(timeStep, move) {
if (move) {
this.t++;
if ((this.t % this.timer) == 0) {
var _local2 = this.y2;
while (_local2 >= this.y1) {
var _local3 = this.x1;
while (_local3 <= this.x2) {
if (_local2 == this.y1) {
map[_local2][_local3] = 0;
col[_local2][_local3] = 0;
} else {
map[_local2][_local3] = map[_local2 - 1][_local3];
col[_local2][_local3] = col[_local2 - 1][_local3];
}
fg[(("t_" + _local2) + "_") + _local3].gotoAndStop(map[_local2][_local3] + 1);
_local3++;
}
_local2--;
}
this.y1++;
if (this.y1 > this.y2) {
removeArrayNoClip(this, entityArr);
}
}
if (this.type & DESTRUCTO_EXPLODE) {
if ((this.t % 3) == 0) {
if ((this.y2 > (fg.y - 4)) && (this.y2 < ((fg.y + sth) + 4))) {
var _local5 = this.x1 + random(this.x2 - this.x1);
var _local3 = this.x1 - 1;
while (_local3 <= (this.x2 + 1)) {
if ((_local3 > (fg.x - 4)) && (_local3 < ((fg.x + stw) + 4))) {
if (_local3 == _local5) {
addExplosion("explosion", (_local3 * tw) + random(tw), (this.y2 * th) + random(th), 0, 0);
}
if (!col[this.y2][_local3]) {
addParticle(1, tileset + "Crumble", (_local3 * tw) + random(tw), (this.y2 * th) + random(th), 4, 4, 10);
}
}
_local3++;
}
}
}
addCamShake(2, true);
} else {
var _local5 = this.x1 + random(this.x2 - this.x1);
var _local4 = addObject("smoke", (_local5 * tw) + random(tw), (this.y2 * th) + th, particleArr, smokeFrame);
_local4.scale(50);
_local4._alpha = 50;
}
}
}
function addLevelFlag(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("levelFlag", "levelFlag" + _local2, _local2);
_local1.w = 32;
_local1.h = 32;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1._x = o.x * tw;
_local1._y = ((o.y * th) - (_local1.h - th)) + 1;
_local1.stop();
_local1.frame = levelFlagFrame;
_local1.o = o;
_local1.t = 0;
_local1.stop();
_local1.blackhole = true;
particleArr.push(_local1);
return(_local1);
}
function levelFlagFrame(timeStep, move) {
var _local2 = int((this._y + this.h2) / th);
var _local3 = int((this._x + this.w2) / tw);
if (this.hitTest(player.hit)) {
nextLevel();
}
_local3 = int(this._x / tw);
_local2 = int(this._y / th);
if ((((_local3 < (fg.x - 4)) || (_local3 > ((fg.x + stw) + 4))) || (_local2 < (fg.y - 4))) || (_local2 > ((fg.y + sth) + 4))) {
var _local5 = int(_local3 / etw);
var _local4 = int(_local2 / eth);
entities[(_local4 * ew) + _local5].push(this.o);
removeArray(this, particleArr);
}
}
function targetSpawnerFrame(timeStep, move) {
if (this.current._x == undefined) {
if ((this.t > 100) || (this.t == 0)) {
var _local4;
_local4 = {t:TARGET, x:this.x, y:this.y, p:0};
this.current = spawnEntity(_local4);
this.current._alpha = 0;
}
if (move) {
this.t++;
}
} else {
if (this.current.vis == undefined) {
this.current._alpha = Math.min(100, this.current._alpha + (10 * timeStep));
if (this.current._alpha >= 100) {
this.current.vis = true;
}
}
this.t = 1;
}
if ((((this.x < (fg.x - 4)) || (this.x > ((fg.x + stw) + 4))) || (this.y < (fg.y - 4))) || (this.y > ((fg.y + sth) + 4))) {
var _local3 = int(this.x / etw);
var _local2 = int(this.y / eth);
entities[(_local2 * ew) + _local3].push(this.o);
this.current.bar.removeMovieClip("");
removeArray(this.current, enemyArr);
removeArrayNoClip(this, entityArr);
}
}
function addTargetSpawner(o) {
var _local1 = {frame:targetSpawnerFrame, x:o.x, y:o.y, o:o, t:0};
entityArr.push(_local1);
return(1);
}
function enemySpawnerFrame(timeStep, move) {
if (move) {
this.t++;
}
if (((((this.x > (fg.x - 4)) && (this.x < ((fg.x + stw) + 4))) && (this.y > (fg.y - 4))) && (this.y < ((fg.y + sth) + 10))) || (this.current._x != undefined)) {
if (this.current._x == undefined) {
if (this.t > this.o.a[0]) {
var _local2;
_local2 = {t:ENEMY, x:this.x, y:this.y, p:this.o.p, f:true};
this.current = spawnEntity(_local2);
this.current._alpha = 0;
}
} else {
if (this.current.vis == undefined) {
this.current._alpha = Math.min(100, this.current._alpha + (10 * timeStep));
if (this.current._alpha >= 100) {
this.current.vis = true;
}
}
this.t = 1;
}
} else {
this.t = Number.POSITIVE_INFINITY;
}
}
function addEnemySpawner(o) {
var _local1 = {frame:enemySpawnerFrame, x:o.x, y:o.y, o:o, t:Number.POSITIVE_INFINITY};
entityArr.push(_local1);
return(1);
}
function addPickup(o) {
if (o.a[0] != undefined) {
dropItem((o.x * tw) + (tw / 2), o.y * th, o.p, true);
} else {
dropItem((o.x * tw) + (tw / 2), o.y * th, o.p, false);
}
return(1);
}
function old(clip) {
clip.ox = int((clip._x + clip.w2) / tw);
clip.ol = int((clip._x + 1) / tw);
clip.orr = int(((clip._x + clip.w) - 1) / tw);
clip.ot = int((clip._y + 1) / th);
clip.ob = int(((clip._y + clip.h) - 1) / th);
}
function setupPlayer(clip, training) {
clip.fr = "stand";
clip.of = "stand";
clip.stop();
clip.torso.stop();
clip.legs.stop();
clip.nw = 32;
clip.nh = 48;
clip.cw = 32;
clip.ch = 32;
clip.w = clip.nw;
clip.h = clip.nh;
clip.w2 = clip.w / 2;
clip.h2 = clip.h / 2;
clip._x = clip.x * tw;
clip._y = (clip.y * th) - (clip.h - th);
clip.realgunrotation = 0;
clip.yspeed = 0;
clip.xspeed = 0;
clip.forcexspeed = 0;
clip.forcestop = 1;
clip.onGround = 0;
clip.crouch = 0;
clip.jumpSpeed = 8;
clip.maxJump = 5;
clip.jumps = 3;
clip.jumptime = 0;
clip.hyperJump = 0;
clip.lockAim = 0;
clip.speed = 5;
clip.crouchSpeed = 2;
clip.frame = playerFrame;
clip.func = playerNormal;
clip.realguns = guns;
clip.guns = [];
var _local2 = 0;
while (_local2 < guns.length) {
if (training) {
worldTraining = true;
if (stats.guns[_local2].unlocked) {
clip.guns.push({reloadtime:Number.POSITIVE_INFINITY, bullets:Number.POSITIVE_INFINITY});
} else {
clip.guns.push({reloadtime:Number.POSITIVE_INFINITY, bullets:0});
}
} else {
worldTraining = false;
if (stats.guns[_local2].unlocked) {
clip.guns.push({reloadtime:Number.POSITIVE_INFINITY, bullets:stats.guns[_local2].ammo});
} else {
clip.guns.push({reloadtime:Number.POSITIVE_INFINITY, bullets:0});
}
}
_local2++;
}
clip.cgun = stats.cgun;
if (clip.guns[gunsGren].bullets < guns[gunsGren].clip) {
clip.guns[gunsGren].bullets = guns[gunsGren].clip;
}
clip.lgun = 0;
clip.recoil = 0;
clip.recoiltime = 0;
clip.maxHealth = 100;
clip.health = clip.maxHealth;
clip.lastHealth = clip.health;
clip.crouchAction = playerCrouch;
clip.move = playerMove;
clip.air = playerAir;
clip.checkDown = checkDown;
clip.ground = playerGround;
clip.action = clip.air;
clip.aim = playerAim;
clip.aimDo = playerAimDo;
clip.shoot = playerShoot;
clip.hudUpdate = hudUpdate;
clip.hudScore = score;
clip.maxTimeDistortTime = 150;
clip.maxHyperJumpTime = 150;
clip.hyperJumpTime = clip.maxHyperJumpTime;
clip.timeDistortTime = clip.maxTimeDistortTime;
clip.xcamdif = 0;
clip.ycamdif = 0;
clip.camtimer = 0;
clip.crouchtimer = 0;
clip.ob = Number.NEGATIVE_INFINITY;
clip.ggun = -1;
}
function playerCrouch(go) {
if (go) {
if (!this.crouch) {
this.crouch = 1;
this.w = this.cw;
this.h = this.ch;
this.w2 = this.w / 2;
this.h2 = this.h / 2;
this._y = this._y + (this.nh - this.ch);
this.fr = "crouch";
this.torso.stop();
this.legs.stop();
}
this.crouchtimer++;
} else {
this.crouchtimer = 0;
if (this.crouch) {
var _local3 = int((this._x + this.w2) / tw);
var _local2 = int((this._y - (this.nh - this.ch)) / th);
if (!(col[_local2][_local3] & DOWN)) {
this.crouch = 0;
this.w = this.nw;
this.h = this.nh;
this.w2 = this.w / 2;
this.h2 = this.h / 2;
this._y = this._y - (this.nh - this.ch);
this.fr = "stand";
this.torso.stop();
this.legs.stop();
} else {
return(0);
}
}
}
return(1);
}
function playerMove(timeStep, move) {
if (move) {
var _local8 = this.speed;
if (this.crouch && (this.action != this.air)) {
_local8 = this.crouchSpeed;
}
if (KeyisDown(leftKey)) {
this.xspeed = -_local8;
this.legs._xscale = -100;
this.legs._x = this.w;
if (this.crouch) {
this.fr = "crunning";
} else {
this.fr = "running";
}
}
if (KeyisDown(rightKey)) {
this.xspeed = _local8;
this.legs._xscale = 100;
this.legs._x = 0;
if (this.crouch) {
this.fr = "crunning";
} else {
this.fr = "running";
}
}
if (((!KeyisDown(rightKey)) && (!KeyisDown(leftKey))) || (KeyisDown(rightKey) && (KeyisDown(leftKey)))) {
this.xspeed = 0;
if (this.crouch) {
this.fr = "crouch";
} else {
this.fr = "stand";
}
}
}
var _local6 = (this.xspeed + this.forcexspeed) * timeStep;
if (move) {
if (this.forcestop) {
if (this.forcexspeed >= 1) {
this.forcexspeed--;
} else if (this.forcexspeed <= -1) {
this.forcexspeed++;
} else {
this.forcexspeed = 0;
}
} else {
this.forcestop = 1;
}
if (this.forcexspeed > 16) {
this.forcexspeed = 16;
}
if (this.forcexspeed < -16) {
this.forcexspeed = -16;
}
}
if (_local6 < 0) {
var _local3 = int(((this._x + this.w2) + _local6) / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if ((col[_local2][_local3] & RIGHT) && (_local3 < this.ox)) {
this.xspeed = 0;
this._x = ((_local3 + 1) * tw) - this.w2;
_local4++;
if (col[_local2][_local3] & CLIMB) {
if (_local4 == ((_local5 - _local7) + 1)) {
this.hyperJump = 0;
this.onx = this.ox;
this.climbx = _local3;
this.climbj = rightKey;
this.xspeed = (this.yspeed = 0);
this.func = playerClimb;
this.action = this.air;
this.crouchAction(0);
this.lockAim = 1;
}
} else {
break;
}
}
_local2++;
}
if (!_local4) {
this._x = this._x + _local6;
} else {
_local6 = 0;
}
} else if (_local6 > 0) {
var _local3 = int(((this._x + this.w2) + _local6) / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if ((col[_local2][_local3] & LEFT) && (_local3 > this.ox)) {
this.xspeed = 0;
this._x = ((_local3 * tw) - this.w2) - 1;
_local4++;
if (col[_local2][_local3] & CLIMB) {
if (_local4 == ((_local5 - _local7) + 1)) {
this.hyperJump = 0;
this.climbx = _local3;
this.onx = this.ox;
this.climbj = leftKey;
this.xspeed = (this.yspeed = 0);
this.func = playerClimb;
this.action = this.air;
this.crouchAction(0);
this.lockAim = 2;
}
} else {
break;
}
}
_local2++;
}
if (!_local4) {
this._x = this._x + _local6;
} else {
_local6 = 0;
}
}
if ((_local6 > 0) && (KeyisDown(rightKey))) {
if (this.camtimer >= 0) {
this.camtimer++;
} else {
this.camtimer = 0;
}
} else if ((_local6 < 0) && (KeyisDown(leftKey))) {
if (this.camtimer <= 0) {
this.camtimer--;
} else {
this.camtimer = 0;
}
}
if ((this.camtimer > 50) || (this.camtimer < -50)) {
if (this.camtimer > 50) {
if (_local6 > 0) {
this.camtimer = 150;
}
this.xcamdif = this.xcamdif + ((-40 - this.xcamdif) / 20);
}
if (this.camtimer < 50) {
if (_local6 < 0) {
this.camtimer = -150;
}
this.xcamdif = this.xcamdif + ((40 - this.xcamdif) / 20);
}
} else {
this.xcamdif = this.xcamdif + ((-this.xcamdif) / 20);
}
this.xcamdif = int(this.xcamdif);
if (this._x < cll) {
this._x = cll;
}
if ((this._x + this.w) > clr) {
this._x = clr - this.w;
}
}
function playerClimb(timeStep, move) {
if (move) {
var _local4 = this.crouchSpeed;
if (KeyisDown(upKey)) {
this.fr = "climbMove";
this.yspeed = -_local4;
if (KeyisDown(this.climbj)) {
jumpKeyD = 0;
this.jump = this.jumps - 1;
this.jumptime = 0;
this.xspeed = (this.jumpSpeed / 2) * (this.onx - this.climbx);
this.yspeed = -this.jumpSpeed;
this.func = playerNormal;
this.action = this.air;
this.lockAim = 0;
return(undefined);
}
} else {
jumpKeyD = 1;
}
if (KeyisDown(downKey)) {
this.yspeed = _local4;
this.fr = "climbMove";
}
if (((!KeyisDown(upKey)) && (!KeyisDown(downKey))) || (KeyisDown(upKey) && (KeyisDown(downKey)))) {
this.yspeed = 0;
this.fr = "climb";
}
}
var _local2 = this.yspeed * timeStep;
if (_local2 < 0) {
var _local6 = this.climbx;
var _local5 = this.onx;
var _local7 = int((this._y + 1) / th);
if (col[_local7][_local5] & DOWN) {
} else {
this._y = this._y + _local2;
if (!(col[_local7][_local6] & CLIMB)) {
this.jump = this.jumps - 1;
this.jumptime = 0;
this.func = playerNormal;
this.yspeed = -this.jumpSpeed;
this.lockAim = 0;
c = 1;
}
}
} else {
var _local6 = this.climbx;
var _local5 = this.onx;
var _local7 = int(((this._y + 1) + _local2) / th);
var _local3 = int((((this._y + this.h) - 1) + _local2) / th);
if (col[_local3][_local5] & UP) {
this.jump = 0;
this.jumptime = 0;
this.func = playerNormal;
this.action = this.ground;
this._y = (_local3 * th) - this.h;
this.lockAim = 0;
} else {
this._y = this._y + _local2;
if (!(col[_local3][_local6] & CLIMB)) {
this.jump = this.jumps;
this.jumptime = this.maxJump;
this.func = playerNormal;
this.lockAim = 0;
c = 1;
}
}
}
}
function checkDown(x, y, timeStep, overShoot) {
var _local5 = 0;
var _local9 = 0;
if ((col[y][x] & UP) && (y > this.ob)) {
_local5 = (y * th) - this.h;
return(_local5);
}
if (col[y][x] & PUSHUP) {
_local5 = (y * th) - this.h;
return(_local5);
}
if (col[y][x] & ANGLEUP) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = (((y + 1) * th) - this.h) - _local8;
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
} else if (col[y][x] & ANGLEDOWN) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = (((y + 1) * th) - this.h) - (tw - _local8);
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
} else if (col[y][x] & SOFTANGLEUPSTART) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = (((y + 1) * th) - this.h) - (_local8 / 2);
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
} else if (col[y][x] & SOFTANGLEUPEND) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = ((((y + 1) * th) - this.h) - (_local8 / 2)) - (th / 2);
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
} else if (col[y][x] & SOFTANGLEDOWNSTART) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = ((((y + 1) * th) - this.h) - ((tw - _local8) / 2)) - (th / 2);
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
} else if (col[y][x] & SOFTANGLEDOWNEND) {
var _local8 = (this._x + this.w2) % tw;
var _local7 = (((y + 1) * th) - this.h) - ((tw - _local8) / 2);
if ((this._y >= (_local7 - (10 * timeStep))) || (overShoot)) {
return(_local7);
}
}
return(0);
}
function playerAir(timeStep, move) {
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + 1;
}
if (KeyisDown(upKey)) {
if ((this.jump < this.jumps) && (this.jumptime < this.maxJump)) {
if (this.hyperJump) {
this.jumptime = this.jumptime + 0.5;
this.yspeed = (-this.jumpSpeed) * 2;
} else {
this.yspeed = -this.jumpSpeed;
this.jumptime++;
}
} else if (jumpKeyD) {
jumpKeyD = 0;
this.jump++;
this.jumptime = 0;
}
} else {
jumpKeyD = 1;
this.jumptime = this.maxJump;
}
if (KeyisDown(downKey)) {
this.crouchAction(1);
} else {
this.crouchAction(0);
}
}
if (this.crouch) {
this.fr = "jumpCrouch";
} else {
this.fr = "jump";
}
var _local2 = this.yspeed * timeStep;
if (_local2 < 0) {
var _local7 = int((this._x + this.w2) / tw);
var _local5 = int((this._y + _local2) / th);
if ((col[_local5][_local7] & DOWN) && (_local5 < this.ot)) {
this.yspeed = 0;
this._y = (_local5 + 1) * th;
this.jump = this.jumps;
this.jumptime = this.maxJump;
} else {
this._y = this._y + _local2;
}
} else {
var _local7 = int((this._x + this.w2) / tw);
var _local5 = int(((this._y + this.h) + _local2) / th);
var _local4 = false;
var _local6 = int((((this._y + this.h) + (_local2 * 2)) + 1) / th);
if (_local6 != _local5) {
_local4 = true;
}
var _local3 = this.checkDown(_local7, _local5, timeStep, _local4);
if (_local3) {
this._y = _local3;
this.yspeed = 0;
this.action = this.ground;
this.hyperJump = 0;
this.jump = 0;
this.jumptime = 0;
} else {
this._y = this._y + _local2;
}
}
}
function playerGround(timeStep, move) {
var _local3 = int((this._x + this.w2) / tw);
var _local2 = int(((this._y + this.h) - 1) / th);
var _local5 = 0;
if (move) {
if (KeyisDown(upKey)) {
if (jumpKeyD) {
jumpKeyD = 0;
if (KeyisDown(specialKey) && (this.hyperJumpTime >= this.maxHyperJumpTime)) {
sb.start("sHyperJump");
this.yspeed = (-this.jumpSpeed) * 2;
this.action = this.air;
this.jump = this.jumps - 1;
this.hyperJump = 1;
this.hyperJumpTime = 0;
} else {
this.yspeed = -this.jumpSpeed;
this.action = this.air;
}
return(undefined);
}
} else {
jumpKeyD = 1;
}
if (KeyisDown(downKey)) {
if (KeyisDown(specialKey) && (col[_local2 + 1][_local3] & FALLTHROUGH)) {
this.jump = this.jumps;
this.jumptime = this.maxJump;
this.yspeed = 0;
this._y = this._y + 2;
this.action = this.air;
return(undefined);
}
this.crouchAction(1);
} else {
this.crouchAction(0);
}
}
do {
if (col[_local2][_local3] & UP) {
if (this.angle) {
this._y = (_local2 * tw) - this.h;
this.angle = 0;
}
return(undefined);
}
if (col[_local2][_local3] & ANGLEUP) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed - 1;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = (((_local2 + 1) * th) - this.h) - _local6;
return(undefined);
}
if (col[_local2][_local3] & ANGLEDOWN) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed + 1;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = (((_local2 + 1) * th) - this.h) - (tw - _local6);
return(undefined);
}
if (col[_local2][_local3] & SOFTANGLEUPSTART) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed - 0.5;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = (((_local2 + 1) * th) - this.h) - (_local6 / 2);
return(undefined);
}
if (col[_local2][_local3] & SOFTANGLEUPEND) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed - 0.5;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = ((((_local2 + 1) * th) - this.h) - (_local6 / 2)) - (th / 2);
return(undefined);
}
if (col[_local2][_local3] & SOFTANGLEDOWNSTART) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed + 0.5;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = ((((_local2 + 1) * th) - this.h) - ((tw - _local6) / 2)) - (th / 2);
return(undefined);
}
if (col[_local2][_local3] & SOFTANGLEDOWNEND) {
if (move && (col[_local2][_local3] & SLIDE)) {
this.forcexspeed = this.forcexspeed + 0.5;
if (KeyisDown(downKey)) {
this.forcestop = 0;
}
}
this.angle = 1;
var _local6 = (this._x + this.w2) % tw;
this._y = (((_local2 + 1) * th) - this.h) - ((tw - _local6) / 2);
return(undefined);
}
_local2++;
_local5++;
if (_local5 > 1) {
break;
}
} while (_local5);
this.angle = 0;
this.jump = 0;
this.jumptime = this.maxJump;
this.action = this.air;
}
function playerAim(timeStep, move) {
var _local12 = this.torso.gfx;
var _local9 = this.torso.arm;
var _local11 = this.torso.arm.gun;
var _local5 = false;
if (KeyisDown(grenadeKey)) {
if (grenadeK) {
if (this.cgun != gunsGren) {
if (this.guns[gunsGren].bullets > 0) {
this.cgun = gunsGren;
}
} else {
this.cgun = this.lgun;
}
_local5 = true;
mouseD = 0;
this.gunframe = 1;
this.recoiltime = 0;
this.recoil = 0;
}
grenadeK = 0;
} else {
grenadeK = 1;
}
var _local8 = this.guns[this.cgun].bullets;
if (!KeyisDown(specialKey)) {
if (KeyisDown(switchKey)) {
if (switchK) {
mouseW = 1;
}
switchK = 0;
} else {
switchK = 1;
}
if (KeyisDown(switchDownKey)) {
if (switchDownK) {
mouseW = -1;
}
switchDownK = 0;
} else {
switchDownK = 1;
}
}
var _local6 = false;
if (stats.weaponswitch && (this.ggun != -1)) {
if (this.ggun > this.cgun) {
this.cgun = this.ggun;
_local6 = true;
}
this.ggun = -1;
}
if ((_local6 || (mouseW != 0)) || (_local8 <= 0)) {
if (_local6) {
} else if ((mouseW >= 0) && (_local8 > 0)) {
do {
this.cgun++;
if (this.cgun >= this.guns.length) {
this.cgun = 0;
}
} while (this.guns[this.cgun].bullets <= 0);
} else {
do {
this.cgun--;
if (this.cgun < 0) {
this.cgun = this.guns.length - 1;
}
} while (this.guns[this.cgun].bullets <= 0);
}
this.lgun = this.cgun;
_local5 = true;
mouseD = 0;
this.gunframe = 1;
this.recoiltime = 0;
this.recoil = 0;
if (this.guns[this.cgun].reloadtime < guns[this.cgun].reloadtime) {
this.guns[this.cgun].reloadtime = 0;
}
mouseW = 0;
}
this.gunrotation = (360 - ((Math.atan2(((fg._x + this._x) + _local9._x) - _root._xmouse, ((fg._y + this._y) + _local9._y) - _root._ymouse) * 180) / Math.PI)) - 90;
if (_local5) {
if (this.torso._xscale > 0) {
this.gunrotation = (this.realgunrotation = 89);
} else {
this.gunrotation = (this.realgunrotation = 91);
}
}
var _local3 = this.gunrotation;
var _local7 = this.realgunrotation;
_local3 = (_local3 + 360) % 360;
_local7 = (_local7 + 360) % 360;
if (this.lockAim == 1) {
if ((_local3 <= 290) && (_local3 >= 180)) {
_local3 = 291;
} else if ((_local3 < 180) && (_local3 >= 60)) {
_local3 = 59;
}
this.torso._xscale = 100;
this.torso._x = 0;
}
if (this.lockAim == 2) {
if (_local3 >= 250) {
_local3 = 249;
} else if (_local3 <= 120) {
_local3 = 121;
}
this.torso._xscale = -100;
this.torso._x = this.w;
}
var _local4 = _local3 - _local7;
_local4 = ((_local4 > 179) ? (-360 + _local4) : (_local4));
_local4 = ((_local4 < -179) ? (360 + _local4) : (_local4));
if (this.recoiltime) {
if (move) {
this.torso.arm.gun.gfx.gotoAndStop(this.gunframe++);
this.recoiltime--;
if (this.recoiltime == 0) {
this.gunframe = 1;
this.torso.arm.gun.gfx.gotoAndStop(1);
}
}
this.realgunrotation = this.realgunrotation + ((_local4 / 10) * timeStep);
} else {
this.realgunrotation = this.realgunrotation + ((_local4 / 2) * timeStep);
}
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
}
function playerAimDo() {
var _local10 = this.torso.arm.gun.gfx.start._currentframe;
if (this.of != this.fr) {
var _local6 = this.torso._xscale;
var _local8 = this.legs._xscale;
var _local9 = this.torso._x;
var _local7 = this.legs._x;
this.gotoAndStop(this.fr);
this.torso._xscale = _local6;
this.legs._xscale = _local8;
this.torso._x = _local9;
this.legs._x = _local7;
this.of = this.fr;
}
var _local5 = this.torso.gfx;
var _local11 = this.torso.arm;
var _local3 = this.torso.arm.gun;
_local3.gotoAndStop(guns[this.cgun].name);
_local3.gfx.start.gotoAndStop(_local10 + 1);
_local3.gfx.gotoAndStop(this.gunframe);
var _local2 = this.realgunrotation;
var _local4 = ((_local2 + 90) + 360) % 360;
if ((_local2 > 90) || (_local2 < -90)) {
this.realgunrotation = this.realgunrotation + this.recoil;
if (((_local2 + this.recoil) > -91) && (_local2 < 0)) {
this.realgunrotation = -91;
_local2 = -91;
}
if (((_local2 + this.recoil) < 91) && (_local2 > 0)) {
this.realgunrotation = 91;
_local2 = 91;
}
this.recoil = 0;
_local5.gotoAndStop(360 - int(_local4));
if (this.lockAim == 0) {
this.torso._xscale = -100;
this.torso._x = this.w;
}
} else {
this.realgunrotation = this.realgunrotation - this.recoil;
if ((_local2 - this.recoil) < -89) {
this.realgunrotation = -89;
_local2 = -89;
}
if ((_local2 - this.recoil) > 89) {
this.realgunrotation = 89;
_local2 = 89;
}
this.recoil = 0;
_local5.gotoAndStop(int(_local4));
if (this.lockAim == 0) {
this.torso._xscale = 100;
this.torso._x = 0;
}
}
if (this.torso._xscale == 100) {
_local3._rotation = _local2;
} else {
_local3._rotation = 180 - _local2;
}
}
function playerShoot(timeStep, move) {
if (move) {
this.guns[this.cgun].reloadtime++;
}
if (mouseD) {
if (move) {
if (this.guns[this.cgun].bullets > 0) {
if (this.guns[this.cgun].reloadtime >= guns[this.cgun].reloadtime) {
t = {x:0, y:0};
var _local2 = 0;
var _local3 = this.torso.arm.gun.c;
if (_local3 != undefined) {
_local3.localToGlobal(t);
_local2 = col[int((t.y - fg._y) / th)][int((t.x - fg._x) / tw)];
} else {
_local2 = -1;
}
if ((((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) || (_local2 == -1)) {
_local2 = 0;
}
if (_local2 == 0) {
point = {x:0, y:0};
this.torso.arm.gun.barrel.localToGlobal(point);
point.x = point.x - fg._x;
point.y = point.y - fg._y;
if (_local3 != undefined) {
_local2 = col[int(point.y / th)][int(point.x / tw)];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = 0;
}
}
if (_local2 == 0) {
this.guns[this.cgun].reloadtime = 0;
this.guns[this.cgun].bullets--;
if (this.guns[this.cgun].bullets <= 0) {
this.guns[this.cgun].reloadtime = Number.POSITIVE_INFINITY;
throwGun(guns[this.cgun].name, this._x + this.w2, this._y + this.h2);
}
guns[this.cgun].gun(point.x, point.y, this.realgunrotation, guns[this.cgun].speed, guns[this.cgun].damage, guns[this.cgun].aim, enemyArr, true);
stats.guns[this.cgun].shotsfired++;
var _local4 = guns[this.cgun].flash;
if (_local4) {
var _local5 = addObject("muzzleFlash", point.x, point.y, particleArr, muzzleFrame);
_local5._rotation = this.realgunrotation;
_local5.gotoAndStop(_local4);
}
this.recoil = guns[this.cgun].recoil;
this.recoiltime = guns[this.cgun].recoiltime;
this.torso.arm.gun.gfx.gotoAndStop((this.gunframe = 2));
}
}
}
}
}
}
}
function playerNormal(timeStep, move) {
this.move(timeStep, move);
this.action(timeStep, move);
old(this);
}
function playerFrame(timeStep, move) {
this.aim(timeStep, move);
this.func(timeStep, move);
this.aimDo();
this.shoot(timeStep, move);
this.hudUpdate(move);
if (move) {
if (this.torso._currentframe == this.torso._totalframes) {
this.torso.gotoAndStop(1);
} else {
this.torso.nextFrame();
}
if (this.legs._currentframe == this.legs._totalframes) {
this.legs.gotoAndStop(1);
} else {
this.legs.nextFrame();
}
this.torso.arm.gun.gfx.gotoAndStop(this.gunframe);
if (this.hyperJumpTime < this.maxHyperJumpTime) {
this.hyperJumpTime++;
}
if (this.hitFlash) {
this.hitFlash = false;
var _local4 = new Color(world);
_local4.setTransform(normalColor);
}
if (this.health != this.lastHealth) {
if (invulnerable) {
this.health = this.lastHealth;
}
if (this.health >= this.lastHealth) {
} else {
this.hitFlash = true;
var _local4 = new Color(world);
_local4.setTransform(hitColor);
sb.start("sPlayerHit");
var _local3 = addObjectOver("blood", this._x + this.w2, this._y + this.h2, particleArr, objectFrame);
if (random(10) > 5) {
_local3._xscale = -100;
}
}
this.lastHealth = this.health;
}
}
if (this._y > ((fg.h + 2) * th)) {
this.health = this.health - 50;
}
if (this.health <= 0) {
death(false);
}
}
function playerDeath(timeStep, move) {
this.gotoAndStop("dead");
this.gfx.stop();
if (move) {
if ((this.gfx._currentframe < 19) || (this.deadfloor)) {
this.gfx.nextFrame();
}
if (this.gfx._currentframe == this.gfx._totalframes) {
deathDo();
}
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + 1;
}
}
if (this.deadfloor == false) {
var _local2 = this.yspeed * timeStep;
if (_local2 < 0) {
var _local7 = int((this._x + this.w2) / tw);
var _local5 = int((this._y + _local2) / th);
if ((col[_local5][_local7] & DOWN) && (_local5 < this.ot)) {
this.yspeed = 0;
this._y = (_local5 + 1) * th;
this.jump = this.jumps;
this.jumptime = this.maxJump;
} else {
this._y = this._y + _local2;
}
} else {
var _local7 = int((this._x + this.w2) / tw);
var _local5 = int(((this._y + this.h) + _local2) / th);
var _local4 = false;
var _local6 = int((((this._y + this.h) + (_local2 * 2)) + 1) / th);
if (_local6 != _local5) {
_local4 = true;
}
var _local3 = this.checkDown(_local7, _local5, timeStep, _local4);
if (_local3) {
this._y = _local3;
this.deadfloor = true;
} else {
this._y = this._y + _local2;
}
}
}
}
function addEnemy(o) {
var _local3 = 0;
var _local1 = null;
if (o.p & ENEMY_WALKER) {
_local1 = addWalker(o);
} else if (o.p & ENEMY_DRONE) {
_local1 = addDrone(o);
} else if (o.p & ENEMY_SNIPER) {
_local1 = addSniper(o);
} else if (o.p & ENEMY_HELI) {
_local1 = addHeli(o);
} else if (o.p & ENEMY_HELI2) {
_local1 = addHeli2(o);
} else if (o.p & ENEMY_HELI3) {
_local1 = addHeli3(o);
} else if (o.p & ENEMY_CRITTER) {
_local1 = addCritter(o);
}
_local1.hit._visible = false;
_local1.frame(0, 0);
_local1.bar = null;
_local1.bartime = 0;
_local1.healthCheck = healthCheck;
_local1.barUpdate = barUpdate;
_local1.kill = enemyKill;
_local1.o = o;
enemyArr.push(_local1);
return(_local1);
}
function barUpdate(move) {
if (move && (this.hitFlash)) {
this.hitFlash = false;
var _local4 = new Color(this);
_local4.setTransform(normalColor);
}
if (this.health != this.lastHealth) {
if (triDamage) {
var _local3 = this.lastHealth - this.health;
this.health = this.health - (_local3 * 2);
}
if (this.health > 0) {
this.lastHealth = this.health;
this.hitFlash = true;
var _local4 = new Color(this);
_local4.setTransform(whiteColor);
if (this.bar == null) {
if (stats.drawhealthbar) {
var _local2 = overgame.getNextHighestDepth();
this.bar = overgame.attachMovie("bar", "bar" + _local2, _local2);
}
}
this.bartime = 0;
sb.start("sMetal" + random(4));
} else {
this.hitFlash = false;
var _local4 = new Color(this);
_local4.setTransform(normalColor);
this.bar.removeMovieClip("");
}
} else if (move) {
this.bartime++;
}
if (this.bartime > 50) {
this.bar.removeMovieClip("");
this.bar = null;
} else {
this.bar._x = this._x - 5;
this.bar._y = this._y + 5;
this.bar._xscale = 4;
this.bar._yscale = (this.health / this.maxHealth) * this.h2;
}
}
function enemyShoot(enemy, barrel, reloadTime, func, speed, damage, aim, flash, rot) {
enemy.reloadTime++;
if (enemy.reloadTime >= reloadTime) {
point = {x:0, y:0};
barrel.localToGlobal(point);
point.x = point.x - fg._x;
point.y = point.y - fg._y;
if (rot != undefined) {
func(point.x, point.y, rot, speed, damage, aim, playerArr, false);
} else {
func(point.x, point.y, enemy.realgunrotation, speed, damage, aim, playerArr, false);
}
if (flash) {
var _local1 = addObject("muzzleFlash", point.x, point.y, particleArr, muzzleFrame);
if (rot != undefined) {
_local1._rotation = rot;
} else {
_local1._rotation = enemy.realgunrotation;
}
_local1.gotoAndStop(flash);
}
if (reloadTime != -1) {
enemy.reloadTime = 0;
}
}
}
function enemyFall(timeStep, move) {
if (move) {
if (((this.t++) % 3) == 0) {
if ((this.t % 6) == 1) {
addParticle(1, "metalShard", this._x + random(this.w), this._y + random(this.h), 6, -6, 10);
} else {
addObject("explosion", this._x + random(this.w), this._y + random(this.h), bulletArr, objectFrame).scale(this.w / 2);
}
}
if (this.yspeed < (tw / 2)) {
this.yspeed++;
}
}
this._y = this._y + (this.yspeed * timeStep);
var _local5 = int((this._x + this.w2) / tw);
var _local4 = int((this._y + this.h2) / th);
if (col[_local4][_local5] != 0) {
var _local3 = addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
attachEnvFlare(Number.POSITIVE_INFINITY, _local3);
addParticle(this.particles, "metalShard", this._x + this.w2, (_local4 * th) - 2, 6, -6, 10);
removeArray(this, particleArr);
}
this._x = this._x + (this.xspeed * timeStep);
_local5 = int(this._x / tw);
_local4 = int(this._y / th);
if (col[_local4][_local5] != 0) {
this._x = this._x - (this.xspeed * timeStep);
this.xspeed = this.xspeed * 0.5;
}
this.gfx._rotation = this.gfx._rotation + (this.rspeed * timeStep);
if (this._y > ((-fg._y) + (sph * 2))) {
this.bar.removeMovieClip("");
removeArray(this, particleArr);
}
}
function enemyKill(drawPoints) {
var _local2 = this.maxHealth + (-this.health);
score = score + _local2;
player.timeDistortTime = Math.min(player.maxTimeDistortTime, player.timeDistortTime + Math.max(25, Math.floor(_local2 / 10)));
var _local3 = 0;
if (stats.drawpoints && (drawPoints)) {
_local3 = _local3 + addCenteredPopUp(this._x + this.w2, this._y + this.h2, ("+" + int(_local2)) + "00", true)._height;
}
if (player.hyperJump) {
player.guns[gunsHyper[0]].bullets = player.guns[gunsHyper[0]].bullets + gunsHyper[1];
addCenteredPopUp(this._x + this.w2, (this._y + this.h2) + _local3, guns[gunsHyper[0]].name, true);
}
if (this.o.p & ENEMY_DROPITEM) {
dropItem(this._x + this.w2, this._y + this.h2, int(this.o.a[0]), false);
}
}
function addCritter(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyCritter", "enemy" + _local2, _local2);
_local1.w = 32;
_local1.h = 30;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = -1;
_local1.yspeed = 0;
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.state = 0;
_local1.gotoAndStop("normal");
_local1.gfx.stop();
_local1.frame = enemyCritter;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 10));
_local1.hitFlash = false;
_local1.t = 0;
return(_local1);
}
function enemyCritter(timeStep, move) {
if (move) {
}
this.gfx.stop();
var _local10 = player._x;
var _local14 = player._y;
var _local15 = Math.abs(this._x - _local10);
var _local3 = Math.abs(this._y - _local14);
var _local5 = 0;
if (this._x > (_local10 + 1)) {
this.dir = -1;
this._xscale = -100;
this.gfx._x = -this.w;
this.hit._x = (-this.w) + 5;
} else if (this._x < (_local10 - 1)) {
this.dir = 1;
this._xscale = 100;
this.gfx._x = 0;
this.hit._x = 5;
} else {
this.dir = 0;
}
_local5 = this.dir * 1;
if (_local5 < 0) {
var _local8 = int(((this._x + this.w2) + _local5) / tw);
var _local7 = int((this._y + 1) / th);
var _local12 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local12) {
if (col[_local2][_local8]) {
if (_local3 >= 100) {
this.dir = 1;
}
this._x = ((_local8 + 1) * tw) - this.w2;
_local4++;
break;
}
_local2++;
}
if (!_local4) {
var _local6 = col[_local12 + 1][_local8];
if ((_local6 >= ANGLEUP) && (_local6 < BREAKABLE)) {
_local6 = 0;
}
if (_local6) {
this._x = this._x + _local5;
if (move) {
if (this.gfx._currentframe == this.gfx._totalframes) {
this.gfx.gotoAndStop(1);
} else {
this.gfx.nextFrame();
}
}
} else {
this.gfx.gotoAndStop(1);
}
}
} else if (_local5 > 0) {
var _local8 = int(((this._x + this.w2) + _local5) / tw);
var _local7 = int((this._y + 1) / th);
var _local12 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local12) {
if (col[_local2][_local8]) {
if (_local3 >= 100) {
this.dir = -1;
}
this._x = ((_local8 * tw) - this.w2) - 1;
_local4++;
break;
}
_local2++;
}
if (!_local4) {
var _local6 = col[_local12 + 1][_local8];
if ((_local6 >= ANGLEUP) && (_local6 < BREAKABLE)) {
_local6 = 0;
}
if (_local6) {
this._x = this._x + _local5;
if (move) {
if (this.gfx._currentframe == this.gfx._totalframes) {
this.gfx.gotoAndStop(1);
} else {
this.gfx.nextFrame();
}
}
} else {
this.gfx.gotoAndStop(1);
}
}
}
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + 1;
}
}
var _local11 = this.yspeed * timeStep;
var _local8 = int((this._x + this.w2) / tw);
var _local7 = int(((this._y + this.h) + _local11) / th);
if (col[_local7][_local8]) {
this._y = ((_local7 - 1) * th) - (this.h - th);
this.yspeed = 0;
} else {
this._y = this._y + _local11;
}
if (this.dir <= 0) {
this._xscale = -100;
this.gfx._x = -this.w;
this.hit._x = (-this.w) + 5;
this.barrel._x = 0;
} else {
this._xscale = 100;
this.gfx._x = 0;
this.hit._x = 5;
this.barrel._x = this.w;
}
_local7 = int((this._y + this.h2) / th);
_local8 = int((this._x + this.w2) / tw);
this.barUpdate(move);
if (this.health <= 0) {
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(3, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
removeArray(this, enemyArr);
stats.totalenemies++;
}
if ((((_local8 < (fg.x - 4)) || (_local8 > ((fg.x + stw) + 4))) || (_local7 < (fg.y - 4))) || (_local7 > ((fg.y + sth) + 10))) {
this.o.x = _local8;
this.o.y = _local7;
var _local13 = int(_local8 / etw);
var _local12 = int(_local7 / eth);
if (this.o.f != true) {
entities[(_local12 * ew) + _local13].push(this.o);
}
this.bar.removeMovieClip("");
removeArray(this, enemyArr);
}
}
function addWalker(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyWalker", "enemy" + _local2, _local2);
_local1.w = 32;
_local1.h = 38;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = -1;
_local1.yspeed = 0;
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.state = 0;
_local1.gotoAndStop("normal");
_local1.gfx.stop();
_local1.legs.stop();
_local1.cgun = 0;
_local1.reloadTime = Number.POSITIVE_INFINITY;
_local1.realgunrotation = 180;
_local1.frame = enemyWalker;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 20));
_local1.hitFlash = false;
_local1.t = 0;
return(_local1);
}
function enemyWalker(timeStep, move) {
if (move) {
if (this.state == 0) {
this.gfx.gotoAndStop(1);
} else if (this.state == 1) {
if (this.gfx._currentframe == this.gfx._totalframes) {
this.state = 2;
this.gotoAndStop("fire");
this.t = 0;
} else {
this.gfx.nextFrame();
}
} else if (this.state == 2) {
if (this.gfx._currentframe == this.gfx._totalframes) {
this.gfx.gotoAndStop(1);
} else {
this.gfx.nextFrame();
}
} else if (this.state == 3) {
if (this.gfx._currentframe == this.gfx._totalframes) {
this.reloadTime = Number.POSITIVE_INFINITY;
this.state = 0;
this.gotoAndStop("normal");
} else {
this.gfx.nextFrame();
}
}
}
this.legs.stop();
this.gfx.stop();
var _local11 = player._x;
var _local15 = player._y;
var _local10 = Math.abs(this._x - _local11);
var _local3 = Math.abs(this._y - _local15);
var _local4 = 0;
if (_local3 < 100) {
if (_local11 < this._x) {
this.dir = -1;
this.realgunrotation = 180;
this._xscale = -100;
this.gfx._x = -this.w;
this.legs._x = -this.w;
this.hit._x = (-this.w) + 5;
this.barrel._x = 0;
} else {
this.dir = 1;
this.realgunrotation = 0;
this._xscale = 100;
this.gfx._x = 0;
this.legs._x = 0;
this.hit._x = 5;
this.barrel._x = this.w;
}
if (this.state == 0) {
if (_local10 < 200) {
this.state = 1;
this.gotoAndStop("open");
}
} else if (this.state == 2) {
if (move) {
enemyShoot(this, this.barrel, 120, machineGun, 5, 5, 2, 1);
}
if (_local10 > 250) {
this.state = 3;
this.gotoAndStop("close");
}
}
if (_local10 > 150) {
_local4 = _local4 + ((this.dir * 2) * timeStep);
} else {
legs.gotoAndStop(1);
}
} else {
if (this.state != 0) {
this.state = 3;
this.gotoAndStop("close");
}
_local4 = _local4 + ((this.dir * 2) * timeStep);
}
if (_local4 < 0) {
var _local9 = int(((this._x + this.w2) + _local4) / tw);
var _local8 = int((this._y + 1) / th);
var _local13 = int(((this._y + this.h) - 1) / th);
var _local5 = 0;
var _local2 = _local8;
while (_local2 <= _local13) {
if (col[_local2][_local9]) {
if (_local3 >= 100) {
this.dir = 1;
}
this._x = ((_local9 + 1) * tw) - this.w2;
_local5++;
break;
}
_local2++;
}
if (!_local5) {
var _local6 = col[_local13 + 1][_local9];
if ((_local6 >= ANGLEUP) && (_local6 < BREAKABLE)) {
_local6 = 0;
}
if (_local6) {
this._x = this._x + _local4;
if (move) {
if (this.legs._currentframe == this.legs._totalframes) {
this.legs.gotoAndStop(1);
} else {
this.legs.nextFrame();
}
}
} else {
this.legs.gotoAndStop(1);
}
}
} else if (_local4 > 0) {
var _local9 = int(((this._x + this.w2) + _local4) / tw);
var _local8 = int((this._y + 1) / th);
var _local13 = int(((this._y + this.h) - 1) / th);
var _local5 = 0;
var _local2 = _local8;
while (_local2 <= _local13) {
if (col[_local2][_local9]) {
if (_local3 >= 100) {
this.dir = -1;
}
this._x = ((_local9 * tw) - this.w2) - 1;
_local5++;
break;
}
_local2++;
}
if (!_local5) {
var _local6 = col[_local13 + 1][_local9];
if ((_local6 >= ANGLEUP) && (_local6 < BREAKABLE)) {
_local6 = 0;
}
if (_local6) {
this._x = this._x + _local4;
if (move) {
if (this.legs._currentframe == this.legs._totalframes) {
this.legs.gotoAndStop(1);
} else {
this.legs.nextFrame();
}
}
} else {
this.legs.gotoAndStop(1);
}
}
}
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + 1;
}
}
var _local12 = this.yspeed * timeStep;
var _local9 = int((this._x + this.w2) / tw);
var _local8 = int(((this._y + this.h) + _local12) / th);
if (col[_local8][_local9]) {
this._y = ((_local8 - 1) * th) - (this.h - th);
this.yspeed = 0;
} else {
this._y = this._y + _local12;
}
if (this.dir <= 0) {
this.realgunrotation = 180;
this._xscale = -100;
this.gfx._x = -this.w;
this.legs._x = -this.w;
this.hit._x = (-this.w) + 5;
this.barrel._x = 0;
} else {
this.realgunrotation = 0;
this._xscale = 100;
this.gfx._x = 0;
this.legs._x = 0;
this.hit._x = 5;
this.barrel._x = this.w;
}
_local8 = int((this._y + this.h2) / th);
_local9 = int((this._x + this.w2) / tw);
this.barUpdate(move);
if (this.health <= 0) {
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(3, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
removeArray(this, enemyArr);
stats.totalenemies++;
}
if ((((_local9 < (fg.x - 4)) || (_local9 > ((fg.x + stw) + 4))) || (_local8 < (fg.y - 4))) || (_local8 > ((fg.y + sth) + 10))) {
this.o.x = _local9;
this.o.y = _local8;
var _local14 = int(_local9 / etw);
var _local13 = int(_local8 / eth);
if (this.o.f != true) {
entities[(_local13 * ew) + _local14].push(this.o);
}
this.bar.removeMovieClip("");
removeArray(this, enemyArr);
}
}
function addSniper(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemySniper", "enemy" + _local2, _local2);
_local1.w = 38;
_local1.h = 21;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.yspeed = 0;
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.reloadTime = 0;
_local1.realgunrotation = 180;
_local1.dir = 1;
_local1.frame = enemySniper;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 10));
_local1.hitFlash = false;
_local1.t = 0;
_local1.stop();
_local1.gfx.stop();
return(_local1);
}
function enemySniper(timeStep, move) {
if (move) {
t = {x:0, y:0};
this.gfx.c.localToGlobal(t);
if (!col[int((t.y - fg._y) / th)][int((t.x - fg._x) / tw)]) {
enemyShoot(this, this.gfx.barrel, 60, machineGun, 5, 5, 4, 1);
}
}
this.legs.stop();
this.gfx.stop();
var _local12 = player._x;
var _local10 = player._y;
var _local14 = Math.abs(this._x - _local12);
var _local13 = Math.abs(this._y - _local10);
if (this._x > player._x) {
if (this.dir == 1) {
this.legs._xscale = -100;
this.legs._x = this.legs._x + this.w;
this.gfx._yscale = -100;
this.gfx._x = this.gfx._x - 15;
this.dir = -1;
}
} else if (this._x < player._x) {
if (this.dir == -1) {
this.legs._xscale = 100;
this.legs._x = this.legs._x - this.w;
this.gfx._yscale = 100;
this.gfx._x = this.gfx._x + 15;
this.dir = 1;
}
}
this.gunrotation = (360 - ((Math.atan2((this._x + this.gfx._x) - (player._x + player.w2), (this._y + this.gfx._y) - (player._y + player.h2)) * 180) / Math.PI)) - 90;
var _local5 = this.gunrotation;
var _local6 = this.realgunrotation;
_local5 = (_local5 + 360) % 360;
_local6 = (_local6 + 360) % 360;
var _local2 = _local5 - _local6;
_local2 = ((_local2 > 179) ? (-360 + _local2) : (_local2));
_local2 = ((_local2 < -179) ? (360 + _local2) : (_local2));
this.realgunrotation = this.realgunrotation + ((_local2 / 2) * timeStep);
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
this.gfx._rotation = this.realgunrotation;
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + 1;
}
}
var _local7 = this.yspeed * timeStep;
var _local4 = int((this._x + this.w2) / tw);
var _local3 = int(((this._y + this.h) + _local7) / th);
if (col[_local3][_local4]) {
this._y = ((_local3 - 1) * th) - (this.h - th);
this.yspeed = 0;
} else {
this._y = this._y + _local7;
}
_local3 = int((this._y + this.h2) / th);
_local4 = int((this._x + this.w2) / tw);
this.barUpdate(move);
if (this.health <= 0) {
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(3, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
removeArray(this, enemyArr);
stats.totalenemies++;
}
if ((((_local4 < (fg.x - 4)) || (_local4 > ((fg.x + stw) + 4))) || (_local3 < (fg.y - 4))) || (_local3 > ((fg.y + sth) + 10))) {
this.o.x = _local4;
this.o.y = _local3;
var _local9 = int(_local4 / etw);
var _local8 = int(_local3 / eth);
if (this.o.f != true) {
entities[(_local8 * ew) + _local9].push(this.o);
}
this.bar.removeMovieClip("");
removeArray(this, enemyArr);
}
}
function addDrone(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyDrone", "enemy" + _local2, _local2);
_local1.w = 46;
_local1.h = 30;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = 1;
_local1.yspeed = 0;
_local1.xspeed = 0;
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.reloadTime = 0;
_local1.realgunrotation = 180;
_local1.frame = enemyDrone;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 50));
_local1.hitFlash = false;
_local1.f = true;
_local1.t = 0;
_local1.stop();
_local1.gfx.stop();
return(_local1);
}
function enemyDrone(timeStep, move) {
if (move) {
enemyShoot(this, this.gfx.barrel, 25, machineGun, 5, 5, 15, 1);
this.t++;
if (this.t > 5) {
this.t = 0;
var _local4 = addObject("smoke", (this._x + this.w2) - this.xspeed, this._y + this.h2, particleArr, smokeFrame);
_local4.scale(25);
}
}
if (this.dir == 1) {
var _local12 = int(((this._x + this.w) + this.xspeed) / tw);
var _local11 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local11;
while (_local2 <= _local5) {
if (col[_local2][_local12]) {
_local4++;
break;
}
_local2++;
}
if ((this.f || (_local4)) || (this._x > (((-fg._x) + spw) + this.w))) {
this.f = false;
this.body._xscale = -100;
this.body._x = this.body._x + this.w;
this.gfx._yscale = -100;
this.dir = -1;
}
}
if (this.dir == -1) {
var _local12 = int((this._x + this.xspeed) / tw);
var _local11 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local11;
while (_local2 <= _local5) {
if (col[_local2][_local12]) {
_local4++;
break;
}
_local2++;
}
if (_local4 || (this._x < ((-fg._x) - this.w))) {
this.body._xscale = 100;
this.body._x = this.body._x - this.w;
this.gfx._yscale = 100;
this.dir = 1;
}
}
if (move) {
this.xspeed = this.xspeed + this.dir;
if (this.xspeed > 5) {
this.xspeed = 5;
}
if (this.xspeed < -5) {
this.xspeed = -5;
}
}
this.yspeed = 0;
if (this._y > ((fg.y + 4) * th)) {
this.yspeed = this.yspeed - (2 * timeStep);
} else if (this._y < ((fg.y + 2) * th)) {
this.yspeed = this.yspeed + (2 * timeStep);
}
if (((this._y + this.h) < (-fg._y)) || (this._y > ((-fg._y) + sph))) {
this.yspeed = this.yspeed * 2;
}
this._y = this._y + this.yspeed;
var _local8 = this.xspeed * timeStep;
if (((this._x + this.w) < (-fg._x)) || (this._x > ((-fg._x) + spw))) {
_local8 = _local8 * 2;
}
this._x = this._x + _local8;
this.gunrotation = (360 - ((Math.atan2((this._x + this.gfx._x) - (player._x + player.w2), (this._y + this.gfx._y) - (player._y + player.h2)) * 180) / Math.PI)) - 90;
var _local6 = (this.gunrotation - 15) + random(30);
var _local7 = this.realgunrotation;
_local6 = (_local6 + 360) % 360;
_local7 = (_local7 + 360) % 360;
var _local3 = _local6 - _local7;
_local3 = ((_local3 > 179) ? (-360 + _local3) : (_local3));
_local3 = ((_local3 < -179) ? (360 + _local3) : (_local3));
this.realgunrotation = this.realgunrotation + ((_local3 / 5) * timeStep);
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
this.gfx._rotation = this.realgunrotation;
var _local11 = int((this._y + this.h2) / th);
var _local12 = int((this._x + this.w2) / tw);
this.barUpdate(move);
if (this.health <= 0) {
this.gotoAndStop("dead");
this.gfx._xscale = this.dir * 100;
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(3, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
stats.totalenemies++;
this.particles = 6;
this.frame = enemyFall;
removeArrayNoClip(this, enemyArr);
particleArr.push(this);
this.rspeed = this.xspeed * 2;
}
}
function addHeli(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyHeli", "enemy" + _local2, _local2);
_local1.w = 100;
_local1.h = 60;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = 1;
_local1.ydir = 0;
_local1.yspeed = 0;
_local1.xspeed = 0;
if (random(100) > 50) {
_local1.vdir = -1;
} else {
_local1.vdir = 1;
}
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.reloadTime = 0;
_local1.realgunrotation = 180;
_local1.frame = enemyHeli;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 300));
_local1.hitFlash = false;
_local1.t = 0;
_local1.stop();
_local1.body.gun.stop();
_local1.middle = 100 + random(150);
_local1.xd = -150 + random(300);
_local1.yd = -200 + random(50);
_local1.collision = 0;
return(_local1);
}
function enemyHeli(timeStep, move) {
sbt.addTransformStartLoop("sHeli", sbt.STOPLOOP, 350, 0);
if (move) {
enemyShoot(this, this.body.gun.barrel, 26, machineGun, 5, 5, 10, 1);
if (this.health < 150) {
this.t++;
if (this.t > 5) {
this.t = 0;
var _local4 = addObject("smoke", (this._x + this.w2) - this.xspeed, this._y + this.h2, particleArr, smokeFrame);
_local4.scale(50);
}
}
}
if ((this.collision--) < 0) {
if ((this.middle--) > 0) {
if ((this.middle % 125) == 0) {
this.xd = -150 + random(300);
this.yd = -200 + random(50);
}
if (this._x > ((player._x + player.w2) + this.xd)) {
this.dir = -1;
} else if (this._x < (((player._x + player.w2) + this.xd) - 30)) {
this.dir = 1;
} else {
this.dir = 0;
this.xd = -150 + random(300);
}
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
} else if (this._y < (((player._y + player.h2) + this.yd) - 30)) {
this.ydir = 1;
} else {
this.ydir = 0;
}
} else {
if (this.ydir == 1) {
this.ydir = -1 + random(2);
}
if (this._y < ((-fg._y) - (this.h * 1.5))) {
this.ydir = 0;
}
if (this.dir == 0) {
if (random(100) > 50) {
this.dir = -1;
} else {
this.dir = 1;
}
}
if ((this._x > (((-fg._x) + spw) + this.w)) || (this._x < ((-fg._x) - this.w))) {
this.ydir = -1;
if (this._x > (((-fg._x) + spw) + this.w)) {
this.dir = -1;
} else {
this.dir = 1;
}
this.middle = 100 + random(150);
if (random(100) > 50) {
this.vdir = 1;
} else {
this.vdir = -1;
}
}
}
}
if (move) {
if (this.dir == 0) {
if (this.xspeed > 0) {
this.xspeed--;
}
if (this.xspeed < 0) {
this.xspeed++;
}
}
this.xspeed = this.xspeed + this.dir;
if (this.xspeed > 7) {
this.xspeed = 7;
}
if (this.xspeed < -7) {
this.xspeed = -7;
}
if (this.ydir == 0) {
if (this.yspeed > 0) {
this.yspeed--;
}
if (this.yspeed < 0) {
this.yspeed++;
}
}
this.yspeed = this.yspeed + this.ydir;
if (this.yspeed > 2) {
this.yspeed = 2;
}
if (this.yspeed < -2) {
this.yspeed = -2;
}
}
var _local9 = this.xspeed * timeStep;
if (((this._x + this.w) < (-fg._x)) || (this._x > ((-fg._x) + spw))) {
_local9 = _local9 * 2;
}
if (this.bombs) {
_local9 = _local9 * 1.2;
}
var _local10 = false;
if (this.xd >= 0) {
var _local13 = (this._x + this.w) + this.xd;
if (_local13 < clr) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
_local10 = true;
this.dir = -1;
this.ydir = -1;
this.collision = 10;
}
}
}
if ((_local10 == false) && (this.xd < 0)) {
var _local13 = this._x + this.xd;
if (_local13 > cll) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.dir = 1;
this.ydir = -1;
_local10 = true;
this.collision = 10;
}
}
}
this._x = this._x + _local9;
var _local18 = false;
if (this.ydir == 1) {
var _local7 = int(((this._y + this.h) + this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = -1;
this.collision = 10;
}
}
if (this.ydir == -1) {
var _local7 = int((this._y - this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = 1;
this.collision = 10;
}
}
this._y = this._y + (this.yspeed * timeStep);
this.body._rotation = this.xspeed;
var _local15 = 0;
var _local14 = 0;
this.gunrotation = (360 - ((Math.atan2((this._x + this.body._x) - ((player._x + player.w2) + _local15), (this._y + this.body._y) - ((player._y + player.h2) + _local14)) * 180) / Math.PI)) - 90;
var _local11 = (this.gunrotation - 5) + random(10);
var _local12 = this.realgunrotation;
_local11 = (_local11 + 360) % 360;
_local12 = (_local12 + 360) % 360;
var _local3 = _local11 - _local12;
_local3 = ((_local3 > 179) ? (-360 + _local3) : (_local3));
_local3 = ((_local3 < -179) ? (360 + _local3) : (_local3));
this.realgunrotation = this.realgunrotation + ((_local3 / 4) * timeStep);
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
if (this.vdir == 1) {
this.body._xscale = 100;
this.body.gun._rotation = this.realgunrotation;
this.hit._x = 30;
} else {
this.body._xscale = -100;
this.body.gun._rotation = 180 - this.realgunrotation;
this.hit._x = 0;
}
this.barUpdate(move);
if (this.health <= 0) {
this.gotoAndStop("dead");
this.gfx._xscale = this.vdir * 100;
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(5, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
sb.start("sBigExplosion");
stats.totalhelis++;
this.particles = 10;
this.frame = enemyFall;
removeArrayNoClip(this, enemyArr);
particleArr.push(this);
this.rspeed = this.xspeed * 2;
}
}
function addHeli2(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyHeli2", "enemy" + _local2, _local2);
_local1.w = 130;
_local1.h = 70;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = 1;
_local1.ydir = 0;
_local1.yspeed = 0;
_local1.xspeed = 0;
if (random(100) > 50) {
_local1.vdir = -1;
} else {
_local1.vdir = 1;
}
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.reloadTime = 0;
_local1.realgunrotation = 180;
_local1.frame = enemyHeli2;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 450));
_local1.hitFlash = false;
_local1.t = 0;
_local1.stop();
_local1.body.gun.stop();
_local1.middle = 100 + random(150);
_local1.xd = -150 + random(300);
_local1.yd = -200 + random(50);
_local1.collision = 0;
_local1.bombs = false;
_local1.bombtimer = 300 + random(300);
return(_local1);
}
function rocketLauncherNoSplash(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, rocketSetup, rocketFrameNoSplash, 3, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
sb.start("sRocketlauncher");
}
}
function rocketFrameNoSplash(timeStep, move) {
if (move) {
this.t++;
if (this.t > 3) {
this.t = 0;
var _local8 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local8.scale(25);
}
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local4, _local5, timeStep);
}
for (var _local7 in this.arr) {
if (this.hitTest(this.arr[_local7].hit)) {
this.arr[_local7].health = this.arr[_local7].health - this.damage;
if (this.arr == enemyArr) {
stats.shotshit++;
}
_local6 = 1;
}
}
if ((((_local6 || (_local4 < (fg.x - 5))) || (_local4 > ((fg.x + stw) + 5))) || (_local5 < (fg.y - 5))) || (_local5 > ((fg.y + sth) + 5))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 0, 12);
removeArray(this, bulletArr);
}
}
function bombDrop(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, rocketSetup, bombFrame, 2, damage, tarr, player);
}
function bombFrame(timeStep, move) {
if (move) {
this.t++;
if (this.t > 3) {
this.t = 0;
var _local8 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local8.scale(25);
}
this.yspeed = this.yspeed + 0.5;
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local4, _local5, timeStep);
}
for (var _local7 in this.arr) {
if (this.hitTest(this.arr[_local7].hit)) {
this.arr[_local7].health = this.arr[_local7].health - this.damage;
if (this.arr == enemyArr) {
stats.shotshit++;
}
_local6 = 1;
}
}
if ((((_local6 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 0, 12);
removeArray(this, bulletArr);
}
}
function enemyHeli2(timeStep, move) {
sbt.addTransformStartLoop("sHeli", sbt.STOPLOOP, 350, 0);
if (move) {
this.bombtimer++;
if (this.bombs) {
if (this.bombtimer == 20) {
enemyShoot(this, this.body.bomb, -1, bombDrop, 1, 10, 0, 19, 90);
sb.start("sAirstrike");
this.bombtimer = 0;
}
}
enemyShoot(this, this.body.gun.barrel, 22, machineGun, 5, 5, 10, 1);
if (this.health < 150) {
this.t++;
if (this.t > 5) {
this.t = 0;
var _local4 = addObject("smoke", (this._x + this.w2) - this.xspeed, this._y + this.h2, particleArr, smokeFrame);
_local4.scale(50);
}
}
}
if ((this.collision--) < 0) {
if (this.bombs) {
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
} else if (this._y < (((player._y + player.h2) + this.yd) - 30)) {
this.ydir = 1;
} else {
this.ydir = 0;
}
if (((this.dir == 1) && (this._x > (((-fg._x) + spw) + this.w))) || ((this.dir == -1) && (this._x < ((-fg._x) - this.w)))) {
this.bombs = false;
this.middle = 0;
}
} else if ((this.middle--) > 0) {
if ((this.middle % 125) == 0) {
this.xd = -150 + random(300);
this.yd = -200 + random(50);
}
if (this._x > ((player._x + player.w2) + this.xd)) {
this.dir = -1;
} else if (this._x < (((player._x + player.w2) + this.xd) - 30)) {
this.dir = 1;
} else {
this.dir = 0;
this.xd = -150 + random(300);
}
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
} else if (this._y < (((player._y + player.h2) + this.yd) - 30)) {
this.ydir = 1;
} else {
this.ydir = 0;
}
} else {
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
}
if (this._y < ((-fg._y) - (this.h * 1.5))) {
if (this.bombtimer > 600) {
this.ydir = 1;
} else {
this.ydir = 1;
this.middle = 100 + random(150);
if (random(100) > 50) {
this.vdir = 1;
} else {
this.vdir = -1;
}
}
}
if (this.dir == 0) {
if (random(100) > 50) {
this.dir = -1;
} else {
this.dir = 1;
}
}
if ((this._x > (((-fg._x) + spw) + this.w)) || (this._x < ((-fg._x) - this.w))) {
this.ydir = -1;
if (this._x > (((-fg._x) + spw) + this.w)) {
this.dir = -1;
} else {
this.dir = 1;
}
if (this.bombtimer > (600 + random(150))) {
this.bombs = true;
this.bombtimer = 0;
}
this.middle = 100 + random(150);
if (random(100) > 50) {
this.vdir = 1;
} else {
this.vdir = -1;
}
}
}
}
if (move) {
if (this.dir == 0) {
if (this.xspeed > 0) {
this.xspeed--;
}
if (this.xspeed < 0) {
this.xspeed++;
}
}
this.xspeed = this.xspeed + this.dir;
if (this.xspeed > 6) {
this.xspeed = 6;
}
if (this.xspeed < -6) {
this.xspeed = -6;
}
if (this.ydir == 0) {
if (this.yspeed > 0) {
this.yspeed--;
}
if (this.yspeed < 0) {
this.yspeed++;
}
}
this.yspeed = this.yspeed + this.ydir;
if (this.yspeed > 2) {
this.yspeed = 2;
}
if (this.yspeed < -2) {
this.yspeed = -2;
}
}
var _local9 = this.xspeed * timeStep;
if (((this._x + this.w) < (-fg._x)) || (this._x > ((-fg._x) + spw))) {
_local9 = _local9 * 2;
}
if (this.bombs) {
_local9 = _local9 * 1.2;
}
var _local10 = false;
if (this.xd >= 0) {
var _local13 = (this._x + this.w) + this.xd;
if (_local13 < clr) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
_local10 = true;
this.dir = -1;
this.ydir = -1;
this.collision = 10;
this.bombs = false;
}
}
}
if ((_local10 == false) && (this.xd < 0)) {
var _local13 = this._x + this.xd;
if (_local13 > cll) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.dir = 1;
this.ydir = -1;
_local10 = true;
this.collision = 10;
this.bombs = false;
}
}
}
this._x = this._x + _local9;
var _local18 = false;
if (this.ydir == 1) {
var _local7 = int(((this._y + this.h) + this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = -1;
this.collision = 10;
this.bombs = false;
}
}
if (this.ydir == -1) {
var _local7 = int((this._y - this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = 1;
this.collision = 10;
this.bombs = false;
}
}
this._y = this._y + (this.yspeed * timeStep);
this.body._rotation = this.xspeed;
var _local15 = 0;
var _local14 = 0;
this.gunrotation = (360 - ((Math.atan2((this._x + this.body._x) - ((player._x + player.w2) + _local15), (this._y + this.body._y) - ((player._y + player.h2) + _local14)) * 180) / Math.PI)) - 90;
var _local11 = this.gunrotation;
var _local12 = this.realgunrotation;
_local11 = (_local11 + 360) % 360;
_local12 = (_local12 + 360) % 360;
var _local3 = _local11 - _local12;
_local3 = ((_local3 > 179) ? (-360 + _local3) : (_local3));
_local3 = ((_local3 < -179) ? (360 + _local3) : (_local3));
this.realgunrotation = this.realgunrotation + ((_local3 / 3) * timeStep);
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
if (this.vdir == 1) {
this.body._xscale = 100;
this.body.gun._rotation = this.realgunrotation;
this.hit._x = 30;
} else {
this.body._xscale = -100;
this.body.gun._rotation = 180 - this.realgunrotation;
this.hit._x = 0;
}
this.barUpdate(move);
if (this.health <= 0) {
this.gotoAndStop("dead");
this.gfx._xscale = this.vdir * 100;
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(5, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
sb.start("sBigExplosion");
stats.totalhelis++;
this.particles = 10;
this.frame = enemyFall;
removeArrayNoClip(this, enemyArr);
particleArr.push(this);
this.rspeed = this.xspeed * 1.5;
}
}
function addHeli3(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("enemyHeli3", "enemy" + _local2, _local2);
_local1.w = 215;
_local1.h = 90;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1.dir = 1;
_local1.ydir = 0;
_local1.yspeed = 0;
_local1.xspeed = 0;
if (random(100) > 50) {
_local1.vdir = -1;
} else {
_local1.vdir = 1;
}
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.reloadTime = 0;
_local1.realgunrotation = 180;
_local1.frame = enemyHeli3;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 600));
_local1.hitFlash = false;
_local1.t = 0;
_local1.stop();
_local1.body.gun.stop();
_local1.middle = 100 + random(150);
_local1.xd = -150 + random(300);
_local1.yd = -200 + random(50);
_local1.collision = 0;
_local1.bombs = false;
_local1.bombtimer = random(900);
_local1.spintimer = random(800);
_local1.spin = false;
return(_local1);
}
function enemyHeli3(timeStep, move) {
sbt.addTransformStartLoop("sHeli", sbt.STOPLOOP, 350, 0);
if (move) {
this.bombtimer++;
this.spintimer++;
if (this.bombs) {
if (this.bombtimer == 13) {
var _local16;
if (this.vdir == 1) {
_local16 = 25;
} else {
_local16 = 155;
}
enemyShoot(this, this.body.bomb, -1, rocketLauncherNoSplash, 10, 10, 5, 6, _local16);
sb.start("sRocketlauncher");
this.bombtimer = 0;
}
}
enemyShoot(this, this.body.gun.barrel, 20, machineGun, 5, 5, 10, 1);
if (this.health < 150) {
this.t++;
if (this.t > 5) {
this.t = 0;
var _local4 = addObject("smoke", (this._x + this.w2) - this.xspeed, this._y + this.h2, particleArr, smokeFrame);
_local4.scale(50);
}
}
}
if ((this.collision--) < 0) {
if (this.bombs) {
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
} else if (this._y < (((player._y + player.h2) + this.yd) - 30)) {
this.ydir = 1;
} else {
this.ydir = 0;
}
if (((this.dir == 1) && (this._x > (((-fg._x) + spw) + this.w))) || ((this.dir == -1) && (this._x < ((-fg._x) - this.w)))) {
this.bombs = false;
this.middle = 0;
}
} else if ((this.middle--) > 0) {
if ((this.middle % 125) == 0) {
this.xd = -150 + random(300);
this.yd = -250 + random(50);
}
if (this.spin == false) {
if (this.spintimer > (400 + random(400))) {
this.spin = true;
this.spinangle = 0;
this.middle++;
}
} else {
this.middle++;
}
if (this._x > ((player._x + player.w2) + this.xd)) {
this.dir = -1;
} else if (this._x < (((player._x + player.w2) + this.xd) - 30)) {
this.dir = 1;
} else {
this.dir = 0;
this.xd = -150 + random(300);
}
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
} else if (this._y < (((player._y + player.h2) + this.yd) - 30)) {
this.ydir = 1;
} else {
this.ydir = 0;
}
} else {
if (this._y > ((player._y + player.h2) + this.yd)) {
this.ydir = -1;
}
if (this._y < ((-fg._y) - (this.h * 1.5))) {
if (this.bombtimer > 800) {
this.ydir = 1;
} else {
this.ydir = 1;
this.middle = 100 + random(150);
if (random(100) > 50) {
this.vdir = 1;
} else {
this.vdir = -1;
}
}
}
if (this.dir == 0) {
if (random(100) > 50) {
this.dir = -1;
} else {
this.dir = 1;
}
}
if ((this._x > (((-fg._x) + spw) + this.w)) || (this._x < ((-fg._x) - this.w))) {
if (this._x > (((-fg._x) + spw) + this.w)) {
this.dir = -1;
} else {
this.dir = 1;
}
this.middle = 100 + random(150);
if (random(100) > 50) {
this.vdir = 1;
} else {
this.vdir = -1;
}
if (this.bombtimer > (600 + random(300))) {
this.bombs = true;
this.bombtimer = 0;
if (this.dir == 1) {
this.vdir = 1;
} else {
this.vdir = -1;
}
}
}
}
}
if (move) {
if (this.dir == 0) {
if (this.xspeed > 0) {
this.xspeed--;
}
if (this.xspeed < 0) {
this.xspeed++;
}
}
this.xspeed = this.xspeed + this.dir;
if (this.xspeed > 5) {
this.xspeed = 5;
}
if (this.xspeed < -5) {
this.xspeed = -5;
}
if (this.ydir == 0) {
if (this.yspeed > 0) {
this.yspeed--;
}
if (this.yspeed < 0) {
this.yspeed++;
}
}
this.yspeed = this.yspeed + this.ydir;
if (this.yspeed > 2) {
this.yspeed = 2;
}
if (this.yspeed < -2) {
this.yspeed = -2;
}
}
var _local9 = this.xspeed * timeStep;
if (((this._x + this.w) < (-fg._x)) || (this._x > ((-fg._x) + spw))) {
_local9 = _local9 * 2;
}
if (this.bombs) {
_local9 = _local9 * 1.2;
}
var _local10 = false;
if (this.xd >= 0) {
var _local13 = (this._x + this.w) + this.xd;
if (_local13 < clr) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
_local10 = true;
this.dir = -1;
this.ydir = -1;
this.collision = 10;
this.bombs = false;
}
}
}
if ((_local10 == false) && (this.xd < 0)) {
var _local13 = this._x + this.xd;
if (_local13 > cll) {
var _local8 = int(_local13 / tw);
var _local7 = int((this._y + 1) / th);
var _local5 = int(((this._y + this.h) - 1) / th);
var _local4 = 0;
var _local2 = _local7;
while (_local2 <= _local5) {
if (col[_local2][_local8]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.dir = 1;
this.ydir = -1;
_local10 = true;
this.collision = 10;
this.bombs = false;
}
}
}
this._x = this._x + _local9;
var _local19 = false;
if (this.ydir == 1) {
var _local7 = int(((this._y + this.h) + this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = -1;
this.collision = 10;
this.bombs = false;
}
}
if (this.ydir == -1) {
var _local7 = int((this._y - this.yspeed) / th);
var _local8 = int((this._x + 1) / tw);
var _local6 = int(((this._x + this.w) - 1) / th);
var _local4 = 0;
var _local2 = _local8;
while (_local2 <= _local6) {
if (col[_local7][_local2]) {
_local4++;
break;
}
_local2++;
}
if (_local4) {
this.yspeed = 0;
this.ydir = 1;
this.collision = 10;
this.bombs = false;
}
}
this._y = this._y + (this.yspeed * timeStep);
var _local15 = player.xspeed * 2;
var _local14 = player.yspeed * 2;
if (this.spin) {
this.gunrotation = this.gunrotation + 5;
this.spinangle = this.spinangle + 5;
if (this.reloadTime < 18) {
this.reloadTime = 18;
}
if (this.spinangle > 720) {
this.spin = false;
this.spintimer = 0;
}
} else if (this.bombs) {
var _local16 = this.vdir * 25;
this.body._rotation = this.xspeed + _local16;
this.gunrotation = ((360 - ((Math.atan2((this._x + this.body._x) - ((player._x + player.w2) + _local15), (this._y + this.body._y) - ((player._y + player.h2) + _local14)) * 180) / Math.PI)) - 90) + _local16;
} else {
this.body._rotation = this.xspeed;
this.gunrotation = (360 - ((Math.atan2((this._x + this.body._x) - ((player._x + player.w2) + _local15), (this._y + this.body._y) - ((player._y + player.h2) + _local14)) * 180) / Math.PI)) - 90;
}
var _local11 = this.gunrotation;
var _local12 = this.realgunrotation;
_local11 = (_local11 + 360) % 360;
_local12 = (_local12 + 360) % 360;
var _local3 = _local11 - _local12;
_local3 = ((_local3 > 179) ? (-360 + _local3) : (_local3));
_local3 = ((_local3 < -179) ? (360 + _local3) : (_local3));
this.realgunrotation = this.realgunrotation + ((_local3 / 2) * timeStep);
if (this.realgunrotation < -180) {
this.realgunrotation = this.realgunrotation + 360;
}
if (this.realgunrotation > 180) {
this.realgunrotation = this.realgunrotation - 360;
}
if (this.vdir == 1) {
this.body._xscale = 100;
this.body.gun._rotation = this.realgunrotation;
this.hit._x = 30;
} else {
this.body._xscale = -100;
this.body.gun._rotation = 180 - this.realgunrotation;
this.hit._x = 0;
}
this.barUpdate(move);
if (this.health <= 0) {
this.gotoAndStop("dead");
this.gfx._xscale = this.vdir * 100;
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(5, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
this.kill(true);
sb.start("sBigExplosion");
stats.totalhelis++;
this.particles = 10;
this.frame = enemyFall;
removeArrayNoClip(this, enemyArr);
particleArr.push(this);
this.rspeed = this.xspeed;
}
}
function addTarget(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("target", "target" + _local2, _local2);
_local1.w = 32;
_local1.h = 32;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1._x = o.x * tw;
_local1._y = (o.y * th) - (_local1.h - th);
_local1.stop();
_local1.frame = targetFrame;
_local1.health = (_local1.lastHealth = (_local1.maxHealth = 25));
_local1.hitFlash = false;
_local1.t = 0;
_local1.o = o;
_local1.hit._visible = false;
_local1.frame(0, 0);
_local1.bar = null;
_local1.bartime = 0;
_local1.healthCheck = healthCheck;
_local1.barUpdate = barUpdate;
enemyArr.push(_local1);
return(_local1);
}
function targetFrame(timeStep, move) {
if (move) {
if (this._currentframe == this._totalframes) {
this.gotoAndStop(1);
} else {
this.nextFrame();
}
}
var _local3 = int((this._y + this.h2) / th);
var _local4 = int((this._x + this.w2) / tw);
this.barUpdate(move);
if (this.health <= 0) {
addExplosion("explosion", this._x + this.w2, this._y + this.h2, 0, 5);
addParticle(3, "metalShard", this._x + this.w2, this._y + this.h2, 6, 6, 10);
removeArray(this, enemyArr);
this._alpha = 0;
}
}
function addHelper(o) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie("helper", "helper" + _local2, _local2);
if (o.p & HELPER_HIDDEN) {
_local1._visible = false;
}
_local1.w = 32;
_local1.h = 32;
_local1.w2 = _local1.w / 2;
_local1.h2 = _local1.h / 2;
_local1._x = o.x * tw;
_local1._y = ((o.y * th) - (_local1.h - th)) + 1;
_local1.stop();
_local1.frame = helperFrame;
_local1.o = o;
_local1.t = 0;
particleArr.push(_local1);
_local1.blackhole = true;
return(_local1);
}
function helperFrame(timeStep, move) {
var _local2 = int((this._y + this.h2) / th);
var _local3 = int((this._x + this.w2) / tw);
if (this.hitTest(player.hit)) {
if (this.popup) {
removeArray(this.popup, particleArr);
}
if (this.o.p & HELPER_ONCE) {
this.popup = addCenteredPopUp(this._x + this.w2, this._y - this.h2, this.o.a[0], false, 0);
removeArray(this, particleArr);
} else {
this.popup = addCenteredPopUp(this._x + this.w2, this._y - this.h2, this.o.a[0], false, 65280, 75);
}
} else {
removeArray(this.popup, particleArr);
this.popup = false;
}
if ((((_local3 < (fg.x - 4)) || (_local3 > ((fg.x + stw) + 4))) || (_local2 < (fg.y - 4))) || (_local2 > ((fg.y + sth) + 4))) {
var _local5 = int(_local3 / etw);
var _local4 = int(_local2 / eth);
entities[(_local4 * ew) + _local5].push(this.o);
removeArray(this, particleArr);
}
}
enemyhitsound = 0;
function addBullet(x, y, rot, realrot, speed, setup, func, frame, damage, tarr, player) {
var _local2 = game.getNextHighestDepth();
var _local1 = null;
if (player) {
_local1 = game.attachMovie("bullet", "bullet_" + _local2, _local2);
} else {
_local1 = game.attachMovie("enemyBullet", "bullet_" + _local2, _local2);
}
_local1._x = x;
_local1._y = y;
_local1.sped = speed;
_local1.xspeed = speed * Math.cos(rot * pi180);
_local1.yspeed = speed * Math.sin(rot * pi180);
_local1.gotoAndStop(frame);
_local1._rotation = realrot;
_local1.frame = func;
_local1.damage = damage;
setup(_local1);
_local1.checkDown = checkDown;
_local1.w2 = 0;
_local1.h = 4;
_local1.ob = Number.NEGATIVE_INFINITY;
_local1.arr = tarr;
bulletArr.push(_local1);
return(_local1);
}
function aBombLauncher(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = addBullet(x, y, rot, rot, speed, rocketSetup, aBombFrame, 9, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
attachEnvFlare(30, _local1);
sb.start("sABomb");
sb.start("sRocketlauncher");
}
}
function rocketLauncher(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, rocketSetup, rocketFrame, 3, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
sb.start("sRocketlauncher");
}
}
function rocketSetup(clip) {
clip.t = 0;
}
function rocketFrame(timeStep, move) {
if (move) {
this.t++;
if (this.t > 3) {
this.t = 0;
var _local8 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local8.scale(25);
}
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local4, _local5, timeStep);
}
for (var _local7 in this.arr) {
if (this.hitTest(this.arr[_local7].hit)) {
this.arr[_local7].health = this.arr[_local7].health - this.damage;
stats.shotshit++;
_local6 = 1;
}
}
if ((((_local6 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 5, 12);
removeArray(this, bulletArr);
}
}
function guidedLauncher(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, rocketSetup, guidedFrame, 5, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
sb.start("sRocketlauncher");
}
}
function seekerLauncher(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, rocketSetup, seekerFrame, 11, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
sb.start("sRocketlauncher");
}
}
function guidedFrame(timeStep, move) {
if (move) {
this.t++;
if ((this.t % 3) == 0) {
var _local13 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local13.scale(25);
}
}
var _local10 = (360 - ((Math.atan2((fg._x + this._x) - _root._xmouse, (fg._y + this._y) - _root._ymouse) * 180) / Math.PI)) - 90;
var _local11 = this._rotation;
_local10 = (_local10 + 360) % 360;
_local11 = (_local11 + 360) % 360;
var _local8 = _local10 - _local11;
_local8 = ((_local8 > 179) ? (-360 + _local8) : (_local8));
_local8 = ((_local8 < -179) ? (360 + _local8) : (_local8));
this._rotation = this._rotation + ((_local8 / 10) * timeStep);
this.xspeed = this.sped * Math.cos(this._rotation * pi180);
this.yspeed = this.sped * Math.sin(this._rotation * pi180);
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local6 = int(this._y / th);
var _local5 = int(this._x / tw);
var _local7 = col[_local6][_local5];
if (((_local7 != 0) && (_local7 >= ANGLEUP)) && (_local7 < BREAKABLE)) {
_local7 = this.checkDown(_local5, _local6, timeStep);
}
for (var _local9 in this.arr) {
if (this.hitTest(this.arr[_local9].hit)) {
this.arr[_local9].health = this.arr[_local9].health - this.damage;
stats.shotshit++;
_local7 = 1;
}
}
if ((((((this.t > 320) || (_local7)) || (_local5 < (fg.x - 2))) || (_local5 > ((fg.x + stw) + 2))) || (_local6 < (fg.y - 2))) || (_local6 > ((fg.y + sth) + 2))) {
_local5 = int(this._x / tw);
_local6 = int(this._y / th);
var _local4 = _local6 - 1;
while (_local4 < (_local6 + 2)) {
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
if ((_local4 == _local6) || (_local3 == _local5)) {
breakTile(_local3, _local4);
}
_local3++;
}
_local4++;
}
addExplosion("explosion", this._x, this._y, 5, 12);
removeArray(this, bulletArr);
}
}
function seekerFrame(timeStep, move) {
if (move) {
this.t++;
if ((this.t % 3) == 0) {
var _local14 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local14.scale(25);
}
}
if (this.targets == null) {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
} else {
var _local12 = (360 - ((Math.atan2(this._x - (this.targets._x + this.targets.w2), this._y - (this.targets._y + this.targets.h2)) * 180) / Math.PI)) - 90;
var _local13 = this._rotation;
_local12 = (_local12 + 360) % 360;
_local13 = (_local13 + 360) % 360;
var _local9 = _local12 - _local13;
_local9 = ((_local9 > 179) ? (-360 + _local9) : (_local9));
_local9 = ((_local9 < -179) ? (360 + _local9) : (_local9));
this._rotation = this._rotation + ((_local9 / 15) * timeStep);
this.xspeed = this.sped * Math.cos(this._rotation * pi180);
this.yspeed = this.sped * Math.sin(this._rotation * pi180);
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
}
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local8 = col[_local5][_local4];
if (((_local8 != 0) && (_local8 >= ANGLEUP)) && (_local8 < BREAKABLE)) {
_local8 = this.checkDown(_local4, _local5, timeStep);
}
var _local7 = Number.POSITIVE_INFINITY;
this.targets = null;
for (var _local11 in this.arr) {
if (this.hitTest(this.arr[_local11].hit)) {
this.arr[_local11].health = this.arr[_local11].health - this.damage;
stats.shotshit++;
_local8 = 1;
}
var _local6 = Math.abs(this._x - this.arr[_local11]._x) + Math.abs(this._y - this.arr[_local11]._y);
if (_local6 < _local7) {
_local7 = _local6;
this.targets = this.arr[_local11];
}
}
if ((((((this.t > 320) || (_local8)) || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 5, 12);
removeArray(this, bulletArr);
}
}
function drunkenSetup(clip) {
clip.t = 0;
clip.rt = 0;
clip.re = random(35);
clip.rd = random(2);
clip.rs = 1 + random(2);
clip.rocket = rocketFrame;
}
function drunkenLauncher(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, rot, speed, drunkenSetup, drunkenFrame, 6, damage, tarr, player);
addBullet(x, y, rot, rot, speed, drunkenSetup, drunkenFrame, 6, damage, tarr, player);
addBullet(x, y, rot, rot, speed, drunkenSetup, drunkenFrame, 6, damage, tarr, player);
if (player) {
ejectBrass(3, 0, 1);
addCamShake(5, true);
sb.start("sRocketlauncher");
}
}
function drunkenFrame(timeStep, move) {
if (move) {
this.rt++;
if (this.rt > this.re) {
this.rd = !this.rd;
this.re = random(35);
this.rs = 1 + random(2);
this.rt = 0;
}
}
if (this.rd == 0) {
this._rotation = this._rotation + (this.rs * timeStep);
} else {
this._rotation = this._rotation - (this.rs * timeStep);
}
this.xspeed = this.sped * Math.cos(this._rotation * pi180);
this.yspeed = this.sped * Math.sin(this._rotation * pi180);
this.rocket(timeStep, move);
}
function RPG(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), random(360), speed, rocketSetup, RPGFrame, 8, damage, tarr, player);
sb.start("sGrenade");
}
function RPGFrame(timeStep, move) {
if (move) {
this.t++;
if ((this.t > 5) && (this.t < 12)) {
this.xspeed = this.xspeed * 2;
this.yspeed = this.yspeed * 2;
}
if ((this.t > 7) && ((this.t % 2) == 0)) {
var _local13 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local13.scale(25);
}
}
var _local10 = this._x + (this.xspeed * timeStep);
var _local9 = this._y + (this.yspeed * timeStep);
this._rotation = this._rotation + (Math.abs(this.xspeed + this.yspeed) * timeStep);
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local8 = col[_local5][_local4];
if (((_local8 != 0) && (_local8 >= ANGLEUP)) && (_local8 < BREAKABLE)) {
_local8 = this.checkDown(_local4, _local5, timeStep);
}
for (var _local11 in this.arr) {
var _local6 = this.arr[_local11].hit;
var _local7 = _local6.getBounds(fg);
if (lineRectangleHitTest(_local7.xMin, _local7.yMin, _local6._width, _local6._height, this._x, this._y, _local10, _local9)) {
this.arr[_local11].health = this.arr[_local11].health - this.damage;
_local8 = -1;
break;
}
}
if ((((_local8 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
breakTile(_local4, _local5);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 5, 12);
removeArray(this, bulletArr);
}
this._x = _local10;
this._y = _local9;
}
function aBombFrame(timeStep, move) {
if (move) {
this.t++;
if (this.t > 3) {
this.t = 0;
var _local9 = addObject("smoke", this._x, this._y, particleArr, smokeFrame);
_local9.scale(35);
}
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local5 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local4, _local5, timeStep);
}
for (var _local7 in this.arr) {
if (this.hitTest(this.arr[_local7].hit)) {
this.arr[_local7].health = this.arr[_local7].health - this.damage;
stats.shotshit++;
_local6 = 1;
}
}
if ((((_local6 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
breakTile(_local2, _local3);
_local2++;
}
_local3++;
}
var _local8 = addExplosion("nuke", this._x, this._y, 50, 0);
_local8.scale(150);
_local8._rotation = 0;
sb.start("sBigExplosion");
attachEnvFlare(Number.POSITIVE_INFINITY, _local8);
addCamShake(50, false);
removeArray(this, bulletArr);
}
}
function grenadeLauncher(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), random(360), speed, grenadeSetup, grenadeFrame, 7, damage, tarr, player);
sb.start("sGrenade");
}
function grenade(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), random(360), speed, grenadeSetup, grenadeFrame, 2, damage, tarr, player);
sb.start("sKnife");
}
function grenadeSetup(clip) {
clip.hits = 0;
}
function grenadeFrame(timeStep, move) {
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed++;
}
}
var _local4 = int((this._x + (this.xspeed * timeStep)) / tw);
var _local5 = int(this._y / th);
var _local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = 0;
}
if (_local6) {
this.hits++;
if (_local6 & BREAKABLE) {
this.hits = Number.POSITIVE_INFINITY;
this._x = this._x + (this.xspeed * timeStep);
}
this.xspeed = this.xspeed * -1;
} else {
this._x = this._x + (this.xspeed * timeStep);
}
_local4 = int(this._x / tw);
_local5 = int((this._y + (this.yspeed * timeStep)) / th);
_local6 = col[_local5][_local4];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local4, _local5, timeStep);
if (_local6) {
this._y = this._y + ((this.yspeed * timeStep) * -1);
}
}
if (_local6) {
this.hits++;
if (_local6 & BREAKABLE) {
this.hits = Number.POSITIVE_INFINITY;
this._y = this._y + (this.yspeed * timeStep);
}
this.yspeed = this.yspeed * -0.5;
} else {
this._y = this._y + (this.yspeed * timeStep);
}
this._rotation = this._rotation + (Math.abs(this.xspeed + this.yspeed) * timeStep);
for (var _local8 in this.arr) {
if (this.hitTest(this.arr[_local8].hit)) {
this.arr[_local8].health = this.arr[_local8].health - this.damage;
stats.shotshit++;
this.hits = Number.POSITIVE_INFINITY;
}
}
if (((((this.hits >= 4) || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local5 < (fg.y - 2))) || (_local5 > ((fg.y + sth) + 2))) {
_local4 = int(this._x / tw);
_local5 = int(this._y / th);
var _local3 = _local5 - 1;
while (_local3 < (_local5 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local5) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("explosion", this._x, this._y, 5, 12);
removeArray(this, bulletArr);
}
}
function sparkPlug(x, y, rot, speed, damage, aim, tarr, player) {
sparkSetup(addBullet(x, y, rot, rot, speed, null, sparkFrame, 12, damage, tarr, player), -4, -1);
sparkSetup(addBullet(x, y, rot, rot, speed, null, sparkFrame, 12, damage, tarr, player), 4, 1);
sb.start("sSparkplug");
}
function sparkSetup(clip, pspeed, gravity) {
clip.x = clip._x;
clip.y = clip._y;
clip.phasespeed = pspeed;
clip.grav = pspeed + gravity;
clip.xspeed2 = 1 * Math.cos((clip._rotation + 90) * pi180);
clip.yspeed2 = 1 * Math.sin((clip._rotation + 90) * pi180);
}
function sparkFrame(timeStep, move) {
if (move) {
if (this.phasespeed > 0) {
this.grav--;
} else {
this.grav++;
}
}
this.phasespeed = this.phasespeed + (this.grav * timeStep);
this.x = this.x + (this.xspeed * timeStep);
this.y = this.y + (this.yspeed * timeStep);
this._x = this.x + (this.xspeed2 * this.phasespeed);
this._y = this.y + (this.yspeed2 * this.phasespeed);
var _local3 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local2 = col[_local3][_local4];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local4, _local3, timeStep);
}
for (var _local5 in this.arr) {
if (this.hitTest(this.arr[_local5].hit)) {
this.arr[_local5].health = this.arr[_local5].health - this.damage;
stats.shotshit++;
_local2 = 1;
}
}
if ((((_local2 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
breakTile(_local4, _local3);
removeArray(this, bulletArr);
}
}
function railGun(dx, dy, rot, speed, damage, aim, arr) {
var _local10 = addObject("bullet", dx, dy, particleArr, fadeFrame);
_local10._rotation = rot;
_local10.gotoAndStop(10);
var _local7 = dx + (speed * Math.cos(rot * pi180));
var _local6 = dy + (speed * Math.sin(rot * pi180));
for (var _local9 in arr) {
var _local1 = arr[_local9].hit;
var _local2 = _local1.getBounds(fg);
if (lineRectangleHitTest(_local2.xMin, _local2.yMin, _local1._width, _local1._height, dx, dy, _local7, _local6)) {
arr[_local9].health = arr[_local9].health - damage;
}
}
sb.start("sRailgun");
}
function enemySuckFrame(timeStep, move) {
this.gotoAndStop("dead");
this.gfx._rotation = this.gfx._rotation + (5 * timeStep);
this._alpha = this._alpha - (5 * timeStep);
this._x = this._x + (((this.targetx - this._x) / 10) * timeStep);
this._y = this._y + (((this.targety - this._y) / 10) * timeStep);
if ((this._x > (this.targetx - 5)) && (this._x < (this.targetx + 5))) {
if ((this._y > (this.targety - 5)) && (this._y < (this.targety + 5))) {
if (this._alpha <= 0) {
removeArray(this, particleArr);
}
}
}
}
function suckFrame(timeStep, move) {
this._rotation = this._rotation + (5 * timeStep);
this._alpha = this._alpha - (5 * timeStep);
this._x = this._x + (((this.targetx - this._x) / 10) * timeStep);
this._y = this._y + (((this.targety - this._y) / 10) * timeStep);
if ((this._x > (this.targetx - 5)) && (this._x < (this.targetx + 5))) {
if ((this._y > (this.targety - 5)) && (this._y < (this.targety + 5))) {
if (this._alpha <= 0) {
removeArray(this, particleArr);
}
}
}
}
function blackHoleFrame(timeStep, move) {
if (this.t < 50) {
for (var _local3 in enemyArr) {
if (enemyArr[_local3].blackhole != true) {
if (this.hitTest(enemyArr[_local3].hit)) {
var _local2 = enemyArr[_local3];
_local2.health = 0;
_local2.kill(true);
_local2.frame = enemySuckFrame;
_local2.targetx = this._x;
_local2.targety = this._y;
_local2.blackhole = true;
particleArr.push(_local2);
_local2.bar.removeMovieClip("");
enemyArr.splice(Number(_local3), 1);
}
}
}
for (var _local3 in bulletArr) {
if (bulletArr[_local3].blackhole != true) {
if (this.hitTest(bulletArr[_local3])) {
var _local2 = bulletArr[_local3];
_local2.frame = suckFrame;
_local2.targetx = this._x;
_local2.targety = this._y;
_local2.blackhole = true;
particleArr.push(_local2);
bulletArr.splice(Number(_local3), 1);
}
}
}
for (var _local3 in particleArr) {
if (particleArr[_local3].blackhole != true) {
if (this.hitTest(particleArr[_local3])) {
var _local2 = particleArr[_local3];
_local2.frame = suckFrame;
_local2.targetx = this._x;
_local2.targety = this._y;
_local2.blackhole = true;
particleArr.push(_local2);
particleArr.splice(Number(_local3), 1);
}
}
}
}
this._rotation = this._rotation + (1 * timeStep);
if ((this.t == 0) && (this._xscale < 2000)) {
this._xscale = (this._yscale = this._yscale + ((this._yscale / 10) * timeStep));
} else {
if (move) {
this.t++;
}
if (this.t > 75) {
this._alpha = this._alpha - (10 * timeStep);
this._xscale = (this._yscale = this._yscale - (200 * timeStep));
this._rotation = this._rotation + (5 * timeStep);
if (this._alpha <= 0) {
removeArray(this, bulletArr);
}
}
}
}
function blackHoleGenerator(dx, dy, rot, speed, damage, aim, arr) {
var _local1 = addObject("blackHole", dx, dy, bulletArr, blackHoleFrame);
_local1.t = 0;
_local1._rotation = random(360);
_local1.blackhole = true;
attachEnvFlare(125, player);
addCamShake(125, false);
sb.start("sBlackhole");
}
function airStrikeFrame(timeStep, move) {
if (move) {
this.t++;
if (this.t > 40) {
if ((this.t % 4) == 0) {
var _local2 = 90;
var _local3 = int((fg.y * th) / th);
if ((this.t % 8) == 0) {
sb.start("sAirstrike");
}
if (this.dir == 1) {
var _local4 = int((((this._x - (spw / 2)) + ((this.t - 39) * 10)) - player.xcamdif) / th);
if (!col[_local3][_local4]) {
addBullet(((this._x - (spw / 2)) + ((this.t - 39) * 10)) - player.xcamdif, fg.y * th, _local2, _local2, 5, rocketSetup, bombFrame, 23, 50, enemyArr, true);
}
} else {
var _local4 = int((((this._x + (spw / 2)) - ((this.t - 39) * 10)) - player.xcamdif) / th);
if (!col[_local3][_local4]) {
addBullet(((this._x + (spw / 2)) - ((this.t - 39) * 10)) - player.xcamdif, fg.y * th, _local2, _local2, 5, rocketSetup, bombFrame, 23, 50, enemyArr, true);
}
}
}
}
if (this.t > 87) {
removeArray(this, bulletArr);
}
}
}
function airStrike(dx, dy, rot, speed, damage, aim, tarr, player) {
var _local1 = addBullet(dx, dy, rot, rot, speed, rocketSetup, airStrikeFrame, 13, damage, tarr, player);
_local1.dir = random(2);
attachEnvFlare(10, _local1);
sb.start("sAirstrikeCall");
}
function knife(dx, dy, rot, speed, damage, aim, arr) {
var _local15 = (tw / 2) * Math.cos(rot * pi180);
var _local13 = (th / 2) * Math.sin(rot * pi180);
var _local5 = dx + (speed * Math.cos(rot * pi180));
var _local4 = dy + (speed * Math.sin(rot * pi180));
var _local11 = int(dy / th);
var _local12 = int(dx / tw);
breakTile(_local12, _local11);
_local11 = int(_local4 / th);
_local12 = int(_local5 / tw);
breakTile(_local12, _local11);
for (var _local9 in arr) {
var _local1 = arr[_local9].hit;
var _local2 = _local1.getBounds(fg);
if (lineRectangleHitTest(_local2.xMin, _local2.yMin, _local1._width, _local1._height, dx, dy, _local5, _local4)) {
arr[_local9].health = arr[_local9].health - damage;
}
}
sb.start("sKnife");
}
function flameSetup(clip) {
clip.g = true;
clip._xscale = (clip._yscale = 10);
}
function flameFrame(timeStep, move) {
this.scale(this._xscale + (5 * timeStep));
this._alpha = ((1 - (this._xscale / 150)) * 100) * 1.5;
var _local5 = int((this._y + this.yspeed) / th);
var _local6 = int((this._x + this.xspeed) / tw);
var _local2 = col[_local5][_local6];
if ((((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) || (_local2 & BREAKABLE)) {
_local2 = this.checkDown(_local6, _local5, timeStep);
}
if (_local2) {
this._rotation = this._rotation + (150 + random(60));
this.sped = this.sped * 0.5;
this.xspeed = this.sped * Math.cos(this._rotation * pi180);
this.yspeed = this.sped * Math.sin(this._rotation * pi180);
} else {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
}
for (var _local4 in this.arr) {
if (this.hitTest(this.arr[_local4].hit)) {
this.arr[_local4].health = this.arr[_local4].health - ((this.damage * (1 - (this._xscale / 150))) * timeStep);
if (this.g) {
stats.shotshit++;
this.g = false;
}
_local2 = 1;
}
}
breakTile(_local6, _local5);
if (this._xscale > 120) {
removeArray(this, bulletArr);
}
}
function flameThrower(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), rot, speed, flameSetup, flameFrame, 4, damage, tarr, player);
sbt.addTransformStartLoop("sFlame", sbt.STOPLOOP, 350, 0);
}
function mac10(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = random(aim * 2);
addBullet(x, y, (rot - aim) + _local1, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, (rot - aim) + _local1, 0, speed, null, bulletFrame, 1, damage, tarr, player).frame(1, 1);
if (player) {
brass++;
if (brass > 5) {
brass = 0;
ejectBrass(2, -0.5 + (Math.random() * 1), -6);
ejectBrass(2, -0.5 + (Math.random() * 1), -3);
}
sb.start("sBulletSmall" + random(4));
}
}
function machineGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), 0, speed, null, bulletFrame, 1, damage, tarr, player);
if (player) {
brass++;
if (brass > 3) {
brass = 0;
ejectBrass(2, -0.5 + (Math.random() * 1), -6);
}
sb.start("sBulletSmall" + random(4));
}
}
function shotGunRockets(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot - 10, rot - 10, speed, rocketSetup, rocketFrame, 3, damage, tarr, player).scale(75);
addBullet(x, y, rot, rot, speed, rocketSetup, rocketFrame, 3, damage, tarr, player).scale(75);
addBullet(x, y, rot + 10, rot + 10, speed, rocketSetup, rocketFrame, 3, damage, tarr, player).scale(75);
sb.start("sShotgun");
}
function shotGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot - 6, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot - 2, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot + 2, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot + 6, 0, speed, null, bulletFrame, 1, damage, tarr, player);
sb.start("sShotgun");
}
function doubleShotGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot - 15, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot - 10, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot - 5, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot + 5, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot + 10, 0, speed, null, bulletFrame, 1, damage, tarr, player);
addBullet(x, y, rot + 15, 0, speed, null, bulletFrame, 1, damage, tarr, player);
sb.start("sShotgun");
}
function bowArrow(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = (-aim) + random(aim * 2);
addBullet(x, y, rot + _local1, rot + _local1, speed, arrowSetup, arrowFrame, 14, damage, tarr, player);
sb.start("sKnife");
}
function arrowSetup(clip) {
clip.t = 0;
}
function arrowFrameStuck(timeStep, move) {
if (move) {
this.t++;
}
if (this.t > 90) {
this._alpha = this._alpha - (10 * timeStep);
}
if (((((this.x < (fg.x - 2)) || (this.x > ((fg.x + stw) + 2))) || (this.y < (fg.y - 2))) || (this.y > ((fg.y + sth) + 2))) || (this.t > 100)) {
removeArray(this, bulletArr);
}
}
function arrowFrame(timeStep, move) {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + (0.5 * timeStep);
}
this._rotation = ((Math.atan2(this._y - (this._y + this.yspeed), this._x - (this._x + this.xspeed)) * 180) / Math.PI) + 180;
var _local3 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local2 = col[_local3][_local4];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local4, _local3, timeStep);
if (_local2) {
this._y = _local2;
this.t = 0;
this.x = _local4;
this.y = _local3;
this.frame = arrowFrameStuck;
}
}
for (var _local5 in this.arr) {
if (this.hitTest(this.arr[_local5].hit)) {
this.arr[_local5].health = this.arr[_local5].health - this.damage;
stats.shotshit++;
_local2 = -1;
}
}
if ((((_local2 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
if ((!breakTile(_local4, _local3)) && (_local2 != -1)) {
this.t = 0;
this.x = _local4;
this.y = _local3;
this.frame = arrowFrameStuck;
} else {
removeArray(this, bulletArr);
}
}
}
function anytime(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = (-aim) + random(aim * 2);
var _local2 = addBullet(x, y, rot + _local1, rot + _local1, speed, null, anytimeFrame, 17, damage, tarr, player);
attachEnvFlare(Number.POSITIVE_INFINITY, _local2);
sb.start("sRailgun");
}
function anytimeFrame(timeStep, move) {
var _local10 = this._x + (this.xspeed * timeStep);
var _local9 = this._y + (this.yspeed * timeStep);
var _local6 = int(_local9 / th);
var _local4 = int(_local10 / tw);
var _local8 = col[_local6][_local4];
if (((_local8 != 0) && (_local8 >= ANGLEUP)) && (_local8 < BREAKABLE)) {
_local8 = this.checkDown(_local4, _local6, timeStep);
}
for (var _local12 in this.arr) {
var _local5 = this.arr[_local12].hit;
var _local7 = _local5.getBounds(fg);
if (lineRectangleHitTest(_local7.xMin, _local7.yMin, _local5._width, _local5._height, this._x, this._y, _local10, _local9)) {
this.arr[_local12].health = this.arr[_local12].health - (this.damage * timeStep);
_local8 = -1;
}
}
if ((_local8 & BREAKABLE) || (_local8 == -1)) {
if (_local8 & BREAKABLE) {
_local8 = 0;
}
var _local3 = _local6 - 1;
while (_local3 < (_local6 + 2)) {
var _local2 = _local4 - 1;
while (_local2 < (_local4 + 2)) {
if ((_local3 == _local6) || (_local2 == _local4)) {
breakTile(_local2, _local3);
}
_local2++;
}
_local3++;
}
addExplosion("purpleExplosion", _local10, _local9, 5, 12);
}
if ((((_local4 < (fg.x - 2)) || (_local4 > ((fg.x + stw) + 2))) || (_local6 < (fg.y - 2))) || (_local6 > ((fg.y + sth) + 2))) {
addExplosion("purpleExplosion", _local10, _local9, 5, 12);
removeArray(this, bulletArr);
}
this._x = _local10;
this._y = _local9;
}
function flakCannon(x, y, rot, speed, damage, aim, tarr, player) {
var _local2 = 0;
while (_local2 < 10) {
var _local1 = (-aim) + random(aim * 2);
addBullet(x, y, rot + _local1, rot + _local1, speed + random(speed), null, flakFrame, 16, damage, tarr, player).rspeed = 10 + random(20);
_local2++;
}
if (player) {
ejectBrass(3, -0.5 + (Math.random() * 1), -6);
addCamShake(5, true);
sb.start("sBullet");
}
}
function flakFrame(timeStep, move) {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + (0.5 * timeStep);
}
this._rotation = this._rotation + (this.rspeed * timeStep);
var _local3 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local2 = col[_local3][_local4];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local4, _local3, timeStep);
}
for (var _local5 in this.arr) {
if (this.hitTest(this.arr[_local5].hit)) {
this.arr[_local5].health = this.arr[_local5].health - this.damage;
stats.shotshit++;
_local2 = -1;
}
}
if ((((_local2 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
breakTile(_local4, _local3);
removeArray(this, bulletArr);
}
}
function laserShotGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot - 10, rot - 10, speed, rocketSetup, laserFrame, 15, damage, tarr, player);
addBullet(x, y, rot, rot, speed, rocketSetup, laserFrame, 15, damage, tarr, player);
addBullet(x, y, rot + 10, rot + 10, speed, rocketSetup, laserFrame, 15, damage, tarr, player);
sb.start("sLaser");
sb.start("sShotgun");
}
function sniperGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), 0, speed, null, sniperFrame, 1, damage, tarr, player);
if (player) {
ejectBrass(2, -0.5 + (Math.random() * 1), -6);
sb.start("sBullet");
}
}
function sniperFrame(timeStep, move) {
var _local6 = this._x + (this.xspeed * timeStep);
var _local5 = this._y + (this.yspeed * timeStep);
var _local7 = int(_local5 / th);
var _local8 = int(_local6 / tw);
var _local4 = col[_local7][_local8];
if (((_local4 != 0) && (_local4 >= ANGLEUP)) && (_local4 < BREAKABLE)) {
_local4 = this.checkDown(_local8, _local7, timeStep);
}
for (var _local9 in this.arr) {
var _local2 = this.arr[_local9].hit;
var _local3 = _local2.getBounds(fg);
if (lineRectangleHitTest(_local3.xMin, _local3.yMin, _local2._width, _local2._height, this._x, this._y, _local6, _local5)) {
this.arr[_local9].health = this.arr[_local9].health - this.damage;
_local4 = -1;
break;
}
}
if ((((_local4 || (_local8 < (fg.x - 2))) || (_local8 > ((fg.x + stw) + 2))) || (_local7 < (fg.y - 2))) || (_local7 > ((fg.y + sth) + 2))) {
breakTile(_local8, _local7);
removeArray(this, bulletArr);
}
this._x = _local6;
this._y = _local5;
}
function laserGun(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = (-aim) + random(aim * 2);
addBullet(x, y, rot + _local1, rot + _local1, speed, rocketSetup, laserFrame, 15, damage, tarr, player);
sb.start("sLaser");
}
function laserFrame(timeStep, move) {
var _local5 = this._x + (this.xspeed * timeStep);
var _local4 = this._y + (this.yspeed * timeStep);
var _local8 = int(_local4 / th);
var _local9 = int(_local5 / tw);
var _local7 = col[_local8][_local9];
if (((_local7 != 0) && (_local7 >= ANGLEUP)) && (_local7 < BREAKABLE)) {
_local7 = this.checkDown(_local9, _local8, timeStep);
}
for (var _local10 in this.arr) {
var _local2 = this.arr[_local10].hit;
var _local3 = _local2.getBounds(fg);
if (lineRectangleHitTest(_local3.xMin, _local3.yMin, _local2._width, _local2._height, this._x, this._y, _local5, _local4)) {
this.arr[_local10].health = this.arr[_local10].health - (this.damage * timeStep);
}
}
if ((((_local7 || (_local9 < (fg.x - 2))) || (_local9 > ((fg.x + stw) + 2))) || (_local8 < (fg.y - 2))) || (_local8 > ((fg.y + sth) + 2))) {
breakTile(_local9, _local8);
removeArray(this, bulletArr);
}
this._x = _local5;
this._y = _local4;
}
function bulletFrame(timeStep, move) {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local3 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local2 = col[_local3][_local4];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local4, _local3, timeStep);
}
for (var _local5 in this.arr) {
if (this.hitTest(this.arr[_local5].hit)) {
this.arr[_local5].health = this.arr[_local5].health - this.damage;
if (this.arr == enemyArr) {
stats.shotshit++;
}
_local2 = 1;
}
}
if ((((_local2 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
breakTile(_local4, _local3);
removeArray(this, bulletArr);
}
}
function gooGun(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, (rot - aim) + random(aim * 2), rot, speed, gooSetup, gooFrame, 19, damage, tarr, player);
sb.start("sGooGun");
}
function gooSetup(clip) {
clip.t = 0;
}
function gooFrameStuck(timeStep, move) {
if (move) {
this.t++;
}
var _local2 = 0;
for (var _local3 in this.arr) {
if (this.hitTest(this.arr[_local3].hit)) {
this.arr[_local3].health = this.arr[_local3].health - this.damage;
stats.shotshit++;
_local2 = -1;
}
}
if (((((_local2 || (this.x < (fg.x - 2))) || (this.x > ((fg.x + stw) + 2))) || (this.y < (fg.y - 2))) || (this.y > ((fg.y + sth) + 2))) || (this.t > 250)) {
addExplosion("gooSplat", this._x, this._y, 0, 0);
removeArray(this, bulletArr);
}
}
function gooFrame(timeStep, move) {
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
if (this.yspeed < (tw / 2)) {
this.yspeed = this.yspeed + (0.5 * timeStep);
}
this._rotation = ((Math.atan2(this._y - (this._y + this.yspeed), this._x - (this._x + this.xspeed)) * 180) / Math.PI) + 180;
var _local3 = int(this._y / th);
var _local4 = int(this._x / tw);
var _local2 = col[_local3][_local4];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local4, _local3, timeStep);
if (_local2) {
this.x = _local4;
this.y = _local3;
this._y = _local2;
this.frame = gooFrameStuck;
sb.start("sGooHit");
}
}
for (var _local5 in this.arr) {
if (this.hitTest(this.arr[_local5].hit)) {
this.arr[_local5].health = this.arr[_local5].health - this.damage;
stats.shotshit++;
_local2 = -1;
}
}
if ((((_local2 || (_local4 < (fg.x - 2))) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
if ((!breakTile(_local4, _local3)) && (_local2 != -1)) {
this.x = _local4;
this.y = _local3;
this._x = this._x - ((this.xspeed * timeStep) / 2);
this.frame = gooFrameStuck;
sb.start("sGooHit");
} else {
addExplosion("gooSplat", this._x, this._y, 0, 0);
removeArray(this, bulletArr);
}
}
}
function taser(x, y, rot, speed, damage, aim, tarr, player) {
addBullet(x, y, rot, 0, speed, taserSetup, taserFrame, 18, damage, tarr, player).gfx._rotation = rot;
sb.start("sTaser");
}
function taserSetup(clip) {
clip.target = null;
clip.xd = 0;
clip.yd = 0;
clip.t = 0;
}
function taserStuckFrame(timeStep, move) {
this.clear();
this.lineStyle(2, 0, 100);
this.moveTo(0, 0);
this.lineTo((player._x + player.w2) - this._x, (player._y + player.h2) - this._y);
this._x = this.target._x + this.xd;
this._y = this.target._y + this.yd;
this._rotation = this.target._rotation;
if (move) {
this.t++;
this.target.health = this.target.health - this.damage;
}
if ((this.t % 2) == 0) {
if ((this.t % 4) == 0) {
var _local2 = new Color(this.target);
_local2.setTransform(normalColor);
} else {
var _local2 = new Color(this.target);
_local2.setTransform(invColor);
}
}
if ((this.target.health <= 0) || (this.t > 500)) {
removeArray(this, bulletArr);
}
}
function taserFrame(timeStep, move) {
var _local5 = this._x + (this.xspeed * timeStep);
var _local4 = this._y + (this.yspeed * timeStep);
var _local8 = int(_local4 / th);
var _local9 = int(_local5 / tw);
var _local6 = col[_local8][_local9];
if (((_local6 != 0) && (_local6 >= ANGLEUP)) && (_local6 < BREAKABLE)) {
_local6 = this.checkDown(_local9, _local8, timeStep);
}
for (var _local7 in this.arr) {
var _local2 = this.arr[_local7].hit;
var _local3 = _local2.getBounds(fg);
if (lineRectangleHitTest(_local3.xMin, _local3.yMin, _local2._width, _local2._height, this._x, this._y, _local5, _local4)) {
this.frame = taserStuckFrame;
this.target = this.arr[_local7];
this._x = _local5;
this._y = _local4;
this.xd = this._x - this.target._x;
this.yd = this._y - this.target._y;
attachEnvFlare(Number.POSITIVE_INFINITY, this);
}
}
if ((((_local6 || (_local9 < (fg.x - 2))) || (_local9 > ((fg.x + stw) + 2))) || (_local8 < (fg.y - 2))) || (_local8 > ((fg.y + sth) + 2))) {
removeArray(this, bulletArr);
}
this._x = _local5;
this._y = _local4;
this.clear();
this.lineStyle(2, 0, 100);
this.moveTo(0, 0);
this.lineTo((player._x + player.w2) - this._x, (player._y + player.h2) - this._y);
}
function bladerang(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = (-aim) + random(aim * 2);
addBullet(x, y, rot + _local1, rot + _local1, speed, bladerangSetup, bladerangFrame, 20, damage, tarr, player);
sb.start("sBladerang");
}
function bladerangSetup(clip) {
clip.tspeed = 20;
clip.addy = 0;
}
function bladerangFrame(timeStep, move) {
this._x = this._x + ((this.tspeed * this.xspeed) * timeStep);
this._y = this._y + (((this.tspeed * this.yspeed) + this.addy) * timeStep);
if (move) {
if (this.tspeed < -15) {
this.addy = this.addy + 0.5;
} else {
this.tspeed--;
}
}
var _local4 = int(this._y / th);
var _local5 = int(this._x / tw);
var _local2 = col[_local4][_local5];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local5, _local4, timeStep);
}
for (var _local6 in this.arr) {
if (this.hitTest(this.arr[_local6].hit)) {
this.arr[_local6].health = this.arr[_local6].health - (this.damage * timeStep);
stats.shotshit++;
_local2 = -1;
}
}
if ((((_local2 || (_local5 < (fg.x - 2))) || (_local5 > ((fg.x + stw) + 2))) || (_local4 < (fg.y - 2))) || (_local4 > ((fg.y + sth) + 2))) {
if ((_local2 == -1) || (breakTile(_local5, _local4))) {
} else {
removeArray(this, bulletArr);
}
}
}
function soundwaave(x, y, rot, speed, damage, aim, tarr, player) {
var _local1 = (rot - aim) + random(aim * 2);
addBullet(x, y, _local1, _local1, speed, null, waveFrame, 21, damage, tarr, player).scale(50);
sbt.addTransformStartLoop("sSoundwaave", sbt.STOPLOOP, 350, 0);
}
function waveFrame(timeStep, move) {
this.scale(Math.min(150, this._xscale + (5 * timeStep)));
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local4 = int(this._y / th);
var _local5 = int(this._x / tw);
var _local2 = col[_local4][_local5];
if (((_local2 != 0) && (_local2 >= ANGLEUP)) && (_local2 < BREAKABLE)) {
_local2 = this.checkDown(_local5, _local4, timeStep);
}
for (var _local6 in this.arr) {
if (this.hitTest(this.arr[_local6].hit)) {
this.arr[_local6].health = this.arr[_local6].health - (this.damage * timeStep);
stats.shotshit++;
_local2 = -1;
}
}
breakTile(_local5, _local4);
if ((((_local5 < (fg.x - 2)) || (_local5 > ((fg.x + stw) + 2))) || (_local4 < (fg.y - 2))) || (_local4 > ((fg.y + sth) + 2))) {
removeArray(this, bulletArr);
}
}
brass = 0;
function outcode(x, y, w, h, lx, ly) {
var _local1 = 0;
if (w <= 0) {
_local1 = _local1 | (OUT_LEFT | OUT_RIGHT);
} else if (lx < x) {
_local1 = _local1 | OUT_LEFT;
} else if (lx > (x + w)) {
_local1 = _local1 | OUT_RIGHT;
}
if (h <= 0) {
_local1 = _local1 | (OUT_TOP | OUT_BOTTOM);
} else if (ly < y) {
_local1 = _local1 | OUT_TOP;
} else if (ly > (y + h)) {
_local1 = _local1 | OUT_BOTTOM;
}
return(_local1);
}
function lineRectangleHitTest(tx, ty, tw, th, x1, y1, x2, y2) {
var _local3;
var _local12;
_local12 = outcode(tx, ty, tw, th, x2, y2);
if (_local12 == 0) {
return(true);
}
while (_local3 = outcode(tx, ty, tw, th, x1, y1) , _local3 != 0) {
if ((_local3 & _local12) != 0) {
return(false);
}
if ((_local3 & (OUT_LEFT | OUT_RIGHT)) != 0) {
var _local5 = tx;
if ((_local3 & OUT_RIGHT) != 0) {
_local5 = _local5 + tw;
}
y1 = y1 + (((_local5 - x1) * (y2 - y1)) / (x2 - x1));
x1 = _local5;
} else {
var _local4 = ty;
if ((_local3 & OUT_BOTTOM) != 0) {
_local4 = _local4 + th;
}
x1 = x1 + (((_local4 - y1) * (x2 - x1)) / (y2 - y1));
y1 = _local4;
}
}
return(true);
}
function addPopUp(clip, depth, x, y, string, align, w, txtcol, col, alf) {
var _local1 = clip.createEmptyMovieClip("textbox_" + depth, depth);
_local1._x = x;
_local1._y = y;
var _local2 = new TextFormat();
_local2.font = "Arial";
_local2.size = 12;
if (align == 1) {
_local2.align = "right";
} else if (align == 2) {
_local2.align = "center";
}
_local2.color = txtcol;
if (w) {
_local1.createTextField("txt", 0, 0, 0, w, 1000);
} else {
_local1.createTextField("txt", 0, 0, 0, 1000, 1000);
}
txt = _local1.txt;
txt.multiline = true;
txt.wordWrap = true;
txt.embedFonts = true;
txt.selectable = false;
txt.text = string;
txt.setTextFormat(_local2);
if (!w) {
txt._width = txt.textWidth + 6;
}
txt._height = txt.textHeight + 6;
_local1.drawButton(col, alf);
_local1.blackhole = true;
return(_local1);
}
function addObjectUnder(name, x, y, arr, func) {
var _local2 = undergame.getNextHighestDepth();
var _local1 = undergame.attachMovie(name, name + _local2, _local2);
_local1._x = x;
_local1._y = y;
_local1.frame = func;
_local1.arr = arr;
arr.push(_local1);
return(_local1);
}
function addObject(name, x, y, arr, func) {
var _local2 = game.getNextHighestDepth();
var _local1 = game.attachMovie(name, name + _local2, _local2);
_local1._x = x;
_local1._y = y;
_local1.frame = func;
_local1.arr = arr;
arr.push(_local1);
return(_local1);
}
function addObjectOver(name, x, y, arr, func) {
var _local2 = overgame.getNextHighestDepth();
var _local1 = overgame.attachMovie(name, name + _local2, _local2);
_local1._x = x;
_local1._y = y;
_local1.frame = func;
_local1.arr = arr;
arr.push(_local1);
return(_local1);
}
function addCamShake(num, trim) {
if (trim) {
if (camshake < 15) {
camshake = Math.min(camshake + num, 15);
}
} else {
camshake = camshake + num;
}
}
function throwGun(gun, x, y) {
var _local1 = addObjectOver("weapons", x, y, particleArr, particleFrame);
_local1.gotoAndStop(gun);
_local1.xspeed = 2;
_local1.yspeed = -5 - random(-5);
_local1._rotation = _local1._rotation + (-10 + random(20));
_local1.rspeed = -5 + random(10);
}
function addParticle(num, type, x, y, xr, yr, rotr) {
if (stats.drawparticles) {
var _local3 = 0;
while (_local3 < num) {
var _local1 = addObject(type, x, y, particleArr, particleFrame);
_local1.gotoAndStop(1 + random(_local1._totalframes));
_local1.xspeed = (-xr) + random(xr * 2);
if (yr < 0) {
_local1.yspeed = -random(-yr);
} else {
_local1.yspeed = (-yr) + random(yr * 2);
}
_local1._rotation = random(360);
_local1.rspeed = (-rotr) + random(rotr * 2);
_local3++;
}
}
}
function ejectBrass(frame, xs, ys) {
if (stats.drawbrass) {
var _local2 = {x:0, y:0};
var _local3 = player.torso.arm.gun.e;
_local3.localToGlobal(_local2);
var _local1 = addObject("brass", _local2.x - fg._x, _local2.y - fg._y, particleArr, particleFrame);
_local1.gotoAndStop(frame);
_local1.xspeed = xs;
_local1.yspeed = ys;
_local1._rotation = random(360);
_local1.rspeed = -10 + random(20);
}
}
function addExplosion(clip, x, y, damage, shake) {
var _local1 = addObject(clip, x, y, bulletArr, explosionFrame);
_local1.stop();
_local1.damage = damage;
_local1._rotation = random(360);
addCamShake(shake, true);
sb.start("sExplosion");
return(_local1);
}
function dropItem(x, y, type, under) {
if (type == -2) {
type = random(guns.length - 2) + 3;
while ((!stats.guns[type].unlocked) && (type < guns.length)) {
type = random(guns.length - 3) + 3;
}
}
if (type == 3) {
type = 2;
}
var _local2;
if (under) {
_local2 = addObjectUnder("weaponBox", x, y, particleArr, itemFrame);
} else {
_local2 = addObject("weaponBox", x, y, particleArr, itemFrame);
}
_local2.blackhole = true;
_local2.type = type;
_local2.t = 0;
_local2.yspeed = 0;
if (type == -1) {
_local2.gotoAndStop("health");
} else if (type >= guns.length) {
_local2.gotoAndStop("powerup");
} else {
_local2.gotoAndStop(guns[type].name);
}
if ((((type >= 0) && (type < guns.length)) && (player.guns[type].bullets <= 0)) && (type != gunsGren)) {
var _local3 = _local2.attachMovie("weapons", "weapons", 0);
_local3.gotoAndStop(guns[type].name);
_local3._y = _local3._y - Math.max(0, (_local3._height - th) / 2);
_local3._x = _local3._x - Math.max(0, (_local3._width - tw) / 2);
}
}
function removeArray(clip, arr) {
for (var _local3 in arr) {
if (arr[_local3] == clip) {
arr.splice(Number(_local3), 1);
break;
}
}
clip.removeMovieClip();
}
function removeArrayNoClip(clip, arr) {
for (var _local3 in arr) {
if (arr[_local3] == clip) {
arr.splice(Number(_local3), 1);
break;
}
}
}
function timedFrame(timeStep, move) {
if (move) {
this.t++;
}
if (this.t > 100) {
this._alpha = this._alpha - (10 * timeStep);
if (this._alpha <= 0) {
removeArray(this, particleArr);
}
}
}
function timedMoveFrame(timeStep, move) {
if (move) {
this.t++;
}
if (this.t > 50) {
this._alpha = this._alpha - (10 * timeStep);
if (this._alpha < 0) {
removeArray(this, particleArr);
}
}
this._y = this._y - (1 * timeStep);
}
function fadeFrame(timeStep, move) {
this._alpha = this._alpha - (10 * timeStep);
if (this._alpha < 0) {
removeArray(this, this.arr);
}
}
function smokeFrame(timeStep, move) {
this.scale(this._xscale + (5 * timeStep));
this._alpha = this._alpha - (10 * timeStep);
if (this._alpha < 0) {
removeArray(this, this.arr);
}
}
function objectFrame(timeStep, move) {
if (move) {
this.nextFrame();
}
if (this._currentframe == this._totalframes) {
removeArray(this, this.arr);
}
}
function particleFrame(timeStep, move) {
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed++;
}
}
this._y = this._y + (this.yspeed * timeStep);
var _local4 = int(this._x / tw);
var _local3 = int(this._y / th);
if (col[_local3][_local4] != 0) {
this._y = this._y - (this.yspeed * timeStep);
this.yspeed = this.yspeed * -0.5;
if (this.yspeed > -2) {
removeArray(this, this.arr);
}
}
this._x = this._x + (this.xspeed * timeStep);
_local4 = int(this._x / tw);
_local3 = int(this._y / th);
if (col[_local3][_local4] != 0) {
this._x = this._x - (this.xspeed * timeStep);
this.xspeed = this.xspeed * 0.5;
}
this._rotation = this._rotation + (this.rspeed * timeStep);
if (this._y > ((-fg._y) + (sph * 2))) {
removeArray(this, this.arr);
}
}
function addCenteredPopUp(x, y, string, animate, color, alpha) {
var _local2 = 0;
var _local3 = 50;
if (color) {
_local2 = color;
}
if (alpha) {
_local3 = alpha;
}
var _local1 = addPopUp(game, game.getNextHighestDepth(), x, y, string, 2, 0, 16777215, _local2, _local3, false);
_local1._y = _local1._y - _local1._height;
_local1._x = _local1._x - (_local1._width / 2);
var _local4 = _local1.getBounds(fg);
if (_local4.xMin < 0) {
_local1._x = 0;
}
if (animate) {
_local1.frame = timedMoveFrame;
} else {
_local1.frame = timedFrame;
}
_local1.t = 0;
particleArr.push(_local1);
return(_local1);
}
function itemFrame(timeStep, move) {
if (move) {
if (this.yspeed < (tw / 2)) {
this.yspeed++;
}
}
if (this._x < cll) {
this._x = cll;
}
if ((this._x + this._width) > clr) {
this._x = clr - this._width;
}
this._y = this._y + (this.yspeed * timeStep);
var _local4 = int(this._x / tw);
var _local3 = int((this._y + (this._height / 2)) / th);
if (col[_local3][_local4] != 0) {
this._y = this._y - (this.yspeed * timeStep);
this.yspeed = this.yspeed * -0.5;
if (this.yspeed > -2) {
this.yspeed = 0;
this._y = (_local3 * th) - (this._height / 2);
}
}
if (this.hitTest(player.hit)) {
if (this.type == -1) {
player.health = Math.min(player.maxHealth, player.health + 30);
addCenteredPopUp(this._x + 16, this._y + 16, "Health", true);
} else if (this.type >= guns.length) {
var _local2 = 1 << random(3);
if (_local2 & POWERUP_TIMESINK) {
powerups.push({powerup:_local2, t:frameRate * 10});
addCenteredPopUp(this._x + 16, this._y + 16, "TimeSink", true);
} else if (_local2 & POWERUP_INVULNERABLE) {
powerups.push({powerup:_local2, t:frameRate * 15});
addCenteredPopUp(this._x + 16, this._y + 16, "Invulnerable", true);
} else if (_local2 & POWERUP_TRIDAMAGE) {
powerups.push({powerup:_local2, t:frameRate * 10});
addCenteredPopUp(this._x + 16, this._y + 16, "TriDamage", true);
}
} else {
player.ggun = this.type;
player.guns[this.type].bullets = player.guns[this.type].bullets + guns[this.type].clip;
if (!stats.guns[this.type].unlocked) {
stats.guns[this.type].unlocked = true;
addCenteredPopUp(this._x + 16, this._y + 16, guns[this.type].name + " Unlocked!", true);
} else {
addCenteredPopUp(this._x + 16, this._y + 16, guns[this.type].name, true);
}
}
sb.start("sPickup");
score = score + 10;
removeArray(this, this.arr);
}
if ((((_local4 < (fg.x - 2)) || (_local4 > ((fg.x + stw) + 2))) || (_local3 < (fg.y - 2))) || (_local3 > ((fg.y + sth) + 2))) {
this._visible = false;
} else {
this._visible = true;
}
}
function explosionFrame(timeStep, move) {
if (move) {
this.nextFrame();
}
if (this._currentframe == this._totalframes) {
removeArray(this, this.arr);
}
if (this._currentframe < (this._totalframes / 2)) {
for (var _local3 in enemyArr) {
if (this.hitTest(enemyArr[_local3])) {
enemyArr[_local3].health = enemyArr[_local3].health - (this.damage * timeStep);
}
}
}
}
function muzzleFrame(timeStep, move) {
if (move) {
this._alpha = this._alpha - 25;
}
if (this._alpha <= 0) {
removeArray(this, this.arr);
}
}
function breakTile(x, y) {
if (col[y][x] & BREAKABLE) {
col[y][x] = 0;
map[y][x] = 0;
fg[(("t_" + y) + "_") + x].gotoAndStop(1);
addParticle(1, tileset + "Crumble", (x * tw) + (tw / 2), (y * th) + (th / 2), 4, 4, 10);
addCamShake(7, true);
return(true);
}
return(false);
}
function addEnvObject(name, x, y, setup, func) {
var _local2 = environment.getNextHighestDepth();
var _local1 = environment.attachMovie(name, name + _local2, _local2);
_local1._x = x;
_local1._y = y;
_local1.frame = func;
_local1.arr = envArr;
setup(_local1);
envArr.push(_local1);
return(_local1);
}
function setupEnvSnow() {
envArr = [];
envTimer = 0;
}
function envSnow(timeStep, move) {
if (move) {
envTimer++;
if (((envTimer % 15) == 0) && (envArr.length < 10)) {
addEnvObject("snowFlake", (-fg._x) + random(spw * 1.25), -fg._y, snowFlakeSetup, snowFlakeFrame);
}
}
for (var _local3 in envArr) {
envArr[_local3].frame(timeStep, move);
}
}
function snowFlakeSetup(clip) {
clip.yspeed = 2;
clip.speed = -2;
clip.xspeed = clip.speed;
clip.cycle = 0;
clip.gotoAndStop(1 + random(clip._totalframes));
}
function snowFlakeFrame(timeStep, move) {
if (move) {
this.cycle = this.cycle + 0.1;
this.xspeed = this.speed + (2 * Math.sin(this.cycle));
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
var _local3 = int(this._x / tw);
var _local2 = int(this._y / th);
if (((((col[_local2][_local3] != 0) || (this._x < (-fg._x))) || (this._x > ((-fg._x) + (spw * 1.25)))) || (this._y < ((-fg._y) - 50))) || (this._y > ((-fg._y) + sph))) {
removeArray(this, this.arr);
}
}
function setupEnvLeaf() {
envArr = [];
envTimer = 0;
}
function envLeaf(timeStep, move) {
if (move) {
envTimer++;
if (((envTimer % 30) == 0) && (envArr.length < 10)) {
addEnvObject("leaf", ((-fg._x) - (spw * 0.25)) + random(spw * 1.5), -fg._y, leafSetup, leafFrame);
}
}
for (var _local3 in envArr) {
envArr[_local3].frame(timeStep, move);
}
}
function leafSetup(clip) {
clip.speed = -2;
clip.xspeed = clip.speed;
clip.rot = -5 + random(10);
clip.gotoAndStop(1 + random(clip._totalframes));
}
function leafFrame(timeStep, move) {
if (move) {
this.cycle = this.cycle + 0.1;
this.xspeed = this.speed * Math.cos(this._rotation * pi180);
this.yspeed = (this.speed * Math.sin(this._rotation * pi180)) + 2;
}
this._x = this._x + (this.xspeed * timeStep);
this._y = this._y + (this.yspeed * timeStep);
this._rotation = this._rotation + this.rot;
var _local3 = int(this._x / tw);
var _local2 = int(this._y / th);
if (((((col[_local2][_local3] != 0) || (this._x < ((-fg._x) - (spw * 0.25)))) || (this._x > ((-fg._x) + (spw * 1.25)))) || (this._y < ((-fg._y) - 50))) || (this._y > ((-fg._y) + sph))) {
removeArray(this, this.arr);
}
}
function togglePause() {
if (!gamePaused) {
doPause();
} else {
undoPause();
}
}
function undoPause() {
if (gamePaused) {
setKeys();
toggleBG(true);
toggleEnvironment(true);
if (gamePausedFunction != null) {
onEnterFrame = gamePausedFunction;
gamePausedFunction = null;
}
pauseMenu.removeMovieClip("");
}
gamePaused = false;
mb.start(backgroundmusic, 5, 90);
}
function doPause() {
if (!gamePaused) {
gamePausedFunction = onEnterFrame;
onEnterFrame = null;
pauseMenu = world.createEmptyMovieClip("pauseMenu", 128);
pauseMenu.onEnterFrame = function () {
this.clear();
var _local2 = this._height;
var _local3 = this._width;
this.lineStyle(1, "0x000000", 0);
this.beginFill("0x000000", 75);
this.moveTo(-5, -5);
this.lineTo(_local3 + 5, -5);
this.lineTo(_local3 + 5, _local2 + 5);
this.lineTo(-5, _local2 + 5);
this.endFill();
this._x = (spw - _local3) / 2;
this._y = (sph - _local2) / 2;
};
drawPauseMenu(pauseMenu);
pauseMenu.onEnterFrame();
}
gamePaused = true;
mb.start("sMenuLoop", 5, 100);
}
function toggleBG(notoggle) {
if (!notoggle) {
stats.drawbg = !stats.drawbg;
}
var _local2 = bg._x;
var _local1 = bg._y;
if (stats.drawbg) {
bg = drawMap(world, back, null, "bg", 1, tileset, false);
bg._x = _local2;
bg._y = _local1;
scroll(bg);
} else {
bg = world.createEmptyMovieClip("bg", 1);
bg._x = _local2;
bg._y = _local1;
}
}
function toggleEnvironment(notoggle) {
if (!notoggle) {
stats.drawenvironment = !stats.drawenvironment;
}
var _local2 = bg._x;
var _local1 = bg._y;
environment = fg.createEmptyMovieClip("environment", (w * h) + 3);
if (stats.drawenvironment && (mapenv)) {
if (mapenv & ENVIRONMENT_SNOW) {
setupEnvSnow();
envFrame = envSnow;
} else if (mapenv & ENVIRONMENT_LEAF) {
setupEnvLeaf();
envFrame = envLeaf;
} else {
envFrame = null;
}
} else {
envFrame = null;
}
}
function keys() {
if (KeyisDown(pauseKey)) {
togglePause();
}
}
function endGameFrame() {
if ((egf++) > (frameRate * 2)) {
nextLevelDo();
}
}
function gameFrame() {
if (shouldPause == true) {
doPause();
shouldPause = false;
return(undefined);
}
if (worldTraining) {
timeSink = true;
}
var _local2 = 0;
if (KeyisDown(specialKey)) {
if (KeyisDown(switchKey)) {
if (switchK) {
mouseW = 1;
}
switchK = 0;
} else {
switchK = 1;
}
if (KeyisDown(switchDownKey)) {
if (switchDownK) {
mouseW = -1;
}
switchDownK = 0;
} else {
switchDownK = 1;
}
}
if (KeyisDown(specialKey) && (mouseW)) {
if (tMK) {
tMK = 0;
if (mouseW >= 0) {
timeMode++;
if (timeMode > 2) {
timeMode = 0;
}
} else {
timeMode--;
if (timeMode < 0) {
timeMode = 2;
}
}
stats.ctimemode = timeMode;
mouseW = 0;
}
} else {
tMK = 1;
}
if ((KeyisDown(timeKey) && (player.timeDistortTime > 0)) && (timeKeyD)) {
cSpeed = cSpeed - 0.1;
if (timeMode == 0) {
if (!timeSink) {
player.timeDistortTime--;
}
if (cSpeed < minGameSpeed) {
cSpeed = minGameSpeed;
}
} else if (timeMode == 1) {
if (!timeSink) {
player.timeDistortTime--;
}
_local2 = 1;
if (cSpeed < minGameSpeed) {
if (!timeSink) {
player.timeDistortTime--;
}
cSpeed = minGameSpeed;
}
} else if (timeMode == 2) {
if (!timeSink) {
player.timeDistortTime--;
}
_local2 = 2;
if (cSpeed < 0) {
if (!timeSink) {
player.timeDistortTime = player.timeDistortTime - 2;
}
cSpeed = 0;
}
}
} else {
if (!KeyisDown(timeKey)) {
timeKeyD = true;
}
if (cSpeed < 1) {
if (timeMode == 1) {
_local2 = 1;
} else if (timeMode == 2) {
_local2 = 2;
}
cSpeed = cSpeed + 0.1;
} else {
cSpeed = 1;
moveStep = 0;
}
}
moveStep = moveStep + cSpeed;
var _local1 = 0;
if (moveStep >= 1) {
_local1 = 1;
moveStep = moveStep - 1;
}
entityFrame();
if (cSpeed > 0) {
for (var _local3 in enemyArr) {
enemyArr[_local3].frame(cSpeed, _local1);
}
for (var _local3 in bulletArr) {
bulletArr[_local3].frame(cSpeed, _local1);
}
for (var _local3 in particleArr) {
particleArr[_local3].frame(cSpeed, _local1);
}
for (var _local3 in entityArr) {
entityArr[_local3].frame(cSpeed, _local1);
}
envFrame(cSpeed, _local1);
}
if (_local2) {
for (var _local3 in playerArr) {
playerArr[_local3].frame(1, 1);
}
} else {
for (var _local3 in playerArr) {
playerArr[_local3].frame(cSpeed, _local1);
}
}
if (cam(cSpeed, _local1, 2)) {
scroll(fg);
if (stats.drawbg) {
scroll(bg);
}
}
gametime = gametime + cSpeed;
}
function uncompress(str) {
var _local6 = new Array();
var _local9 = str.split(",");
var _local7 = _local9[0];
var _local11 = _local9[1];
_local9.splice(0, 2);
var _local5 = 0;
while (_local5 < _local9.length) {
var _local4 = _local9[_local5];
if (_local4 < 0) {
_local4 = _local4 * -1;
var _local8 = _local9[_local5 + 1];
var _local3 = 0;
while (_local3 < _local4) {
_local6.push(_local8);
_local3++;
}
_local5++;
} else {
_local6.push(_local4);
}
_local5++;
}
var _local10 = new Array();
var _local2 = 0;
while (_local2 < _local11) {
_local10[_local2] = new Array();
var _local1 = 0;
while (_local1 < _local7) {
_local10[_local2][_local1] = int(_local6[(_local2 * _local7) + _local1]);
_local1++;
}
_local2++;
}
return(_local10);
}
function nextLevel() {
var _local2 = hud.getNextHighestDepth();
var _local1 = hud.attachMovie("levelDisplay", "levelDisplay" + _local2, _local2);
_local1._x = int((spw - _local1._width) / 2);
_local1._y = int((sph - _local1._height) / 2);
_local1.mapd.gotoAndStop(levels[stats.level].mapd + 1);
mb.stop(5);
sb.start("sEndLevel");
egf = 0;
onEnterFrame = endGameFrame;
}
function nextLevelDo() {
if (!worldTraining) {
var _local1 = 0;
while (_local1 < guns.length) {
stats.guns[_local1].ammo = player.guns[_local1].bullets;
_local1++;
}
if (stats.guns[player.cgun].ammo > 0) {
stats.cgun = player.cgun;
} else {
stats.cgun = 2;
}
}
healthbonus = int((player.health / player.maxHealth) * 100);
score = score + healthbonus;
stats.level++;
stats.levels[stats.level] = true;
stats.currentGame = true;
stats.score = score;
stats.gametime = gametime;
endGame();
gotoAndStop ("nextLevel");
}
function death(force) {
gameOver = true;
submitscore = score * 100;
stats.score = score;
stats.gametime = gametime;
stats.totalscore = stats.totalscore + stats.score;
if (stats.highscore < stats.score) {
stats.highscore = stats.score;
}
stats.totaltime = stats.totaltime + stats.gametime;
if (stats.besttime < stats.gametime) {
stats.besttime = stats.gametime;
}
if (!force) {
if ((stats.worsttime > stats.gametime) || (stats.worsttime == 0)) {
stats.worsttime = stats.gametime;
}
}
player.deadfloor = false;
player.frame = playerDeath;
var _local1 = new Color(world);
_local1.setTransform(hitColor);
throwGun(guns[player.cgun].name, player._x + player.w2, player._y + player.h2);
}
function deathDo() {
endGame();
gotoAndStop ("gameOver");
}
function deathFrame() {
moveStep = moveStep + 0.5;
var _local1 = 0;
if (moveStep >= 1) {
_local1 = 1;
moveStep = moveStep - 1;
}
for (var _local2 in enemyArr) {
enemyArr[_local2].frame(cSpeed, _local1);
}
for (var _local2 in bulletArr) {
bulletArr[_local2].frame(cSpeed, _local1);
}
for (var _local2 in particleArr) {
particleArr[_local2].frame(cSpeed, _local1);
}
envFrame(cSpeed, _local1);
for (var _local2 in playerArr) {
playerArr[_local2].frame(cSpeed, _local1);
}
if (cam(cSpeed, _local1, 2)) {
scroll(fg);
if (stats.drawbg) {
scroll(bg);
}
}
gametime = gametime + cSpeed;
}
function startGame(l) {
inGameMenu();
_quality = "low";
stw = Math.ceil(spw / tw);
sth = Math.ceil(sph / th);
gameSpeed = 1;
minGameSpeed = 0.2;
mouseW = 0;
setKeys();
gameOver = false;
stats.currentGame = false;
so.flush();
loadLevel(l);
}
function loadLevel(l) {
var _local1;
if (l >= 0) {
_local1 = levels[l];
} else {
var _local3 = importstring.split("|||");
var _local2 = new Object();
_local2.d = _local3[0];
_local2.c = _local3[1];
_local2.b = _local3[2];
_local2.e = _local3[3];
_local2.t = _local3[4];
_local2.bg = "canyonBG";
_local2.bs = 0;
_local2.s = 0;
_local2.env = 0;
_local1 = _local2;
}
mb.instantStart(_local1.bgm, 125);
mb.start(_local1.bgm, 100, 90);
backgroundmusic = _local1.bgm;
map = uncompress(_local1.d);
col = uncompress(_local1.c);
back = uncompress(_local1.b);
tileset = _local1.t;
mapenv = _local1.env;
world = createEmptyMovieClip("world", 0);
sbg = world.attachMovie(_local1.bg, "sbg", 0);
sbg._x = (sbg._y = -1);
if (stats.drawbg) {
bg = drawMap(world, back, null, "bg", 1, tileset, false);
} else {
bg = world.createEmptyMovieClip("bg", 1);
}
fg = drawMap(world, map, col, "fg", 2, tileset, true);
undergame = fg.createEmptyMovieClip("undergame", 0);
game = fg.createEmptyMovieClip("game", (w * h) + 1);
overgame = fg.createEmptyMovieClip("overgame", (w * h) + 2);
environment = fg.createEmptyMovieClip("environment", (w * h) + 3);
if (stats.drawenvironment && (mapenv)) {
if (mapenv & ENVIRONMENT_SNOW) {
setupEnvSnow();
envFrame = envSnow;
} else if (mapenv & ENVIRONMENT_LEAF) {
setupEnvLeaf();
envFrame = envLeaf;
} else {
envFrame = null;
}
} else {
envFrame = null;
}
heliSpawner = false;
hud = world.attachMovie("HUD", "HUD", 32);
hud.hudscore = score;
cSpeed = 1;
moveStep = 0;
timeMode = stats.ctimemode;
gamePaused = false;
shouldPause = false;
onKeyDown = keys;
baseshake = _local1.bs;
levelScroll = _local1.s;
drawEntities(game, _local1.e);
if (airdrop == true) {
adopy = player._y;
adopx = player._x;
player._y = 0;
player._x = player._x + (spw / 2);
var _local4 = undergame.getNextHighestDepth();
chute = undergame.attachMovie("parachute", "parachute" + _local4, _local4);
chute._x = player._x;
chute._y = player._y;
onEnterFrame = airDropFrame;
player.hudUpdate(1, 1);
player.gotoAndStop("chute");
hud.heli._visible = false;
hud.helis = "";
} else {
onEnterFrame = gameFrame;
}
cam(1, 1, 1);
scroll(fg);
if (stats.drawbg) {
scroll(bg);
}
gotoAndStop ("game");
}
function airDropFrame() {
player._x = player._x - 1;
player._y = player._y + 2;
chute._x = player._x;
chute._y = player._y;
if (player._x < adopx) {
player._x = adopx;
player.gotoAndStop("jump");
player.gunrotation = (player.realgunrotation = 89);
chute.arr = particleArr;
particleArr.push(chute);
chute.frame = function (timeStep, move) {
this._x = this._x - (1 * timeStep);
this._y = this._y - (1 * timeStep);
this._xscale = this._xscale - 1;
if (this._x < (-this._width)) {
removeArray(this, this.arr);
}
};
onEnterFrame = gameFrame;
}
if (cam(cSpeed, move, 2)) {
scroll(fg);
if (stats.drawbg) {
scroll(bg);
}
}
}
function endGame() {
clearMenus();
_quality = "best";
clearInterval(fpsI);
onKeyDown = null;
onEnterFrame = null;
world.removeMovieClip("");
so.flush();
}
function fpsf() {
overlay.fps = "fps: " + overlay.f;
overlay.f = 0;
}
function gunDisplay(string) {
if (stats.drawweaponnames) {
if (gunDisplayClip) {
removeArray(gunDisplayClip, particleArr);
}
var _local1 = addPopUp(hud, 32, 0, 0, string, 0, 0, 16777215, 0, 0, false);
_local1._y = (sph - 30) - _local1._height;
_local1._x = spw - _local1._width;
_local1.frame = timedFrame;
_local1.t = 0;
particleArr.push(_local1);
gunDisplayClip = _local1;
}
}
function displayHelis(num) {
helisshow = hud.createEmptyMovieClip("helisshow", hud.getNextHighestDepth());
var _local2 = helisshow.attachMovie("HelisDisplay", "Display", 0);
var _local4 = _local2._width;
if (num > 0) {
_local2.gotoAndStop(1);
var _local3 = num.toString();
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = helisshow.attachMovie("HelisNumber", "Number" + _local1, _local1 + 1);
_local2.gotoAndStop(_local3.charCodeAt(_local1) - 47);
_local2._x = _local4 + (_local1 * _local2._width);
_local1++;
}
} else {
_local2.gotoAndStop(2);
}
helisshow._x = (spw - helisshow._width) / 2;
helisshow._y = (sph - helisshow._height) / 2;
displayHelisBackup = onEnterFrame;
onEnterFrame = displayHelisCounter;
displayHelisTimer = 0;
mouseD = 0;
}
function displayHelisCounter() {
displayHelisTimer++;
if ((displayHelisTimer > 40) || (mouseD)) {
helisshow.removeMovieClip("");
onEnterFrame = displayHelisBackup;
}
}
function hudUpdate(move) {
if (score > 0) {
if (hud.hudscore < score) {
hud.hudscore = hud.hudscore + 10;
}
if (hud.hudscore > score) {
hud.hudscore = score;
}
hud.score = int(hud.hudscore) + "00";
} else {
hud.hudscore = 0;
hud.score = 0;
}
if (heliSpawner) {
hud.heli._visible = true;
hud.helis = heliSpawnerKilled;
if (heliSpawnerTotal > 0) {
hud.helis = hud.helis + ("/" + heliSpawnerTotal);
}
} else {
hud.heli._visible = false;
hud.helis = "";
}
var _local11 = this.guns[this.cgun].bullets;
if (_local11 != Number.POSITIVE_INFINITY) {
hud.ammo = _local11 + " x";
} else {
hud.ammo = "Infinite x";
}
hud.weapon.gotoAndStop(this.realguns[this.cgun].name);
var _local8 = this.realguns[this.cgun].name;
if (this.lastGunName != _local8) {
this.lastGunName = _local8;
gunDisplay(_local8);
}
var _local10 = 55 + Math.min(45, ((this.guns[this.cgun].reloadtime + moveStep) / this.realguns[this.cgun].reloadtime) * 45);
hud.reload.mask._yscale = _local10;
hud.reload.gfxOff.gotoAndStop("reload");
if (_local10 >= 100) {
hud.reload.gfxOn.gotoAndStop("ready");
} else {
hud.reload.gfxOn.gotoAndStop("reload");
}
var _local9 = Math.min(100, Math.max(0, (this.health / this.maxHealth) * 100));
hud.health.mask._xscale = _local9;
hud.health.gfxOn.gotoAndStop("health");
hud.health.gfxOff.gotoAndStop("health");
hud.port.gotoAndStop(int(_local9));
if (timeMode == 0) {
hud.two.gfxOn.gotoAndStop("timedistort");
hud.two.gfxOff.gotoAndStop("timedistort");
} else if (timeMode == 1) {
hud.two.gfxOn.gotoAndStop("timerift");
hud.two.gfxOff.gotoAndStop("timerift");
} else if (timeMode == 2) {
hud.two.gfxOn.gotoAndStop("timebreak");
hud.two.gfxOff.gotoAndStop("timebreak");
}
hud.two.mask._xscale = (this.timeDistortTime / this.maxTimeDistortTime) * 100;
hud.one._visible = true;
hud.one.gfxOn.gotoAndStop("hyperjump");
hud.one.gfxOff.gotoAndStop("hyperjump");
hud.one.mask._xscale = (this.hyperJumpTime / this.maxHyperJumpTime) * 100;
timeSink = false;
invulnerable = false;
triDamage = false;
var _local5 = 0;
var _local3 = 0;
hud.poweruptext = "";
if (powerups.length > 0) {
var _local4 = new Color(world);
_local4.setTransform(normalColor);
}
for (var _local7 in powerups) {
var _local2 = powerups[_local7];
if (move) {
_local2.t--;
}
if (_local2.t <= 0) {
if (_local2.powerup & POWERUP_TIMESINK) {
timeKeyD = false;
}
removeArrayNoClip(_local2, powerups);
} else {
_local5 = _local5 + _local2.t;
if (_local2.powerup & POWERUP_TIMESINK) {
timeSink = true;
var _local4 = new Color(world);
_local4.setTransform(timeSinkColor);
hud.poweruptext = hud.poweruptext + " TimeSink";
_local3 = _local3 + (frameRate * 10);
} else if (_local2.powerup & POWERUP_INVULNERABLE) {
invulnerable = true;
var _local4 = new Color(world);
_local4.setTransform(invulnerableColor);
hud.poweruptext = hud.poweruptext + " Invulnerable";
_local3 = _local3 + (frameRate * 15);
} else if (_local2.powerup & POWERUP_TRIDAMAGE) {
triDamage = true;
var _local4 = new Color(world);
_local4.setTransform(triDamageColor);
hud.poweruptext = hud.poweruptext + " TriDamage";
_local3 = _local3 + (frameRate * 10);
}
}
}
if (_local3) {
hud.powerup._visible = true;
hud.poweruptime._visible = true;
hud.poweruptime.gfxOn.gotoAndStop("powerup");
hud.poweruptime.gfxOff.gotoAndStop("powerup");
hud.poweruptime.mask._yscale = (_local5 / _local3) * 100;
hud.powerup.gotoAndStop("powerup");
} else {
hud.powerup._visible = false;
hud.poweruptime._visible = false;
}
}
function newPlayer(name, qual) {
var _local6 = new Array();
var _local1 = 0;
while (_local1 < guns.length) {
_local6[_local1] = {unlocked:guns[_local1].unlocked, shotsfired:0, ammo:0};
_local1++;
}
var _local5 = new Array();
_local1 = 0;
while (_local1 < levels.length) {
_local5[_local1] = false;
_local1++;
}
_local5[0] = true;
var _local7 = {name:name, score:0, level:0, drawbg:true, drawenvironment:true, drawbrass:true, drawparticles:true, drawsound:true, drawmusic:true, drawhealthbar:true, drawpoints:true, drawweaponnames:true, drawcoronas:false, weaponswitch:false, leftKey:65, rightKey:68, upKey:87, downKey:83, timeKey:16, specialKey:32, switchKey:69, switchDownKey:81, grenadeKey:70, pauseKey:80, guns:_local6, levels:_local5, cgun:2, ctimemode:0, currentgame:false, gametime:0, shotshit:0, gamesplayed:0, timesplayed:1, totalenemies:0, totalhelis:0, totaltime:0, besttime:0, worsttime:0, totalscore:0, highscore:0};
if (qual < 2) {
(_local7.drawbrass = false);
(_local7.drawenvironment = false);
}
if (qual < 1) {
(_local7.drawbg = false);
(_local7.drawparticles = false);
}
return(_local7);
}
function setKeys() {
leftKey = stats.leftKey;
rightKey = stats.rightKey;
upKey = stats.upKey;
downKey = stats.downKey;
timeKey = stats.timeKey;
switchKey = stats.switchKey;
switchDownKey = stats.switchDownKey;
specialKey = stats.specialKey;
grenadeKey = stats.grenadeKey;
pauseKey = stats.pauseKey;
}
function isShared(so) {
if (so.data.players == undefined) {
return(false);
}
var _local3 = false;
var _local1 = 0;
while (_local1 < so.data.players.length) {
if (so.data.players[_local1] != undefined) {
_local3 = true;
break;
}
_local1++;
}
return(_local3);
}
function addPlayer(so, ob) {
so.data.players.push(ob);
so.data.player = so.data.players.length - 1;
return(ob);
}
function createSharedObject(so) {
so.data.players = new Array();
so.data.player = -1;
so.flush();
}
function getPlayer(so, num) {
var _local1 = so.data.players[num];
if (_local1 == undefined) {
return(null);
}
so.data.player = num;
so.flush();
return(_local1);
}
function getLastPlayer(so) {
return(so.data.players[so.data.player]);
}
function updatePlayer(so) {
so.data.players[so.data.player] = stats;
so.flush();
}
function deleteLastPlayer(so) {
so.data.players.splice(so.data.player, 1);
if (so.data.players.length > 0) {
so.data.player = Math.max(0, so.data.player - 1);
} else {
so.data.player = -1;
}
return(so.data.players.length > 0);
}
function numPlayers(so) {
return(so.data.players.length);
}
function clearSharedObject(so) {
so.clear();
so.data.players = new Array();
so.data.player = -1;
so.flush();
}
function menuSetup(clip) {
clip.i = 0;
}
function menuAddToggle(clip, name, variable) {
var _local2 = clip.attachMovie("MenuToggle", "i_" + clip.i, clip.i);
_local2._y = _local2._height * clip.i;
_local2.name = name;
_local2.variable = variable;
_local2.status = ((stats[variable] == true) ? "On" : "Off");
_local2.onRelease = function () {
stats[this.variable] = !stats[this.variable];
this.status = ((stats[this.variable] == true) ? "On" : "Off");
};
clip.i++;
}
function menuAddToggleTrigger(clip, name, variable) {
var _local2 = clip.attachMovie("MenuToggle", "i_" + clip.i, clip.i);
_local2._y = _local2._height * clip.i;
_local2.name = name;
_local2.variable = variable;
_local2.status = ((stats[variable] == true) ? "On" : "Off");
_local2.onRelease = function () {
stats[this.variable] = !stats[this.variable];
this.status = ((stats[this.variable] == true) ? "On" : "Off");
menuToggle();
};
clip.i++;
}
function menuToggle() {
mb.setActive(stats.drawmusic);
sb.setActive(stats.drawsound);
}
function menuAddSpacer(clip) {
clip.i++;
}
function menuAddButton(clip, name, func) {
var _local1 = clip.attachMovie("MenuOption", "i_" + clip.i, clip.i);
_local1._y = _local1._height * clip.i;
_local1.name = name;
_local1.onRelease = func;
clip.i++;
}
function menuAddLabel(clip, name) {
var _local2 = new TextFormat();
_local2.font = "Arial";
_local2.size = 12;
_local2.color = 16777215 /* 0xFFFFFF */;
clip.createTextField("txt" + clip.i, clip.i, 0, 0, 10, 10);
txt = clip["txt" + clip.i];
txt.embedFonts = true;
txt.selectable = false;
txt.text = name;
txt.setTextFormat(_local2);
txt._height = txt.textHeight * 1.2;
txt._width = txt.textWidth * 1.1;
txt._y = txt._height * clip.i;
clip.i++;
}
function grabKey() {
var _local2 = Key.getCode();
stats[this.variable] = _local2;
this.status = keynames[_local2];
this.onKeyDown = null;
onKeyDown = this.oldKeyDown;
}
function menuAddControl(clip, name, variable) {
var _local2 = clip.attachMovie("MenuToggle", "i_" + clip.i, clip.i);
_local2._y = _local2._height * clip.i;
_local2.name = name;
_local2.variable = variable;
_local2.status = keynames[stats[variable]];
_local2.onPress = function () {
this.oldKeyDown = onKeyDown;
onKeyDown = null;
this.status = "Press a key..";
this.onKeyDown = grabKey;
};
Key.addListener(_local2);
clip.i++;
}
function drawPauseMenu(clip) {
menuSetup(clip);
menuAddLabel(clip, "Pause Menu");
menuAddSpacer(clip);
menuAddButton(clip, "Options", function () {
clearMenu(clip);
drawOptions(clip, false);
clip.onEnterFrame();
});
menuAddButton(clip, "Controls", function () {
clearMenu(clip);
drawControls(clip, false);
clip.onEnterFrame();
});
menuAddButton(clip, "Quit", function () {
clearMenu(clip);
drawQuitConfirm(clip);
clip.onEnterFrame();
});
menuAddSpacer(clip);
menuAddButton(clip, "Continue", function () {
clearMenu(clip);
togglePause();
});
}
function drawOptions(clip, full) {
menuSetup(clip);
if (!full) {
menuAddLabel(clip, "Options");
menuAddSpacer(clip);
}
menuAddToggle(clip, "Draw Background:", "drawbg");
menuAddToggle(clip, "Draw Particles:", "drawparticles");
menuAddToggle(clip, "Draw Environment:", "drawenvironment");
menuAddToggle(clip, "Draw Brass:", "drawbrass");
menuAddToggle(clip, "Draw Coronas:", "drawcoronas");
menuAddToggle(clip, "Draw Enemy Health:", "drawhealthbar");
menuAddToggle(clip, "Draw Point Popups:", "drawpoints");
menuAddToggle(clip, "Draw Weapon Names:", "drawweaponnames");
menuAddToggleTrigger(clip, "Music:", "drawmusic");
menuAddToggleTrigger(clip, "Sound:", "drawsound");
menuAddToggle(clip, "Auto Weapon Switch:", "weaponswitch");
menuAddSpacer(clip);
if (!full) {
menuAddButton(clip, "Back", function () {
clearMenu(clip);
drawPauseMenu(clip);
clip.onEnterFrame();
});
}
}
function drawControls(clip, full) {
menuSetup(clip);
if (full) {
menuAddLabel(clip, "Controls: (Click to change)");
} else {
menuAddLabel(clip, "Controls (Click to change)");
menuAddSpacer(clip);
}
menuAddControl(clip, "Move Left", "leftKey");
menuAddControl(clip, "Move Right", "rightKey");
menuAddControl(clip, "Jump", "upKey");
menuAddControl(clip, "Crouch", "downKey");
menuAddControl(clip, "TimeDistort", "timeKey");
menuAddControl(clip, "Next Weapon", "switchKey");
menuAddControl(clip, "Previous Weapon", "switchDownKey");
menuAddControl(clip, "Modify", "specialKey");
menuAddControl(clip, "Grenade Switch", "grenadeKey");
menuAddControl(clip, "Pause Menu", "pauseKey");
menuAddSpacer(clip);
if (!full) {
menuAddButton(clip, "Back", function () {
clearMenu(clip);
drawPauseMenu(clip);
clip.onEnterFrame();
});
}
}
function drawQuitConfirm(clip) {
menuAddLabel(clip, "Are you sure you want to quit?");
menuAddSpacer(clip);
menuAddLabel(clip, "This will end current game and");
menuAddLabel(clip, "you will not be able to continue.");
menuAddSpacer(clip);
menuAddButton(clip, "Quit", function () {
clearMenu(clip);
togglePause();
death(true);
});
menuAddButton(clip, "Back", function () {
clearMenu(clip);
drawPauseMenu(clip);
clip.onEnterFrame();
});
}
function clearMenu(clip) {
var _local1 = 0;
while (_local1 < clip.i) {
clip["i_" + _local1].removeMovieClip("");
_local1++;
}
clip.i = 0;
}
function resetSurvival() {
score = 0;
stats.score = 0;
stats.level = 0;
var _local1 = 0;
while (_local1 < stats.levels.length) {
if (stats.levels[_local1]) {
stats.level = _local1;
}
_local1++;
}
gametime = 0;
stats.gametime = 0;
stats.gamesplayed++;
stats.currentGame = false;
_local1 = 0;
while (_local1 < guns.length) {
stats.guns[_local1].ammo = 0;
_local1++;
}
stats.guns[0].ammo = Number.POSITIVE_INFINITY;
stats.guns[1].ammo = Number.POSITIVE_INFINITY;
stats.guns[2].ammo = Number.POSITIVE_INFINITY;
stats.guns[3].ammo = Number.POSITIVE_INFINITY;
stats.guns[gunsGren].ammo = guns[gunsGren].clip;
stats.cgun = 3;
}
function resumeSurvival() {
score = stats.score;
gametime = stats.gametime;
}
function inGameMenu() {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
var _local4 = new ContextMenuItem("Heli Attack 3", function () {
});
var _local3 = new ContextMenuItem("Pause Menu", togglePause);
_local3.separatorBefore = true;
_local2.customItems.push(_local4);
_local2.customItems.push(_local3);
_root.menu = _local2;
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y2 - y1) * (y2 - y1))));
}
function attachFlare(clip, x, y, vx, vy, perc, frame, scale, rot, perc2) {
perc = perc * perc2;
var _local2 = clip.getNextHighestDepth();
var _local1 = clip.attachMovie("flare", "flare" + _local2, _local2);
_local1._x = x + (vx * perc);
_local1._y = y + (vy * perc);
_local1.gotoAndStop(frame);
_local1._xscale = (_local1._yscale = scale);
_local1._rotation = rot;
}
function drawLenseFlare(clip, depth, x, y, perc, alp) {
var _local2 = clip.createEmptyMovieClip("lenseFlare" + depth, depth);
var _local1 = (360 - ((Math.atan2((spw / 2) - x, (sph / 2) - y) * 180) / Math.PI)) + 90;
var _local7 = dist(x, y, spw / 2, sph / 2);
var _local4 = 1 * Math.cos(_local1 * pi180);
var _local3 = 1 * Math.sin(_local1 * pi180);
attachFlare(_local2, x, y, _local4, _local3, 0, 1, 100, _local1 * 2, perc);
attachFlare(_local2, x, y, _local4, _local3, -0.4 * _local7, 2, 70, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 0.3 * _local7, 1, 30, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, -0.7 * _local7, 4, 40, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 2.1 * _local7, 2, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.9 * _local7, 3, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, -0.3 * _local7, 3, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 0.5 * _local7, 4, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 0.8 * _local7, 4, 140, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.3 * _local7, 5, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.1 * _local7, 5, 120, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 2.7 * _local7, 6, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 0.7 * _local7, 2, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.2 * _local7, 6, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, -0.65 * _local7, 6, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.5 * _local7, 3, 100, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.7 * _local7, 4, 50, _local1, perc);
attachFlare(_local2, x, y, _local4, _local3, 1.8 * _local7, 1, 25, _local1, perc);
_local2._alpha = alp;
return(_local2);
}
function attachEnvFlare(t, targ) {
if (stats.drawcoronas) {
var _local2 = hud.getNextHighestDepth();
var _local1 = {clip:hud, dep:_local2, flare:t, frame:envFlareFrame, targ:targ, bit:0};
_local1.frame(1, true);
playerArr.push(_local1);
}
}
function envFlareFrame(timeStep, move) {
if (move) {
this.flare--;
this.bit = 0;
} else {
this.bit = this.bit + timeStep;
}
if (this.targ._x != undefined) {
this.x = this.targ._x + fg._x;
this.y = this.targ._y + fg._y;
} else if (this.flare > 10) {
this.flare = 10;
}
var _local3 = this.x;
var _local2 = this.y;
if (this.flare > 10) {
this.lf = drawLenseFlare(this.clip, this.dep, _local3, _local2, 1, 100);
} else if ((this.flare < 11) && (this.flare > 0)) {
var _local4 = (10 - (this.flare - this.bit)) / 10;
this.lf = drawLenseFlare(this.clip, this.dep, _local3, _local2, 1 + _local4, (this.flare - this.bit) * 10);
} else {
this.lf.removeMovieClip("");
removeArrayNoClip(this, playerArr);
}
}
OUT_LEFT = 1;
OUT_TOP = 2;
OUT_RIGHT = 4;
OUT_BOTTOM = 8;
MovieClip.prototype.scale = function (n) {
this._xscale = (this._yscale = n);
};
MovieClip.prototype.drawButton = function (col, alf) {
var _local3 = this._width;
var _local2 = this._height;
this.clear();
this.lineStyle(0, 0, 0);
this.beginFill(col, alf);
this.moveTo(0, 0);
this.lineTo(_local3, 0);
this.lineTo(_local3, _local2);
this.lineTo(0, _local2);
this.lineTo(0, 0);
this.endFill();
};
sign = function (i) {
if (i > 0) {
return(1);
}
if (i < 0) {
return(-1);
}
return(0);
};
var sb = new SoundBoard(_root, 32, true);
var sbt = new SoundBoardTransform(sb);
var mb = new MusicBoard(sb, sbt, true);
sb.attachSound("sIntro", true);
sb.attachSound("sMenuLoop", true);
sb.attachSound("sLevelLoopHardcore", true);
sb.attachSound("sLevelLoopEvil", true);
sb.attachSound("sLevelLoopJungle", true);
sb.attachSound("sLevelSelectLoop", true);
sb.attachSound("sLevelLoopTraining", true);
sb.attachSound("sEndLevel", true);
sb.attachSound("sABomb");
sb.attachSound("sAirstrike");
sb.attachSound("sAirstrikeCall");
sb.attachSound("sBigExplosion");
sb.attachSound("sBlackhole");
sb.attachSound("sBladerang");
sb.attachSound("sBullet");
sb.attachSound("sBulletSmall0");
sb.attachSound("sBulletSmall1");
sb.attachSound("sBulletSmall2");
sb.attachSound("sBulletSmall3");
sb.attachSound("sFlame");
sb.attachSound("sGooGun");
sb.attachSound("sGooHit");
sb.attachSound("sTaser");
sb.attachSound("sGrenade");
sb.attachSound("sKnife");
sb.attachSound("sLaser");
sb.attachSound("sRailgun");
sb.attachSound("sRocketlauncher");
sb.attachSound("sShotgun");
sb.attachSound("sExplosion");
sb.attachSound("sSoundwaave");
sb.attachSound("sSparkplug");
sb.attachSound("sPlayerHit");
sb.attachSound("sHyperJump");
sb.attachSound("sHeli");
sb.attachSound("sMetal0");
sb.attachSound("sMetal1");
sb.attachSound("sMetal2");
sb.attachSound("sMetal3");
sb.attachSound("sPickup");
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((num >> ((j * 8) + 4)) & 15) + hex_chr.charAt((num >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((((str.length * 8) + i) % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((((str.length * 8) + i) % 4) * 8));
var _local2 = str.length * 8;
blks[(nblk * 16) - 2] = _local2 & 255;
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 8) & 255) << 8);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 16) & 255) << 16);
blks[(nblk * 16) - 2] = blks[(nblk * 16) - 2] | (((_local2 >>> 24) & 255) << 24);
return(blks);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, c), bitAND(~b, d)), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
stop();
var hex_chr = "0123456789abcdef";
pi180 = (Math.PI/180);
KeyisDown = Key.isDown;
keynames = ["0", "1", "2", "3", "4", "5", "6", "7", "Backspace", "Tab", "10", "11", "Center", "Enter", "14", "15", "Shift", "Control", "Alt", "Pause", "Caps Lock", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "Space", "Page Up", "Page Down", "End", "Home", "Left", "Up", "Right", "Down", "41", "42", "43", "44", "Insert", "Delete", "47", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "58", "59", "60", "61", "62", "63", "64", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Windows", "Windows", "Menu", "94", "95", "Num 0", "Num 1", "Num 2", "Num 3", "Num 4", "Num 5", "Num 6", "Num 7", "Num 8", "Num 9", "Num *", "Num +", "108", "Num -", "Num .", "Num /", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "124", "125", "126", "127", "128", "129", "130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "140", "141", "142", "143", "Num Lock", "Scroll Lock", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", "160", "161", "162", "163", "164", "165", "166", "167", "168", "169", "170", "171", "172", "173", "174", "175", "176", "177", "178", "179", "180", "181", "182", "183", "184", "185", ";", "+", ",", "-", ".", "/", "~", "193", "194", "195", "196", "197", "198", "199", "200", "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "[", "\\", "]", "'", "223", "224", "225", "226", "227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", "253", "254", "255"];
UP = 1;
DOWN = 2;
LEFT = 4;
RIGHT = 8;
SLIDE = 16;
CLIMB = 32;
ANGLEUP = 64;
ANGLEDOWN = 128;
SOFTANGLEUPSTART = 256;
SOFTANGLEUPEND = 512;
SOFTANGLEDOWNSTART = 1024;
SOFTANGLEDOWNEND = 2048;
BREAKABLE = 4096;
FALLTHROUGH = 8192;
PUSHUP = 16384;
PLAYERSTART = 1;
ENEMY = 2;
HELISPAWNER = 4;
TARGETSPAWNER = 8;
TARGET = 16;
HELPER = 32;
BUTTON = 64;
LEVELFLAG = 128;
ENEMYSPAWNER = 256;
PICKUP = 512;
AIRDROP = 16;
TRAINING = 32;
ENEMY_WALKER = 1;
ENEMY_DRONE = 2;
ENEMY_SNIPER = 4;
ENEMY_HELI = 8;
ENEMY_HELI2 = 16;
ENEMY_HELI3 = 32;
ENEMY_CRITTER = 64;
ENEMY_DROPITEM = 128;
HELPER_HIDDEN = 1;
HELPER_ONCE = 2;
BUTTON_HIDDEN = 1;
BUTTON_SHOOT = 2;
BUTTON_SPENT = 4;
DESTRUCTO_CRUMBLE = 1;
DESTRUCTO_EXPLODE = 2;
DESTRUCTO_FADE = 4;
ENVIRONMENT_SNOW = 1;
ENVIRONMENT_LEAF = 2;
POWERUP_TIMESINK = 1;
POWERUP_INVULNERABLE = 2;
POWERUP_TRIDAMAGE = 4;
gunsGren = 2;
guns = new Array();
guns[0] = {name:"Knife", gun:knife, reloadtime:15, recoil:0, recoiltime:15, speed:20, damage:50, aim:0, flash:0, clip:Number.POSITIVE_INFINITY, unlocked:true, info:"A simple melee weapon and the last line of defense, it does high damage for it's reload time, however you must be extremely close to the enemy for it to do damage"};
guns[1] = {name:"Bow&Arrow", gun:bowArrow, reloadtime:20, recoil:-5, recoiltime:10, speed:12, damage:30, aim:6, flash:0, clip:Number.POSITIVE_INFINITY, unlocked:false, info:"A primitive weapon, it does good damage, but it is hard to aim"};
guns[2] = {name:"Grenade", gun:grenade, reloadtime:20, recoil:-50, recoiltime:12, speed:12, damage:50, aim:2, flash:0, clip:25, unlocked:true, info:"The basic explosive weapon, does high damage, but is hard to aim. After the initial damage, the explosion itself will also damage an enemy"};
guns[3] = {name:"Pistol", gun:machineGun, reloadtime:8, recoil:10, recoiltime:6, speed:10, damage:10, aim:4, flash:1, clip:Number.POSITIVE_INFINITY, unlocked:true, info:"The work-horse of weapons. Good damage, fast reload and easy to aim. The Pistol is usually the most used weapon in a soldiers arsenal"};
guns[4] = {name:"MachineGun", gun:machineGun, reloadtime:5, recoil:5, recoiltime:3, speed:10, damage:10, aim:2, flash:2, clip:150, unlocked:true, info:"Fast firing, good damage and fast reload. A great all purpose weapon."};
guns[5] = {name:"AkimboMac10's", gun:mac10, reloadtime:4, recoil:4, recoiltime:2, speed:10, damage:8, aim:10, flash:8, clip:75, unlocked:true, info:"For the action movie fan, fast firing, two bullets per shot"};
guns[6] = {name:"ChainGun", gun:machineGun, reloadtime:2, recoil:3, recoiltime:2, speed:10, damage:10, aim:6, flash:5, clip:100, unlocked:false, info:"Fires bullets faster than any other gun, has high recoil so aim carefully"};
guns[7] = {name:"Shotgun", gun:shotGun, reloadtime:25, recoil:15, recoiltime:15, speed:10, damage:15, aim:0, flash:3, clip:20, unlocked:true, info:"Shoots 4 bullets at once, aim carefully, they spread"};
guns[8] = {name:"DoubleShotgun", gun:doubleShotGun, reloadtime:35, recoil:20, recoiltime:15, speed:10, damage:10, aim:0, flash:4, clip:15, unlocked:false, info:"The super shotgun! Shoots 8 bullets at once with heavy spread"};
guns[9] = {name:"SniperRifle", gun:sniperGun, reloadtime:20, recoil:30, recoiltime:25, speed:75, damage:75, aim:0, flash:5, clip:12, unlocked:false, info:"Super accurate weapon with laser sight, almost impossible to miss with"};
guns[10] = {name:"GrenadeLauncher", gun:grenadeLauncher, reloadtime:30, recoil:30, recoiltime:20, speed:18, damage:75, aim:4, flash:10, clip:15, unlocked:true, info:"Fires grenades at moderate speeds with an arc, aim carefully. Great for taking out ground troops"};
guns[11] = {name:"RPG", gun:RPG, reloadtime:25, recoil:35, recoiltime:25, speed:1, damage:85, aim:4, flash:10, clip:15, unlocked:true, info:"Rocket Propelled Grenades, for when you need a grenade to get there on time. The grenade leaves the gun at a very low speed, but accelerates to incredible speeds"};
guns[12] = {name:"FlakCannon", gun:flakCannon, reloadtime:50, recoil:50, recoiltime:30, speed:7, damage:13, aim:20, flash:10, clip:12, unlocked:false, info:"Shoots 10 seperate pieces of flak at random speeds and trajectories. Extremely hard to aim with, get up close to do maximum damage"};
guns[13] = {name:"RocketLauncher", gun:rocketLauncher, reloadtime:50, recoil:50, recoiltime:30, speed:6, damage:100, aim:0, flash:6, clip:11, unlocked:true, info:"The standard launcher, shoots slow straight firing rockets"};
guns[14] = {name:"SeekerLauncher", gun:seekerLauncher, reloadtime:60, recoil:50, recoiltime:30, speed:6, damage:100, aim:0, flash:6, clip:7, unlocked:true, info:"Shoots rockets which automatically seek the closest enemy, almost guaranteed to hit"};
guns[15] = {name:"DrunkenLauncher", gun:drunkenLauncher, reloadtime:60, recoil:50, recoiltime:30, speed:6, damage:50, aim:0, flash:6, clip:6, unlocked:false, info:"Fires 3 drunken rockets that fly around randomly, very hard to aim"};
guns[16] = {name:"GuidedLauncher", gun:guidedLauncher, reloadtime:60, recoil:50, recoiltime:30, speed:6, damage:100, aim:0, flash:6, clip:9, unlocked:false, info:"Guided rockets are special, fire them and they follow where you aim, keep your aim on an enemy, and it will aim to it"};
guns[17] = {name:"ShotgunRockets", gun:shotGunRockets, reloadtime:40, recoil:30, recoiltime:20, speed:7, damage:25, aim:0, flash:9, clip:7, unlocked:true, info:"Fires three small rockets, a devastating weapon"};
guns[18] = {name:"FlameThrower", gun:flameThrower, reloadtime:2, recoil:1, recoiltime:1, speed:8, damage:2, aim:10, flash:7, clip:150, unlocked:true, info:"For when you want to make toast from your enemies. Does its damage over its entire life, but does less damage the bigger the flame"};
guns[19] = {name:"SparkPlug", gun:sparkPlug, reloadtime:15, recoil:20, recoiltime:10, speed:10, damage:30, aim:0, flash:11, clip:30, unlocked:false, info:"Shoots two sparks which do equal damage"};
guns[20] = {name:"GooGun", gun:gooGun, reloadtime:10, recoil:10, recoiltime:10, speed:8, damage:50, aim:5, flash:16, clip:40, unlocked:false, info:"Goo is a strange substance, it will stick to the ground and do damage to anything that walks over it. Very hard to use against airborne targets, but does extreme amounts of damage"};
guns[21] = {name:"Bladerang", gun:bladerang, reloadtime:50, recoil:50, recoiltime:30, speed:1, damage:20, aim:2, flash:10, clip:7, unlocked:false, info:"An extremely tricky gun to use, the projectile fires out forwards but soon returns like a boomerang. Aim it carefully, and you can hit your enemy twice!"};
guns[22] = {name:"LaserRifle", gun:laserGun, reloadtime:16, recoil:10, recoiltime:10, speed:50, damage:30, aim:2, flash:13, clip:25, unlocked:false, info:"The laser is one of the fastest moving projectiles, and it will pass through multiple enemies. It can do its damage multiple times to the same enemy"};
guns[23] = {name:"AutoLaserRifle", gun:laserGun, reloadtime:8, recoil:10, recoiltime:10, speed:50, damage:20, aim:10, flash:14, clip:25, unlocked:false, info:"Shoots lasers faster than the standard rifle, but is very innacurate"};
guns[24] = {name:"ShotgunLasers", gun:laserShotGun, reloadtime:30, recoil:30, recoiltime:15, speed:50, damage:20, aim:0, flash:15, clip:12, unlocked:false, info:"Fires 3 lasers at once, in a large spread pattern"};
guns[25] = {name:"RailGun", gun:railGun, reloadtime:75, recoil:40, recoiltime:20, speed:500, damage:200, aim:0, flash:0, clip:6, unlocked:true, info:"Instant rail delivery. Fires depleted uranium slugs at near light-speed. If your aim is correct it is guaranteed to hit, even through walls"};
guns[26] = {name:"Anytime", gun:anytime, reloadtime:150, recoil:50, recoiltime:30, speed:100, damage:130, aim:4, flash:17, clip:5, unlocked:false, info:"It has been done, an upgraded railgun! Anytime fires similar slugs to the railgun, but they detonate when they come in contact with an enemy and do more damage. This added explosive power slows the shots down enough to be seen in slowed time"};
guns[27] = {name:"AirStrike", gun:airStrike, reloadtime:40, recoil:-10, recoiltime:5, speed:0, damage:0, aim:0, flash:0, clip:4, unlocked:false, info:"While this device does no damage by itself, it calls down an airstrike which bombards the field with rockets which do high damage each"};
guns[28] = {name:"Taser", gun:taser, reloadtime:200, recoil:10, recoiltime:10, speed:30, damage:5, aim:0, flash:0, clip:2, unlocked:true, info:"A large socket is fired at high speeds, when it comes in contact with an enemy, the Taser fires electricity over time that shocks the enemy. If the taser is attached to an enemy, it is guaranteed to kill them"};
guns[29] = {name:"Soundwaave", gun:soundwaave, reloadtime:10, recoil:10, recoiltime:10, speed:15, damage:10, aim:0, flash:18, clip:30, unlocked:false, info:"Uber bass! Fires large waves of sound which do constant damage to enemies, and also shoots through walls"};
guns[30] = {name:"A-BombLauncher", gun:aBombLauncher, reloadtime:300, recoil:80, recoiltime:40, speed:4, damage:500, aim:0, flash:6, clip:3, unlocked:false, info:"U235 harnessed in the worst possible way. Fires extremely slow moving projectiles, that do incredible amounts of damage. The explosion fallout does equally high damage also"};
guns[31] = {name:"BlackHoleGenerator", gun:blackHoleGenerator, reloadtime:600, recoil:100, recoiltime:50, speed:0, damage:0, aim:0, flash:12, clip:1, unlocked:false, info:"The ultimate weapon. Nothing commands as much fear as this weapon. It fires a microsized black-hole which will suck up all enemies that come in contact with it"};
gunsHyper = [4, 25];
levels = new Array();
levels[0] = {d:"104,20,41,-37,33,40,41,-9,33,40,41,-29,33,40,13,41,-20,33,40,38,-14,0,30,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,39,-14,0,29,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-14,0,29,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-14,0,29,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-14,0,29,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,39,-14,0,29,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-14,0,29,-22,0,31,38,-9,0,31,38,-16,0,8,9,10,-10,0,31,13,38,-20,0,31,39,-14,0,28,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-14,0,27,-22,0,31,38,-9,0,31,38,-29,0,31,13,38,-20,0,31,39,-37,0,34,37,-9,0,31,38,-29,0,31,13,38,-20,0,31,38,-13,0,48,43,51,-15,0,48,42,63,-14,0,31,38,-29,0,31,13,38,-20,0,31,38,-13,0,31,13,38,-15,0,31,13,60,-14,0,34,37,-29,0,31,13,38,-20,0,31,38,-8,0,48,42,43,42,42,49,13,39,-15,0,31,13,60,-8,0,48,42,63,-34,0,31,13,38,-20,0,31,50,42,44,-3,42,43,42,44,49,16,-5,13,38,-10,0,62,42,43,42,42,49,13,60,-8,0,31,13,60,-34,0,32,13,39,-20,0,31,14,-11,13,14,16,13,15,50,42,43,51,-7,0,56,-6,13,60,-8,0,31,13,60,-34,0,35,33,36,-20,0,31,-5,13,15,-5,13,14,-7,13,38,-7,0,56,-6,13,60,-8,0,31,13,60,-7,0,2,3,46,43,47,6,-15,0,30,-5,0,65,66,64,-15,0,48,42,43,42,42,49,-7,13,16,15,-5,13,15,13,13,16,13,38,-7,0,56,-6,13,50,-6,42,43,42,49,13,61,-5,0,2,3,-6,13,6,-13,0,30,28,-5,0,66,64,65,-10,0,48,42,43,42,42,49,16,-3,13,15,-3,13,15,-15,13,38,0,0,48,43,51,0,0,56,-17,13,60,-3,0,2,3,-9,13,6,-5,0,7,-5,0,7,27,27,-5,0,65,66,64,-5,0,48,42,43,42,42,49,-23,13,15,-5,13,50,42,42,49,13,50,42,42,49,-17,13,50,42,43,42,49,-10,13,50,44,42,43,44,42,43,42,42,43,-3,42,44,43,42,42,43,-7,42,43,42,42,49,-6,13,15,-5,13,14,13,13", c:"104,20,-105,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-16,0,-3,15,-10,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-14,0,15,-22,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-37,0,15,15,-9,0,15,15,-29,0,-3,15,-20,0,15,15,-13,0,-3,15,-15,0,15,15,47,-14,0,15,15,-29,0,-3,15,-20,0,15,15,-13,0,-3,15,-15,0,15,15,47,-14,0,15,15,-29,0,-3,15,-20,0,15,15,-8,0,-8,15,-15,0,15,15,47,-8,0,15,15,47,-34,0,-3,15,-20,0,-18,15,-10,0,47,-6,15,47,-8,0,15,15,47,-34,0,-3,15,-20,0,-21,15,-7,0,47,-6,15,47,-8,0,15,15,47,-34,0,-3,15,-20,0,-21,15,-7,0,47,-7,15,-8,0,15,15,47,-7,0,256,512,16385,15,16385,144,-15,0,15,-5,0,-3,4111,-15,0,-7,15,-19,4111,-7,0,47,-17,15,47,-5,0,256,512,16385,-4,15,16385,144,-13,0,15,15,-5,0,-3,4111,-10,0,-12,15,-19,4111,0,0,-3,15,0,0,-19,15,-3,0,256,512,16385,-7,15,16385,144,-5,0,15,-5,0,-3,15,-5,0,-3,4111,-5,0,-120,15", b:"44,20,-14,0,67,69,-20,0,67,69,-20,0,73,75,-20,0,73,75,-52,0,67,69,-20,0,67,69,-20,0,73,75,-4,0,67,69,-14,0,73,75,-4,0,67,69,-20,0,73,75,-6,0,67,69,-12,0,73,75,-6,0,67,69,-20,0,73,75,-20,0,73,75,-97,0,67,69,-10,0,67,69,-8,0,67,69,-10,0,67,69,-8,0,73,75,-5,0,67,69,-3,0,73,75,-8,0,73,75,-5,0,67,69,-3,0,73,75,-5,0,67,69,-8,0,73,75,-10,0,67,69,-8,0,73,75,-10,0,73,75,-20,0,73,75,-69,0,67,69,-7,0,67,69,-11,0,67,69,-7,0,67,69,-11,0,73,75,-7,0,70,72,-11,0,73,75,-7,0,70,72,-10,0,67,68,69,-7,0,73,75,0,67,69,-7,0,67,68,69,-7,0,73,75,0,67,69,0,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70", e:"1,1,13,32|8,74,15,0|8,66,17,0|8,66,11,0|8,74,9,0|32,6,13,0,Jump to get up here\n(Default W)|32,11,12,0,Hold Jump to jump higher|32,14,10,0,Crouch to get through here\n(Default S)|32,23,17,0,Jump into this wall to start climbing\nPress Jump and Left/Right to\njump off walls while climbing|32,47,18,0,Simply walk up angled floors|32,56,15,0,Crouch to slide down certain angled floors|32,29,13,0,You can jump twice while your mid-air\nTriple jump over this wall|32,77,18,0,Some walls can be destroyed|32,63,18,0,Aim with the mouse and Click to shoot|32,69,18,0,Change weapons with the Buttons or Mouse Wheel\n(Default Q & E)|32,111,18,0,Walk over a button to activate it|32,90,17,0,You can change your controls\nselect options or quit at\nany time in the Pause Menu\n(Default P)|32,95,16,0,Touch the flag to finish your training|32,85,18,0,Use the TimeDistort button\nto trigger time powers\n(Default Shift)\nHold Modify and change weapon\nto change time powers\n(Default Space + Q or E)|512,2,19,6,1|512,68,6,12|128,100,15,0|32,1,13,0,Press Left and Right to move\n(Default A & D)|32,41,16,0,Hold Modify and press Jump to HyperJump\n(Default Space + W)\nHold Jump to HyperJump higher", t:"trainingTiles", bg:"trainingBG", bs:0, s:0, env:0, name:"Training Zone", gunUnlock:-1, bgm:"sLevelLoopTraining", mapd:0, mapdx:26, mapdy:10};
levels[1] = {d:"42,20,-589,0,81,82,83,-7,0,84,-3,0,79,80,-9,0,81,82,83,-9,0,79,80,-3,0,95,96,97,-7,0,98,-3,0,93,94,-9,0,95,96,97,-9,0,93,94,-3,0,109,110,111,84,-6,0,112,-3,0,107,108,84,-7,0,84,109,110,111,-5,0,86,87,91,0,107,108,-4,0,124,125,98,-6,0,112,-3,0,121,122,98,-7,0,98,0,124,125,-4,0,53,55,90,102,0,121,122,0,0,34,36,31,29,31,33,36,31,32,33,34,35,36,38,0,121,122,112,-7,0,112,0,124,37,33,35,36,38,113,114,50,52,37,31,33,35,34,71,72,1,74,1,57,58,1,75,76,77,78,1,46,33,36,31,32,31,29,31,32,33,35,34,35,36,31,45,75,76,77,46,33,35,34,36,45,71,72,1,1", c:"42,20,-706,0,15,15,-39,0,-3,15,-6,0,-14,15,-14,0,-56,15", b:"56,20,-513,0,81,82,83,-12,0,79,80,-11,0,81,82,83,-12,0,79,80,-11,0,95,96,97,-12,0,93,94,-11,0,95,96,97,-12,0,93,94,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112", e:"1,0,17,16|4,0,17,-1,6,2", t:"snowTiles", bg:"snowBG", bs:0, s:0, env:ENVIRONMENT_SNOW, name:"Zone 1-1", gunUnlock:1, bgm:"sLevelLoopHardcore", mapd:1, mapdx:85, mapdy:8};
levels[2] = {d:"42,20,-586,0,82,83,0,0,84,-36,0,95,96,97,0,0,98,-10,0,84,-12,0,84,-12,0,109,110,111,0,0,112,0,0,99,86,87,91,-4,0,98,-12,0,98,-13,0,124,125,35,34,36,30,38,53,55,50,51,52,-3,0,112,-3,0,86,87,86,87,91,-4,0,112,-13,0,124,125,15,75,78,15,64,113,114,115,116,37,32,29,31,30,31,38,53,55,115,114,50,51,52,-3,0,112,-4,0,37,32,32,29,38,-4,0,124,125,71,72,1,74,46,33,34,35,36,45,77,78,1,71,72,46,31,32,33,34,34,36,31,29,30,31,32,30,33,35,36,45,-3,15,46,33,34,35,36,29,31", c:"42,20,-678,0,15,15,-34,0,-10,15,-7,0,-4,15,-21,0,-23,15,-8,0,-5,15,-6,0,-42,15", b:"56,20,-513,0,81,82,83,-12,0,79,80,-11,0,81,82,83,-12,0,79,80,-11,0,95,96,97,-12,0,93,94,-11,0,95,96,97,-12,0,93,94,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112", e:"1,0,16,0|4,0,16,-1,9,2|256,13,17,64,1000|256,26,18,64,1000", t:"snowTiles", bg:"snowBG", bs:0, s:0, env:ENVIRONMENT_SNOW, name:"Zone 1-2", gunUnlock:6, bgm:"sLevelLoopHardcore", mapd:1, mapdx:87, mapdy:11};
levels[3] = {d:"50,20,-602,0,84,-49,0,98,-49,0,112,-31,0,79,80,-16,0,112,-12,0,3,4,32,9,10,0,0,86,87,68,69,-8,0,93,94,-5,0,84,-7,0,79,31,29,32,32,31,32,31,38,-6,0,37,17,71,72,23,24,40,41,103,50,51,54,51,52,86,87,91,-3,0,107,108,-5,0,98,-7,0,93,57,58,-5,1,12,13,27,13,42,13,13,14,71,72,46,59,49,0,88,89,90,105,0,0,99,103,50,54,52,0,0,121,122,-5,0,112,-4,0,86,87,105,107,-4,1,71,72,1,62,0,0,39,38,0,0,67,59,1,1,64,0,0,113,114,101,116,0,0,113,114,115,116,-3,0,121,122,0,3,4,31,29,31,48,0,0,113,114,115,116,121,1,75,76,77,77,78,1,63,-3,0,65,46,30,45,73,1,60,46,32,33,36,31,92,29,33,34,36,31,92,31,32,29,31,31,30,31,17,18,71,72,1,47,33,34,35,34,36,29,31", c:"50,20,-765,0,272,528,16385,1040,2064,0,0,15,15,-26,0,-8,15,-6,0,-16,15,-20,0,-12,15,8193,8193,-6,15,0,0,-10,15,-14,0,15,15,0,0,-12,15,0,0,-5,4111,-3,0,-8,15,-7,0,272,528,16385,15,16385,144,-3,0,15,15,0,0,-50,15", b:"56,20,-513,0,81,82,83,-12,0,79,80,-11,0,81,82,83,-12,0,79,80,-11,0,95,96,97,-12,0,93,94,-11,0,95,96,97,-12,0,93,94,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112", e:"1,0,15,0|4,0,15,-1,12,2|512,20,18,19|256,11,16,64,1000|256,34,18,64,1000|256,27,15,64,1000|", t:"snowTiles", bg:"snowBG", bs:0, s:0, env:ENVIRONMENT_SNOW, name:"Zone 1-3", gunUnlock:8, bgm:"sLevelLoopHardcore", mapd:1, mapdx:90, mapdy:7};
levels[4] = {d:"45,20,-583,0,84,-9,0,84,-12,0,81,82,83,-5,0,79,80,-12,0,98,-9,0,98,0,84,-10,0,95,96,97,-5,0,93,94,-12,0,112,-9,0,112,0,98,-10,0,109,110,111,-5,0,107,108,-12,0,112,0,34,35,36,31,29,9,10,0,112,0,112,-9,0,84,0,124,125,-4,0,84,121,122,-7,0,3,4,29,33,34,35,36,1,15,57,58,15,23,24,33,35,36,29,31,48,-7,0,98,0,124,125,84,-3,0,98,121,122,0,2,33,36,29,30,31,17,18,1,15,1,57,58,71,72,1,15,61,74,1,59,1,71,72,1,46,33,34,35,34,36,9,10,112,0,124,125,98,3,4,31,29,31,33,36,16,59,74,75,77,78,1,1,15,71,72,15,1,1,75,76,77,78,15,1,73,1,74,15,1,15,1,60,1,74,1,23,24,33,34,35,34,36,17,18,71,72,1,74,1,15,73,15,1,60,1,15,1,61,-3,1,76", c:"45,20,-720,0,-4,15,16385,1040,2064,-31,0,272,528,16385,-15,15,16385,144,-19,0,80,16385,-28,15,16385,1040,2064,-5,0,272,528,16385,-62,15", b:"56,20,-513,0,81,82,83,-12,0,79,80,-11,0,81,82,83,-12,0,79,80,-11,0,95,96,97,-12,0,93,94,-11,0,95,96,97,-12,0,93,94,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-11,0,109,110,111,84,-7,0,81,82,83,0,107,108,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,84,-4,0,124,125,98,-7,0,95,110,97,0,121,122,-7,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,98,-4,0,124,125,112,0,0,81,82,83,0,0,109,110,111,0,121,122,0,84,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,-5,0,112,-3,0,84,124,125,112,0,0,95,110,97,-3,0,124,125,0,121,122,0,98,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,81,82,83,0,112,79,80,0,98,124,125,112,79,80,109,110,111,79,80,0,124,125,0,121,122,0,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,0,95,96,97,0,112,93,94,0,112,124,125,112,93,94,0,124,125,93,94,84,124,125,0,121,122,84,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,84,109,110,111,0,112,107,108,84,112,124,125,112,107,108,0,124,125,107,108,98,124,125,0,121,122,98,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112,98,123,124,125,84,112,121,122,98,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,-3,112,123,124,125,98,112,121,122,112,112,124,125,112,121,122,0,124,125,121,122,112,124,125,0,121,122,112,112", e:"1,0,15,0|4,0,11,-1,6,8", t:"snowTiles", bg:"snowBG", bs:0, s:0, env:ENVIRONMENT_SNOW, name:"Zone 1-4", gunUnlock:9, bgm:"sLevelLoopHardcore", mapd:1, mapdx:90, mapdy:9};
levels[5] = {d:"50,30,-886,0,83,91,92,94,-10,0,94,78,0,76,92,91,-10,0,76,78,0,0,78,0,92,94,-12,0,76,86,37,38,91,92,94,-7,0,29,30,50,37,38,90,0,0,78,92,94,92,91,80,0,52,37,26,13,27,13,13,28,38,84,-6,0,97,94,0,79,48,30,29,43,12,13,28,38,77,0,78,0,82,83,37,90,34,63,43,12,-3,13,28,26,13,13,28,26,27,13,14,45,70,0,0,69,51,44,49,92,93,94,0,0,79,37,38,48,29,62,29,29,43,44,32,43,12,13,27,13,27,13,13,14,0,0,86,39,44,62,29,29,43,12,13,27,14,40,91,92,39,46,84,0,0,55,39,44,63,29,57,58,59,59,60,43,44,29,29,35,87,15,39,46,15,39,45,70,-5,0,39,0,0,87,39,45,15,1,15,39,40,0,69,51,40,1,1,41,40,-4,0,39,46,15,1,71,72,73,72,74,41,40,15,90,0,0,87,51,40,1,41,45,56,-4,0,55,51,0,0,69,51,40,90,88,1,39,40,56,55,41,40,1,54,39,40,70,0,0,55,39,45,1,90,87,1,1,85,87,39,45,1,56,0,0,69,39,40,1,39,40,-5,0,69,39,-3,0,39,46,70,0,87,39,45,0,69,39,46,90,83,39,40,84,0,0,83,39,40,1,70,0,87,1,1,56,51,40,90,-4,0,39,40,1,39,40,56,-4,0,83,39,0,0,55,39,40,0,0,55,39,40,84,0,39,40,0,69,39,45,56,-3,0,41,40,89,-3,0,87,85,0,39,40,70,-3,0,55,39,40,1,51,40,-6,0,39,0,0,83,41,40,56,0,0,51,40,70,0,41,40,70,83,39,46,-4,0,39,40,56,-4,0,68,55,39,46,56,-4,0,41,40,1,39,46,-5,0,55,41,-3,0,39,45,84,0,69,39,46,0,55,39,40,56,69,39,40,56,0,0,69,39,45,70,-6,0,39,40,-4,0,69,39,45,1,39,40,70,-4,0,83,39,0,0,83,51,40,-3,0,39,40,70,83,39,45,0,83,39,40,84,-3,0,51,40,84,-5,0,83,39,40,84,-4,0,51,40,1,39,40,84,-5,0,39,0,0,69,39,40,70,0,69,39,40,70,69,39,40,70,69,39,40,70,0,0,55,39,40,70,-5,0,69,39,40,70,-3,0,83,39,40,88,39,40,70,-4,0,69,39", c:"50,30,-938,0,15,15,-10,0,-5,15,-11,0,-8,15,-11,0,-8,15,-6,0,-26,15,-6,0,-469,15", b:"40,30,-10,0,101,103,-18,0,101,103,-17,0,101,102,102,107,103,-3,0,101,107,104,-9,0,101,102,102,107,103,-3,0,101,107,104,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-3,102,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-6,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-5,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-3,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,-6,0,101,107,105,0,101,107,109,0,115,117,0,101,103,-7,0,101,107,105,0,101,107,109,0,115,117,0,101,103,0,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,-6,102,117,114,-5,102,103,0,101,102,117,115,-7,102,117,114,-5,102,103,0,101,102,117,115,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-3,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-7,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,105,-12,0,101,-6,102,105,-12,0,101,-6,102,119,-11,0,101,-7,102,119,-11,0,101,-6,102,119,-11,0,101,102,102,117,115,-3,102,119,-11,0,101,102,102,117,115,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,102,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-3,102,115,-13,102,105,100,-3,102,117,115,-13,102,105,100,-3,102,117,0,115,121,-4,102,121,121,-9,102,117,0,0,115,121,-4,102,121,121,-9,102,117,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-5,0,115,118,-7,0,115,102,118,115,102,102,103,-4,0,115,118,-7,0,115,102,118,115,102,102,103,103,-10,0,101,107,107,102,105,101,-3,102,103,-10,0,101,107,107,102,105,101,-3,102,117,-9,0,101,-7,102,121,121,117,-9,0,101,-7,102,121,121,-9,0,101,102,121,117,115,121,102,102,117,-11,0,101,102,121,117,115,121,102,102,117,-10,0,101,102,117,-3,0,110,102,102,103,-10,0,101,102,117,-3,0,110,102,102,103,0,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,-6,102,107,107,102,102,103,0,115,102,102,103,101,-9,102,107,107,102,102,103,0,115,102,102,103,101,-3,102", e:"1,0,18,16|4,0,18,-1,8,8", t:"jungleTiles", bg:"jungleBG", bs:0, s:0, env:ENVIRONMENT_LEAF, name:"Zone 2-1", gunUnlock:15, bgm:"sLevelLoopJungle", mapd:2, mapdx:30, mapdy:47};
levels[6] = {d:"80,30,-1280,0,93,94,-75,0,95,94,0,-3,29,49,0,0,92,91,-68,0,83,37,38,91,1,37,38,75,48,49,37,38,-66,0,79,80,81,39,44,35,1,39,44,63,62,63,43,44,7,8,-47,0,79,92,93,94,-5,0,95,94,-5,0,83,37,26,13,14,40,0,1,41,40,1,54,1,39,40,21,22,11,-41,0,79,-5,0,37,38,85,78,-3,0,83,37,38,93,94,-3,0,95,39,44,31,43,40,56,1,39,40,85,0,86,39,40,1,1,25,7,8,0,80,97,98,-10,0,92,91,82,-4,0,82,-11,0,92,94,77,0,0,5,6,-5,29,43,44,31,29,35,48,30,49,53,12,-4,13,27,13,14,40,1,39,40,0,1,39,40,1,91,87,41,40,-3,1,21,22,50,37,38,90,-7,0,80,81,79,37,26,13,13,27,33,29,31,49,-9,0,79,37,38,0,5,6,19,20,34,50,87,1,1,43,40,90,0,47,62,31,63,43,40,70,-4,0,69,39,40,1,39,40,70,86,51,40,1,90,55,39,40,1,1,90,67,48,62,43,44,-6,29,49,48,57,58,60,43,40,91,-3,0,68,68,75,-7,0,5,6,49,39,42,48,19,20,1,90,0,61,0,87,1,39,40,0,92,75,87,1,1,39,40,56,-5,0,39,40,1,39,40,56,87,39,42,89,0,69,51,46,1,90,0,97,61,48,43,40,93,94,80,77,0,0,75,61,71,72,74,39,45,1,91,-3,0,79,75,-5,0,5,6,19,21,62,43,44,62,35,64,65,0,48,62,35,69,1,39,42,0,86,75,0,87,1,39,40,-6,0,39,40,1,39,40,0,69,39,40,56,0,83,39,44,29,29,32,29,62,62,43,44,29,31,29,35,0,0,75,75,87,1,15,39,44,29,57,58,60,29,29,62,29,35,48,29,29,19,20,-3,1,51,40,1,70,-3,0,75,0,0,69,1,39,40,0,86,75,0,0,87,39,40,84,-4,0,69,39,40,54,39,40,0,55,39,40,70,0,69,39,40,-6,1,51,40,90,66,34,29,31,29,63,62,49,87,1,39,40,1,71,73,74,1,1,89,0,0,75,37,38,-3,1,90,83,41,40,90,-4,0,75,-3,0,88,39,44,29,29,62,-3,29,43,40,-5,0,55,39,40,69,39,40,0,0,41,40,-3,0,39,40,90,64,65,87,1,1,39,40,29,57,58,59,58,60,35,0,61,0,87,51,40,-5,1,89,0,0,34,62,41,40,1,90,66,0,0,39,40,56,-3,0,34,63,-4,29,41,40,-6,1,39,40,70,-5,0,39,40,0,39,40,56,69,39,40,84,0,69,39,40,-4,0,87,1,41,45,1,71,72,73,72,74,84,0,75,0,0,39,42,54,-3,1,89,-5,0,51,40,90,-3,0,55,39,45,-6,0,-3,66,0,39,45,-6,1,39,40,56,-4,0,69,39,40,56,39,40,70,0,39,40,70,0,55,39,40,84,-4,0,87,39,40,-3,1,54,1,89,0,83,75,0,83,39,40,0,88,89,68,-5,0,55,39,42,-5,0,39,40,56,-8,0,83,39,40,-6,1,39,40,-6,0,39,40,0,39,40,0", c:"80,30,-1360,0,-4,15,-73,0,15,15,0,-8,15,-69,0,-11,15,1024,2048,-64,0,-15,15,16385,128,-47,0,15,15,-6,0,15,15,-6,0,-16,15,16385,1024,2048,-38,0,256,512,16385,15,-3,8193,-38,15,-11,0,15,15,-3,8193,-4,15,-10,0,15,15,0,256,512,16385,-3,15,-3,0,15,15,0,0,-47,15,-6,0,4111,-7,0,256,512,16385,-9,15,-3,0,4111,4111,0,0,4111,-3,0,-43,15,-6,0,4111,-5,0,256,512,16385,-12,15,0,0,4111,4111,0,0,4111,-3,0,-68,15,-4,0,4111,4111,0,0,4111,-3,0,-68,15,-4,0,-114,15,0,-9,15,0,-125,15,0,-11,15", b:"40,30,-10,0,101,103,-18,0,101,103,-17,0,101,102,102,107,103,-3,0,101,107,104,-9,0,101,102,102,107,103,-3,0,101,107,104,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-3,102,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-6,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-5,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-3,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,-6,0,101,107,105,0,101,107,109,0,115,117,0,101,103,-7,0,101,107,105,0,101,107,109,0,115,117,0,101,103,0,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,-6,102,117,114,-5,102,103,0,101,102,117,115,-7,102,117,114,-5,102,103,0,101,102,117,115,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-3,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-7,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,105,-12,0,101,-6,102,105,-12,0,101,-6,102,119,-11,0,101,-7,102,119,-11,0,101,-6,102,119,-11,0,101,102,102,117,115,-3,102,119,-11,0,101,102,102,117,115,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,102,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-3,102,115,-13,102,105,100,-3,102,117,115,-13,102,105,100,-3,102,117,0,115,121,-4,102,121,121,-9,102,117,0,0,115,121,-4,102,121,121,-9,102,117,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-5,0,115,118,-7,0,115,102,118,115,102,102,103,-4,0,115,118,-7,0,115,102,118,115,102,102,103,103,-10,0,101,107,107,102,105,101,-3,102,103,-10,0,101,107,107,102,105,101,-3,102,117,-9,0,101,-7,102,121,121,117,-9,0,101,-7,102,121,121,-9,0,101,102,121,117,115,121,102,102,117,-11,0,101,102,121,117,115,121,102,102,117,-10,0,101,102,117,-3,0,110,102,102,103,-10,0,101,102,117,-3,0,110,102,102,103,0,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,-6,102,107,107,102,102,103,0,115,102,102,103,101,-9,102,107,107,102,102,103,0,115,102,102,103,101,-3,102", e:"1,0,16,0|4,0,16,-1,10,8|512,64,25,20|256,21,22,64,1000|256,71,20,64,1000|256,63,20,64,1000|256,47,21,64,1000", t:"jungleTiles", bg:"jungleBG", bs:0, s:0, env:ENVIRONMENT_LEAF, name:"Zone 2-2", gunUnlock:16, bgm:"sLevelLoopJungle", mapd:2, mapdx:32, mapdy:49};
levels[7] = {d:"49,30,-520,0,92,94,-45,0,92,93,37,38,56,-10,0,76,-3,0,92,94,-6,0,92,94,-19,0,55,37,38,51,44,49,-9,0,5,6,11,77,69,37,38,0,92,93,94,80,92,37,38,95,94,-16,0,76,2,43,40,39,42,61,94,77,-6,0,2,19,20,25,29,29,43,12,29,29,31,29,32,29,43,44,57,60,9,10,0,76,77,-9,0,80,81,48,16,51,42,39,44,63,31,49,77,0,0,79,3,4,16,90,68,34,29,30,43,40,85,66,87,1,90,88,51,40,91,74,23,24,49,48,49,0,92,94,77,-3,0,5,6,29,29,62,29,43,40,39,40,90,34,63,9,10,80,2,17,18,90,-3,0,66,88,39,44,67,0,0,67,0,69,39,40,90,64,65,34,63,62,63,49,37,38,95,98,5,6,19,20,90,87,1,1,39,40,39,40,70,0,88,23,24,32,16,90,68,-5,0,69,39,40,-5,0,69,39,45,70,0,0,69,37,38,48,62,43,44,29,29,19,20,90,67,0,0,87,1,39,46,39,40,56,0,0,-4,68,-7,0,69,39,40,-5,0,55,39,40,-4,0,39,44,63,35,39,40,85,64,65,67,-5,0,87,39,40,51,45,70,-13,0,83,39,42,-6,0,39,40,56,0,0,69,39,46,56,69,39,46,89,-8,0,69,39,40,39,40,-14,0,69,39,40,-5,0,34,43,40,56,0,0,69,41,40,70,69,39,40,70,-9,0,39,45,41,40,56,-14,0,51,40,-5,0,55,39,40,84,-3,0,39,40,56,55,39,42,-9,0,69,39,40,39,40,56,-13,0,55,39,40,-5,0,55,39,42,-3,0,69,39,45,0,69,39,40,70,-8,0,69,51,40,39,42,-14,0,69,39,40,-6,0,39,40,84,0,0,69,39,40,70,55,51,40,56,-9,0,39,40,39,12,13,27,13,27,13,27,13,13,27,13,27,13,27,13,13,14,40,-5,0,83,41,40,70,0,0,83,39,40,56,69,39,40,-10,0,41,40,39,45,70,-13,0,55,39,40,-5,0,69,39,44,57,58,59,60,43,46,56,69,39,40,70,-8,0,69,39,40,39,40,-14,0,69,39,42,-5,0,83,39,45,71,72,73,74,39,40,0,0,41,40,56,-9,0,39,40,51,40,70,-13,0,69,39,40,-6,0,39,40,89,64,65,86,39,40,56,55,39,46,70,-8,0,69,51,40,39,40,56,-14,0,39,40,-5,0,83,39,40,70,0,0,87,39,42,70,69,39,40,56,-8,0,69,39,40,39,45,84,-13,0,55,51,40,-5,0,52,53,40,56,0,0,69,39,40,56,69,39,40,70,-8,0,69,39,40,39,40,-15,0,39,40", c:"49,30,-569,0,15,15,-45,0,-5,15,-9,0,256,512,128,0,0,15,15,-6,0,15,15,-19,0,64,-5,15,-8,0,64,16385,-15,15,16385,1024,2048,-14,0,-9,15,-4,0,256,512,16385,-22,15,-7,0,256,512,16385,-10,15,1024,2048,0,64,16385,-27,15,0,0,256,512,16385,-39,15,0,-558,15,0,-64,15", b:"40,30,-10,0,101,103,-18,0,101,103,-17,0,101,102,102,107,103,-3,0,101,107,104,-9,0,101,102,102,107,103,-3,0,101,107,104,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-3,102,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-6,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-5,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-3,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,-6,0,101,107,105,0,101,107,109,0,115,117,0,101,103,-7,0,101,107,105,0,101,107,109,0,115,117,0,101,103,0,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,-6,102,117,114,-5,102,103,0,101,102,117,115,-7,102,117,114,-5,102,103,0,101,102,117,115,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-3,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-7,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,105,-12,0,101,-6,102,105,-12,0,101,-6,102,119,-11,0,101,-7,102,119,-11,0,101,-6,102,119,-11,0,101,102,102,117,115,-3,102,119,-11,0,101,102,102,117,115,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,102,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-3,102,115,-13,102,105,100,-3,102,117,115,-13,102,105,100,-3,102,117,0,115,121,-4,102,121,121,-9,102,117,0,0,115,121,-4,102,121,121,-9,102,117,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-5,0,115,118,-7,0,115,102,118,115,102,102,103,-4,0,115,118,-7,0,115,102,118,115,102,102,103,103,-10,0,101,107,107,102,105,101,-3,102,103,-10,0,101,107,107,102,105,101,-3,102,117,-9,0,101,-7,102,121,121,117,-9,0,101,-7,102,121,121,-9,0,101,102,121,117,115,121,102,102,117,-11,0,101,102,121,117,115,121,102,102,117,-10,0,101,102,117,-3,0,110,102,102,103,-10,0,101,102,117,-3,0,110,102,102,103,0,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,-6,102,107,107,102,102,103,0,115,102,102,103,101,-9,102,107,107,102,102,103,0,115,102,102,103,101,-3,102", e:"1,0,13,0|4,0,13,-1,12,8|256,16,15,64,1000|256,37,15,64,1000|256,29,11,64,1000|256,7,12,64,1000", t:"jungleTiles", bg:"jungleBG", bs:0, s:0, env:ENVIRONMENT_LEAF, name:"Zone 2-3", gunUnlock:21, bgm:"sLevelLoopJungle", mapd:2, mapdx:37, mapdy:51};
levels[8] = {d:"72,30,-1331,0,92,94,-62,0,92,91,82,-4,0,92,37,38,0,82,0,0,76,92,94,-28,0,93,94,-19,0,92,93,94,0,80,81,86,37,26,-5,13,14,12,-5,13,28,38,94,-3,0,92,93,94,77,-18,0,92,93,37,38,98,0,0,78,0,92,94,-5,0,76,77,-3,0,82,69,37,26,-3,13,27,13,14,40,-5,0,39,44,35,-3,0,55,39,12,13,13,27,13,13,28,38,70,0,80,81,0,92,93,94,-4,0,76,77,0,80,81,0,76,37,38,39,12,13,27,-3,13,28,38,94,0,76,77,110,37,26,-5,13,14,40,70,-3,0,69,39,42,70,-3,0,55,41,40,70,-3,0,34,43,40,70,-3,0,55,51,12,27,-4,13,28,38,1,91,0,79,95,37,26,-3,13,27,13,14,40,41,40,-4,0,83,39,12,-5,13,14,40,70,-3,0,83,41,45,56,48,30,29,32,43,44,29,50,0,0,34,43,40,84,-4,0,41,42,70,-4,0,39,45,70,-3,0,83,39,12,-5,13,14,40,84,-3,0,83,39,40,39,40,70,-3,0,34,43,40,93,94,0,0,52,53,45,84,-3,0,83,39,44,29,62,29,31,29,43,45,54,61,-3,0,39,40,56,-3,0,69,39,40,56,-3,0,55,39,44,31,29,35,0,69,41,40,70,-3,0,55,39,44,31,30,-3,29,43,40,39,42,56,-3,0,69,39,12,-3,13,27,13,14,40,56,-4,0,39,42,-4,0,83,39,40,56,75,0,0,69,39,40,-4,0,55,39,40,56,-4,0,39,40,84,-3,0,69,39,40,56,-3,0,69,39,40,-4,0,69,39,40,51,40,-4,0,55,41,40,56,-3,0,83,39,42,-4,0,55,39,40,56,-3,0,69,39,40,84,75,0,0,55,39,45,70,-3,0,83,51,45,-4,0,69,41,40,56,-3,0,55,51,40,84,-4,0,39,40,70,-3,0,83,39,40,39,40,84,-4,0,39,45,-4,0,69,51,40,56,-3,0,34,43,40,84,-4,0,41,40,0,75,0,0,69,39,40,-5,0,39,40,-4,0,83,39,42,70,-4,0,39,45,-4,0,83,39,40,70,-4,0,39,40,39,45,70,-3,0,69,51,40,56,-4,0,39,45,70,-3,0,69,39,40,70,-4,0,51,45,56,75,-3,0,41,40,70,-3,0,55,39,40,70,-3,0,69,51,45,-4,0,55,51,40,70,-4,0,39,40,84,-3,0,83,39,40,39,40,56,-3,0,83,39,42,70,-3,0,55,41,40,56,-3,0,55,39,45,56,-3,0,69,39,40,70,75,0,0,55,51,40,56,-3,0,69,39,40,-4,0,55,39,40,56,-4,0,39,40,-4,0,69,39,40,-5,0,39,40", c:"72,30,-1403,0,15,15,-63,0,-16,15,-28,0,15,15,-19,0,-30,15,-19,0,-11,15,-5,0,-44,15,-5,0,-64,15,0,-448,15", b:"40,30,-10,0,101,103,-18,0,101,103,-17,0,101,102,102,107,103,-3,0,101,107,104,-9,0,101,102,102,107,103,-3,0,101,107,104,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-3,102,104,101,103,0,101,103,-3,0,-5,102,103,0,101,-6,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-5,102,107,102,102,111,0,0,115,121,121,-3,102,107,102,121,-3,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,102,122,-3,102,117,-6,0,115,-3,102,117,0,115,102,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,117,0,115,122,117,-8,0,115,102,102,123,0,0,115,-6,0,101,107,105,0,101,107,109,0,115,117,0,101,103,-7,0,101,107,105,0,101,107,109,0,115,117,0,101,103,0,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,107,104,101,107,105,101,-3,102,107,102,102,103,-3,0,101,102,102,107,-6,102,117,114,-5,102,103,0,101,102,117,115,-7,102,117,114,-5,102,103,0,101,102,117,115,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,118,114,-4,102,103,101,-3,102,118,115,102,108,102,102,104,101,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-3,102,104,101,-6,102,117,115,102,103,101,102,117,68,114,-7,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,118,113,121,117,0,0,115,121,121,117,-3,0,114,-6,102,105,-12,0,101,-6,102,105,-12,0,101,-6,102,119,-11,0,101,-7,102,119,-11,0,101,-6,102,119,-11,0,101,102,102,117,115,-3,102,119,-11,0,101,102,102,117,115,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,115,102,118,0,0,100,103,-7,0,106,-3,102,103,0,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,101,102,123,0,101,102,102,109,-7,0,115,-3,102,103,102,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,123,106,-3,102,103,0,101,107,107,103,-3,0,115,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-5,102,103,101,-4,102,107,-4,102,105,0,0,100,-3,102,115,-13,102,105,100,-3,102,117,115,-13,102,105,100,-3,102,117,0,115,121,-4,102,121,121,-9,102,117,0,0,115,121,-4,102,121,121,-9,102,117,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-4,0,115,102,102,118,0,0,115,-3,122,-5,102,103,-5,0,115,118,-7,0,115,102,118,115,102,102,103,-4,0,115,118,-7,0,115,102,118,115,102,102,103,103,-10,0,101,107,107,102,105,101,-3,102,103,-10,0,101,107,107,102,105,101,-3,102,117,-9,0,101,-7,102,121,121,117,-9,0,101,-7,102,121,121,-9,0,101,102,121,117,115,121,102,102,117,-11,0,101,102,121,117,115,121,102,102,117,-10,0,101,102,117,-3,0,110,102,102,103,-10,0,101,102,117,-3,0,110,102,102,103,0,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,106,107,103,101,107,111,0,106,102,102,111,101,-3,107,-3,102,103,0,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,101,-4,102,103,0,110,102,102,111,115,-3,102,117,115,102,102,103,-6,102,107,107,102,102,103,0,115,102,102,103,101,-9,102,107,107,102,102,103,0,115,102,102,103,101,-3,102", e:"1,0,20,0|4,0,13,-1,6,16", t:"jungleTiles", bg:"jungleBG", bs:0, s:0, env:ENVIRONMENT_LEAF, name:"Zone 2-4", gunUnlock:22, bgm:"sLevelLoopJungle", mapd:2, mapdx:36, mapdy:52};
levels[9] = {d:"42,20,-703,0,97,-9,0,62,-10,0,97,-9,0,62,59,66,96,-6,0,62,32,33,12,-6,0,62,30,-8,0,98,62,57,66,-5,0,97,97,62,30,37,30,65,-5,0,62,28,58,53,98,-5,0,62,30,16,59,58,57,58,56,60,59,57,57,29,36,31,60,61,60,57,56,57,58,30,16,15,37,27,59,61,58,56,57,57,25,61,25,58,56,58,32,33,56,30,21,20", c:"42,20,-713,0,15,-20,0,-3,15,-7,0,-4,15,-6,0,15,15,-9,0,-3,15,-7,0,-5,15,-5,0,-4,15,-6,0,-45,15", b:"80,20,-749,0,100,101,104,-37,0,100,101,104,-34,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0", e:"1,0,18,16|4,0,12,-1,12,2|256,10,17,1,1000|256,21,16,1,1000|256,36,18,1,1000", t:"canyonTiles", bg:"canyonBG", bs:0, s:0, env:0, name:"Zone 3-1", gunUnlock:23, bgm:"sLevelLoopEvil", mapd:3, mapdx:68, mapdy:24};
levels[10] = {d:"65,32,-1370,0,97,-53,0,96,-8,0,98,0,62,57,66,0,0,96,-42,0,96,-3,0,62,60,66,-3,0,98,0,57,56,57,57,58,57,28,-3,57,32,33,82,-39,0,81,56,58,57,58,30,59,31,58,58,57,57,56,25,61,37,36,23,37,30,38,31,30,34,35,78,-7,0,96,-23,0,96,-7,0,74,29,13,15,16,13,20,13,24,16,13,19,13,28,29,17,31,28,30,17,18,13,31,25,29,77,0,96,0,0,98,62,56,66,96,97,-17,0,96,97,0,98,62,60,66,-3,0,97,96,74,30,19,13,22,15,14,15,37,17,22,15,13,36,24,20,31,34,30,22,16,19,15,17,14,31,60,56,57,58,60,29,31,58,32,33,56,58,82,-13,0,79,57,56,60,61,57,59,57,60,61,57,60,60,30,14,17,16,19,13,18,13,13,17,19,13,16,18,36,17,16,14,17,19,27,17,19,16,16,13,16,31,32,33,28,34,27,19,13,31,25,28,78,-7,0,96,-5,0,74,28,58,61,58,59,57,61,59,58,58,30,17,13,15,14,24,31,58,57,29,15,20,20,19,13,22,16,19,20,17,16,14,36,15,13,18,13,17,20,31,34,35,28,29,36,20,16,13,36,61,78,0,0,98,0,0,62,58,66,0,0,97,0,0,74,25,30,15,31,61,27,31,57,30,13,19,20,19,18,18,31,-3,58,57,29,13,16,17,13,14,17,13,18,13,20,18,20,17,16,17,14,15,15,16,18,36,14,19,17,22,23,20,19,18,31,-5,58,32,33,25,-5,58,30,29,26,24,17,16,36,14,19,22,17,15,16,22,15,13,31,56,57,58,56,30,16,23,19,22,19,17,18,14,31,58,60,30,19,17,15,13,16,22,16,13,17,15,16,17,31,28,30,16,20,31,58,29,31,61,28,34,35,14,18,31,28,61,30,14,30,18,36,15,22,20,16,17,16,20,24,18,14,17,13,18,16,31,56,29,16,22,37,15,13,13,20,16,31,60,58,58,29,18,20,16,18,13,17,14,16,19,18,20,16,18,38,16,13,14,14,36,14,18,14,38,-3,14,19,14,22,14,18,14,29,15,20,18,19,17,15,19,13,15,36,19,16,14,19,15,13,19,17,13,19,13,15,13,13", c:"65,32,-1435,0,-3,15,-49,0,-3,15,-5,0,-12,15,47,-39,0,47,-24,15,47,-39,0,47,-25,15,-5,0,-3,15,-23,0,-3,15,-5,0,-38,15,47,-13,0,47,-50,15,47,-13,0,47,-51,15,-5,0,-3,15,-5,0,-221,15", b:"80,20,-749,0,100,101,104,-37,0,100,101,104,-34,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0", e:"1,0,20,0|4,0,20,-1,12,8|256,6,21,1,750|256,19,24,1,750|256,32,27,1,750|256,45,24,1,750|256,58,21,1,750", t:"canyonTiles", bg:"canyonBG", bs:0, s:0, env:0, name:"Zone 3-2", gunUnlock:24, bgm:"sLevelLoopEvil", mapd:3, mapdx:70, mapdy:22};
levels[11] = {d:"64,30,-873,0,96,-60,0,79,60,57,58,82,-59,0,74,30,13,31,78,-6,0,98,-49,0,97,96,0,74,30,13,31,78,97,96,-4,0,62,58,82,-45,0,62,-4,57,58,30,15,31,-3,58,56,-3,57,58,61,78,-35,0,96,98,62,58,90,-5,91,95,30,13,31,57,30,13,13,18,37,37,38,28,31,30,14,31,61,78,-5,0,98,62,57,58,57,58,57,0,96,-4,0,96,0,98,-3,0,62,57,66,-5,0,97,96,0,62,59,58,59,53,0,96,-3,0,46,30,13,31,57,30,15,13,22,13,15,14,36,14,14,16,14,61,57,57,58,56,-3,58,30,31,29,36,22,14,57,57,66,97,98,62,59,90,93,91,91,93,95,58,90,91,93,-3,91,95,59,57,57,58,30,31,58,58,90,-3,91,94,30,13,22,-4,13,15,13,22,-3,13,22,13,13,15,31,28,30,31,30,15,13,13,-3,14,16,23,58,57,57,58,-3,57,53,-4,0,46,58,53,-5,0,45,28,58,9,10,8,10,9,58,53,-3,0,46,30,31,57,9,57,30,13,13,18,13,13,15,13,13,18,13,-3,15,14,-3,15,22,18,14,16,31,30,58,57,30,22,36,38,31,58,52,-4,0,46,57,53,-5,0,46,28,53,-5,0,46,53,-3,0,46,30,31,53,98,46,30,23,24,13,24,13,23,13,15,13,22,-3,13,22,13,16,13,16,-3,13,53,0,46,19,15,13,24,13,31,58,53,-4,0,46,58,53,-5,0,45,36,53,-3,0,98,96,46,90,-3,91,94,30,31,58,9,58,9,10,61,9,57,61,9,61,61,57,9,10,10,9,57,10,9,10,9,57,10,9,51,0,46,22,16,23,38,19,31,59,53,-4,0,46,59,52,-4,0,98,46,14,31,57,57,-4,58,53,-3,0,46,30,31,53,0,40,0,0,98,0,40,-4,0,39,0,96,0,0,39,-3,0,96,40,0,0,97,0,40,13,31,57,30,22,19,27,52,-4,0,46,57,90,92,91,91,93,91,95,-7,13,31,53,-3,0,46,30,31,53,0,39,0,62,66,0,39,0,62,66,0,40,0,62,60,60,53,-3,0,62,53,0,62,66,0,46,31,57,58,57,30,13,31,53,-3,0,62,58,58,53,-5,0,46,30,-6,13,31,53,-3,0,46,30,31,53,0,40,0,48,51,0,40,0,48,51,0,39,0,46,30,13,53,0,11,8,9,53,0,48,51,0,46,19,31,58,57,30,16,17,52,-3,0,46,57,59,53,-5,0,46,30,-6,13,31,53,-3,0,46,30,31,53,0,40,0,0,96,0,39,0,96,97,0,40,0,46,30,13,53,0,97,96,0,40,-4,0,40,13,16,31,27,30,15,13,52,-3,0,46,58,59,53,-5,0,46,30,-6,13,31,53,-3,0,46,30,31,-5,58,60,58,53,0,63,60,-3,58,57,30,13,-5,60,28,-4,60,57,-3,13,36,13,13,31,53,-3,0,46,58,57,90,92,92,93,92,92,94,30,-6,13,31,53,-3,0,46,30,13,13,18,13,13,18,13,13,53,0,46,13,13,18,-3,13,18,-4,13,18,13,13,18,13,22,13", c:"64,30,-934,0,47,-3,15,47,-59,0,47,-3,15,47,-59,0,-5,15,-6,0,15,15,47,-45,0,-18,15,47,-37,0,-27,15,-6,0,-6,15,-12,0,-3,15,-8,0,-44,15,0,0,-10,15,-5,8193,-59,15,-5,0,-59,15,-5,0,-3,15,-5,0,-35,15,0,-15,15,-5,0,-3,15,-5,0,-51,15,-5,0,-3,15,4111,4111,-54,15,-5,8193,-3,15,4111,4111,-54,15,-5,0,-3,15,4111,4111,-54,15,-5,0,-5,4111,-54,15,-5,0,-5,4111,-13,15,0,-11,15,0,0,-12,15,0,-47,15,0,-15,15", b:"80,20,-749,0,100,101,104,-37,0,100,101,104,-34,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0", e:"1,0,19,0|4,0,19,-1,8,16|256,13,18,1,750|256,26,17,1,750|256,35,16,1,750|256,46,16,1,750|256,55,18,1,750|512,26,23,29", t:"canyonTiles", bg:"canyonBG", bs:0, s:0, env:0, name:"Zone 3-3", gunUnlock:26, bgm:"sLevelLoopEvil", mapd:3, mapdx:72, mapdy:21};
levels[12] = {d:"81,30,-1659,0,96,98,-76,0,96,0,1,60,58,60,4,97,96,-67,0,96,97,2,3,57,58,57,60,58,60,58,60,58,57,56,6,5,0,97,96,-55,0,97,0,98,2,3,57,58,57,58,57,30,15,15,18,15,13,13,15,13,16,31,58,58,60,58,57,6,5,0,0,98,-47,0,97,2,3,58,57,58,57,57,30,31,13,18,15,15,16,13,18,13,13,24,13,14,14,13,14,16,13,13,31,58,57,56,58,56,6,5,0,96,-37,0,97,98,2,3,57,58,57,57,60,58,57,58,57,61,57,30,15,22,13,15,22,13,15,21,31,58,29,15,18,16,14,13,22,18,13,13,31,57,57,60,57,56,58,58,57,6,5,98,-29,0,96,2,3,57,58,-3,57,28,58,61,58,61,58,56,58,30,15,38,18,13,13,16,21,15,31,58,58,57,28,57,30,15,13,13,16,16,13,13,15,14,31,60,57,60,30,13,16,31,56,60,58,57,58,6,5,97,98,96,-15,0,98,0,0,2,3,57,58,57,58,57,30,37,38,23,38,36,31,58,57,30,38,31,61,58,30,15,13,15,21,18,16,18,15,31,57,58,60,57,58,57,30,18,13,18,22,13,16,18,14,15,18,36,13,15,13,18,31,59,59,28,61,57,58,56,58,56,6,5,96,-7,0,97,96,0,2,3,57,58,-3,57,30,15,13,31,32,33,57,58,29,16,15,18,16,15,13,16,13,18,13,16,18,13,16,13,13,22,18,21,15,38,13,16,18,13,38,18,15,14,16,13,16,13,15,13,16,22,15,16,14,22,16,13,18,13,36,31,60,58,60,60,58,56,57,58,58,56,6,5,0,98,96,57,56,58,56,60,60,57,57,30,15,18,22,16,31,34,35,58,57,30,13,13,16,13,21,22,13,15,21,13,15,13,13,15,13,15,13,16,16,13,18,15,16,15,18,16,15,13,15,13,15,13,18,14,15,13,13,16,13,18,15,18,16,15,31,61,58,57,58,60,57,58,59,59,57,56,57,56,60,57,58,56", c:"81,30,-1739,0,64,16385,15,16385,128,-71,0,256,512,16385,-9,15,16385,1024,2048,-61,0,256,512,16385,-19,15,16385,1024,2048,-51,0,256,512,16385,-29,15,16385,1024,2048,-41,0,256,512,16385,-39,15,16385,1024,2048,-31,0,256,512,16385,-49,15,16385,1024,2048,-21,0,256,512,16385,-59,15,16385,1024,2048,-11,0,256,512,16385,-16,15,0,-52,15,16385,1024,2048,-3,0,-81,15", b:"80,20,-749,0,100,101,104,-37,0,100,101,104,-34,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,99,103,0,108,106,109,0,0,99,101,102,103,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-28,0,105,107,0,110,111,112,0,0,108,125,106,109,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-24,0,124,124,0,0,110,112,0,113,114,115,0,0,110,111,117,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,99,101,102,102,103,100,104,-5,0,136,133,137,0,0,113,115,124,116,117,118,0,0,113,114,120,107,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,-11,0,105,106,117,106,135,133,112,-5,0,119,120,115,0,0,119,127,129,130,125,121,124,0,116,131,111,112,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,99,102,103,-6,0,108,114,-3,106,114,115,-5,0,122,126,123,124,0,116,121,0,119,120,127,128,129,130,126,125,118,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,110,111,112,0,0,124,-3,0,113,117,106,-3,114,123,-5,0,119,126,131,134,133,135,123,0,122,126,123,0,0,119,114,117,121,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,113,117,115,124,136,133,137,0,0,119,135,-3,126,120,121,0,99,102,103,0,122,126,127,128,128,130,121,0,122,120,121,0,0,122,126,114,115,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,119,131,127,128,130,125,121,0,0,122,106,126,106,131,114,118,0,110,111,112,0,119,126,115,0,0,116,131,134,135,117,131,134,132,133,120,120,118,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0,116,114,115,0,119,131,121,0,0,116,117,106,127,129,130,123,0,113,114,118,0,122,126,123,0,0,122,120,117,120,120,126,125,120,120,126,114,123,0,0", e:"1,0,28,0|4,0,28,-1,6,32", t:"canyonTiles", bg:"canyonBG", bs:0, s:0, env:0, name:"Zone 3-4", gunUnlock:27, bgm:"sLevelLoopEvil", mapd:3, mapdx:74, mapdy:22};
levels[13] = {d:"78,30,-1637,0,65,-76,0,64,66,-4,42,51,-33,0,64,65,-8,0,48,43,51,-22,0,48,-4,42,-4,13,50,-4,42,51,-3,0,48,43,51,-13,0,48,43,51,-4,0,64,65,66,64,66,64,-3,0,48,42,42,49,13,50,42,42,51,-5,0,66,-7,0,48,43,51,-3,0,31,-5,13,16,-7,13,50,-3,42,49,13,50,-4,42,51,-5,0,48,42,42,49,13,50,42,42,51,66,65,64,65,66,48,-4,42,49,-3,13,16,-3,13,38,66,-3,0,66,65,64,-3,0,48,42,42,49,13,50,-3,42,49,16,13,14,-4,13,14,-12,13,14,-3,13,50,-5,42,49,-6,13,14,50,-5,42,49,-11,13,15,50,-10,42,49,-19,13,15,-6,13,16,-6,13,15,-11,13,16,-14,13,14,-18,13,14,13,13,15,-34,13,14,-11,13,15,-16,13,14,-4,13,15,-18,13,15,-8,13,14,-11,13,16,-7,13,15,-11,13,16,-9,13,14,-20,13,14,13,13,15,-7,13,16,-6,13,15,-5,13,14,-21,13,14,-3,13,15,-17,13,14,13,16,-12,13", c:"78,30,-1637,0,4111,-76,0,4111,4111,-5,15,-33,0,4111,4111,-8,0,-3,15,-22,0,-15,15,-3,0,-3,15,-13,0,-3,15,-4,0,-6,4111,-3,0,-9,15,-5,0,4111,-7,0,-3,15,-3,0,-26,15,-5,0,-9,15,-5,4111,-14,15,4111,-3,0,-3,4111,-3,0,-404,15", b:"44,20,-14,0,67,69,-20,0,67,69,-20,0,73,75,-20,0,73,75,-52,0,67,69,-20,0,67,69,-20,0,73,75,-4,0,67,69,-14,0,73,75,-4,0,67,69,-20,0,73,75,-6,0,67,69,-12,0,73,75,-6,0,67,69,-20,0,73,75,-20,0,73,75,-97,0,67,69,-10,0,67,69,-8,0,67,69,-10,0,67,69,-8,0,73,75,-5,0,67,69,-3,0,73,75,-8,0,73,75,-5,0,67,69,-3,0,73,75,-5,0,67,69,-8,0,73,75,-10,0,67,69,-8,0,73,75,-10,0,73,75,-20,0,73,75,-69,0,67,69,-7,0,67,69,-11,0,67,69,-7,0,67,69,-11,0,73,75,-7,0,70,72,-11,0,73,75,-7,0,70,72,-10,0,67,68,69,-7,0,73,75,0,67,69,-7,0,67,68,69,-7,0,73,75,0,67,69,0,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70", e:"1,0,21,16|4,0,21,-1,14,8|256,14,22,4,1500|256,30,22,4,1500|256,49,21,4,1500|256,68,22,4,1500", t:"trainingTiles", bg:"trainingBG", bs:0, s:0, env:0, name:"Zone 4-1", gunUnlock:29, bgm:"sLevelLoopTraining", mapd:4, mapdx:108, mapdy:37};
levels[14] = {d:"86,30,-1782,0,48,-3,42,51,-9,0,48,-3,42,51,-10,0,48,-3,42,51,-9,0,48,-3,42,51,-19,0,48,-3,42,51,-9,0,48,-4,42,49,-3,13,38,-3,0,48,43,51,-3,0,31,-3,13,50,-10,42,49,-3,13,39,-3,0,48,43,51,-3,0,31,-3,13,50,-4,42,51,-9,0,48,-4,42,49,-3,13,38,-3,0,48,43,51,-3,0,31,-8,13,50,-3,42,49,13,50,-3,42,49,-18,13,50,-3,42,49,13,50,-3,42,49,-8,13,39,-3,0,48,43,51,-3,0,31,-8,13,50,-3,42,49,13,50,-3,42,49,-29,13,16,-26,13,50,-3,42,49,13,50,-3,42,49,-10,13,16,-24,13,16,13,14,-12,13,14,-12,13,14,-16,13,14,-18,13,15,-39,13,15,-6,13,16,-6,13,15,-11,13,16,-14,13,14,-18,13,14,13,13,15,-42,13,14,-11,13,15,-16,13,14,-4,13,15,-26,13,15,-8,13,14,-11,13,16,-7,13,15,-11,13,16,-9,13,14,-20,13,14,13,13,15,-15,13,16,-6,13,15,-5,13,14,-21,13,14,-3,13,15,-17,13,14,13,16,-20,13", c:"86,30,-1782,0,-5,15,-9,0,-5,15,-10,0,-5,15,-9,0,-5,15,-19,0,-5,15,-9,0,-10,15,-3,0,-3,15,-3,0,-20,15,-3,0,-3,15,-3,0,-10,15,-9,0,-10,15,-3,0,-3,15,-3,0,-58,15,-3,0,-3,15,-3,0,-564,15", b:"44,20,-14,0,67,69,-20,0,67,69,-20,0,73,75,-20,0,73,75,-52,0,67,69,-20,0,67,69,-20,0,73,75,-4,0,67,69,-14,0,73,75,-4,0,67,69,-20,0,73,75,-6,0,67,69,-12,0,73,75,-6,0,67,69,-20,0,73,75,-20,0,73,75,-97,0,67,69,-10,0,67,69,-8,0,67,69,-10,0,67,69,-8,0,73,75,-5,0,67,69,-3,0,73,75,-8,0,73,75,-5,0,67,69,-3,0,73,75,-5,0,67,69,-8,0,73,75,-10,0,67,69,-8,0,73,75,-10,0,73,75,-20,0,73,75,-69,0,67,69,-7,0,67,69,-11,0,67,69,-7,0,67,69,-11,0,73,75,-7,0,70,72,-11,0,73,75,-7,0,70,72,-10,0,67,68,69,-7,0,73,75,0,67,69,-7,0,67,68,69,-7,0,73,75,0,67,69,0,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70", e:"1,0,21,0|4,0,21,-1,10,16|256,71,20,4,1500|256,52,21,4,1500|256,33,22,4,1500|256,14,21,4,1500", t:"trainingTiles", bg:"trainingBG", bs:0, s:0, env:0, name:"Zone 4-2", gunUnlock:30, bgm:"sLevelLoopTraining", mapd:4, mapdx:110, mapdy:39};
levels[15] = {d:"86,30,-1720,0,-4,42,51,-81,0,-4,13,18,9,9,12,42,51,-5,0,48,42,11,9,10,-66,0,13,14,13,13,38,0,0,31,13,18,9,10,7,8,9,19,13,38,0,0,48,42,11,9,9,10,-5,0,8,9,9,12,42,51,-24,0,8,9,10,-22,0,-3,13,16,38,0,0,31,16,38,-5,0,31,13,38,0,0,31,14,21,-11,22,23,16,18,9,9,10,-15,0,48,42,11,-3,9,10,0,8,-3,9,12,42,51,-13,0,48,42,42,14,-3,13,38,0,0,31,13,38,-5,0,31,13,38,0,0,31,13,38,-11,0,31,13,38,-3,0,48,42,51,-7,0,48,42,20,22,22,23,13,38,-9,0,31,13,38,-8,0,8,-4,9,19,-6,13,38,0,0,31,13,38,-5,0,31,13,38,0,0,31,13,38,-11,0,31,13,38,-3,0,31,13,18,9,9,10,7,8,9,9,19,14,38,0,0,31,14,38,-9,0,31,13,21,-5,22,24,42,51,-5,0,31,-4,13,14,13,38,0,0,31,13,38,-5,0,31,16,38,0,0,31,13,38,-11,0,31,13,38,-3,0,31,13,38,-7,0,31,13,38,0,0,31,13,38,-9,0,31,13,38,-5,0,31,13,38,-5,0,31,-6,13,38,0,0,31,13,38,-5,0,31,13,38,0,0,31,16,38,-11,0,31,13,38,-3,0,31,14,38,-7,0,31,16,38,0,0,31,16,38,-9,0,31,13,38,-5,0,31,13,38,-5,0,31,-3,13,16,13,13,38,0,0,31,14,38,-5,0,31,14,38,0,0,31,13,38,-11,0,31,14,38,-3,0,31,13,38,-7,0,31,13,38,0,0,31,13,38,-9,0,31,13,38,-5,0,31,13,38,-5,0,31,-6,13,38,0,0,31,13,38,-5,0,31,13,38,0,0,31,13,38,-11,0,31,13,38,-3,0,31,13,38,-7,0,31,13,38,0,0,31,14,38,-9,0,31,13,38,-5,0,31,13,38,-5,0,31,13,13", c:"86,30,-1720,0,-5,15,-81,0,-10,15,-5,0,-5,15,-66,0,-26,15,-5,0,-6,15,-24,0,-3,15,-22,0,-40,15,-15,0,-15,15,-13,0,-46,15,-7,0,-20,15,-8,0,-389,15,0,-48,15", b:"44,20,-14,0,67,69,-20,0,67,69,-20,0,73,75,-20,0,73,75,-52,0,67,69,-20,0,67,69,-20,0,73,75,-4,0,67,69,-14,0,73,75,-4,0,67,69,-20,0,73,75,-6,0,67,69,-12,0,73,75,-6,0,67,69,-20,0,73,75,-20,0,73,75,-97,0,67,69,-10,0,67,69,-8,0,67,69,-10,0,67,69,-8,0,73,75,-5,0,67,69,-3,0,73,75,-8,0,73,75,-5,0,67,69,-3,0,73,75,-5,0,67,69,-8,0,73,75,-10,0,67,69,-8,0,73,75,-10,0,73,75,-20,0,73,75,-69,0,67,69,-7,0,67,69,-11,0,67,69,-7,0,67,69,-11,0,73,75,-7,0,70,72,-11,0,73,75,-7,0,70,72,-10,0,67,68,69,-7,0,73,75,0,67,69,-7,0,67,68,69,-7,0,73,75,0,67,69,0,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70", e:"1,0,19,0|4,0,19,-1,8,32|256,12,21,4,1500|256,28,22,4,1500|256,46,24,4,1500|256,62,21,4,1500|256,80,23,4,1500", t:"trainingTiles", bg:"trainingBG", bs:0, s:0, env:0, name:"Zone 4-3", gunUnlock:31, bgm:"sLevelLoopTraining", mapd:4, mapdx:114, mapdy:42};
levels[16] = {d:"86,30,-1766,0,66,64,-83,0,64,65,66,64,-82,0,65,66,64,66,65,65,-78,0,65,66,66,64,66,48,42,63,-30,0,48,42,43,42,42,-42,0,65,66,64,48,42,42,49,16,60,-20,0,48,42,43,42,51,-5,0,31,-3,13,16,-35,0,48,42,43,42,11,9,10,7,8,9,19,15,-3,13,60,-5,0,48,43,51,-12,0,31,13,14,13,50,-5,42,49,13,13,15,13,-19,0,48,42,43,42,51,-6,0,48,42,43,42,42,49,13,13,16,39,-5,0,31,13,13,14,13,50,-5,42,49,13,50,-4,42,11,10,8,12,-4,42,49,-14,13,-11,0,48,43,51,-5,0,31,-3,13,38,-6,0,31,16,13,14,13,13,15,13,41,36,-4,0,64,35,40,-6,13,15,13,13,15,-6,13,18,9,9,19,-9,13,16,-8,13,14,-6,0,48,42,43,42,44,49,16,50,47,46,43,47,46,49,13,13,14,50,-6,42,49,-4,13,16,13,13,38,-4,0,66,65,66,31,13,13,14,13,13,16,-7,13,15,13,14,38,0,0,31,13,16,14,13,13,15,-5,13,15,-3,13,16,-3,13,44,-5,42,49,13,15,-3,13,14,13,13,15,-4,13,16,-5,13,14,-3,13,14,13,13,15,13,14,13,15,21,-7,22,23,16,13,15,-7,13,14,16,-4,13,38,0,0,31,-7,13,14,-5,13,15,-5,13", c:"86,30,-1766,0,4111,4111,-83,0,-4,4111,-82,0,-6,4111,-78,0,-5,4111,15,15,47,-30,0,-5,15,-42,0,-3,4111,-5,15,47,-20,0,-5,15,-5,0,-5,15,-35,0,-16,15,-5,0,-3,15,-12,0,-15,15,-19,0,-5,15,-6,0,-56,15,-11,0,-3,15,-5,0,-5,15,-6,0,-56,15,-6,0,-166,15", b:"44,20,-14,0,67,69,-20,0,67,69,-20,0,73,75,-20,0,73,75,-52,0,67,69,-20,0,67,69,-20,0,73,75,-4,0,67,69,-14,0,73,75,-4,0,67,69,-20,0,73,75,-6,0,67,69,-12,0,73,75,-6,0,67,69,-20,0,73,75,-20,0,73,75,-97,0,67,69,-10,0,67,69,-8,0,67,69,-10,0,67,69,-8,0,73,75,-5,0,67,69,-3,0,73,75,-8,0,73,75,-5,0,67,69,-3,0,73,75,-5,0,67,69,-8,0,73,75,-10,0,67,69,-8,0,73,75,-10,0,73,75,-20,0,73,75,-69,0,67,69,-7,0,67,69,-11,0,67,69,-7,0,67,69,-11,0,73,75,-7,0,70,72,-11,0,73,75,-7,0,70,72,-10,0,67,68,69,-7,0,73,75,0,67,69,-7,0,67,68,69,-7,0,73,75,0,67,69,0,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,68,68,69,-3,0,70,71,72,0,0,67,69,0,0,67,68,68,69,70,72,67,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,71,71,72,0,67,69,70,71,72,67,69,70,72,0,0,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70,74,74,75,69,73,75,73,74,75,73,75,73,75,69,69,70,71,71,72,70,72,70", e:"1,0,28,0|4,0,28,-1,-1,32|512,2,28,-2|256,12,26,4,1500|256,57,24,4,1500|256,72,23,1,750|256,37,24,1,750|256,21,25,1,750|256,83,22,4,1500", t:"trainingTiles", bg:"trainingBG", bs:0, s:0, env:0, name:"Zone X - Warning", gunUnlock:-1, bgm:"sLevelLoopTraining", mapd:5, mapdx:132, mapdy:54};
tw = (th = 32);
gamePaused = false;
gamePausedFunction = null;
mouseD = 0;
onMouseDown = function () {
mouseD = 1;
};
onMouseUp = function () {
mouseD = 0;
};
mouseW = 0;
onMouseWheel = function (delta) {
mouseW = sign(delta);
};
darkColor = {ra:"50", rb:"0", ga:"50", gb:"0", ba:"50", bb:"0", aa:"100", ab:"0"};
whiteColor = {ra:"100", rb:"100", ga:"100", gb:"100", ba:"100", bb:"100", aa:"100", ab:"0"};
normalColor = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
hitColor = {ra:"100", rb:"150", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
triDamageColor = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"150", aa:"100", ab:"0"};
invulnerableColor = {ra:"100", rb:"150", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
timeSinkColor = {ra:"100", rb:"0", ga:"100", gb:"150", ba:"100", bb:"0", aa:"100", ab:"0"};
invColor = {ra:"-100", rb:"255", ga:"-100", gb:"255", ba:"-100", bb:"255", aa:"100", ab:"0"};
frameRate = 32;
so = SharedObject.getLocal("heliattack3");
gotoAndStop ("menuintro");
Frame 19
gotoAndStop ("menuintro");
Frame 20
stop();
Frame 21
gotoAndStop ("menuintro");
Frame 22
if (isShared(so)) {
stats = getLastPlayer(so);
stats.timesplayed++;
menuToggle();
if (numPlayers(so) > 1) {
gotoAndStop ("select");
} else {
gotoAndStop ("menu");
}
} else {
gotoAndStop ("new");
}
mb.instantStart("sMenuLoop", 100);
clearMenus();
Frame 24
gotoAndStop ("menu");
Frame 25
function changeBGColor(num) {
flash.gotoAndPlay(1);
bgcolor.gotoAndStop(num);
logo.gotoAndStop(num);
}
mb.start("sMenuLoop", 5, 100);
changeBGColor(1);
playerD.name = "Current Player: " + stats.name;
stop();
Frame 26
gotoAndStop ("menu");
Frame 29
gotoAndStop ("start");
Frame 30
flash.gotoAndPlay(1);
playerD.name = "Current Player: " + stats.name;
if (stats.currentGame == true) {
contc.onRelease = function () {
resumeSurvival();
gotoAndStop ("levelSelect");
};
} else {
contc._visible = false;
}
Frame 31
gotoAndStop ("start");
Frame 34
gotoAndStop ("instructions");
Instance of Symbol 1896 MovieClip in Frame 34
//component parameters
onClipEvent (construct) {
child = "instructions";
height = 170;
}
Frame 35
changeBGColor(5);
playerD.name = "Current Player: " + stats.name;
instructions.text = "Use the movement keys to move your player, Left and Right keys to move, press the Jump key to jump or hold it to jump higher, hold the Crouch key to lower your height and dodge bullets, you can also crouch mid-air for highly evasive jumps. These keys are changeable in the options menu.";
instructions.text = instructions.text + "\n\nUse the mouse to aim and click the mouse button to shoot your weapon. Change weapons with the mousewheel.";
instructions.text = instructions.text + "\n\nUse the Modify key to change actions, Modify+Jump will hyperJump and Modify+ChangeWeapon will change time modes, Modify+Crouch will let you drop through certain floors.";
instructions.text = instructions.text + "\n\nThe Time Mode key triggers time modes which will slow down time to help you dodge and aim.";
instructions.text = instructions.text + "\n\nEvery time you destroy 2 helicopters, an item will drop. Unlock weapons by defeating levels, this will increase the variety of weapons that can be dropped.";
Frame 36
gotoAndStop ("instructions");
Frame 39
gotoAndStop ("highscores");
Instance of Symbol 1929 MovieClip "comHighscores" in Frame 39
//component parameters
onClipEvent (construct) {
scoreLocation = "";
gamename = "heli3";
saveScore = false;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 40
changeBGColor(3);
playerD.name = "Current Player: " + stats.name;
Frame 41
gotoAndStop ("highscores");
Frame 44
gotoAndStop ("options");
Frame 45
changeBGColor(4);
playerD.name = "Current Player: " + stats.name;
drawOptions(opt, true);
drawControls(cont, true);
Frame 46
gotoAndStop ("options");
Frame 49
gotoAndStop ("stats");
Instance of Symbol 1896 MovieClip in Frame 49
//component parameters
onClipEvent (construct) {
child = "statsd";
height = 170;
}
Frame 50
changeBGColor(6);
playerD.name = "Current Player: " + stats.name;
statsd.text = ("Statistics for " + stats.name) + ":";
statsd.text = statsd.text + ("\n\tTimes Played: " + stats.timesplayed);
statsd.text = statsd.text + (("\n\tGames Played: " + stats.gamesplayed) + newline);
statsd.text = statsd.text + (("\n\tTotal Time Played: " + int(stats.totaltime / frameRate)) + " seconds");
statsd.text = statsd.text + (("\n\tBest Time: " + int(stats.besttime / frameRate)) + " seconds");
statsd.text = statsd.text + (("\n\tWorst Time: " + int(stats.worsttime / frameRate)) + " seconds\n");
if (stats.totalscore == 0) {
statsd.text = statsd.text + "\n\tTotal Score: 0";
statsd.text = statsd.text + "\n\tHigh Score: 0\n";
} else {
statsd.text = statsd.text + (("\n\tTotal Score: " + int(stats.totalscore)) + "00");
statsd.text = statsd.text + (("\n\tHigh Score: " + int(stats.highscore)) + "00\n");
}
statsd.text = statsd.text + ("\n\tHelis Destroyed: " + stats.totalhelis);
statsd.text = statsd.text + (("\n\tEnemies Destroyed: " + stats.totalenemies) + newline);
var s = 0;
var o = "";
var n = 0;
var max = 0;
var maxi = 0;
var i = 0;
while (i < guns.length) {
if (stats.guns[i].unlocked) {
n++;
o = o + ("\n\t\t" + guns[i].name);
s = s + stats.guns[i].shotsfired;
if (stats.guns[i].shotsfired > max) {
maxi = i;
max = stats.guns[i].shotsfired;
}
}
i++;
}
statsd.text = statsd.text + ((((("\n\t" + n) + "/") + guns.length) + " Weapons Unlocked:") + o);
if (n == guns.length) {
statsd.text = statsd.text + "\n\tAll Weapons Unlocked!";
}
statsd.text = statsd.text + newline;
statsd.text = statsd.text + ("\n\tShots Fired: " + s);
statsd.text = statsd.text + ("\n\tShots Hit: " + stats.shotshit);
if (s > 0) {
statsd.text = statsd.text + (("\n\tAccuracy: " + Math.round((stats.shotshit / s) * 100)) + "%");
} else {
statsd.text = statsd.text + "\n\tAccuracy: n/a";
}
if (max > 0) {
statsd.text = statsd.text + ("\n\tMost used weapon: " + guns[maxi].name);
}
Frame 51
gotoAndStop ("stats");
Frame 54
gotoAndStop ("new");
Frame 55
changeBGColor(1);
newname = "";
if (isShared(so)) {
canc.onRelease = function () {
gotoAndStop ("players");
};
} else {
canc._visible = false;
createSharedObject(so);
}
qual = 0;
quals.gotoAndStop(qual + 1);
quals.onRelease = function () {
qual++;
if (qual > 2) {
qual = 0;
}
this.gotoAndStop(qual + 1);
};
Frame 56
gotoAndStop ("new");
Frame 59
gotoAndStop ("del");
Frame 60
changeBGColor(2);
delname = stats.name + "?";
Frame 61
gotoAndStop ("del");
Frame 64
gotoAndStop ("players");
Frame 65
changeBGColor(7);
playerD.name = "Current Player: " + stats.name;
Frame 66
gotoAndStop ("players");
Frame 69
gotoAndStop ("change");
Frame 70
function showPlayers() {
var _local4 = numPlayers(so);
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = playersDisplay.attachMovie("playerDisplay", "d_" + _local2, _local2);
_local3._x = ((-(_local3._width * (_local4 - 1))) / 2) + (_local2 * _local3._width);
_local3.name = so.data.players[_local2].name;
_local3.i = _local2;
_local3.onRelease = function () {
stats = getPlayer(so, this.i);
menuToggle();
gotoAndStop ("players");
};
_local2++;
}
}
changeBGColor(1);
showPlayers();
Frame 71
gotoAndStop ("change");
Frame 74
gotoAndStop ("error");
Frame 75
changeBGColor(2);
Frame 76
gotoAndStop ("error");
Frame 79
gotoAndStop ("select");
Frame 80
function showPlayers() {
var _local4 = numPlayers(so);
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = playersDisplay.attachMovie("playerDisplay", "d_" + _local2, _local2);
_local3._x = ((-(_local3._width * (_local4 - 1))) / 2) + (_local2 * _local3._width);
_local3.name = so.data.players[_local2].name;
_local3.i = _local2;
_local3.onRelease = function () {
stats = getPlayer(so, this.i);
menuToggle();
gotoAndStop ("menu");
};
_local2++;
}
}
changeBGColor(1);
showPlayers();
Frame 81
gotoAndStop ("select");
Frame 84
gotoAndStop ("credits");
Instance of Symbol 1896 MovieClip in Frame 84
//component parameters
onClipEvent (construct) {
child = "credits";
height = 170;
}
Frame 85
changeBGColor(32);
credits.text = "Heli Attack 3 - Produced by squarecircleco.";
credits.text = credits.text + "\n\nGame Design & Programming:";
credits.text = credits.text + "\n\tChristopher 'iopred' Rhodes";
credits.text = credits.text + "\n\nArtwork:";
credits.text = credits.text + "\n\tChristian 'DayDream' Hildenbrand";
credits.text = credits.text + "\n\nSound & Music:";
credits.text = credits.text + "\n\tDavid 'Psykopig' Desi";
credits.text = credits.text + "\n\tChristopher 'iopred' Rhodes";
credits.text = credits.text + "\n\nSpecial thanks goes to:";
credits.text = credits.text + "\n\tDan 'Samurai' MacDonald";
credits.text = credits.text + "\n\tJason 'Visual Mirage' Mitsios";
credits.text = credits.text + "\n\tCraig 'Kludos' McPhee";
credits.text = credits.text + "\n\tChris 'Cookie' Tran";
credits.text = credits.text + "\n\tEric 'brimstone' He Song";
credits.text = credits.text + "\n\tNathan 'dstrek' Miller";
credits.text = credits.text + "\n\tRichard 'Squize' Myles";
credits.text = credits.text + "\n\tChris 'Pixelsumo' O'shea";
credits.text = credits.text + "\n\tJeremy 'Feanor' La Camera";
credits.text = credits.text + "\n\tSasha 'Skulky' Brejnev";
credits.text = credits.text + "\n\tLuke 'Lukstr' Rewega";
credits.text = credits.text + "\n\tHeli Attack 3 Beta testers";
credits.text = credits.text + "\n\tThe Stimunation crew";
credits.text = credits.text + "\n\tEveryone at FlashKit";
credits.text = credits.text + "\n\tAll the Miniclip supporters";
credits.text = credits.text + "\n\tEverybody who played and loved Heli Attack 2";
Frame 86
gotoAndStop ("credits");
Frame 89
gotoAndStop ("levelselect");
Frame 90
mb.start("sLevelSelectLoop", 5, 100);
function mapdd(x, y) {
mapd.small.circle._x = (mapd.large.circle._x = x);
mapd.small.circle._y = (mapd.large.circle._y = y);
mapd.large._x = ((-x) * 9.5) + 250;
mapd.large._y = ((-y) * 9.5) + 50;
mapd.large._xscale = (mapd.large._yscale = 950);
mapd.large.circle._xscale = (mapd.large.circle._yscale = 50);
}
changeBGColor(1);
playerD.name = "Current Player: " + stats.name;
if (stats.currentGame == false) {
if (stats.levels[1]) {
if (stats.level > 0) {
prevc._visible = true;
} else {
prevc._visible = false;
}
if (stats.levels[stats.level + 1] == true) {
nextc._visible = true;
} else {
nextc._visible = false;
}
prevc.onRelease = function () {
stats.level--;
if (stats.level < 0) {
stats.level = 0;
}
if (stats.level == 0) {
prevc._visible = false;
}
currentLevel = levels[stats.level].name;
mapd.gotoAndStop(levels[stats.level].mapd + 1);
mapdd(levels[stats.level].mapdx, levels[stats.level].mapdy);
nextc._visible = true;
};
nextc.onRelease = function () {
if (stats.levels[stats.level + 1]) {
stats.level++;
}
if (stats.level > (levels.length - 1)) {
stats.level = levels.length - 1;
}
if ((!stats.levels[stats.level + 1]) || (stats.level == (levels.length - 1))) {
nextc._visible = false;
}
currentLevel = levels[stats.level].name;
mapd.gotoAndStop(levels[stats.level].mapd + 1);
mapdd(levels[stats.level].mapdx, levels[stats.level].mapdy);
prevc._visible = true;
};
} else {
prevc._visible = false;
nextc._visible = false;
}
savec._visible = false;
backc._visible = true;
backc.onRelease = function () {
gotoAndStop ("menu");
};
newc._visible = false;
} else {
prevc._visible = false;
nextc._visible = false;
backc._visible = false;
savec._visible = true;
savec.onRelease = function () {
gotoAndStop ("menu");
};
newc._visible = false;
}
newStart = false;
startc.onRelease = function () {
startGame(stats.level);
};
currentLevel = levels[stats.level].name;
mapd.gotoAndStop(levels[stats.level].mapd + 1);
mapdd(levels[stats.level].mapdx, levels[stats.level].mapdy);
Frame 91
gotoAndStop ("levelselect");
Frame 94
gotoAndStop ("nextLevel");
Instance of Symbol 1896 MovieClip in Frame 94
//component parameters
onClipEvent (construct) {
child = "leveld";
height = 170;
}
Frame 95
mb.start("sLevelSelectLoop", 5, 100);
changeBGColor(1);
playerD.name = "Current Player: " + stats.name;
var lc = (stats.level - 1);
leveld.text = levels[lc].name + " completed!\n";
leveld.text = leveld.text + (("\nCurrent time: " + int(stats.gametime / frameRate)) + " seconds\n");
leveld.text = leveld.text + (("\nHealth bonus: " + healthbonus) + "00");
leveld.text = leveld.text + "\nCurrent score: ";
if (score == 0) {
leveld.text = leveld.text + 0;
} else {
leveld.text = leveld.text + (int(stats.score) + "00");
}
var gu = levels[lc].gunUnlock;
if (gu >= 0) {
if (!stats.guns[gu].unlocked) {
if (gu != -1) {
leveld.text = leveld.text + (("\n\n" + guns[gu].name) + " unlocked!");
if (gu > 2) {
leveld.text = leveld.text + "\n(This gun can now drop from enemies)\n\n";
} else {
leveld.text = leveld.text + "\n\n";
}
leveld.text = leveld.text + (guns[gu].name + " weapon data:\n");
leveld.text = leveld.text + (guns[gu].info + newline);
leveld.text = leveld.text + "\tAdditional data:\n";
leveld.text = leveld.text + (("\t\tClip size: " + guns[gu].clip) + newline);
leveld.text = leveld.text + (("\t\tDamage: " + guns[gu].damage) + newline);
leveld.text = leveld.text + (("\t\tReload time: " + (guns[gu].reloadtime / frameRate)) + " seconds");
stats.guns[gu].unlocked = true;
if (gu == 1) {
stats.guns[gu].ammo = Number.POSITIVE_INFINITY;
}
}
}
}
Frame 96
gotoAndStop ("nextLevel");
Frame 99
gotoAndStop ("gameOver");
Instance of Symbol 1896 MovieClip in Frame 99
//component parameters
onClipEvent (construct) {
child = "scored";
height = 140;
}
Frame 100
mb.start("sLevelSelectLoop", 5, 100);
changeBGColor(2);
playerD.name = "Current Player: " + stats.name;
scored.text = "You have died, game over.\n";
scored.text = scored.text + (("\nFinal time: " + int(stats.gametime / frameRate)) + " seconds");
if (stats.score == 0) {
scored.text = scored.text + "\nFinal score: 0";
} else {
scored.text = scored.text + (("\nFinal score: " + int(stats.score)) + "00");
}
Frame 101
gotoAndStop ("gameOver");
Frame 104
gotoAndStop ("cheats");
Instance of Symbol 1896 MovieClip in Frame 104
//component parameters
onClipEvent (construct) {
child = "cheatd";
height = 80;
}
Frame 105
changeBGColor(3);
playerD.name = "Current Player: " + stats.name;
cheatcode = "";
cheats = [[1, "0aed94549c866af127904aa77f0a580c", "I just wanted some food"], [6, "86950984ae016acfd1522793cbfad639", "Long tall sally, she's built sweet"], [8, "5c1e4df80a6025cdd0c2197c6561c3ed", "Here's two forms of id, suck them both"], [9, "dfbb0b14f61ac48d5a8b338413bcf58e", "It wasn't a jackal the first time you said it"], [12, "59cba561167be494dd1add10f7b841c2", "Loose change"], [15, "54059ec4d7c3fca916338bd5cdb76500", "Pure Ethanol"], [16, "8df1f01c33a081ed3249acf1eb34f287", "Your it"], [19, "ffe46efde36294cfd2c70c960b25a6c6", "Nickel Cadmium"], [20, "111b7dc627467efcd3838a9b1eedbf05", "Flubber"], [21, "d9534b74333a5f1bd83cdca322e33de0", "For we are young and free"], [22, "2c1743a391305fbf367df8e4f069f9f9", "Alpha"], [23, "987bcab01b929eb2c07877b224215c92", "Beta"], [24, "05b048d7242cb7b8b57cfa3b1d65ecea", "Gamma"], [26, "3aa40480fe6cc791bf665a70edea1af2", "You have time to duck?"], [27, "6bf52ba339edc2cb25b8bb0151e8bb3b", "Affirmative"], [29, "f6f91074cdabcd7b5ce3386c2f2709f1", "London"], [30, "959162af82d0d69a8b626e02bcd9b15a", "Warning"], [31, "d86e21bf26fc75c77e4e78be4ad784b7", "Blackhole sun, wont you come"]];
Frame 106
gotoAndStop ("cheats");
Frame 109
gotoAndStop ("weapons");
Instance of Symbol 1896 MovieClip in Frame 109
//component parameters
onClipEvent (construct) {
child = "weaponsd";
height = 170;
}
Frame 110
changeBGColor(6);
playerD.name = "Current Player: " + stats.name;
weapond.text = "";
var i = 0;
while (i < guns.length) {
if (stats.guns[i].unlocked) {
weaponsd.text = weaponsd.text + (guns[i].name + ":\n");
weaponsd.text = weaponsd.text + (guns[i].info + newline);
weaponsd.text = weaponsd.text + "\tAdditional data:\n";
weaponsd.text = weaponsd.text + (("\t\tClip size: " + guns[i].clip) + newline);
weaponsd.text = weaponsd.text + (("\t\tDamage: " + guns[i].damage) + newline);
weaponsd.text = weaponsd.text + (("\t\tReload time: " + (guns[i].reloadtime / frameRate)) + " seconds\n\n");
}
i++;
}
Frame 111
gotoAndStop ("weapons");
Frame 114
gotoAndStop ("weapons");
Instance of Symbol 1929 MovieClip "comHighscores" in Frame 114
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.submitscore";
gamename = "heli3";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 115
changeBGColor(3);
playerD.name = "Current Player: " + stats.name;
Frame 116
gotoAndStop ("weapons");
Frame 120
gotoAndStop ("initgame");
Frame 121
startGame(l);
gotoAndStop ("game");
Frame 122
gotoAndStop ("initgame");
Frame 124
gotoAndStop ("game");
Frame 125
stop();
Frame 126
gotoAndStop ("game");
Symbol 29 MovieClip Frame 4
stop();
Symbol 2005 MovieClip [__Packages.MusicBoard] Frame 0
class MusicBoard
{
var sb, sbt, music, vol, active;
function MusicBoard (sb, sbt, active) {
this.sb = sb;
this.sbt = sbt;
music = null;
vol = 0;
this.active = active;
}
function start(soundName, speed, vol) {
this.vol = vol;
if (!active) {
music = soundName;
return(undefined);
}
if (soundName == music) {
sbt.addTransform(soundName, sbt.FADETO, speed, vol);
return(undefined);
}
if (music != null) {
sbt.addTransform(music, sbt.FADEOUT, speed, 0);
}
sb.setVolume(soundName, 0);
sb.start(soundName, 0, 99999, true);
sbt.addTransform(soundName, sbt.FADEIN, speed, vol);
music = soundName;
}
function stop(speed) {
sbt.addTransform(music, sbt.FADEOUT, speed, 0);
}
function instantStart(soundName, vol) {
this.vol = vol;
if (!active) {
music = soundName;
return(undefined);
}
if (soundName == music) {
sb.setVolume(soundName, vol);
return(undefined);
}
if (music != null) {
sb.stop(music);
}
sb.setVolume(soundName, vol);
sb.start(soundName, 0, 99999, true);
music = soundName;
}
function instantIntroStart(soundName, soundName2, vol) {
this.vol = vol;
if (!active) {
music = soundName;
return(undefined);
}
if (soundName == music) {
sb.setVolume(soundName, vol);
return(undefined);
}
if (music != null) {
sb.stop(music);
}
sb.setVolume(soundName, vol);
sb.setVolume(soundName2, vol);
music = soundName2;
var _local5 = sb.getSound(soundName);
_local5.onSoundComplete = function () {
_root.sb.start(soundName2, 0, 99999, true);
};
sb.start(soundName, 0, 0, true);
}
function setActive(active) {
var _local2 = this.active;
this.active = active;
if (music == null) {
return(undefined);
}
if (this.active) {
if (!_local2) {
sb.setVolume(music, 0);
sb.start(music, 0, 99999, true);
sbt.addTransform(music, sbt.FADEIN, 5, vol);
}
} else {
stop(1);
}
}
}
Symbol 2006 MovieClip [__Packages.SoundBoard] Frame 0
class SoundBoard
{
var sounds, soundsClip, active;
function SoundBoard (clip, depth, active) {
sounds = new Array();
soundsClip = clip.createEmptyMovieClip("SoundBoard" + depth, depth);
this.active = active;
}
function attachSound(soundName, unForce) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
return(sounds[_local2].soundVar);
}
_local2++;
}
var _local4 = new Object();
_local4.soundName = soundName;
var _local6 = soundsClip.createEmptyMovieClip(soundName, sounds.length);
var _local5 = new Sound(_local6);
_local5.attachSound(soundName);
_local4.soundVar = _local5;
if (unForce == true) {
_local4.unForce = true;
} else {
_local4.unForce = false;
}
sounds.push(_local4);
return(_local5);
}
function getSound(soundName) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
return(sounds[_local2].soundVar);
}
_local2++;
}
}
function start(soundName, secondsOffset, loops, forceActive) {
if (active || (forceActive)) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
sounds[_local2].soundVar.stop();
sounds[_local2].soundVar.start(secondsOffset, loops);
break;
}
_local2++;
}
}
}
function stop(soundName) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
sounds[_local2].soundVar.stop();
break;
}
_local2++;
}
}
function setVolume(soundName, vol) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
sounds[_local2].soundVar.setVolume(vol);
}
_local2++;
}
}
function getVolume(soundName, vol) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
return(sounds[_local2].soundVar.getVolume());
}
_local2++;
}
}
function setPan(soundName, pan) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
sounds[_local2].soundVar.setPan(pan);
}
_local2++;
}
}
function getPan(soundName, vol) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
return(sounds[_local2].soundVar.getPan());
}
_local2++;
}
}
function setTransform(soundName, trans) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
sounds[_local2].soundVar.setTransform(trans);
}
_local2++;
}
}
function getTransform(soundName, vol) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (sounds[_local2].soundName == soundName) {
return(sounds[_local2].soundVar.getTransform());
}
_local2++;
}
}
function stopAllSounds() {
var _local2 = 0;
while (_local2 < sounds.length) {
if (!sounds[_local2].unForce) {
sounds[_local2].soundVar.stop();
}
_local2++;
}
}
function setActive(active) {
this.active = active;
if (!this.active) {
stopAllSounds();
}
}
}
Symbol 2007 MovieClip [__Packages.SoundBoardTransform] Frame 0
class SoundBoardTransform
{
var sb, transformations;
function SoundBoardTransform (sb) {
this.sb = sb;
transformations = new Array();
}
function addTransform(soundName, transform, speed, target) {
var _local2 = 0;
while (_local2 < transformations.length) {
if (transformations[_local2].soundName == soundName) {
clearInterval(transformations[_local2].interval);
transformations[_local2] = null;
}
_local2++;
}
var _local3 = new Object();
var _local5 = setInterval(this, "doTransform", speed, transformations.length);
_local3.interval = _local5;
_local3.soundName = soundName;
_local3.transform = transform;
_local3.target = target;
transformations.push(_local3);
}
function addTransformStartLoop(soundName, transform, speed, target) {
var _local3 = false;
var _local2 = 0;
while (_local2 < transformations.length) {
if (transformations[_local2].soundName == soundName) {
clearInterval(transformations[_local2].interval);
transformations[_local2] = null;
_local3 = true;
}
_local2++;
}
if (!_local3) {
sb.start(soundName, 0, 99999);
}
var _local5 = new Object();
var _local6 = setInterval(this, "doTransform", speed, transformations.length);
_local5.interval = _local6;
_local5.soundName = soundName;
_local5.transform = transform;
_local5.target = target;
transformations.push(_local5);
}
function doTransform(intervalID) {
var _local3 = transformations[intervalID];
var _local4 = _local3.transform;
var _local2 = sb.getSound(_local3.soundName);
if (_local4 & FADEIN) {
_local2.setVolume(_local2.getVolume() + 1);
if (_local2.getVolume() >= _local3.target) {
clearInterval(_local3.interval);
transformations[intervalID] = null;
clearTransforms();
}
} else if (_local4 & FADEOUT) {
_local2.setVolume(_local2.getVolume() - 1);
if (_local2.getVolume() <= _local3.target) {
_local2.stop();
clearInterval(_local3.interval);
transformations[intervalID] = null;
clearTransforms();
}
} else if (_local4 & FADETO) {
if (_local2.getVolume() > _local3.target) {
_local2.setVolume(_local2.getVolume() - 1);
} else {
_local2.setVolume(_local2.getVolume() + 1);
}
if (_local2.getVolume() == _local3.target) {
clearInterval(_local3.interval);
transformations[intervalID] = null;
clearTransforms();
}
} else if (_local4 & STOPLOOP) {
_local2.stop();
clearInterval(_local3.interval);
transformations[intervalID] = null;
clearTransforms();
}
}
function clearTransforms() {
var _local2 = 0;
while (_local2 < transformations.length) {
if (transformations[_local2] != null) {
return(undefined);
}
_local2++;
}
transformations = new Array();
}
var FADEIN = 1;
var FADEOUT = 2;
var FADETO = 4;
var STOPLOOP = 8;
}
Symbol 53 MovieClip Frame 1
this._visible = false;
Symbol 59 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 64 MovieClip Frame 1
pushSWF1 = "http://www.miniclip.com/swfcontent/push/didyouknow.swf";
totalAds = 1;
gotoAndPlay ("ReadCookie");
Symbol 64 MovieClip Frame 9
so = SharedObject.getLocal("MiniclipLoaderAd");
showThisAd = so.data.showThisAd + 1;
if (showThisAd > totalAds) {
showThisAd = 1;
}
so.data.showThisAd = showThisAd;
gotoAndPlay ("prepareAd");
Symbol 64 MovieClip Frame 20
doReadCookie();
showAd = ((this["pushSWF" + showThisAd] + "?cacheBuster=") + getTimer()) + random(999999);
gotoAndPlay ("loadAd");
Symbol 64 MovieClip Frame 31
if (_url.indexOf(http) > 0) {
mcAd.loadMovie(showAd);
}
mcCookie.doWriteCookie(showThisAd);
Symbol 64 MovieClip Frame 33
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
lastAdShown = showThisAd;
doWriteCookie();
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 64 MovieClip Frame 41
stop();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 100
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 80 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 81 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 81 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 60
Symbol 95 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 96 MovieClip Frame 1
_root.stop();
play();
Instance of Symbol 53 MovieClip "mcIntro" in Symbol 96 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 96 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
trace(stageWidth);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 76 MovieClip "mcLoadingAnimated" in Symbol 96 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 96 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
_root.isFinished = true;
stop();
} else {
mcLoadingAnimated._visible = true;
}
Symbol 96 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 125 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 15
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 7
_root.ejectBrass(1, -0.5 + (Math.random() * 1), -6);
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 7
_root.ejectBrass(1, -0.5 + (Math.random() * 1), -6);
Symbol 162 MovieClip Frame 15
_root.ejectBrass(1, -0.5 + (Math.random() * 1), -6);
Symbol 171 MovieClip Frame 1
!!!ERROR
Symbol 171 MovieClip Frame 7
!!!ERROR
Symbol 201 MovieClip Frame 1
!!!ERROR
Symbol 212 MovieClip Frame 1
!!!ERROR
Symbol 212 MovieClip Frame 7
!!!ERROR
Symbol 225 MovieClip Frame 1
!!!ERROR
Symbol 304 MovieClip [gooSplat] Frame 1
!!!ERROR
Symbol 369 MovieClip [Bullet] Frame 1
!!!ERROR
Symbol 397 MovieClip [explosion] Frame 1
!!!ERROR
Symbol 523 MovieClip [HUD] Frame 1
stop();
port.gotoAndStop(100);
heli._visible = false;
powerup._visible = false;
poweruptime._visible = false;
Symbol 628 MovieClip [purpleExplosion] Frame 1
!!!ERROR
Symbol 648 MovieClip [enemyBullet] Frame 1
!!!ERROR
Symbol 1731 MovieClip Frame 1
!!!ERROR
Symbol 1821 MovieClip Frame 1
!!!ERROR
Symbol 1827 MovieClip Frame 590
!!!ERROR
Symbol 1842 MovieClip Frame 15
!!!ERROR
Symbol 1849 MovieClip Frame 93
!!!ERROR
Symbol 1849 MovieClip Frame 105
!!!ERROR
Symbol 1856 MovieClip Frame 41
!!!ERROR
Symbol 1871 MovieClip Frame 1
!!!ERROR
Symbol 1872 MovieClip Frame 1
!!!ERROR
Symbol 1872 MovieClip Frame 106
!!!ERROR
Symbol 1872 MovieClip Frame 213
!!!ERROR
Symbol 1876 Button
on (release) {
!!!ERROR
Symbol 1877 Button
on (release) {
!!!ERROR
Symbol 1878 Button
on (release) {
!!!ERROR
Symbol 1881 Button
on (release) {
!!!ERROR
Symbol 1882 Button
on (release) {
!!!ERROR
Symbol 1883 Button
on (release) {
!!!ERROR
Symbol 1886 Button
on (release) {
!!!ERROR
Symbol 1888 MovieClip Frame 1
!!!ERROR
Symbol 1890 Button
on (release) {
!!!ERROR
Symbol 1896 MovieClip Frame 1
bstart._y = 0;
drag._y = bstart._y + bstart._height;
drag._yscale = Math.max(10, height / _parent[child].maxscroll);
bend._y = drag._y + height;
scrollnum = 1;
Mouse.addListener(this);
this.onMouseWheel = function (delt) {
scrollnum = _parent[child].scroll - delt;
if (scrollnum > _parent[child].maxscroll) {
scrollnum = _parent[child].maxscroll;
} else if (scrollnum < 0) {
scrollnum = 0;
}
};
onEnterFrame = function () {
drag._yscale = Math.max(10, height / _parent[child].maxscroll);
if (drag.drag == 1) {
scrollnum = Math.ceil(((drag._y - 10) / (height - drag._yscale)) * _parent[child].maxscroll);
} else {
drag._y = (10 + (scrollnum * (height / _parent[child].maxscroll))) - (height / _parent[child].maxscroll);
drag.snap();
}
_parent[child].scroll = scrollnum;
y = _y;
};
Instance of Symbol 1894 MovieClip "drag" in Symbol 1896 MovieClip Frame 1
onClipEvent (load) {
function snap() {
if (_y < (_parent.bstart._y + _parent.bstart._height)) {
_y = (_parent.bstart._y + _parent.bstart._height);
}
if ((_y + _height) > _parent.bend._y) {
_y = (_parent.bend._y - _height);
}
}
}
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
drag = 1;
_y = ((_root._ymouse - _parent._y) - (_height / 2));
snap();
}
}
onClipEvent (mouseUp) {
!!!ERROR
Instance of Symbol 1895 MovieClip "bstart" in Symbol 1896 MovieClip Frame 1
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
drag = 1;
}
}
onClipEvent (mouseUp) {
!!!ERROR
Instance of Symbol 1895 MovieClip "bend" in Symbol 1896 MovieClip Frame 1
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
drag = 1;
}
}
onClipEvent (mouseUp) {
!!!ERROR
Symbol 1898 Button
on (release) {
!!!ERROR
Symbol 1907 MovieClip Frame 1
!!!ERROR
Symbol 1923 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Instance of Symbol 1907 MovieClip "mcHighscores" in Symbol 1929 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Symbol 1929 MovieClip Frame 2
if (_url.indexOf("miniclip.com") == -1) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?" + noCache);
stop();
}
Symbol 1929 MovieClip Frame 3
!!!ERROR
Symbol 1936 Button
on (release, keyPress "<Enter>") {
if (newname != "") {
stats = addPlayer(so, newPlayer(newname, qual));
menuToggle();
if (numPlayers(so) > 1) {
gotoAndStop ("players");
} else {
gotoAndStop ("menu");
}
}
}
Symbol 1952 Button
on (release) {
if (!deleteLastPlayer(so)) {
gotoAndStop ("new");
} else {
stats = getLastPlayer(so);
if (true || (numPlayers(so) > 1)) {
gotoAndStop ("change");
} else {
gotoAndStop ("players");
}
}
}
Symbol 1955 Button
on (release) {
!!!ERROR
Symbol 1956 Button
on (release) {
!!!ERROR
Symbol 1957 Button
on (release) {
!!!ERROR
Symbol 1958 Button
on (release) {
!!!ERROR
Symbol 1959 Button
on (release) {
!!!ERROR
Symbol 1960 Button
on (release) {
!!!ERROR
Symbol 1963 Button
on (release) {
!!!ERROR
Symbol 1989 Button
on (release) {
!!!ERROR
Symbol 1995 Button
on (release) {
!!!ERROR
Symbol 1999 Button
on (release, keyPress "<Enter>") {
var input = calcMD5(cheatcode.toLowerCase());
if (input == "da02d13c34e37ac3b7711035d8f9afe2") {
cheatd.text = "iopred - Instigator of Awesomness!\n\t(It's not going to be that easy)\n" + cheatd.text;
}
if (input == "e61ad40c8597b3804daed1df3872df79") {
cheatd.text = "DayDream - Artwizard Extrordinaire!\n\t(It's not going to be that easy)\n" + cheatd.text;
}
if (input == "c7fba0a0efed47872385ffb067ffcff7") {
cheatd.text = "All weapons unlocked\n\t(Retro gaming ftw)\n" + cheatd.text;
var i = 0;
while (i < guns.length) {
stats.guns[i].unlocked = true;
i++;
}
}
if (input == "be718e6a09dc819f60e8ffca7a63c93a") {
cheatd.text = "All levels unlocked\n\t(Gorgatron repellant)\n" + cheatd.text;
var i = 0;
while (i < levels.length) {
stats.levels[i] = true;
i++;
}
}
if (input == "ce5954a6651760a1dda24a1d94e5f453") {
cheatd.text = "Amazon jungle unlocked\n\t(We\u2019ve got jungle fever, we\u2019re in love)\n" + cheatd.text;
var i = 0;
while (i < 6) {
stats.levels[i] = true;
i++;
}
}
if (input == "b6fda32cd7906f2642420dffb2a44e83") {
cheatd.text = "Canyon lands unlocked\n\t(To keep me from getting to you)\n" + cheatd.text;
var i = 0;
while (i < 10) {
stats.levels[i] = true;
i++;
}
}
if (input == "dce3b1ce7579a17a8e771db1947d6f07") {
cheatd.text = "Underground lab unlocked\n\t(Into our guitars)\n" + cheatd.text;
var i = 0;
while (i < 14) {
stats.levels[i] = true;
i++;
}
}
var i = 0;
while (i < cheats.length) {
if (input == cheats[i][1]) {
cheatd.text = (((guns[cheats[i][0]].name + " unlocked\n\t(") + cheats[i][2]) + ")\n") + cheatd.text;
stats.guns[cheats[i][0]].unlocked = true;
}
i++;
}
cheatcode = "";
}