Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("90cffd6b", this, 10301, true);
function OpenArmorGames() {
getURL ("http://www.armorgames.com", "_blank");
}
function OpenHeroInteractive() {
getURL ("http://www.herointeractive.com", "_blank");
}
function BuyExtraContent() {
getURL ("http://www.herointeractive.com/stormwinds1-5.html", "_blank");
}
function HoldForVerification() {
return(blnHoldForVerify);
}
function BuildCampaigns() {
delete _global.Campaigns;
delete _global.Challenges;
_global.Campaigns = new Array();
_global.Challenges = new Array();
var _local2;
_local2 = new Campaign();
_local2.strTitle = "The Last City";
_local2.strDifficulty = "Hard";
_local2.strSlots = "5";
_local2.strDescription = "This is it, the final confrontation, all or nothing. The enemy that still remains has finally surrounded our final holdout, the last city.";
_local2.strButton = "city_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Eastern Plains";
_local2.strDifficulty = "Medium";
_local2.strSlots = "4";
_local2.strDescription = "As the enemy moves south towards our eastern border, we must rely on this countryside fortress to hold them off. Not only will we be facing aerial assaults, but land vehicles as well!";
_local2.strButton = "plains_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "The Sky Fortress";
_local2.strDifficulty = "Hard";
_local2.strSlots = "5";
_local2.strDescription = "The enemy invasion towards our home will start off mighty indeed, but must be broken apart by our glorious air fortress. Soaring high in the clouds, we might be able to stop them before they even reach our lands!";
_local2.strButton = "sky_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Ocean Guard";
_local2.strDifficulty = "Easy";
_local2.strSlots = "4";
_local2.strDescription = "After the main invasion splits up, a large portion of the invasionary force will head straight to our homeland. This fortress, overlooking the ocean, is our first defense and must stand strong in the face of our destruction!";
_local2.strVictory = "Great job! Although you held your defenses, other sections of the fortress succumbed to the enemy. Looks like there is more ahead...";
_local2.strButton = "ocean_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret11", type:11, cost:2000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:5000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:15000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form."});
_local2.arrGuns.push({name:"turret13", type:13, cost:30000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:40000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Mountain Pass";
_local2.strDifficulty = "Medium";
_local2.strSlots = "4";
_local2.strDescription = "The enemy's allies from the North will have to enter through this mountain pass. Our fortress here is strong and, if managed well, can withstand the fury of their awesome contraptions.";
_local2.strButton = "pass_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "The South";
_local2.strDifficulty = "Insane";
_local2.strSlots = "5";
_local2.strDescription = "Although extremely dangerous, our enemies and their allies have sent a force to invade from the south. Our only defense, a massive fortress overlooking the neighboring volcano, must hold them at bay or all is lost.";
_local2.strButton = "south_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Frozen Peaks";
_local2.strDifficulty = "Medium";
_local2.strSlots = "4";
_local2.strDescription = "Sitting atop our tallest mountains in the snow, this is our last bastion against the main invasionary force before they reach our home city. Defend till the last man, or our hope shall perish... with our families.";
_local2.strButton = "peaks_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:10000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Northern Desert";
_local2.strDifficulty = "Hard";
_local2.strSlots = "5";
_local2.strDescription = "The Northern Desert is a barren wasteland, home to a mighty fortress seperated from our main civilization and nearly forgotten... until now. Their stand against the enemy is vital to our surviving the coming onslaught.";
_local2.strButton = "desert_bt";
_local2.blnSet = false;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "All Guns";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "all_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Drone Swarm";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge1_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Juggernaut Insanity";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge2_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Missile Mayhem";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge3_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Acid Cannon Practice";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge4_bt";
_local2.blnSet = true;
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Bombs Away!";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge5_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Artillery Tower Practice";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge6_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "The Hardest Lvl. Pt. 1";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge7_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Decoy Armada";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge8_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
_global.Campaigns.push(_local2);
_local2 = new Campaign();
_local2.strTitle = "Kongregate Challenge";
_local2.strDifficulty = "";
_local2.strSlots = "";
_local2.strDescription = "";
_local2.strButton = "challenge9_bt";
_local2.blnSet = true;
_local2.arrGuns.push({name:"turret1", type:1, cost:1500, title:"Heavy Cannon", weaponType:"Primary Weapon", description:"This is your standard gun: a lot of life, awesome reload time, and decent damage. Hold down on the mouse button to gain strength, then release to fire. Takes practice, but skill paired with this weapon leaves a lot of enemies reduced to scrap metal very quickly."});
_local2.arrGuns.push({name:"turret2", type:2, cost:1500, title:"Machine Gun", weaponType:"Primary Weapon", description:"The machine gun can fire a number of bullets quickly in a straight line, but each bullet does less damage. It also has less life than the heavy cannon. Hold mouse button down to fire."});
_local2.arrGuns.push({name:"turret11", type:11, cost:10000, title:"Dual Machine Gun", weaponType:"Primary Weapon", description:"Not only does this powerful primary weapon have two machine guns, but unlike the other turrets, it can rotate a full 360 degrees! Hold mouse button down to fire. "});
_local2.arrGuns.push({name:"turret12", type:12, cost:10000, title:"Radio Plasmid Gun", weaponType:"Primary Weapon", description:"This powerful gun fires multiple blasts of plasmid in succession. Best though, is that when you fire one cannon, all other plasmid cannons fire as well! Select one and hold mouse button down to fire... all of them."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret19", type:19, cost:20000, title:"Flame Thrower", weaponType:"Primary Weapon", description:"The flame thrower deals a lot of damage but in a very limited range. Hold down the mouse button to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret18", type:18, cost:30000, title:"Minigun", weaponType:"Primary Weapon", description:"It's like the machine gun, but much more awesome. Hold mouse button down to fire."});
}
_local2.arrGuns.push({name:"turret3", type:3, cost:3000, title:"Sniping Cannon", weaponType:"Secondary Weapon", description:"The sniping gun fires a single, very powerful, armor piercing shot that hits its target instantly. Damage is dealt without regard to damage zones. Just click to fire."});
_local2.arrGuns.push({name:"turret5", type:5, cost:4000, title:"Flak Cannon", weaponType:"Secondary Weapon", description:"The flak cannon allows you to fire a normal bullet into the air which detonates and explodes the shell into many smaller shards. Very potent vs. groups. Hold down on the mouse button to gain strength, then release to fire."});
_local2.arrGuns.push({name:"turret16", type:16, cost:5000, title:"Remote Missile", weaponType:"Secondary Weapon", description:"Ever have a target you just couldn't hit? No longer. This remote controlled missile follows your mouse when fired, so you can manuever it to hit those hard to reach spots."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret6", type:6, cost:8000, title:"Flame Cannon", weaponType:"Secondary Weapon", description:"The flame cannon does massive amounts of damage by firing intensly heated charges at an enemy. On impact, the shells explode into multiple shards, each capable of more damage. Deadly vs. large vehicles. Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret22", type:22, cost:10000, title:"Acid Cannon", weaponType:"Secondary Weapon", description:"The acid cannon is similar to the heavy cannon, except that the canister you launch is loaded with corrosive acid that leaks out in a trail behind it, causing a lot of damage below! Hold down on the mouse button to gain strength, then release to fire."});
}
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret23", type:23, cost:10000, title:"Artillery Tower", weaponType:"Secondary Weapon", description:"The artillery tower communicates with the guns behind our lines to call forth a massive barrage of shells towards a target area, laying waste to whatever it hits. Simply select the tower, then click where you'd like to target!"});
}
_local2.arrGuns.push({name:"turret7", type:7, cost:20000, title:"Lightning Gun", weaponType:"Secondary Weapon", description:"The lightning gun fires an arc of intense energy instantly at whatever enemy you click on. Then, based on the gun's upgrades, it'll jump from enemy to enemy in chain form. Each jump does less damage than the one before it."});
_local2.arrGuns.push({name:"turret13", type:13, cost:35000, title:"Apocalypse Cannon", weaponType:"Secondary Weapon", description:"Arguably one of the most powerful weapons created, the apocalypse cannon destroys all flying non-boss units on the screen, enemy or not! Just click to fire."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret10", type:10, cost:45000, title:"Meteor Summoner", weaponType:"Secondary Weapon", description:"The meteor summoner calls forth a massive raining of meteors that pummel your enemies into little itsy bits. Hold down the mouse to charge, when fully charged it'll fire."});
}
_local2.arrGuns.push({name:"turret14", type:14, cost:5000, title:"Orbital Mines", weaponType:"Passive Weapon", description:"This tower has a number of mines that orbit it's peak. Mines deal a lot of damage, and once destroyed, new ones will respawn to take their place! You don't even have to control it!"});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret21", type:21, cost:3000, title:"Avenger", weaponType:"Vehicle", description:"Our little airship, the Avenger, follows your mouse when selected and can fire its armed machine gun. It also self repairs at it's landing pad! Click on it's landing pad, then click to launch. Click on another turret to have it return to the landing pad."});
}
_local2.arrGuns.push({name:"turret20", type:20, cost:5000, title:"Decoy Drones", weaponType:"Support", description:"This handy structure releases decoy drones that fly about and take damage while distracting the enemies. Better though, you can upgrade and give them a gun! You don't need to control this tower."});
_local2.arrGuns.push({name:"turret15", type:15, cost:7000, title:"Time Gun", weaponType:"Support", description:"This crazy machinery can freeze enemies right where they are for a short period of time, allowing you to unleash hell! Just click to fire!"});
_local2.arrGuns.push({name:"turret17", type:17, cost:7000, title:"Shield Gun", weaponType:"Support", description:"The shield gun can protect another turret and prevent a lot of damage. Rather than give a turret more health, bullets do less damage, some none at all! Click on the shield turret and then, with mouse button still down, drag to the turret you'd like to protect."});
_local2.arrGuns.push({name:"turret4", type:4, cost:6000, title:"Health Buffer", weaponType:"Passive Buffer", description:"As long as the health buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of damage they can take."});
_local2.arrGuns.push({name:"turret8", type:8, cost:8000, title:"Damage Buffer", weaponType:"Passive Buffer", description:"As long as the damage buffer isn't destroyed on the battlefield, all of your turrets will get a raise in the amount of pain they dish out."});
if (_global.var1.Get() != -1) {
_local2.arrGuns.push({name:"turret9", type:9, cost:30000, title:"Fire Rate Buffer", weaponType:"Passive Buffer", description:"As long as the fire rate buffer isn't destroyed, all of your turrets will reload/recharge faster- meaning you can use them more often."});
}
_global.Campaigns.push(_local2);
_global.Challenges.push({strButton:"challenge1_bt", blnLocked:false, strTitle:"Drone Swarm", strDescription:"In this challenge mission, you must use nothing but your lone heavy cannon to take out a swarm of harmless drones. Kill them quickly though, you'll get a hefty score bonus based on how fast you can clear the level!", blnCompleted:false, intScore:0, maxTimeInSeconds:120, maxTimeBonus:20000, maxAccuracyBonus:4000, url:"http://rankz.armorbot.com/stormwinds1_5_ch1/", parameter1:"MjE1N2olZSVhJW4lcw==", parameter2:"SWtPdGNqU2I="});
_global.Challenges.push({strButton:"challenge5_bt", blnLocked:false, strTitle:"Bombs Away!", strDescription:"In this challenge, it's just you, your flak cannons, and a whole lot of things that drop bombs. Lots and lots of bombs...", blnCompleted:false, intScore:0, maxTimeInSeconds:300, maxTimeBonus:50000, maxAccuracyBonus:5000, url:"http://rankz.armorbot.com/stormwinds15ch5/", parameter1:"MjE5M2olZSVhJW4lcw==", parameter2:"SFd1RVpZSHU="});
_global.Challenges.push({strButton:"challenge8_bt", blnLocked:false, strTitle:"Decoy Armada", strDescription:"Decoys, decoys, and more decoys. That's what this challenge mission is about. Choose the best balance of upgrades to destroy your enemies as swiftly as possible. Oh yeah, and you get a machine gun too. Also, consider lowering your graphics settings. :)", blnCompleted:false, intScore:0, maxTimeInSeconds:300, maxTimeBonus:40000, maxAccuracyBonus:0, url:"http://rankz.armorbot.com/stormwinds15ch8/", parameter1:"MjIzMWolZSVhJW4lcw==", parameter2:"bXZQZ3lOZ1o="});
_global.Challenges.push({strButton:"challenge9_bt", blnLocked:false, strTitle:"Kongregate Challenge", strDescription:"In this special Kongregate challenge mission, you'll face a large force of enemies, including 2 new units- the Shield Ship and the Kongregate Elite Juggernaut!", blnCompleted:false, intScore:0, maxTimeInSeconds:300, maxTimeBonus:40000, maxAccuracyBonus:20000, url:"http://rankz.armorbot.com/stormwinds15ch9/", parameter1:"MjI5M2olZSVhJW4lcw==", parameter2:"b1RyT0RRSU8="});
_global.Challenges.push({strButton:"challenge2_bt", blnLocked:true, strTitle:"Juggernaut Insanity", strDescription:"You'll get a ton of gold and upgrade points, but you'll still have a difficult tasking at destroy all 30 Juggernaut airships coming at you. Bonus points for quick times!", blnCompleted:false, intScore:0, maxTimeInSeconds:600, maxTimeBonus:70000, maxAccuracyBonus:10000, url:"http://rankz.armorbot.com/stormwinds15ch2/", parameter1:"MjE4M2olZSVhJW4lcw==", parameter2:"dUJuckxzeWo="});
_global.Challenges.push({strButton:"challenge3_bt", blnLocked:true, strTitle:"Missile Mayhem", strDescription:"In this challenge, it's all missiles and reload buffs. Destroy the oncoming enemies as fast as possible with your remote missiles! You have lots of them!", blnCompleted:false, intScore:0, maxTimeInSeconds:600, maxTimeBonus:50000, maxAccuracyBonus:0, url:"http://rankz.armorbot.com/stormwinds15ch3/", parameter1:"MjE4NmolZSVhJW4lcw==", parameter2:"TXFzRVJKQ1c="});
_global.Challenges.push({strButton:"challenge4_bt", blnLocked:true, strTitle:"Acid Cannon Practice", strDescription:"This challenge mission will give you some practice with the brand new Acid Cannon, added for EC subscribers in this first update!", blnCompleted:false, intScore:0, maxTimeInSeconds:180, maxTimeBonus:30000, maxAccuracyBonus:5000, url:"http://rankz.armorbot.com/stormwinds15ch4/", parameter1:"MjE5MmolZSVhJW4lcw==", parameter2:"RmpybXpFSHg="});
_global.Challenges.push({strButton:"challenge6_bt", blnLocked:true, strTitle:"Artillery Tower Practice", strDescription:"This challenge mission will give you some practice with the brand new Artillery Tower, added for EC subscribers in the second update!", blnCompleted:false, intScore:0, maxTimeInSeconds:240, maxTimeBonus:40000, maxAccuracyBonus:5000, url:"http://rankz.armorbot.com/stormwinds15ch6/", parameter1:"MjIyOWolZSVhJW4lcw==", parameter2:"Tm9RSEVWaEQ="});
_global.Challenges.push({strButton:"challenge7_bt", blnLocked:true, strTitle:"The Hardest Lvl. Pt. 1", strDescription:"There's not much special about this challenge other than it's really freaking hard. You'll face all kinds of enemies in a massively long wave. You'll probably die, but so will everyone else.", blnCompleted:false, intScore:0, maxTimeInSeconds:600, maxTimeBonus:70000, maxAccuracyBonus:20000, url:"http://rankz.armorbot.com/stormwinds15ch7/", parameter1:"MjIzMGolZSVhJW4lcw==", parameter2:"S1hTVFdhc2E="});
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
stop();
var additionalMenu = new ContextMenu();
additionalMenu.hideBuiltInItems();
var NewItem = new ContextMenuItem("Play More Games!", OpenArmorGames);
additionalMenu.customItems.push(NewItem);
NewItem = new ContextMenuItem("This Game Developed by Hero Interactive", OpenHeroInteractive);
additionalMenu.customItems.push(NewItem);
_root.menu = additionalMenu;
var verifyData = new XML();
verifyData.ignoreWhite = true;
_global.versionNumber = "V 1.5 61 U";
_global.musicOn = true;
_global.soundOn = true;
_global.graphics = "HIGH";
_global.myMusicPlayer = new Music();
_global.SoundManager = new SoundPlayer();
_global.ResumeSong = "";
_global.Campaigns = new Array();
_global.Challenges = new Array();
_global.currentCampaign = "";
_global.currentProfile = new PlayerProfile();
_global.cheatsEnabled = new DataObject();
_global.cheatsEnabled.Set(236545);
_global.cheatUnlock = new DataObject();
_global.cheatUnlock.Set(236545);
_global.cheatCheapGuns = new DataObject();
_global.cheatCheapGuns.Set(236545);
_global.cheatUpgrades = new DataObject();
_global.cheatUpgrades.Set(236545);
_global.var1 = new DataObject();
_global.var1.Set(2382752);
_global.arenaCurrentName = "";
_global.arenaCurrentImage = "";
_global.arenaPrevName = "";
_global.arenaPrevImage = "";
_global.SaveStrDifficulty = "";
_global.SaveStrName = "";
_global.loadSlot = "none";
_global.overWriteSlot = false;
_global.startMoney = 2500;
_global.gamePaused = false;
_global.hotKey1 = 49;
_global.hotKey2 = 50;
_global.hotKey3 = 51;
_global.hotKey4 = 52;
_global.hotKey5 = 53;
_global.pauseHotkey = 80;
_global.buttonClickSound = "buttonClick";
_global.noCanDoSound = "";
_global.levelClose = false;
var blnHoldForVerify = true;
var saveValue = 0;
var mySharedObject = SharedObject.getLocal("settings");
if (mySharedObject.data.firstTime == undefined) {
mySharedObject.data.firstTime = false;
mySharedObject.data.musicOn = _global.musicOn;
mySharedObject.data.soundOn = _global.soundOn;
mySharedObject.data.graphics = _global.graphics;
mySharedObject.data.isActivated = false;
mySharedObject.data.keyCode = "";
mySharedObject.data.hotKey1 = _global.hotKey1;
mySharedObject.data.hotKey2 = _global.hotKey2;
mySharedObject.data.hotKey3 = _global.hotKey3;
mySharedObject.data.hotKey4 = _global.hotKey4;
mySharedObject.data.hotKey5 = _global.hotKey5;
mySharedObject.data.versionNumber = _global.versionNumber;
mySharedObject.flush();
blnHoldForVerify = false;
} else {
_global.musicOn = mySharedObject.data.musicOn;
_global.soundOn = mySharedObject.data.soundOn;
_global.graphics = mySharedObject.data.graphics;
_quality = _global.graphics;
var isActivated = mySharedObject.data.isActivated;
var newKey = mySharedObject.data.keyCode;
_global.hotKey1 = mySharedObject.data.hotKey1;
_global.hotKey2 = mySharedObject.data.hotKey2;
_global.hotKey3 = mySharedObject.data.hotKey3;
_global.hotKey4 = mySharedObject.data.hotKey4;
_global.hotKey5 = mySharedObject.data.hotKey5;
blnHoldForVerify = false;
}
verifyData.onLoad = function (blnSuccess) {
if (blnSuccess && (this.status == 0)) {
var _local4 = Number(this.firstChild.attributes.intValue);
var _local5 = this.firstChild.firstChild;
var _local6 = Number(_local5.attributes.intError);
var _local3 = Math.round(Math.sqrt(saveValue * (saveValue * 1.24)) * 1.47);
if (_local3 == _local4) {
_global.var1.Set(_local3);
} else {
_global.var1.mSet(6546879);
}
}
blnHoldForVerify = false;
};
Instance of Symbol 801 MovieClip in Frame 1
onClipEvent (load) {
myFlag = 0;
Counter = -1;
_root.BuildCampaigns();
totalFileSize = _root.getBytesTotal();
startBytes = _root.getBytesLoaded();
}
onClipEvent (enterFrame) {
if (Counter == -1) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
myPercentLoaded = int(100 * amountLoaded);
_root.pre.load_txt.text = myPercentLoaded + "%";
_root.pre.ooz.gotoAndStop(myPercentLoaded);
_root.pre.od.gotoAndStop(myPercentLoaded);
if (((amountLoaded >= 1) && (myFlag == 0)) && (_root.HoldForVerification() == false)) {
myFlag = 1;
Counter = 30;
if (_global.latestLevel != 0) {
Counter = 0;
}
}
} else if (Counter == 0) {
okToPlay = false;
var testArray = new Array();
testArray.push("http://www.herointeractive.com");
testArray.push("http://herointeractive.com");
testArray.push("http://www.armorgames.com");
testArray.push("http://armorgames.com");
testArray.push("http://games.armorgames.com");
var i = 0;
while (i < testArray.length) {
if (_url.substr(0, testArray[i].length) == testArray[i]) {
okToPlay = true;
break;
}
i++;
}
testArray.push(".armorgames.com");
testArray.push(".herointeractive.com");
var i = 0;
while (i < testArray.length) {
if (_url.indexOf(testArray[i]) != -1) {
okToPlay = true;
break;
}
i++;
}
if (okToPlay == true) {
_root.gotoAndPlay("loadSound");
} else {
_root.gotoAndStop("halt");
}
} else {
Counter--;
}
}
Frame 2
stop();
_root.pre.gotoAndPlay(46);
_root.pre.ooz.gotoAndStop(100);
_root.pre.od.gotoAndStop(100);
Frame 10
function Setup() {
blnMouseActive = false;
BuildCampaigns();
lockCampaignMenu = false;
arrChallenges = new Array();
challengeSelected = "";
_global.pageSelected = "";
_global.notBack = false;
_global.previousPage = false;
_global.playButt = "";
_global.play2Butt = "";
_global.settingsNum = "";
_global.theBigOpen = false;
_global.theCampaignOpen = false;
_global.theFinalOpen = false;
_global.loadButt = "";
_global.OverWriteButt = "";
_global.cheat1 = false;
_global.cheat2 = false;
_global.cheat3 = false;
_global.cheat4 = false;
_global.cheat5 = false;
_global.inOrOut = "in";
_global.firstTime = "true";
_global.fOrB = "";
_root.campaign.more_mc._visible = false;
_root.campaign._visible = false;
menuListener = new Object();
menuListener.onMouseDown = function () {
_root.CampaignDeSelect();
};
StartMouse();
}
function Run() {
cheatEnabled();
ProcessScroll();
}
function ButtonSelected() {
if (_global.pageSelected == "play") {
_root.infoPage.gotoAndPlay("playIn");
} else if (_global.pageSelected == "settings") {
_root.infoPage.gotoAndPlay("settingsIn");
} else if (_global.pageSelected == "credits") {
_root.infoPage.gotoAndPlay("creditsIn");
} else if (_global.pageSelected == "deluxe") {
_root.infoPage.gotoAndPlay("deluxeIn");
} else if (_global.pageSelected == "more") {
}
}
function ExitChallengeMissions() {
lockCampaignMenu = false;
_root.campaign.more_mc._visible = false;
challengeSelected = "";
StartMouse();
lockCampaignMenu = false;
_root.campaign.message_mc.gotoAndPlay("down");
}
function SetupChallenges() {
StopMouse();
numWindowTop = 2;
lockCampaignMenu = true;
TurnOffCampaignClips();
UpdateChallengeDetails("");
_root.campaign.message_mc.gotoAndPlay("up");
var challengeDepth = 10;
var yStart = 0;
var buttonRef;
var i = 0;
while (i < _global.Challenges.length) {
_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc.attachMovie("challengeButton", _global.Challenges[i].strButton, challengeDepth);
buttonRef = eval ("_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc." + _global.Challenges[i].strButton);
buttonRef._x = 0;
buttonRef._y = yStart;
buttonRef.strTitle_txt.text = _global.Challenges[i].strTitle;
if (_global.Challenges[i].blnLocked == true) {
buttonRef.lock_mc._visible = true;
if (_global.var1.Get() != -1) {
buttonRef.lock_mc.gotoAndStop(2);
} else {
buttonRef.lock_mc.gotoAndStop(1);
}
} else {
buttonRef.lock_mc._visible = false;
}
buttonRef.onRelease = function () {
SelectChallenge(this._name);
};
buttonRef.onRollOver = function () {
if (_root.challengeSelected != this._name) {
this.gotoAndStop(2);
UpdateChallengeDetails(this._name);
}
};
buttonRef.onRollOut = function () {
if (_root.challengeSelected != this._name) {
this.gotoAndStop(1);
if (_root.challengeSelected != "") {
UpdateChallengeDetails(_root.challengeSelected);
} else {
UpdateChallengeDetails("");
}
}
};
yStart = yStart + 25;
challengeDepth++;
i++;
}
numScrollHeight = (_global.Challenges.length - 8) * 25;
ResetScroll();
}
function ProcessScroll() {
if (blnScrollMode == true) {
var _local4 = new Object({x:_root._xmouse, y:_root._ymouse});
_root.campaign.more_mc.panel_mc.globalToLocal(_local4);
var _local2 = _local4.y - numClickOffset;
if (_local2 > numScrollEnd) {
_local2 = numScrollEnd;
}
if (_local2 < numScrollStart) {
_local2 = numScrollStart;
}
_root.campaign.more_mc.panel_mc.scrollButton_mc._y = _local2;
var _local3 = (_local2 - numScrollStart) / (numScrollEnd - numScrollStart);
if (_local3 > 1) {
_local3 = 1;
}
if (_local3 < 0) {
_local3 = 0;
}
var _local5 = numScrollHeight * _local3;
_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc._y = numWindowTop - _local5;
}
}
function ResetScroll() {
blnScrollMode = false;
numClickOffset = 0;
_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc._y = numWindowTop;
_root.campaign.more_mc.panel_mc.scrollButton_mc._y = numScrollStart;
}
function StartScroll(startPos) {
blnScrollMode = true;
var _local2 = new Object({x:_root._xmouse, y:_root._ymouse});
_root.campaign.more_mc.panel_mc.globalToLocal(_local2);
numClickOffset = _local2.y - startPos;
}
function StopScroll() {
blnScrollMode = false;
numClickOffset = 0;
}
function StartMouse() {
if (blnMouseActive == false) {
Mouse.addListener(menuListener);
blnMouseActive = true;
}
}
function StopMouse() {
if (blnMouseActive == true) {
Mouse.removeListener(menuListener);
blnMouseActive = false;
}
}
function UpdateChallengeDetails(challengeName) {
var _local4 = false;
var _local3 = 0;
while (_local3 < _global.Challenges.length) {
if (_global.Challenges[_local3].strButton == challengeName) {
_root.campaign.more_mc.panel_mc.title_txt.text = _global.Challenges[_local3].strTitle;
_root.campaign.more_mc.panel_mc.description_txt.text = _global.Challenges[_local3].strDescription;
if (_global.Challenges[_local3].blnLocked == true) {
if (_global.var1.Get() != -1) {
_root.campaign.more_mc.panel_mc.play_mc._visible = true;
_root.campaign.more_mc.panel_mc.view_mc._visible = true;
_root.campaign.more_mc.panel_mc.extra_mc._visible = false;
} else {
_root.campaign.more_mc.panel_mc.play_mc._visible = false;
_root.campaign.more_mc.panel_mc.view_mc._visible = false;
_root.campaign.more_mc.panel_mc.extra_mc._visible = true;
}
} else {
_root.campaign.more_mc.panel_mc.play_mc._visible = true;
_root.campaign.more_mc.panel_mc.view_mc._visible = true;
_root.campaign.more_mc.panel_mc.extra_mc._visible = false;
}
_local4 = true;
break;
}
_local3++;
}
if (_local4 == false) {
_root.campaign.more_mc.panel_mc.play_mc._visible = false;
_root.campaign.more_mc.panel_mc.view_mc._visible = false;
_root.campaign.more_mc.panel_mc.extra_mc._visible = false;
_root.campaign.more_mc.panel_mc.title_txt.text = "";
_root.campaign.more_mc.panel_mc.description_txt.text = "Roll over a mission for details. Mouse click to select.";
}
}
function UnselectAllChallenges() {
var buttonRef;
var i = 0;
while (i < _global.Challenges.length) {
buttonRef = eval ("_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc." + _global.Challenges[i].strButton);
buttonRef.gotoAndStop(1);
i++;
}
challengeSelected = "";
}
function PlayMission() {
_global.currentCampaign = challengeSelected;
_root.background_mc.gotoAndStop(_global.currentCampaign);
StopMouse();
triggerDoorsStart();
}
function SelectChallenge(challengeName) {
UnselectAllChallenges();
challengeSelected = challengeName;
var buttonRef;
var i = 0;
while (i < _global.Challenges.length) {
if (_global.Challenges[i].strButton == challengeName) {
buttonRef = eval ("_root.campaign.more_mc.panel_mc.challengeSelectBox_mc.challengeSelectBoxInside_mc." + _global.Challenges[i].strButton);
buttonRef.gotoAndStop(3);
return;
}
i++;
}
}
function ViewHighScoreBoard() {
var _local2 = 0;
while (_local2 < _global.Challenges.length) {
if (_global.Challenges[_local2].strButton == challengeSelected) {
getURL (_global.Challenges[_local2].url, "_blank");
break;
}
_local2++;
}
}
function StartCampaign(strButton) {
_global.currentCampaign = _root.campaign.more_mc.panel_mc.strSelectedCampaign;
_root.background_mc.gotoAndStop(_global.currentCampaign);
StopMouse();
triggerDoorsStart();
}
function CampaignSelected(buttonName) {
if (lockCampaignMenu == true) {
return(undefined);
}
TurnOffCampaignClips();
_root.campaign.more_mc._visible = true;
if ((buttonName == "sky_bt") || (buttonName == "ocean_bt")) {
_root.campaign.more_mc._x = 38;
} else {
_root.campaign.more_mc._x = 448;
}
if (buttonName == "challenge_bt") {
_root.campaign.more_mc.panel_mc.strSelectedCampaign = buttonName;
_root.campaign.more_mc.panel_mc.gotoAndStop(5);
SetupChallenges();
} else {
var i = 0;
while (i < _global.Campaigns.length) {
if (_global.Campaigns[i].strButton == buttonName) {
if (_global.Campaigns[i].blnSet == true) {
if (_global.var1.Get() != -1) {
if (IsCampaignCompleted(buttonName) == true) {
_root.campaign.more_mc.panel_mc.gotoAndStop(3);
} else {
_root.campaign.more_mc.panel_mc.gotoAndStop(2);
}
} else {
_root.campaign.more_mc.panel_mc.gotoAndStop(1);
}
} else if (IsCampaignCompleted(buttonName) == true) {
_root.campaign.more_mc.panel_mc.gotoAndStop(3);
} else {
_root.campaign.more_mc.panel_mc.gotoAndStop(2);
}
_root.campaign.more_mc.panel_mc.strSelectedCampaign = buttonName;
_root.campaign.more_mc.panel_mc.title_txt.text = _global.Campaigns[i].strTitle;
_root.campaign.more_mc.panel_mc.difficulty_txt.text = _global.Campaigns[i].strDifficulty;
_root.campaign.more_mc.panel_mc.slots_txt.text = _global.Campaigns[i].strSlots;
_root.campaign.more_mc.panel_mc.description_txt.text = _global.Campaigns[i].strDescription;
var clipRef = eval ("_root.campaign.more_mc." + buttonName);
clipRef.gotoAndPlay(2);
return;
}
i++;
}
}
}
function IsCampaignCompleted(testCampaign) {
var _local3 = false;
var _local12 = new DataObject();
var _local10 = new DataObject();
var _local6 = new DataObject();
var _local11 = new DataObject();
var _local8 = new DataObject();
var _local7 = new DataObject();
var _local9 = new DataObject();
var _local5 = new DataObject();
var _local2 = SharedObject.getLocal(_global.loadSlot);
_name = _local2.data.strName;
if (_name != undefined) {
_local12.Load(_local2.data.data5);
_local10.Load(_local2.data.data6);
_local6.Load(_local2.data.data7);
_local11.Load(_local2.data.data8);
_local8.Load(_local2.data.data9);
_local7.Load(_local2.data.data10);
_local9.Load(_local2.data.data11);
if (_local2.data.data18 == undefined) {
_local5.mSet(2396236);
_local2.data.data18 = _local5.Store();
_local2.flush();
} else {
_local5.Load(_local2.data.data18);
}
} else {
_local12.Load(_global.currentProfile.data5);
_local10.Load(_global.currentProfile.data6);
_local6.Load(_global.currentProfile.data7);
_local11.Load(_global.currentProfile.data8);
_local8.Load(_global.currentProfile.data9);
_local7.Load(_global.currentProfile.data10);
_local9.Load(_global.currentProfile.data11);
_local5.Load(_global.currentProfile.data18);
}
if (testCampaign == "ocean_bt") {
if (_local12.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "peaks_bt") {
if (_local11.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "plains_bt") {
if (_local6.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "pass_bt") {
if (_local8.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "city_bt") {
if (_local7.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "desert_bt") {
if (_local5.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "sky_bt") {
if (_local10.Get() != -1) {
_local3 = true;
}
} else if (testCampaign == "south_bt") {
if (_local9.Get() != -1) {
_local3 = true;
}
}
return(_local3);
}
function SetNextCampaign() {
var returnResult = false;
var nextCampaign = "";
var beatOceanCampaign = new DataObject();
var beatSkyCampaign = new DataObject();
var beatPlainsCampaign = new DataObject();
var beatPeaksCampaign = new DataObject();
var beatMountainCampaign = new DataObject();
var beatCityCampaign = new DataObject();
var beatSouthCampaign = new DataObject();
var beatDesertCampaign = new DataObject();
var mySharedObject = SharedObject.getLocal(_global.loadSlot);
_name = mySharedObject.data.strName;
if (_name != undefined) {
beatOceanCampaign.Load(mySharedObject.data.data5);
beatSkyCampaign.Load(mySharedObject.data.data6);
beatPlainsCampaign.Load(mySharedObject.data.data7);
beatPeaksCampaign.Load(mySharedObject.data.data8);
beatMountainCampaign.Load(mySharedObject.data.data9);
beatCityCampaign.Load(mySharedObject.data.data10);
beatSouthCampaign.Load(mySharedObject.data.data11);
if (mySharedObject.data.data18 == undefined) {
beatDesertCampaign.mSet(2396236);
mySharedObject.data.data18 = beatDesertCampaign.Store();
mySharedObject.flush();
} else {
beatDesertCampaign.Load(mySharedObject.data.data18);
}
} else {
beatOceanCampaign.Load(_global.currentProfile.data5);
beatSkyCampaign.Load(_global.currentProfile.data6);
beatPlainsCampaign.Load(_global.currentProfile.data7);
beatPeaksCampaign.Load(_global.currentProfile.data8);
beatMountainCampaign.Load(_global.currentProfile.data9);
beatCityCampaign.Load(_global.currentProfile.data10);
beatSouthCampaign.Load(_global.currentProfile.data11);
beatDesertCampaign.Load(_global.currentProfile.data18);
}
if (beatOceanCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "ocean_bt";
}
if (returnResult == false) {
if (beatPeaksCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "peaks_bt";
}
}
if (returnResult == false) {
if (beatPlainsCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "plains_bt";
}
}
if (returnResult == false) {
if (beatMountainCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "pass_bt";
}
}
if (returnResult == false) {
if (beatCityCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "city_bt";
}
}
if (returnResult == false) {
if (beatDesertCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "desert_bt";
}
}
if (returnResult == false) {
if (beatSkyCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "sky_bt";
}
}
if (returnResult == false) {
if (beatSouthCampaign.Get() == -1) {
returnResult = true;
nextCampaign = "south_bt";
}
}
if (returnResult == true) {
var targetRef = eval ("_root.campaign." + nextCampaign);
_root.campaign.next_mc.gotoAndPlay(1);
_root.campaign.next_mc._x = (targetRef._x + 6.75) - 0.5;
_root.campaign.next_mc._y = (targetRef._y + 6.75) - 0.5;
} else {
_root.campaign.next_mc._x = -100;
_root.campaign.next_mc._y = -100;
}
}
function CampaignDeSelect() {
var _local2 = true;
if (_root.campaign.more_mc._visible == true) {
if (_root.campaign.more_mc.panel_mc.play_bt.hitTest(_xmouse, _ymouse)) {
_local2 = false;
} else if (_root.campaign.more_mc.panel_mc.more_bt.hitTest(_xmouse, _ymouse)) {
_local2 = false;
}
}
if (_local2 == true) {
_root.campaign.more_mc._visible = false;
TurnOffCampaignClips();
}
}
function TurnOffCampaignClips() {
_root.campaign.more_mc.pass_bt.gotoAndStop(1);
_root.campaign.more_mc.peaks_bt.gotoAndStop(1);
_root.campaign.more_mc.ocean_bt.gotoAndStop(1);
_root.campaign.more_mc.plains_bt.gotoAndStop(1);
_root.campaign.more_mc.south_bt.gotoAndStop(1);
_root.campaign.more_mc.city_bt.gotoAndStop(1);
_root.campaign.more_mc.sky_bt.gotoAndStop(1);
_root.campaign.more_mc.desert_bt.gotoAndStop(1);
}
function TriggerLevelClose() {
_global.theBigOpen = true;
_global.theCampaignOpen = true;
_global.theFinalOpen = false;
_root.campaign._visible = true;
_root.campaign.message_mc.gotoAndPlay(2);
Mouse.addListener(menuListener);
}
function triggerDoors() {
_root.doors2.leftdoor.v1.steam.gotoAndPlay(2);
_root.doors2.leftdoor.v2.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v1.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v2.steam.gotoAndPlay(2);
_global.theBigOpen = true;
_global.theCampaignOpen = true;
_global.theFinalOpen = false;
_root.campaign._visible = true;
_root.campaign.message_mc.gotoAndPlay(2);
Mouse.addListener(menuListener);
}
function triggerDoorsOld() {
_root.doors2.leftdoor.v1.steam.gotoAndPlay(2);
_root.doors2.leftdoor.v2.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v1.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v2.steam.gotoAndPlay(2);
_global.theBigOpen = true;
_global.theCampaignOpen = false;
_global.theFinalOpen = false;
_root.campaign._visible = false;
}
function triggerDoorsStart() {
_root.doors2.gotoAndPlay(2);
_global.theBigOpen = true;
_global.theCampaignOpen = false;
_global.theFinalOpen = true;
}
function cheatEnabled() {
if (((((_global.cheat1 == true) && (_global.cheat2 == true)) && (_global.cheat3 == true)) && (_global.cheat4 == true)) && (_global.cheat5 == true)) {
if (_global.cheatsEnabled.Get() != -1) {
_global.cheatsEnabled.mSet(238676);
}
} else {
_global.cheat1 = false;
_global.cheat2 = false;
_global.cheat3 = false;
_global.cheat4 = false;
_global.cheat5 = false;
}
}
function CreateProfile(strName, strDifficulty) {
var _local3 = LocateOpenSlot();
if (_local3 == "none") {
_global.SaveStrName = strName;
_global.SaveStrDifficulty = strDifficulty;
_global.overWriteSlot = true;
} else {
_global.loadSlot = _local3;
var _local6 = new DataObject();
var _local11 = new DataObject();
var _local4 = new DataObject();
var _local7 = new DataObject();
var _local15 = new DataObject();
var _local13 = new DataObject();
var _local5 = new DataObject();
var _local14 = new DataObject();
var _local9 = new DataObject();
var _local8 = new DataObject();
var _local10 = new DataObject();
var _local12 = new DataObject();
_local15.mSet(4635);
_local13.mSet(6873);
_local5.mSet(1348);
_local14.mSet(2468);
_local9.mSet(1337);
_local8.mSet(4221);
_local10.mSet(9313);
_local12.mSet(9313);
var _local20 = new DataObject();
var _local17 = new DataObject();
var _local16 = new DataObject();
var _local19 = new DataObject();
var _local18 = new DataObject();
_local4.Set(4);
_local7.Set(2000);
_local20.Set(9033);
_local17.Set(22);
_local16.Set(9060);
_local19.Set(453);
_local18.Set(9340);
_local6.Set(_global.startMoney);
_local11.Set(1);
var _local2 = SharedObject.getLocal(_local3);
_local2.data.blnInUse = true;
_local2.data.strName = strName;
_local2.data.strDifficulty = strDifficulty;
_local2.data.strCampaign = "none";
_local2.data.data1 = _local6.Store();
_local2.data.data2 = _local11.Store();
_local2.data.data3 = _local4.Store();
_local2.data.data4 = _local7.Store();
_local2.data.data5 = _local15.Store();
_local2.data.data6 = _local13.Store();
_local2.data.data7 = _local5.Store();
_local2.data.data8 = _local14.Store();
_local2.data.data9 = _local9.Store();
_local2.data.data10 = _local8.Store();
_local2.data.data11 = _local10.Store();
_local2.data.data12 = _global.cheatsEnabled.Store();
_local2.data.data13 = _local20.Store();
_local2.data.data14 = _local17.Store();
_local2.data.data15 = _local16.Store();
_local2.data.data16 = _local19.Store();
_local2.data.data17 = _local18.Store();
_local2.data.data18 = _local12.Store();
_local2.data.arrAllies = new Array();
_local2.data.arrStorage = new Array();
_local2.data.arrSlots = new Array();
_global.currentProfile.blnInUse = true;
_global.currentProfile.strName = strName;
_global.currentProfile.strDifficulty = strDifficulty;
_global.currentProfile.strCampaign = "none";
_global.currentProfile.data1 = _local6.Store();
_global.currentProfile.data2 = _local11.Store();
_global.currentProfile.data3 = _local4.Store();
_global.currentProfile.data4 = _local7.Store();
_global.currentProfile.data5 = _local15.Store();
_global.currentProfile.data6 = _local13.Store();
_global.currentProfile.data7 = _local5.Store();
_global.currentProfile.data8 = _local14.Store();
_global.currentProfile.data9 = _local9.Store();
_global.currentProfile.data10 = _local8.Store();
_global.currentProfile.data11 = _local10.Store();
_global.currentProfile.data18 = _local12.Store();
_global.currentProfile.data12 = _global.cheatsEnabled.Store();
_global.currentProfile.arrAllies = new Array();
_global.currentProfile.arrStorage = new Array();
_global.currentProfile.arrSlots = new Array();
}
}
function OverWriteSlot() {
var _local5 = new DataObject();
var _local10 = new DataObject();
var _local3 = new DataObject();
var _local6 = new DataObject();
var _local14 = new DataObject();
var _local12 = new DataObject();
var _local4 = new DataObject();
var _local13 = new DataObject();
var _local8 = new DataObject();
var _local7 = new DataObject();
var _local9 = new DataObject();
var _local11 = new DataObject();
_local14.mSet(4635);
_local12.mSet(6873);
_local4.mSet(1348);
_local13.mSet(2468);
_local8.mSet(1337);
_local7.mSet(4221);
_local9.mSet(9313);
_local11.mSet(9313);
var _local19 = new DataObject();
var _local16 = new DataObject();
var _local15 = new DataObject();
var _local18 = new DataObject();
var _local17 = new DataObject();
_local3.Set(4);
_local6.Set(2000);
_local19.Set(9033);
_local16.Set(22);
_local15.Set(9060);
_local18.Set(453);
_local17.Set(9340);
_local5.Set(_global.startMoney);
_local10.Set(1);
var _local2 = SharedObject.getLocal(_global.loadSlot);
_local2.data.blnInUse = true;
_local2.data.strName = _global.SaveStrName;
_local2.data.strDifficulty = _global.SaveStrDifficulty;
_local2.data.strCampaign = "none";
_local2.data.data1 = _local5.Store();
_local2.data.data2 = _local10.Store();
_local2.data.data3 = _local3.Store();
_local2.data.data4 = _local6.Store();
_local2.data.data5 = _local14.Store();
_local2.data.data6 = _local12.Store();
_local2.data.data7 = _local4.Store();
_local2.data.data8 = _local13.Store();
_local2.data.data9 = _local8.Store();
_local2.data.data10 = _local7.Store();
_local2.data.data11 = _local9.Store();
_local2.data.data12 = _global.cheatsEnabled.Store();
_local2.data.data13 = _local19.Store();
_local2.data.data14 = _local16.Store();
_local2.data.data15 = _local15.Store();
_local2.data.data16 = _local18.Store();
_local2.data.data17 = _local17.Store();
_local2.data.data18 = _local11.Store();
_local2.data.arrAllies = new Array();
_local2.data.arrStorage = new Array();
_local2.data.arrSlots = new Array();
_local2.flush();
_global.currentProfile.blnInUse = true;
_global.currentProfile.strName = strName;
_global.currentProfile.strDifficulty = strDifficulty;
_global.currentProfile.strCampaign = "none";
_global.currentProfile.data1 = _local5.Store();
_global.currentProfile.data2 = _local10.Store();
_global.currentProfile.data3 = _local3.Store();
_global.currentProfile.data4 = _local6.Store();
_global.currentProfile.data5 = _local14.Store();
_global.currentProfile.data6 = _local12.Store();
_global.currentProfile.data7 = _local4.Store();
_global.currentProfile.data8 = _local13.Store();
_global.currentProfile.data9 = _local8.Store();
_global.currentProfile.data10 = _local7.Store();
_global.currentProfile.data11 = _local9.Store();
_global.currentProfile.data18 = _local11.Store();
_global.currentProfile.data12 = _global.cheatsEnabled.Store();
_global.currentProfile.arrAllies = new Array();
_global.currentProfile.arrStorage = new Array();
_global.currentProfile.arrSlots = new Array();
}
function LocateOpenSlot() {
var _local2 = false;
var _local3 = "none";
var _local1 = SharedObject.getLocal("slot1");
if (_local1.data.blnInUse == undefined) {
_local2 = true;
_local3 = "slot1";
}
if (_local2 == false) {
_local1 = SharedObject.getLocal("slot2");
if (_local1.data.blnInUse == undefined) {
_local2 = true;
_local3 = "slot2";
}
}
if (_local2 == false) {
_local1 = SharedObject.getLocal("slot3");
if (_local1.data.blnInUse == undefined) {
_local2 = true;
_local3 = "slot3";
}
}
return(_local3);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function StartActivation() {
_root.infoPage.deluxeMenu.submit_mc.gotoAndStop(2);
var _local2 = _root.infoPage.deluxeMenu.text_mc.key_txt.text;
saveValue = RandNum(99999999, 10000000);
saveKey = _local2;
_local2 = (_local2 + "-") + saveValue;
var _local5 = new DataEncrypter(128, 128);
var _local3 = String(_local2);
var _local6 = _local5.encrypt(_local3, "zv3TayWxuyHCpRHw", "ECB");
var _local4 = (("http://www.herointeractive.com/sales/activate.php?strKey=" + _local6) + "&strDomain=") + _url;
serverData.load(_local4);
}
stop();
var serverData = new XML();
serverData.ignoreWhite = true;
var menuListener;
var arrChallenges;
var saveValue;
var saveKey;
var lockCampaignMenu;
var challengeSelected;
var blnMouseActive;
var numScrollStart = 67;
var numScrollEnd = 247;
var numScrollHeight = 0;
var numWindowTop = -999999;
var numClickOffset = 0;
_root.icoOut.ico1.ico.selectObject.selectedObject.name_txt.text = _global.arenaCurrentName;
if (_global.levelClose == true) {
_root.doors2.gotoAndPlay("levelClose");
_root.doorGear._visible = false;
_root.doorGear2._visible = false;
} else {
_root.doorGear._visible = true;
_root.doorGear2._visible = true;
}
if (_global.var1.Get() != -1) {
_root.version_txt.text = _global.versionNumber + " EC";
} else {
_root.version_txt.text = _global.versionNumber;
}
serverData.onLoad = function (blnSuccess) {
_root.infoPage.deluxeMenu.submit_mc.gotoAndStop(1);
if (blnSuccess && (this.status == 0)) {
var _local7 = Number(this.firstChild.attributes.intValue);
var _local8 = this.firstChild.firstChild;
var _local4 = Number(_local8.attributes.intError);
if (_local4 == 200) {
_root.infoPage.deluxeMenu.alert_txt.text = "Key has been activated 5 times already!";
} else if (_local4 == 901) {
_root.infoPage.deluxeMenu.alert_txt.text = "Hero Interactive server is temporarily down.";
} else if (_local7 == 0) {
_root.infoPage.deluxeMenu.alert_txt.text = "Key is not valid.";
}
var _local5 = Math.round(Math.sqrt(saveValue * (saveValue * 1.24)) * 1.47);
if (_local5 == _local7) {
_root.infoPage.deluxeMenu.submit_mc._visible = false;
_root.infoPage.deluxeMenu.text_mc.gotoAndStop(2);
_root.infoPage.deluxeMenu.alert_txt.text = "";
_global.var1.Set(_local5);
var _local6 = SharedObject.getLocal("settings");
_local6.data.isActivated = true;
_local6.data.keyCode = saveKey;
_local6.flush();
BuildCampaigns();
} else {
if (((_local4 != 200) && (_local4 != 901)) && (_local4 != 0)) {
_root.infoPage.deluxeMenu.alert_txt.text = "Key is not valid.";
}
_global.var1.mSet(_local5);
}
} else {
_root.infoPage.deluxeMenu.alert_txt.text = "Could not connect to server.";
}
};
Instance of Symbol 801 MovieClip in Frame 10
onClipEvent (load) {
_root.Setup();
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack("title");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.PlayWithCrossFade(4);
}
}
onClipEvent (enterFrame) {
_root.Run();
_global.myMusicPlayer.RunPlayer();
}
Frame 20
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Instance of Symbol 801 MovieClip "gameActions_mc" in Frame 20
onClipEvent (load) {
}
onClipEvent (enterFrame) {
}
Frame 21
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 22
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 23
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 24
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 25
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 26
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 27
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 28
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 29
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 30
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 31
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 32
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 33
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 34
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 35
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 36
_global.gamePaused = false;
_global.gravityConst = 0;
var game = new StormWindsGame();
stop();
gameActions_mc.onLoad = function () {
game.Load();
};
gameActions_mc.onEnterFrame = function () {
game.Run();
};
Frame 60
gotoAndPlay ("endSounds");
Frame 95
gotoAndPlay ("intro");
Frame 96
stop();
Frame 97
stop();
Frame 98
stop();
Frame 99
stop();
Frame 100
stop();
Frame 101
stop();
Frame 102
stop();
Frame 103
stop();
Frame 104
stop();
Frame 105
stop();
Symbol 5 MovieClip Frame 10
gotoAndPlay ("move");
Symbol 13 MovieClip Frame 1
this._alpha = 0;
Symbol 14 MovieClip [Enemy_18] Frame 1
#initclip 109
Object.registerClass("Enemy_18", Enemy_18);
#endinitclip
Symbol 27 MovieClip Frame 17
stop();
Symbol 28 MovieClip [damageExplosionBig] Frame 18
this.inside._rotation = Math.round(Math.random() * 360);
Symbol 28 MovieClip [damageExplosionBig] Frame 66
_root.game.RemoveEffect(this._name);
stop();
Symbol 42 MovieClip Frame 15
stop();
Symbol 43 MovieClip [damageExplosionSmall] Frame 18
this.inside._rotation = Math.round(Math.random() * 360);
Symbol 43 MovieClip [damageExplosionSmall] Frame 66
_root.game.RemoveEffect(this._name);
stop();
Symbol 50 MovieClip [BulletFlameShard] Frame 1
#initclip 61
Object.registerClass("BulletFlameShard", BulletFlameShard);
#endinitclip
Symbol 57 MovieClip [fireBullet] Frame 1
#initclip 62
Object.registerClass("fireBullet", BulletFlame);
#endinitclip
Symbol 87 MovieClip [Enemy_10] Frame 1
#initclip 63
Object.registerClass("Enemy_10", Enemy_10);
#endinitclip
stop();
Symbol 87 MovieClip [Enemy_10] Frame 2
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 9
gotoAndPlay ("shoot");
Symbol 99 MovieClip [Enemy_5] Frame 1
#initclip 64
Object.registerClass("Enemy_5", Enemy_5);
#endinitclip
Symbol 101 MovieClip [droneDestroyed] Frame 1
#initclip 65
Object.registerClass("droneDestroyed", BulletDrone);
#endinitclip
Symbol 105 MovieClip [Enemy_2] Frame 1
#initclip 66
Object.registerClass("Enemy_2", Enemy_2);
#endinitclip
Symbol 118 MovieClip [explosion_1] Frame 13
_root.game.RemoveEffect(this._name);
stop();
Symbol 120 MovieClip [bullet2] Frame 1
#initclip 67
Object.registerClass("bullet2", BulletTargetable);
#endinitclip
Symbol 121 MovieClip [bullet1] Frame 1
#initclip 68
Object.registerClass("bullet1", Bullet);
#endinitclip
Symbol 123 MovieClip [piece1] Frame 1
#initclip 69
Object.registerClass("piece1", Debris);
#endinitclip
Symbol 140 MovieClip Frame 17
_root.game.RemoveEffect(this._parent._name);
stop();
Symbol 145 MovieClip [levelUp] Frame 60
_root.game.RemoveEffect(this._name);
stop();
Symbol 149 MovieClip [award2] Frame 35
_root.game.RemoveEffect(this._name);
stop();
Symbol 154 MovieClip [award] Frame 35
_root.game.RemoveEffect(this._name);
stop();
Symbol 158 MovieClip [Enemy_3] Frame 1
#initclip 70
Object.registerClass("Enemy_3", Enemy_3);
#endinitclip
Symbol 161 MovieClip [Enemy_4] Frame 1
#initclip 71
Object.registerClass("Enemy_4", Enemy_4);
#endinitclip
Symbol 163 MovieClip [bulletMachine] Frame 1
#initclip 72
Object.registerClass("bulletMachine", BulletMachineGun);
#endinitclip
Symbol 165 MovieClip [machineGunHit] Frame 2
_root.game.RemoveEffect(this._name);
stop();
Symbol 167 MovieClip [selectGun] Frame 60
_root.game.RemoveEffect(this._name);
stop();
Symbol 173 MovieClip [starBurst] Frame 45
_root.game.RemoveEffect(this._name);
stop();
Symbol 179 MovieClip [Enemy_6] Frame 1
#initclip 73
Object.registerClass("Enemy_6", Enemy_6);
#endinitclip
Symbol 185 MovieClip [gunsmoke] Frame 10
_root.game.RemoveEffect(this._name);
stop();
Symbol 196 MovieClip [lightning] Frame 21
_root.game.RemoveEffect(this._name);
stop();
Symbol 199 MovieClip [spark] Frame 1
#initclip 74
Object.registerClass("spark", Debris);
#endinitclip
Symbol 208 MovieClip [meteor] Frame 1
#initclip 75
Object.registerClass("meteor", BulletMeteor);
#endinitclip
Symbol 212 MovieClip [alertLightning] Frame 221
_root.game.RemoveEffect(this._name);
stop();
Symbol 214 MovieClip [bomb] Frame 1
#initclip 76
Object.registerClass("bomb", Bomb);
#endinitclip
Symbol 223 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 16
stop();
this._parent.LaunchBomb(this._name);
Symbol 224 MovieClip [Enemy_7] Frame 1
#initclip 77
Object.registerClass("Enemy_7", Enemy_7);
#endinitclip
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 16
stop();
this._parent.LaunchBomb(this._name);
Symbol 232 MovieClip [Enemy_8] Frame 1
#initclip 78
Object.registerClass("Enemy_8", Enemy_8);
#endinitclip
stop();
Symbol 232 MovieClip [Enemy_8] Frame 2
stop();
Symbol 235 MovieClip [piece2] Frame 1
#initclip 79
Object.registerClass("piece2", Debris);
#endinitclip
Symbol 237 MovieClip [sellAnimation] Frame 31
_root.game.RemoveEffect(this._name);
stop();
Symbol 240 MovieClip [alertMiss] Frame 176
_root.game.RemoveEffect(this._name);
stop();
Symbol 242 MovieClip [alertStart] Frame 221
_root.game.RemoveEffect(this._name);
stop();
Symbol 254 MovieClip [Enemy_20] Frame 1
#initclip 80
Object.registerClass("Enemy_20", Enemy_20);
#endinitclip
stop();
Symbol 254 MovieClip [Enemy_20] Frame 2
stop();
Symbol 264 MovieClip [Enemy_9] Frame 1
#initclip 81
Object.registerClass("Enemy_9", Enemy_9);
#endinitclip
Symbol 272 MovieClip [Enemy_11] Frame 1
#initclip 82
Object.registerClass("Enemy_11", Enemy_11);
#endinitclip
Symbol 275 MovieClip [teleport] Frame 18
_root.game.RemoveEffect(this._name);
stop();
Symbol 278 MovieClip [teleportAppear] Frame 14
_root.game.RemoveEffect(this._name);
stop();
Symbol 281 MovieClip [casing] Frame 1
#initclip 83
Object.registerClass("casing", Debris);
#endinitclip
Symbol 284 MovieClip [Enemy_12] Frame 1
#initclip 84
Object.registerClass("Enemy_12", Enemy_12);
#endinitclip
Symbol 291 MovieClip [Enemy_21] Frame 1
#initclip 85
Object.registerClass("Enemy_21", Enemy_21);
#endinitclip
stop();
Symbol 291 MovieClip [Enemy_21] Frame 2
stop();
Symbol 296 MovieClip [upgradeMachineGuns] Frame 1
stop();
Symbol 296 MovieClip [upgradeMachineGuns] Frame 2
stop();
Symbol 300 MovieClip [upgradeDensity] Frame 1
stop();
Symbol 300 MovieClip [upgradeDensity] Frame 2
stop();
Symbol 304 MovieClip [upgradeNumArtillery] Frame 1
stop();
Symbol 304 MovieClip [upgradeNumArtillery] Frame 2
stop();
Symbol 308 MovieClip [upgradeRange] Frame 1
stop();
Symbol 308 MovieClip [upgradeRange] Frame 2
stop();
Symbol 312 MovieClip [upgradeDuration] Frame 1
stop();
Symbol 312 MovieClip [upgradeDuration] Frame 2
stop();
Symbol 316 MovieClip [upgradeReload] Frame 1
stop();
Symbol 316 MovieClip [upgradeReload] Frame 2
stop();
Symbol 320 MovieClip [upgradeFragment] Frame 1
stop();
Symbol 320 MovieClip [upgradeFragment] Frame 2
stop();
Symbol 324 MovieClip [upgradeSecondary] Frame 1
stop();
Symbol 324 MovieClip [upgradeSecondary] Frame 2
stop();
Symbol 328 MovieClip [upgradeJump] Frame 1
stop();
Symbol 328 MovieClip [upgradeJump] Frame 2
stop();
Symbol 332 MovieClip [upgradeBuff] Frame 1
stop();
Symbol 332 MovieClip [upgradeBuff] Frame 2
stop();
Symbol 336 MovieClip [upgradeMineNumber] Frame 1
stop();
Symbol 336 MovieClip [upgradeMineNumber] Frame 2
stop();
Symbol 340 MovieClip [upgradeDecoyNumber] Frame 1
stop();
Symbol 340 MovieClip [upgradeDecoyNumber] Frame 2
stop();
Symbol 344 MovieClip [upgradeDecoyHealth] Frame 1
stop();
Symbol 344 MovieClip [upgradeDecoyHealth] Frame 2
stop();
Symbol 348 MovieClip [upgradeHealth] Frame 1
stop();
Symbol 348 MovieClip [upgradeHealth] Frame 2
stop();
Symbol 352 MovieClip [upgradeDamage] Frame 1
stop();
Symbol 352 MovieClip [upgradeDamage] Frame 2
stop();
Symbol 355 MovieClip [bulletPlasma] Frame 1
#initclip 86
Object.registerClass("bulletPlasma", BulletPlasmaHit);
#endinitclip
Symbol 358 MovieClip [acidGunHit] Frame 3
_root.game.RemoveEffect(this._name);
stop();
Symbol 361 MovieClip [plasmaGunHit] Frame 3
_root.game.RemoveEffect(this._name);
stop();
Symbol 364 MovieClip [orbitalMine] Frame 1
#initclip 87
Object.registerClass("orbitalMine", Mine);
#endinitclip
Symbol 366 MovieClip [apocalypseEffect] Frame 21
_root.game.RemoveEffect(this._name);
stop();
Symbol 369 MovieClip [remoteMissile] Frame 1
#initclip 88
Object.registerClass("remoteMissile", BulletRemoteMissile);
#endinitclip
Symbol 373 MovieClip [smoketrail] Frame 23
_root.game.RemoveEffect(this._name);
stop();
Symbol 376 MovieClip [jets] Frame 11
_root.game.RemoveEffect(this._name);
stop();
Symbol 379 MovieClip [shield] Frame 27
stop();
Symbol 382 MovieClip [shieldHit] Frame 11
_root.game.RemoveEffect(this._name);
stop();
Symbol 384 MovieClip [bulletRail] Frame 1
#initclip 89
Object.registerClass("bulletRail", BulletMachineGun);
#endinitclip
this._alpha = 0;
Symbol 392 MovieClip [bulletFlamethrower] Frame 1
#initclip 90
Object.registerClass("bulletFlamethrower", BulletMachineGun);
#endinitclip
Symbol 412 MovieClip Frame 21
stop();
Symbol 413 MovieClip [decoyWGun] Frame 1
#initclip 91
Object.registerClass("decoyWGun", DecoyWGun);
#endinitclip
Symbol 415 MovieClip Frame 21
stop();
Symbol 416 MovieClip [decoy] Frame 1
#initclip 92
Object.registerClass("decoy", Decoy);
#endinitclip
Symbol 419 MovieClip [controlUnitOne] Frame 1
#initclip 93
Object.registerClass("controlUnitOne", ControlUnitOne);
#endinitclip
Symbol 426 MovieClip [Enemy_13] Frame 1
#initclip 94
Object.registerClass("Enemy_13", Enemy_13);
#endinitclip
stop();
Symbol 426 MovieClip [Enemy_13] Frame 2
stop();
Symbol 429 MovieClip [MonsterBullet] Frame 1
#initclip 95
Object.registerClass("MonsterBullet", Enemy_MonsterBullet);
#endinitclip
Symbol 434 MovieClip [Enemy_15] Frame 1
#initclip 96
Object.registerClass("Enemy_15", Enemy_15);
#endinitclip
Symbol 439 MovieClip [Enemy_16] Frame 1
#initclip 97
Object.registerClass("Enemy_16", Enemy_16);
#endinitclip
stop();
Symbol 439 MovieClip [Enemy_16] Frame 2
stop();
Symbol 442 MovieClip [Enemy_17] Frame 1
#initclip 98
Object.registerClass("Enemy_17", Enemy_17);
#endinitclip
Symbol 446 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 2
stop();
Symbol 449 MovieClip [challengeButton] Frame 1
stop();
Symbol 449 MovieClip [challengeButton] Frame 2
stop();
Symbol 449 MovieClip [challengeButton] Frame 3
stop();
Symbol 451 MovieClip [bulletAcid] Frame 1
#initclip 99
Object.registerClass("bulletAcid", BulletAcid);
#endinitclip
Symbol 454 MovieClip [acidDropBullet] Frame 1
#initclip 100
Object.registerClass("acidDropBullet", BulletAcidDrop);
#endinitclip
Symbol 459 MovieClip [artillery] Frame 1
#initclip 101
Object.registerClass("artillery", BulletArtillery);
#endinitclip
Symbol 469 MovieClip [Enemy_19] Frame 1
#initclip 102
Object.registerClass("Enemy_19", Enemy_19);
#endinitclip
stop();
Symbol 469 MovieClip [Enemy_19] Frame 2
stop();
Symbol 500 MovieClip Frame 54
gotoAndPlay (27);
Symbol 504 MovieClip [Enemy_30] Frame 1
#initclip 103
Object.registerClass("Enemy_30", Enemy_30);
#endinitclip
this.energy_mc._visible = false;
stop();
Symbol 504 MovieClip [Enemy_30] Frame 2
stop();
Symbol 507 MovieClip [Enemy_31] Frame 1
#initclip 104
Object.registerClass("Enemy_31", Enemy_31);
#endinitclip
this.energy_mc._visible = false;
stop();
Symbol 514 MovieClip [Enemy_32] Frame 1
#initclip 105
Object.registerClass("Enemy_32", Enemy_32);
#endinitclip
this.energy_mc._visible = false;
stop();
Symbol 514 MovieClip [Enemy_32] Frame 2
stop();
Symbol 522 MovieClip [Enemy_33] Frame 1
#initclip 106
Object.registerClass("Enemy_33", Enemy_33);
#endinitclip
stop();
Symbol 522 MovieClip [Enemy_33] Frame 2
stop();
Symbol 529 MovieClip [Enemy_34] Frame 1
#initclip 107
Object.registerClass("Enemy_34", Enemy_34);
#endinitclip
stop();
Symbol 529 MovieClip [Enemy_34] Frame 2
stop();
Symbol 534 MovieClip [Enemy_22] Frame 1
#initclip 108
Object.registerClass("Enemy_22", Enemy_22);
#endinitclip
stop();
Symbol 534 MovieClip [Enemy_22] Frame 2
stop();
Symbol 542 MovieClip Frame 1
stop();
Symbol 542 MovieClip Frame 4
gotoAndStop (1);
Symbol 549 MovieClip Frame 1
stop();
Symbol 549 MovieClip Frame 9
gotoAndPlay (2);
Symbol 615 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 130
_root.game.StartMeteors();
stop();
Symbol 615 MovieClip Frame 270
gotoAndStop ("stop");
Symbol 625 MovieClip Frame 1
stop();
Symbol 625 MovieClip Frame 12
gotoAndPlay (2);
Symbol 637 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 10
gotoAndPlay ("shoot");
Instance of Symbol 641 MovieClip "radio_mc" in Symbol 642 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 679 MovieClip Frame 1
stop();
Symbol 679 MovieClip Frame 2
stop();
Symbol 679 MovieClip Frame 41
gotoAndStop ("loaded");
Symbol 682 MovieClip Frame 1
this.energy_mc._visible = false;
Symbol 693 MovieClip Frame 1
stop();
Symbol 693 MovieClip Frame 15
gotoAndPlay (2);
Symbol 699 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 3
gotoAndPlay (2);
Symbol 715 MovieClip Frame 1
stop();
Symbol 715 MovieClip Frame 15
_root.game.ReleaseDecoy(this._parent._parent._name);
Symbol 715 MovieClip Frame 74
gotoAndStop (1);
Symbol 720 MovieClip Frame 1
stop();
Symbol 720 MovieClip Frame 2
stop();
Symbol 724 MovieClip Frame 21
gotoAndPlay(Math.round(Math.random() * 50) + 22);
Symbol 737 MovieClip Frame 246
stop();
Symbol 738 MovieClip [turret] Frame 1
stop();
Symbol 738 MovieClip [turret] Frame 2
stop();
Symbol 738 MovieClip [turret] Frame 3
stop();
Symbol 738 MovieClip [turret] Frame 4
stop();
Symbol 738 MovieClip [turret] Frame 5
stop();
Symbol 738 MovieClip [turret] Frame 6
stop();
Symbol 738 MovieClip [turret] Frame 7
stop();
Symbol 738 MovieClip [turret] Frame 8
stop();
Symbol 738 MovieClip [turret] Frame 9
stop();
Symbol 738 MovieClip [turret] Frame 10
stop();
Symbol 738 MovieClip [turret] Frame 11
stop();
Symbol 738 MovieClip [turret] Frame 12
stop();
Symbol 738 MovieClip [turret] Frame 13
stop();
Symbol 738 MovieClip [turret] Frame 14
stop();
Symbol 738 MovieClip [turret] Frame 15
stop();
Symbol 738 MovieClip [turret] Frame 16
stop();
Symbol 738 MovieClip [turret] Frame 17
stop();
Symbol 738 MovieClip [turret] Frame 18
stop();
Symbol 738 MovieClip [turret] Frame 19
stop();
Symbol 738 MovieClip [turret] Frame 20
stop();
Symbol 738 MovieClip [turret] Frame 21
stop();
Symbol 738 MovieClip [turret] Frame 22
stop();
Symbol 738 MovieClip [turret] Frame 23
stop();
Symbol 738 MovieClip [turret] Frame 24
stop();
Symbol 738 MovieClip [turret] Frame 25
stop();
Symbol 738 MovieClip [turret] Frame 26
stop();
Symbol 738 MovieClip [turret] Frame 27
stop();
Symbol 738 MovieClip [turret] Frame 28
stop();
Symbol 738 MovieClip [turret] Frame 40
stop();
Symbol 757 MovieClip Frame 1
stop();
Symbol 757 MovieClip Frame 2
_root.doorGear.gotoAndStop("gone");
_root.doorGear2.gotoAndStop("gone");
if (_global.musicOn == true) {
_global.myMusicPlayer.SetMaxVolume(18);
_global.myMusicPlayer.SetTrack("recharge");
_global.myMusicPlayer.PlayWithCrossFade(8);
}
Symbol 757 MovieClip Frame 120
_global.levelClose = false;
_root.gotoAndPlay(_global.currentCampaign);
stop();
Symbol 757 MovieClip Frame 240
_root.gotoAndPlay("main");
Symbol 759 MovieClip Frame 1
stop();
Symbol 759 MovieClip Frame 2
stop();
Symbol 765 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 79
stop();
Symbol 765 MovieClip Frame 169
stop();
Symbol 765 MovieClip Frame 170
stop();
Symbol 770 MovieClip Frame 1
stop();
Symbol 779 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 45
stop();
Symbol 797 MovieClip Frame 96
stop();
Symbol 1867 MovieClip [__Packages.DataObject] Frame 0
class DataObject
{
var arrElements, indexOne, indexTwo;
function DataObject () {
var _local3 = RandNum(55, 66);
arrElements = new Array(_local3);
var _local2 = 0;
while (_local2 < _local3) {
arrElements[_local2] = 0;
_local2++;
}
indexOne = -1;
indexTwo = -1;
}
function Set(dataValue) {
var _local6 = Math.round(Math.random() * dataValue);
var _local7 = dataValue - _local6;
indexOne = RandNum(0, arrElements.length - 4);
indexTwo = RandNum(0, arrElements.length - 4);
if (indexOne == indexTwo) {
if (indexOne == (arrElements.length - 1)) {
indexTwo = indexOne - 1;
} else {
indexTwo = indexOne + 1;
}
}
var _local5 = dataValue / (arrElements.length - 2);
var _local4 = dataValue;
var _local9 = arrElements.length;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
arrElements[_local2] = _local6;
} else if (_local2 == indexTwo) {
arrElements[_local2] = _local7;
} else {
var _local3 = 0;
if (_local4 > 0) {
_local3 = Math.round((Math.random() * _local5) + (_local5 * 0.5));
if (_local3 > _local4) {
_local3 = _local4;
}
if (_local2 == (arrElements.length - 1)) {
_local3 = _local4;
}
_local4 = _local4 - _local3;
}
arrElements[_local2] = _local3;
}
_local2++;
}
}
function mSet(dataValue) {
var _local7 = 0;
while (_local7 < 10) {
var _local5 = Math.round(Math.random() * dataValue);
var _local8 = dataValue - _local5;
indexOne = RandNum(0, arrElements.length - 4);
indexTwo = RandNum(0, arrElements.length - 4);
if (indexOne == indexTwo) {
if (indexOne == (arrElements.length - 1)) {
indexTwo = indexOne - 1;
} else {
indexTwo = indexOne + 1;
}
}
var _local4 = dataValue / (arrElements.length - 2);
var _local10 = dataValue;
var _local9 = arrElements.length;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
arrElements[_local2] = _local5;
} else if (_local2 == indexTwo) {
arrElements[_local2] = _local8;
} else {
var _local3 = 0;
_local3 = Math.round((Math.random() * (_local4 * 1.23)) + (_local4 * 0.75));
arrElements[_local2] = _local3;
}
_local2++;
}
if (Get() == -1) {
break;
}
_local7++;
}
}
function Get() {
var _local3 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < arrElements.length) {
if (_local2 == indexOne) {
_local3 = _local3 + arrElements[_local2];
} else if (_local2 == indexTwo) {
_local3 = _local3 + arrElements[_local2];
} else {
_local4 = _local4 + arrElements[_local2];
}
_local2++;
}
if (_local3 == _local4) {
return(_local3);
}
return(-1);
}
function Store() {
var _local2 = arrElements.slice();
_local2.splice(2, 0, indexOne);
_local2.splice(7, 0, indexTwo);
return(_local2);
}
function Load(originalArray) {
indexOne = originalArray[2];
indexTwo = originalArray[7];
delete arrElements;
arrElements = originalArray.slice();
arrElements.splice(7, 1);
arrElements.splice(2, 1);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 1868 MovieClip [__Packages.PlayerProfile] Frame 0
class PlayerProfile
{
var blnInUse;
function PlayerProfile () {
blnInUse = false;
}
}
Symbol 1869 MovieClip [__Packages.SoundPlayer] Frame 0
class SoundPlayer
{
var channelsAvailable, channel1, channel2, channel3, channel4, channel5, channel6, externalSoundVolume;
function SoundPlayer () {
channelsAvailable = new Array(true, true, true, true, true, true);
channel1 = new Sound(_root.soundOneClip);
channel2 = new Sound(_root.soundTwoClip);
channel3 = new Sound(_root.soundThreeClip);
channel4 = new Sound(_root.soundFourClip);
channel5 = new Sound(_root.soundFiveClip);
channel6 = new Sound(_root.soundSixClip);
externalSoundVolume = 100;
}
function CleanSounds(intIndex) {
channelsAvailable[intIndex] = true;
}
function PlaySound(linkIdentifier) {
if (_global.soundOn == true) {
var thisRef = this;
if (channelsAvailable[0] == true) {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound(_root.soundOneClip);
channel1.attachSound(linkIdentifier);
channel1.setVolume(100);
channel1.start(0, 0);
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
} else if (channelsAvailable[1] == true) {
channelsAvailable[1] = false;
delete channel2;
channel2 = new Sound(_root.soundTwoClip);
channel2.attachSound(linkIdentifier);
channel2.setVolume(100);
channel2.start(0, 0);
channel2.onSoundComplete = function () {
thisRef.CleanSounds(1);
};
} else if (channelsAvailable[4] == true) {
channelsAvailable[4] = false;
delete channel5;
channel5 = new Sound(_root.soundFiveClip);
channel5.attachSound(linkIdentifier);
channel5.setVolume(100);
channel5.start(0, 0);
channel5.onSoundComplete = function () {
thisRef.CleanSounds(4);
};
} else if (channelsAvailable[5] == true) {
channelsAvailable[5] = false;
delete channel6;
channel6 = new Sound(_root.soundSixClip);
channel6.attachSound(linkIdentifier);
channel6.setVolume(100);
channel6.start(0, 0);
channel6.onSoundComplete = function () {
thisRef.CleanSounds(5);
};
} else {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound(_root.soundOneClip);
channel1.attachSound(linkIdentifier);
channel1.setVolume(100);
channel1.start(0, 0);
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
}
}
}
function PlayBubbleSound(linkIdentifier) {
if (_global.soundOn == true) {
var thisRef = this;
if (channelsAvailable[2] == true) {
channelsAvailable[2] = false;
delete channel3;
channel3 = new Sound(_root.soundThreeClip);
channel3.attachSound(linkIdentifier);
channel3.setVolume(100);
channel3.start(0, 0);
channel3.onSoundComplete = function () {
thisRef.CleanSounds(2);
};
}
}
}
function PlayMachineGunSound(linkIdentifier) {
if (_global.soundOn == true) {
var _local4 = this;
if (channelsAvailable[3] == true) {
channelsAvailable[3] = false;
delete channel4;
channel4 = new Sound(_root.soundFourClip);
channel4.attachSound(linkIdentifier);
channel4.setVolume(50);
channel4.start(0, 99999);
}
}
}
function StopMachineGunSound() {
if (channelsAvailable[3] == false) {
channelsAvailable[3] = true;
channel4.stop();
}
}
function PlayExternalSound(urlPath) {
var thisRef = this;
if (channelsAvailable[0] == true) {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound();
channel1.loadSound(urlPath, false);
channel1.setVolume(externalSoundVolume);
channel1.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
} else if (channelsAvailable[1] == true) {
channelsAvailable[1] = false;
delete channel2;
channel2 = new Sound();
channel2.loadSound(urlPath, false);
channel2.setVolume(externalSoundVolume);
channel2.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel2.onSoundComplete = function () {
thisRef.CleanSounds(1);
};
} else {
channelsAvailable[0] = false;
delete channel1;
channel1 = new Sound();
channel1.loadSound(urlPath, false);
channel1.setVolume(externalSoundVolume);
channel1.onLoad = function (loadedOK) {
if (loadedOK) {
this.start();
}
};
channel1.onSoundComplete = function () {
thisRef.CleanSounds(0);
};
}
}
}
Symbol 1870 MovieClip [__Packages.Music] Frame 0
class Music
{
var mySound, volume, currentTrack, inCrossfade, state, changeSongs, maxVolume, targetVolume, volumeSpeed;
function Music () {
mySound = new Sound(_root.dynamicMusicClip);
volume = 100;
currentTrack = "";
inCrossfade = false;
state = false;
changeSongs = true;
maxVolume = 60;
}
function StartFastSound() {
currentTrack = "bossMain";
mySound.stop();
mySound.attachSound(currentTrack);
volume = maxVolume;
mySound.setVolume(volume);
mySound.start(0, 2000);
state = true;
}
function SetMaxVolume(vol) {
maxVolume = vol;
}
function SetTrack(setMusic) {
if (setMusic == currentTrack) {
changeSongs = false;
} else {
changeSongs = true;
currentTrack = setMusic;
}
}
function Play() {
mySound.stop();
mySound.attachSound(currentTrack);
volume = maxVolume;
mySound.setVolume(volume);
mySound.start(0, 2000);
state = true;
}
function Stop() {
mySound.stop();
state = false;
}
function PlayWithCrossFade(secondDuration) {
if (changeSongs == true) {
if (state == true) {
inCrossfade = true;
targetVolume = 0;
var _local2 = secondDuration * 30;
volumeSpeed = (targetVolume - volume) / (_local2 / 2);
} else {
mySound.stop();
mySound.attachSound(currentTrack);
if (currentTrack != "bossIntro") {
mySound.start(0, 2000);
} else {
mySound.start(0, 0);
var thisRef = this;
mySound.onSoundComplete = function () {
thisRef.StartFastSound();
};
}
state = true;
inCrossfade = false;
targetVolume = maxVolume;
volume = 0;
mySound.setVolume(0);
var _local2 = secondDuration * 30;
volumeSpeed = (targetVolume - volume) / _local2;
}
}
}
function RunPlayer() {
if (targetVolume != volume) {
var _local2;
_local2 = volume + volumeSpeed;
if ((volumeSpeed < 0) && (_local2 < 0)) {
_local2 = 0;
} else if ((volumeSpeed > 0) && (_local2 > targetVolume)) {
_local2 = targetVolume;
}
volume = _local2;
mySound.setVolume(_local2);
}
if (inCrossfade == true) {
var thisMusic = this;
if (volume <= 0) {
volumeSpeed = volumeSpeed * -1;
inCrossfade = false;
targetVolume = maxVolume;
mySound.stop();
mySound.attachSound(currentTrack);
mySound.setVolume(0);
if (currentTrack != "bossIntro") {
mySound.start(0, 2000);
} else {
mySound.start(0, 0);
mySound.onSoundComplete = function () {
thisMusic.StartFastSound();
};
}
state = true;
}
}
}
}
Symbol 1871 MovieClip [__Packages.Campaign] Frame 0
class Campaign
{
var strTitle, strDifficulty, strSlots, strDescription, strVictory, strButton, blnSet, arrGuns;
function Campaign () {
strTitle = "No Title";
strDifficulty = "Hard";
strSlots = "0";
strDescription = "No description available...";
strVictory = "Great Job!";
strButton = "";
blnSet = false;
arrGuns = new Array();
}
}
Symbol 1872 MovieClip [__Packages.BulletTargetable] Frame 0
class BulletTargetable extends MovieClip
{
var moveX, moveY, gravity, _damage, _protectedCounter, _explodeCounter, _holdMovement, _acidCounter, _subBullet, _enemyProtected, _midX, _midY, _data, t, angle, _turretCameFrom, _mine, velocity, startX, startY, _x, _y, _rotation, lastX, lastY, removeCallback, _name, removeMovieClip, _width, _height;
function BulletTargetable () {
super();
moveX = 0;
moveY = 0;
gravity = 0;
_damage = 1;
_protectedCounter = -1;
_explodeCounter = -1;
_holdMovement = false;
_acidCounter = 0;
_subBullet = false;
_enemyProtected = "";
_midX = 0;
_midY = 0;
_data = 0;
t = 0;
angle = 0;
_turretCameFrom = "";
_mine = false;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function SetGravityAndVelocity(myGravity, myVelocity) {
gravity = -myGravity;
velocity = myVelocity;
}
function SetStart(myX, myY) {
startX = myX;
startY = myY;
}
function SetAngle(myAngle) {
angle = myAngle;
}
function onEnterFrame() {
if (_holdMovement == false) {
if (_protectedCounter > -1) {
if (_protectedCounter == 0) {
_enemyProtected = "";
_protectedCounter = -1;
} else {
_protectedCounter--;
}
}
if (_explodeCounter > -1) {
if (_explodeCounter == 0) {
Burst();
_explodeCounter = -1;
} else {
_explodeCounter--;
}
}
if (_acidCounter > 0) {
_acidCounter--;
_root.game.SpawnAcidDrop(_x, _y, _rotation, _data);
}
t++;
lastX = _x;
lastY = _y;
_x = startX + ((velocity * t) * Math.cos(angle));
_y = startY + (((velocity * t) * Math.sin(angle)) - (((0.5 * gravity) * t) * t));
moveX = _x - lastX;
moveY = _y - lastY;
var _local3 = t - 0.5;
_midX = startX + ((velocity * _local3) * Math.cos(angle));
_midY = startY + (((velocity * _local3) * Math.sin(angle)) - (((0.5 * gravity) * _local3) * _local3));
var _local4 = Math.atan2(moveY, moveX);
var _local5 = (360 * _local4) / (Math.PI*2);
_rotation = _local5;
if (InBounds() == false) {
if (_subBullet == false) {
_root.game.ReportBulletMiss();
}
removeCallback(_name);
removeMovieClip();
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
return(_local2);
}
function Hit(varX, varY, enemyName) {
_root.game.Explosion(varX, varY);
}
function Burst() {
_root.game.BulletShards(_x, _y, _data, Math.round(_damage * 0.25));
removeCallback(_name);
removeMovieClip();
}
}
Symbol 1873 MovieClip [__Packages.BulletFlameShard] Frame 0
class BulletFlameShard extends BulletTargetable
{
function BulletFlameShard () {
super();
}
function Hit(varX, varY, enemyName) {
}
}
Symbol 1874 MovieClip [__Packages.BulletFlame] Frame 0
class BulletFlame extends BulletTargetable
{
var _data, _damage;
function BulletFlame () {
super();
}
function Hit(varX, varY, enemyName) {
_root.game.FlameShards(varX, varY, _data, enemyName, _damage);
}
}
Symbol 1875 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var guns, arrEvents, arrShields, damageZones, queueBullets, blnDestroyed, safetyTurn, numSpeed, fallingMomentum, goldWin, expWin, blnHalt, blnHasShield, blnShieldIsOn, intShieldCounter, floatCounterMax, floatSpeed, floatCounter, floatDirection, blnTeleports, intPointXStop, _bullet, _enemy, _damage, intTeleportMax, intTeleportCounter, deathType, movementStyle, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, holdMomentumTime, turnAroundBoundry, timeModifier, timeCounter, pointsWin, lockedTarget, _y, lockedOpen, maxLife, numLife, maxVelocity, momentum, velocity, enemyOff, _x, _height, _name, removeMovieClip, shield, type, stopPoint, localToGlobal, treads, _xscale, _width, gotoAndStop, _rotation, okStop, isItTime, setToFrame2, energy_mc, customFunction1, arrSeekers;
function Enemy () {
super();
guns = new Array();
arrEvents = new Array();
arrShields = new Array();
damageZones = new Array();
queueBullets = new Array();
blnDestroyed = false;
safetyTurn = false;
numSpeed = 0.25;
fallingMomentum = 0;
goldWin = 0;
expWin = 0;
blnHalt = false;
blnHasShield = false;
blnShieldIsOn = false;
intShieldCounter = 140;
floatCounterMax = 15;
floatSpeed = 0;
floatCounter = Math.round(floatCounterMax / 2);
floatDirection = -0.05;
blnTeleports = false;
intPointXStop = 0;
_bullet = false;
_enemy = true;
_damage = 0;
intTeleportMax = 180;
intTeleportCounter = intTeleportMax;
deathType = "standard";
movementStyle = "straight";
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
holdMomentumTime = 0;
turnAroundBoundry = 50;
timeModifier = 1;
timeCounter = 0;
pointsWin = 200;
ConfigureEnemy();
var _local5 = 0;
while (_local5 < guns.length) {
if ((guns[_local5].type == 13) || (guns[_local5].type == 21)) {
queueBullets.push({gunName:guns[_local5].name, bulletsLeft:0, bulletCounter:0});
} else if (guns[_local5].type == 19) {
lockedTarget = _root.game.GetRandomAllyBelow(125);
var _local6 = CalcBombDrop(_y - lockedTarget._y, _global.gravityConst, numSpeed);
lockedOpen = (lockedTarget._x + _local6) + RandNum(-5, 5);
}
_local5++;
}
maxLife = numLife;
maxVelocity = numSpeed;
momentum = new Vector();
velocity = new Vector();
velocity._x = -RandNum(1, maxVelocity);
velocity._y = RandNum(-(0.5 * maxVelocity), 0.5 * maxVelocity);
if (velocity._y == 0) {
velocity._y = 0.5;
}
}
function ConfigureEnemy() {
numLife = 1;
numSpeed = 2;
arrEvents.push({name:"Death Award", triggerValue:0, hit:false, custom:false, action:"EVENT_Bubbles", values:Array(5, 10)});
}
function CalcBombDrop(h, g, u) {
return(Math.round(u * Math.sqrt((2 * h) / g)));
}
function RecalcTargets() {
var _local4 = 0;
while (_local4 < guns.length) {
if (guns[_local4].type == 19) {
lockedTarget = _root.game.GetRandomAllyBelow(_y);
var _local5 = CalcBombDrop(lockedTarget._y - _y, _global.gravityConst, numSpeed);
lockedOpen = (lockedTarget._x + _local5) + RandNum(-5, 5);
}
_local4++;
}
}
function onEnterFrame() {
if (!enemyOff) {
if (timeModifier > 0) {
Move();
if (!blnDestroyed) {
OperateWeapons();
}
}
}
}
function Cleanup() {
RemoveShieldsIfExist();
}
function Move() {
if (!enemyOff) {
if (!blnDestroyed) {
if (movementStyle == "straight") {
_x = _x + ((-numSpeed) * timeModifier);
} else if (movementStyle == "drone") {
MovementDrone();
} else if (movementStyle == "float") {
MovementFloat();
} else if (movementStyle == "plane") {
MovementPlane();
} else if (movementStyle == "boss") {
MovementBoss();
} else if (movementStyle == "miniboss") {
MovementMiniBoss();
} else if (movementStyle == "ground") {
MovementGround();
} else if (movementStyle == "MonsterBullet") {
MovementMonsterBullet();
}
if (timeModifier > 0) {
if (blnHasShield == true) {
ControlShield();
}
if (blnTeleports == true) {
ControlTeleportation();
}
}
} else {
if (blnHalt == false) {
if (movementStyle == "drone") {
_x = _x + velocity._x;
} else {
_x = _x + ((-numSpeed) * timeModifier);
}
}
fallingMomentum = fallingMomentum + (0.1 * _global.gravityConst);
_y = _y + (fallingMomentum * timeModifier);
if ((_y - _height) > Stage.height) {
_root.game.ReportEnemyDeath(_name);
Cleanup();
removeMovieClip();
}
}
}
}
function SetTimeStatus(newStatus) {
timeModifier = newStatus;
}
function ControlShield() {
if (intShieldCounter <= 0) {
if (blnShieldIsOn == true) {
blnShieldIsOn = false;
var shieldRef = shield;
shieldRef._visible = false;
intShieldCounter = 60;
} else {
blnShieldIsOn = true;
var shieldRef = shield;
shieldRef._visible = true;
intShieldCounter = 120;
}
} else {
intShieldCounter--;
}
}
function ControlTeleportation() {
if (intTeleportCounter <= 0) {
_root.game.Teleport(_x, _y);
_x = RandNum(turnAroundBoundry, Stage.width - turnAroundBoundry);
_y = RandNum(turnAroundBoundry, Stage.height - turnAroundBoundry);
_root.game.TeleportAppear(_x, _y);
intTeleportCounter = intTeleportMax;
} else {
intTeleportCounter--;
}
}
function MovementBoss() {
if ((type == "Enemy_10") || (type == "Enemy_21")) {
if (floatCounter == 0) {
floatDirection = -1 * floatDirection;
floatCounter = floatCounterMax;
} else {
floatCounter--;
}
floatSpeed = floatSpeed + floatDirection;
if (floatDirection < 0) {
if (floatSpeed < -0.25) {
floatSpeed = -0.25;
}
} else if (floatSpeed > 0.25) {
floatSpeed = 0.25;
}
_y = _y + floatSpeed;
}
if (blnHalt == false) {
var ObjRef = stopPoint;
var pointTwo = {x:ObjRef._x, y:ObjRef._y};
localToGlobal(pointTwo);
_x = _x - (numSpeed * timeModifier);
if (pointTwo.x <= Stage.width) {
blnHalt = true;
}
}
}
function MovementMiniBoss() {
if ((((((((type == "Enemy_13") || (type == "Enemy_16")) || (type == "Enemy_17")) || (type == "Enemy_19")) || (type == "Enemy_30")) || (type == "Enemy_32")) || (type == "Enemy_33")) || (type == "Enemy_34")) {
if (floatCounter == 0) {
floatDirection = -1 * floatDirection;
floatCounter = floatCounterMax;
} else {
floatCounter--;
}
floatSpeed = floatSpeed + floatDirection;
if (floatDirection < 0) {
if (floatSpeed < -0.25) {
floatSpeed = -0.25;
}
} else if (floatSpeed > 0.25) {
floatSpeed = 0.25;
}
_y = _y + floatSpeed;
}
if (blnHalt == false) {
_x = _x - (numSpeed * timeModifier);
if (_x <= intPointXStop) {
blnHalt = true;
var _local2 = 0;
while (_local2 < guns.length) {
if (guns[_local2].type == 23) {
if (guns[_local2].counter == -999) {
guns[_local2].counter = -1;
if (LaunchShield(_local2) == false) {
guns[_local2].counter = 30;
}
}
}
_local2++;
}
}
}
}
function MovementGround() {
if (blnHalt == false) {
_x = _x - (numSpeed * timeModifier);
if (_x <= intPointXStop) {
blnHalt = true;
treads.stop();
}
}
}
function MovementDrone() {
var _local2 = false;
if (_x <= turnAroundBoundry) {
momentum._x = 0.1;
_local2 = true;
}
if (_x >= (Stage.width - turnAroundBoundry)) {
momentum._x = -0.1;
_local2 = true;
}
if (_y <= turnAroundBoundry) {
momentum._y = 0.1;
_local2 = true;
}
if (_y >= (Stage.height - turnAroundBoundry)) {
momentum._y = -0.1;
_local2 = true;
}
if (_local2 == false) {
if (holdMomentumTime < 1) {
var _local3 = RandNum(0, 100);
if (_local3 < 35) {
momentum._y = -momentum._y;
}
holdMomentumTime = RandNum(60, 80);
} else {
holdMomentumTime--;
}
} else {
holdMomentumTime = 0;
}
velocity._x = velocity._x + momentum._x;
velocity._y = velocity._y + momentum._y;
if ((velocity._x < 0) && (_xscale < 0)) {
_xscale = -_xscale;
} else if ((velocity._x > 0) && (_xscale > 0)) {
_xscale = -_xscale;
}
if (Math.abs(velocity._x) > maxVelocity) {
velocity._x = (velocity._x / Math.abs(velocity._x)) * maxVelocity;
}
if (Math.abs(velocity._y) > maxVelocity) {
velocity._y = (velocity._y / Math.abs(velocity._y)) * maxVelocity;
}
_x = _x + (velocity._x * timeModifier);
_y = _y + (velocity._y * timeModifier);
}
function MovementFloat() {
_x = _x + 0;
_y = _y - (numSpeed * timeModifier);
if ((_y + _height) < 0) {
_x = RandNum(350, 675);
_y = Stage.height + _height;
}
}
function SetMovement(newX, newY) {
velocity._x = newX;
velocity._y = newY;
}
function MovementMonsterBullet() {
_x = _x + velocity._x;
_y = _y + velocity._y;
if (InBounds() == false) {
_root.game.ReportEnemyDeath(_name);
removeMovieClip();
}
}
function MovementPlane() {
_x = _x - (numSpeed * timeModifier);
_y = _y + (Math.sin(_x) * 0.1);
if (_x < -150) {
_x = 750;
_y = RandNum(10, 150);
var i = 0;
while (i < guns.length) {
if (guns[i].type == 19) {
lockedTarget = _root.game.GetRandomAllyBelow(_y);
var num2drop = CalcBombDrop(lockedTarget._y - _y, _global.gravityConst, numSpeed);
lockedOpen = (lockedTarget._x + num2drop) + RandNum(-5, 5);
var gunRef = eval ("this." + guns[i].name);
gunRef.gotoAndStop(1);
}
i++;
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
if ((_y + (_height / 2)) < 0) {
_local2 = false;
}
return(_local2);
}
function getHealth() {
var _local2 = 0;
_local2 = numLife;
return(_local2);
}
function GetMovementStyle() {
return(movementStyle);
}
function DetectHit(bulletName) {
var returnValue = false;
if (_root[bulletName]._enemyProtected != _name) {
var hullRef = eval (("_root." + _name) + ".hull");
var blnHit = false;
var intHit = 0;
blnHit = hullRef.hitTest(_root[bulletName]._x, _root[bulletName]._y, true);
if (blnHit == false) {
blnHit = hullRef.hitTest(_root[bulletName]._midX, _root[bulletName]._midY, true);
intHit = 2;
} else {
intHit = 1;
}
if (blnHit) {
var i = 0;
while (i < damageZones.length) {
var zoneRef = eval ((("_root." + _name) + ".") + damageZones[i].name);
blnHit = false;
if (intHit == 2) {
blnHit = zoneRef.hitTest(_root[bulletName]._midX, _root[bulletName]._midY, true);
} else {
blnHit = zoneRef.hitTest(_root[bulletName]._x, _root[bulletName]._y, true);
}
if (blnHit) {
var totalDamage = Math.round(_root[bulletName]._damage * damageZones[i].percentage);
if (totalDamage < 0) {
totalDamage = 0;
}
ReportDamage(totalDamage, _root[bulletName]._x, _root[bulletName]._y);
returnValue = true;
}
i++;
}
}
if (returnValue == true) {
if (intHit == 2) {
_root[bulletName].Hit(_root[bulletName]._midX, _root[bulletName]._midY, _name);
} else {
_root[bulletName].Hit(_root[bulletName]._x, _root[bulletName]._y, _name);
}
if (_root[bulletName]._mine == true) {
_root.game.ReportMineDestroyed(_root[bulletName]._creator._name);
}
_root[bulletName].removeMovieClip();
_root.game.RemoveBullet(bulletName);
}
}
return(returnValue);
}
function ReportDamage(numDamage, damageX, damageY) {
var _local4 = false;
if (arrShields.length > 0) {
numDamage = Math.round(0.25 * numDamage);
_root.game.ShieldHit(damageX, damageY);
}
if (blnShieldIsOn == true) {
numDamage = 0;
numLife = numLife - numDamage;
} else {
numLife = numLife - numDamage;
}
if (numLife <= 0) {
if ((type == "Enemy_2") || (type == "Enemy_5")) {
var _local5 = RandNum(0, 100);
if (_local5 < 50) {
_root.game.DroneDeath(_xscale, _x, _y, velocity._x, velocity._y);
} else {
_root.game.ParticleExplosion(type, _x, _y);
}
} else {
_root.game.ParticleExplosion(type, _x, _y);
}
SpawnUnitsOnDeath();
if (deathType == "standard") {
_root.game.ReportEnemyDeath(_name);
_root.game.AwardPoints(_x, _y - 15, goldWin, expWin, type, pointsWin);
blnDestroyed = true;
Cleanup();
removeMovieClip();
_local4 = true;
} else if (deathType == "fall") {
if (blnDestroyed == false) {
_root.game.AwardPoints(_x, _y - 15, goldWin, expWin, type, pointsWin);
_root.game.ParticleExplosion(type, _x, _y);
RemoveShieldsIfExist();
gotoAndStop(2);
blnDestroyed = true;
}
}
} else {
_root.game.AwardDamage(damageX, damageY - 10, numDamage);
}
return(_local4);
}
function Apocalypse() {
var _local2 = false;
if (((type != "Enemy_20") && (type != "Enemy_21")) && (type != "Enemy_22")) {
_local2 = ReportDamage(999999, -50, -50);
}
return(_local2);
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 1) {
var targetEnemy = _root.game.GetRandomAlly();
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var perfectAngle = GetPerfectAngleToHitTarget(point.x, point.y, targetEnemy, guns[i].speed);
if (perfectAngle != 99999) {
myDegrees = perfectAngle;
if (_xscale < 0) {
if (myDegrees < 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.EnemyFire(posVector, perfectAngle, guns[i].speed, 100, guns[i].damage, "normal");
guns[i].size = 999;
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 2) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.SpawnUnit("Enemy_Seeker", posVector, _name);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 3) {
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.SpawnUnit("Enemy_2", posVector, _name);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 5) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 6) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 7) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 8) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 60, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 9) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter1");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter2");
var pointThree = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointThree);
posVector._x = pointThree.x;
posVector._y = pointThree.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) - 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter3");
var pointFour = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFour);
posVector._x = pointFour.x;
posVector._y = pointFour.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter4");
var pointFive = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointFive);
posVector._x = pointFive.x;
posVector._y = pointFive.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 30, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter5");
var pointSix = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSix);
posVector._x = pointSix.x;
posVector._y = pointSix.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 60, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter6");
var pointSeven = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointSeven);
posVector._x = pointSeven.x;
posVector._y = pointSeven.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 90, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter7");
var pointEight = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointEight);
posVector._x = pointEight.x;
posVector._y = pointEight.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 120, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter8");
var pointNine = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointNine);
posVector._x = pointNine.x;
posVector._y = pointNine.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 150, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter9");
var pointTen = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTen);
posVector._x = pointTen.x;
posVector._y = pointTen.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 180, guns[i].speed, guns[i].size, guns[i].damage);
ObjRefTwo = eval (("this." + guns[i].name) + ".emitter10");
var pointEleven = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointEleven);
posVector._x = pointEleven.x;
posVector._y = pointEleven.y;
_root.EnemyShoot(posVector, (ObjRef._rotation + _rotation) + 210, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 10) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShootSpecial("mine", posVector, 0, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 12) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShootSpecial("sticky", posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else if (guns[i].type == 13) {
var targetEnemy = SelectClosestTarget();
var mgIndex = -1;
var t = 0;
while (t < queueBullets.length) {
if (queueBullets[t].gunName == guns[i].name) {
mgIndex = t;
break;
}
t++;
}
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
var shootAngle = myDegrees;
if (_xscale < 0) {
if (myDegrees < 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
queueBullets[t].bulletsLeft = 2;
queueBullets[t].bulletCounter = 5;
ObjRef.gotoAndPlay("shoot");
_root.game.EnemyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
if (queueBullets[t].bulletsLeft > 0) {
if (queueBullets[t].bulletCounter == 0) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.EnemyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
queueBullets[t].bulletsLeft--;
if (queueBullets[t].bulletsLeft > 0) {
queueBullets[t].bulletCounter = 5;
} else {
ObjRef.gotoAndPlay("stop");
}
} else {
queueBullets[t].bulletCounter--;
}
}
} else if (guns[i].type == 15) {
} else if (guns[i].type == 17) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
okStop = false;
if (isItTime) {
} else {
ObjRef.gotoAndPlay(1);
}
if (isItTime) {
if (guns[i].counter < 1) {
ObjRef._rotation = ObjRef._rotation + 5;
if (isItTime) {
if (setToFrame2) {
} else {
ObjRef.gotoAndPlay(2);
setToFrame2 = true;
}
} else {
ObjRef.gotoAndPlay(1);
}
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 18) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = _root.avatar._x - point.x;
vecDirection._y = _root.avatar._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
okStop = false;
if (isItTime) {
} else {
ObjRef.gotoAndPlay(1);
}
if (isItTime) {
if (guns[i].counter < 1) {
ObjRef._rotation = ObjRef._rotation + 20;
if (isItTime) {
if (setToFrame2) {
} else {
ObjRef.gotoAndPlay(2);
setToFrame2 = true;
}
} else {
ObjRef.gotoAndPlay(1);
}
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.EnemyShoot(posVector, ObjRef._rotation + _rotation, guns[i].speed, guns[i].size, guns[i].damage);
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
}
} else if (guns[i].type == 19) {
if (_x <= lockedOpen) {
var gunRef = eval ("this." + guns[i].name);
gunRef.play();
lockedOpen = -99999;
}
} else if (guns[i].type == 20) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
if (guns[i].size == 999) {
var targetEnemy = _root.game.GetRandomAlly();
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var newAngle = GetPerfectAngleToHitTarget(point.x, point.y, targetEnemy, guns[i].speed);
if (newAngle != 99999) {
newAngle = RandNum(newAngle - 5, newAngle + 5);
}
guns[i].size = newAngle;
}
var perfectAngle = guns[i].size;
if ((perfectAngle != 99999) && (perfectAngle != 999)) {
myDegrees = perfectAngle;
if (_xscale < 0) {
if (myDegrees < 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.EnemyFire(posVector, perfectAngle, guns[i].speed, 100, guns[i].damage, "normal");
guns[i].size = 999;
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else {
guns[i].size = 999;
}
} else if (guns[i].type == 21) {
var targetEnemy = SelectClosestTarget();
var mgIndex = -1;
var t = 0;
while (t < queueBullets.length) {
if (queueBullets[t].gunName == guns[i].name) {
mgIndex = t;
break;
}
t++;
}
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
var shootAngle = myDegrees;
if (_xscale < 0) {
if (myDegrees < 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.ParticleExplosion("casing", posVector._x, posVector._y);
queueBullets[t].bulletsLeft = 14;
queueBullets[t].bulletCounter = 5;
ObjRef.gotoAndPlay("shoot");
_root.game.EnemyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
if (queueBullets[t].bulletsLeft > 0) {
if (queueBullets[t].bulletCounter == 0) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.ParticleExplosion("casing", posVector._x, posVector._y);
_root.game.EnemyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
queueBullets[t].bulletsLeft--;
if (queueBullets[t].bulletsLeft > 0) {
queueBullets[t].bulletCounter = 5;
} else {
ObjRef.gotoAndPlay("stop");
}
} else {
queueBullets[t].bulletCounter--;
}
}
} else if (guns[i].type == 22) {
var ObjRef = eval ("this." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
if (guns[i].size == 999) {
var targetEnemy = _root.game.GetRandomAlly();
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
var newAngle = myDegrees;
guns[i].size = newAngle;
}
var perfectAngle = guns[i].size;
if ((perfectAngle != 99999) && (perfectAngle != 999)) {
myDegrees = perfectAngle;
if (_xscale < 0) {
if (myDegrees < 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees - _rotation;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.EnemyFireBulletEnemy(posVector, perfectAngle, guns[i].speed, 100, guns[i].damage, "MonsterBullet");
_root.game.ShakeScreen(30);
_global.SoundManager.PlaySound("LargeGunFire");
guns[i].size = 999;
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
} else {
guns[i].size = 999;
}
} else if (guns[i].type == 23) {
if (guns[i].counter == 0) {
if (LaunchShield(i) == false) {
guns[i].counter = 30;
} else {
guns[i].counter = -1;
}
} else if (guns[i].counter > 0) {
guns[i].counter--;
}
} else if (guns[i].type == 24) {
}
i++;
}
}
function SpawnUnitsOnDeath() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 24) {
var posVector = new Vector();
var ObjRefTwo = eval ("this." + guns[i].name);
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.SpawnEnemyAtLocation("Enemy_6", posVector);
}
i++;
}
}
function LaunchShield(i) {
var targetEnemy = _root.game.GetShieldTarget(_name);
var returnValue;
if (targetEnemy != "") {
var ObjRef = energy_mc;
ObjRef._visible = true;
ObjRef.gotoAndPlay(1);
var shieldCreated = _root.game.LaunchShieldEffect(_root[targetEnemy]._x, _root[targetEnemy]._y, targetEnemy, _name);
guns[i].name = targetEnemy;
_root[targetEnemy].InitiateShield(_name, shieldCreated);
returnValue = true;
} else {
returnValue = false;
}
return(returnValue);
}
function GetNumShields() {
return(arrShields.length);
}
function RemoveShieldsIfExist() {
var _local3 = 0;
while (_local3 < guns.length) {
if (guns[_local3].type == 23) {
if (guns[_local3].counter == -1) {
_root[guns[_local3].name].DestroyShield(_name);
}
}
_local3++;
}
_local3 = 0;
while (_local3 < arrShields.length) {
_root[arrShields[_local3].from].ShieldDestroyed();
_root.game.RemoveEffect(arrShields[_local3].name);
arrShields.splice(_local3, 1);
_local3--;
_local3++;
}
}
function InitiateShield(fromTarget, shieldName) {
arrShields.push({name:shieldName, from:fromTarget});
}
function ShieldDestroyed() {
var ObjRef = energy_mc;
ObjRef._visible = false;
var i = 0;
while (i < guns.length) {
if (guns[i].type == 23) {
guns[i].counter = 30;
}
i++;
}
}
function DestroyShield(fromTarget) {
var _local3 = 0;
while (_local3 < arrShields.length) {
if (arrShields[_local3].from == fromTarget) {
_root.game.RemoveEffect(arrShields[_local3].name);
arrShields.splice(_local3, 1);
_local3--;
}
_local3++;
}
}
function LaunchBomb(gunName) {
var i = 0;
while (i < guns.length) {
if (guns[i].name == gunName) {
var posVector = new Vector();
var ObjRef = eval ("this." + guns[i].name);
var ObjRefTwo = eval (("this." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.DropBomb(posVector, numSpeed, guns[i].size, guns[i].damage);
}
i++;
}
}
function ReceiveDamage(amountDamage, bulletName) {
var returnValue = false;
if (blnShieldIsOn == true) {
amountDamage = 0;
numLife = numLife - amountDamage;
} else {
numLife = numLife - amountDamage;
}
var i = 0;
while (i < arrEvents.length) {
if (((numLife <= arrEvents[i].triggerValue) && (arrEvents[i].hit == false)) || (arrEvents[i].triggerValue == -1)) {
arrEvents[i].hit = true;
if (arrEvents[i].custom == true) {
customFunction1 = arrEvents[i].action;
customFunction1();
} else if (arrEvents[i].action == "EVENT_Bubbles") {
var bubbleVector = new Vector();
bubbleVector._x = _x;
bubbleVector._y = _y;
_root.DropBubbles(arrEvents[i].values[0], bubbleVector, arrEvents[i].values[1]);
} else if (arrEvents[i].action == "EVENT_DropGun") {
RemoveGun(arrEvents[i].values);
} else if (arrEvents[i].action == "EVENT_SeekersDie") {
var t = 0;
while (t < arrSeekers.length) {
_root[arrSeekers[t].name].Explode();
t++;
}
}
}
i++;
}
var i = 0;
while (i < guns.length) {
if (guns[i].type == 15) {
if (guns[i].damage == 0) {
var ObjRef = eval ("this." + guns[i].name);
if (ObjRef.hitTest(_root[bulletName]._x, _root[bulletName]._y, true)) {
ObjRef.inside.gotoAndPlay("hit");
var posVector = new Vector();
var ObjRefTwo = eval ("this." + guns[i].name);
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRefTwo._parent.localToGlobal(pointTwo);
var s = 0;
while (s < 8) {
var theta = Math.round(Math.random() * 360);
var R = Math.round(Math.random() * (ObjRefTwo._width - 15));
posVector._x = (R * Math.cos(theta)) + pointTwo.x;
posVector._y = (R * Math.sin(theta)) + pointTwo.y;
_root.SpawnUnit("Enemy_Seeker", posVector, _name);
s++;
}
guns[i].damage = 1;
}
}
}
i++;
}
if (numLife < 1) {
returnValue = true;
_root.ReportDeath(_name);
removeMovieClip();
} else {
gotoAndStop(numLife);
}
return(returnValue);
}
function RemoveGun(strName) {
var _local2 = 0;
while (_local2 < guns.length) {
if (strName == guns[_local2].name) {
guns.splice(_local2, 1);
break;
}
_local2++;
}
}
function GetPerfectAngleToHitTarget(fireX, fireY, target, velocity) {
var _local4 = target._x - fireX;
var _local8 = target._y - fireY;
var _local6 = (_global.gravityConst * Math.pow(_local4, 2)) + ((2 * _local8) * Math.pow(velocity, 2));
var _local3 = Math.pow(velocity, 4) - (_global.gravityConst * _local6);
if (_local3 < 0) {
return(99999);
}
_local3 = Math.sqrt(_local3);
var _local5 = Math.atan((Math.pow(velocity, 2) + _local3) / (_global.gravityConst * _local4));
var _local2 = (360 * _local5) / (Math.PI*2);
if (_local2 < 0) {
_local2 = -1 * (180 + _local2);
} else if (_local2 >= 0) {
_local2 = -1 * _local2;
}
return(_local2);
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function SelectClosestTarget() {
return(_root.game.GetClosestAlly(this));
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function Hit(varX, varY, enemyName) {
}
}
Symbol 1876 MovieClip [__Packages.Vector] Frame 0
class Vector
{
var _x, _y;
function Vector () {
_x = 0;
_y = 0;
}
}
Symbol 1877 MovieClip [__Packages.Enemy_10] Frame 0
class Enemy_10 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_10 () {
super();
}
function ConfigureEnemy() {
numLife = 150;
numSpeed = 1;
type = "Enemy_10";
deathType = "fall";
movementStyle = "boss";
goldWin = 250;
expWin = 175;
pointsWin = 400;
guns.push({name:"gun_1", type:20, fireTimerMax:150, fireTimerMin:150, counter:400, speed:10, size:999, damage:10});
guns.push({name:"gun_2", type:20, fireTimerMax:150, fireTimerMin:150, counter:410, speed:10, size:999, damage:10});
guns.push({name:"gun_3", type:20, fireTimerMax:150, fireTimerMin:150, counter:420, speed:10, size:999, damage:10});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1.5});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:1});
}
}
Symbol 1878 MovieClip [__Packages.Enemy_5] Frame 0
class Enemy_5 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, guns, damageZones, pointsWin;
function Enemy_5 () {
super();
}
function ConfigureEnemy() {
numLife = 10;
numSpeed = 2.5;
type = "Enemy_5";
deathType = "standard";
movementStyle = "drone";
goldWin = 150;
expWin = 75;
guns.push({name:"gun_1", type:13, fireTimerMax:150, fireTimerMin:90, counter:60, speed:10, size:100, damage:0.5});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
pointsWin = 250;
}
}
Symbol 1879 MovieClip [__Packages.BulletDrone] Frame 0
class BulletDrone extends MovieClip
{
var moveX, moveY, gravity, _damage, _protectedCounter, _explodeCounter, _holdMovement, _enemyProtected, _midX, _midY, _data, angle, _turretCameFrom, _mine, velocity, startX, startY, _x, _y, emitter, localToGlobal, removeCallback, _name, removeMovieClip, _width, _height;
function BulletDrone () {
super();
moveX = 0;
moveY = 0;
gravity = 0;
_damage = 1;
_protectedCounter = -1;
_explodeCounter = -1;
_holdMovement = false;
_enemyProtected = "";
_midX = 0;
_midY = 0;
_data = 0;
angle = 0;
_turretCameFrom = "";
_mine = false;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function SetGravityAndVelocity(myGravity, myVelocity) {
gravity = -myGravity;
velocity = myVelocity;
}
function SetGravity(myGravity) {
gravity = myGravity;
}
function SetStart(myX, myY) {
startX = myX;
startY = myY;
}
function SetAngle(myAngle) {
angle = myAngle;
}
function onEnterFrame() {
if (_holdMovement == false) {
_x = _x + moveX;
_y = _y + moveY;
moveY = moveY + gravity;
var emitterRef = emitter;
var point = new Object({x:emitterRef._x, y:emitterRef._y});
localToGlobal(point);
_root.game.SmokeTrail(point.x, point.y);
if (InBounds() == false) {
removeCallback(_name);
removeMovieClip();
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
return(_local2);
}
function Hit(varX, varY, enemyName) {
_root.game.DamageExplosionMedium(varX, varY, _damage);
}
}
Symbol 1880 MovieClip [__Packages.Enemy_2] Frame 0
class Enemy_2 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, pointsWin, damageZones;
function Enemy_2 () {
super();
}
function ConfigureEnemy() {
numLife = 5;
numSpeed = 2;
type = "Enemy_2";
deathType = "standard";
movementStyle = "drone";
goldWin = 75;
expWin = 30;
pointsWin = 200;
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
}
}
Symbol 1881 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends MovieClip
{
var moveX, moveY, gravity, _damage, _holdMovement, _x, _y, _rotation, removeCallback, _name, removeMovieClip, _width, _height;
function Bullet () {
super();
moveX = 0;
moveY = 0;
gravity = 0;
_damage = 1;
_holdMovement = false;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function SetGravity(myGravity) {
gravity = myGravity;
}
function onEnterFrame() {
if (_holdMovement == false) {
_x = _x + moveX;
_y = _y + moveY;
var _local3 = Math.atan2(moveY, moveX);
var _local4 = (360 * _local3) / (Math.PI*2);
_rotation = _local4;
moveY = moveY + gravity;
if (InBounds() == false) {
_root.game.ReportBulletMiss();
removeCallback(_name);
removeMovieClip();
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
return(_local2);
}
}
Symbol 1882 MovieClip [__Packages.Debris] Frame 0
class Debris extends MovieClip
{
var moveX, moveY, gravity, _holdMovement, power, _rotation, _xscale, _yscale, _x, _y, removeCallback, _name, removeMovieClip, _width, _height;
function Debris () {
super();
moveX = 0;
moveY = 0;
gravity = 0;
_holdMovement = false;
power = 3;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function SetGravity(myGravity) {
gravity = myGravity;
}
function SetGravityAndRandomVector(myGravity) {
gravity = myGravity;
moveX = Math.round(Math.random() * (2 * power)) - power;
moveY = Math.round(Math.random() * (2 * power)) - power;
_rotation = Math.round(Math.random() * 360);
_xscale = Math.round(Math.random() * 75) + 75;
_yscale = _xscale;
}
function SetCasingDrop() {
moveX = Math.round(Math.random() * 2) - 1;
moveY = Math.round(Math.random() * 2) - 1;
_xscale = 100;
_yscale = 100;
}
function onEnterFrame() {
if (_holdMovement == false) {
_x = _x + moveX;
_y = _y + moveY;
moveY = moveY + gravity;
if (InBounds() == false) {
removeCallback(_name);
removeMovieClip();
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
return(_local2);
}
}
Symbol 1883 MovieClip [__Packages.Enemy_3] Frame 0
class Enemy_3 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, goldWin, expWin, guns, damageZones, pointsWin;
function Enemy_3 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 1;
type = "Enemy_3";
deathType = "standard";
movementStyle = "drone";
turnAroundBoundry = 115;
goldWin = 150;
expWin = 50;
guns.push({name:"gun_1", type:13, fireTimerMax:130, fireTimerMin:70, counter:60, speed:10, size:100, damage:0.5});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
pointsWin = 250;
}
}
Symbol 1884 MovieClip [__Packages.Enemy_4] Frame 0
class Enemy_4 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, goldWin, expWin, guns, damageZones, pointsWin;
function Enemy_4 () {
super();
}
function ConfigureEnemy() {
numLife = 30;
numSpeed = 1;
type = "Enemy_4";
deathType = "standard";
movementStyle = "float";
turnAroundBoundry = 150;
goldWin = 150;
expWin = 50;
guns.push({name:"gun_1", type:1, fireTimerMax:150, fireTimerMin:100, counter:60, speed:10, size:100, damage:2});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
pointsWin = 250;
}
}
Symbol 1885 MovieClip [__Packages.BulletMachineGun] Frame 0
class BulletMachineGun extends MovieClip
{
var moveX, moveY, _damage, _holdMovement, _midX, _midY, _noTop, _turretCameFrom, _mine, _missile, _subBullet, _lastTime, _x, _y, removeCallback, _name, removeMovieClip, _width, _height;
function BulletMachineGun () {
super();
moveX = 0;
moveY = 0;
_damage = 1;
_holdMovement = false;
_midX = 0;
_midY = 0;
_noTop = false;
_turretCameFrom = "";
_mine = false;
_missile = false;
_subBullet = false;
_lastTime = -1;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function onEnterFrame() {
if (_holdMovement == false) {
_midX = _x + (0.5 * moveX);
_midY = _y + (0.5 * moveY);
_x = _x + moveX;
_y = _y + moveY;
if (InBounds() == false) {
if (_subBullet == false) {
_root.game.ReportBulletMiss();
}
removeCallback(_name);
removeMovieClip();
}
if (_lastTime > -1) {
_lastTime--;
if (_lastTime == 0) {
removeCallback(_name);
removeMovieClip();
}
}
}
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
if (_noTop == false) {
if ((_y + (_height / 2)) < 0) {
_local2 = false;
}
}
return(_local2);
}
function Hit(varX, varY, enemyName) {
_root.game.MachineGunHit(varX, varY);
}
}
Symbol 1886 MovieClip [__Packages.Enemy_6] Frame 0
class Enemy_6 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_6 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 2;
type = "Enemy_6";
deathType = "standard";
movementStyle = "drone";
turnAroundBoundry = 70;
goldWin = 150;
expWin = 100;
pointsWin = 300;
guns.push({name:"gun_1", type:13, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:0.5});
guns.push({name:"gun_2", type:13, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:0.5});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.3});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:2});
}
}
Symbol 1887 MovieClip [__Packages.BulletMeteor] Frame 0
class BulletMeteor extends BulletMachineGun
{
var _xscale;
function BulletMeteor () {
super();
}
function Hit(varX, varY, enemyName) {
if (_xscale < 60) {
_root.game.DamageExplosionSmall(varX, varY, 0);
} else {
_root.game.DamageExplosionMedium(varX, varY, 0);
}
}
}
Symbol 1888 MovieClip [__Packages.Bomb] Frame 0
class Bomb extends BulletTargetable
{
function Bomb () {
super();
}
function Hit(varX, varY, enemyName) {
_root.game.Explosion(varX, varY);
}
}
Symbol 1889 MovieClip [__Packages.Enemy_7] Frame 0
class Enemy_7 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, guns, damageZones, pointsWin;
function Enemy_7 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 4;
type = "Enemy_7";
deathType = "standard";
movementStyle = "plane";
goldWin = 100;
expWin = 100;
guns.push({name:"gun_1", type:19, fireTimerMax:0, fireTimerMin:0, counter:1, speed:7, size:100, damage:15});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
pointsWin = 250;
}
}
Symbol 1890 MovieClip [__Packages.Enemy_8] Frame 0
class Enemy_8 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, guns, damageZones;
function Enemy_8 () {
super();
}
function ConfigureEnemy() {
numLife = 120;
numSpeed = 1;
type = "Enemy_8";
deathType = "fall";
movementStyle = "plane";
goldWin = 200;
expWin = 200;
guns.push({name:"gun_1", type:13, fireTimerMax:80, fireTimerMin:60, counter:140, speed:10, size:100, damage:2});
guns.push({name:"gun_2", type:19, fireTimerMax:0, fireTimerMin:0, counter:1, speed:7, size:100, damage:15});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:2});
}
}
Symbol 1891 MovieClip [__Packages.Enemy_20] Frame 0
class Enemy_20 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, guns, damageZones;
function Enemy_20 () {
super();
}
function ConfigureEnemy() {
numLife = 1200;
numSpeed = 1;
type = "Enemy_20";
deathType = "fall";
movementStyle = "boss";
goldWin = 4000;
expWin = 1500;
guns.push({name:"gun_1", type:13, fireTimerMax:120, fireTimerMin:70, counter:160, speed:10, size:100, damage:1});
guns.push({name:"gun_2", type:20, fireTimerMax:150, fireTimerMin:150, counter:160, speed:10, size:999, damage:4});
guns.push({name:"gun_3", type:20, fireTimerMax:150, fireTimerMin:150, counter:170, speed:10, size:999, damage:4});
guns.push({name:"gun_4", type:20, fireTimerMax:150, fireTimerMin:150, counter:180, speed:10, size:999, damage:4});
guns.push({name:"gun_5", type:20, fireTimerMax:150, fireTimerMin:150, counter:190, speed:10, size:999, damage:4});
guns.push({name:"gun_6", type:20, fireTimerMax:150, fireTimerMin:150, counter:200, speed:10, size:999, damage:4});
guns.push({name:"gun_7", type:20, fireTimerMax:150, fireTimerMin:150, counter:210, speed:10, size:999, damage:4});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:2.5});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone5", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone6", effect:"none", frame:0, percentage:1});
}
}
Symbol 1892 MovieClip [__Packages.Enemy_9] Frame 0
class Enemy_9 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, blnHasShield, shield, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_9 () {
super();
}
function ConfigureEnemy() {
numLife = 45;
numSpeed = 0.25;
type = "Enemy_9";
deathType = "standard";
movementStyle = "drone";
turnAroundBoundry = 100;
blnHasShield = true;
var shieldRef = shield;
shieldRef._visible = false;
goldWin = 150;
expWin = 100;
pointsWin = 350;
guns.push({name:"gun_1", type:13, fireTimerMax:130, fireTimerMin:70, counter:60, speed:10, size:100, damage:1});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
}
}
Symbol 1893 MovieClip [__Packages.Enemy_11] Frame 0
class Enemy_11 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, blnTeleports, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_11 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 2;
type = "Enemy_11";
deathType = "standard";
movementStyle = "drone";
turnAroundBoundry = 70;
blnTeleports = true;
goldWin = 300;
expWin = 150;
pointsWin = 350;
guns.push({name:"gun_1", type:21, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:1});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.3});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:0.3});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:0.3});
}
}
Symbol 1894 MovieClip [__Packages.Enemy_12] Frame 0
class Enemy_12 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_12 () {
super();
}
function ConfigureEnemy() {
numLife = 50;
numSpeed = 1;
type = "Enemy_12";
deathType = "standard";
movementStyle = "plane";
goldWin = 150;
expWin = 100;
pointsWin = 300;
guns.push({name:"gun_1", type:13, fireTimerMax:80, fireTimerMin:50, counter:140, speed:10, size:100, damage:1});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.2});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:0.2});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:0.2});
}
}
Symbol 1895 MovieClip [__Packages.Enemy_21] Frame 0
class Enemy_21 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, guns, damageZones;
function Enemy_21 () {
super();
}
function ConfigureEnemy() {
numLife = 2000;
numSpeed = 1;
type = "Enemy_21";
deathType = "fall";
movementStyle = "boss";
goldWin = 5000;
expWin = 1500;
guns.push({name:"gun_1", type:21, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:1});
guns.push({name:"gun_2", type:21, fireTimerMax:180, fireTimerMin:140, counter:160, speed:10, size:100, damage:1});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:2});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
}
}
Symbol 1896 MovieClip [__Packages.BulletPlasmaHit] Frame 0
class BulletPlasmaHit extends BulletMachineGun
{
function BulletPlasmaHit () {
super();
}
function Hit(varX, varY, enemyName) {
_root.game.PlasmaGunHit(varX, varY);
}
}
Symbol 1897 MovieClip [__Packages.Mine] Frame 0
class Mine extends MovieClip
{
var moveX, moveY, gravity, _damage, _enemy, _holdMovement, _orbital, _mine, _missile, centerX, centerY, rotateAngle, rotateSpeed, _creator, _x, _y, _width, _height;
function Mine () {
super();
moveX = 0;
moveY = 0;
gravity = 0;
_damage = 1;
_enemy = false;
_holdMovement = false;
_orbital = false;
_mine = true;
_missile = false;
centerX = 0;
centerY = 0;
rotateAngle = 0;
rotateSpeed = 0.1;
}
function SetMovement(myX, myY) {
moveX = myX;
moveY = myY;
}
function SetGravity(myGravity) {
gravity = myGravity;
}
function ResetAngle(newAngle) {
rotateAngle = (newAngle * Math.PI) / 180;
}
function SetCreator(newObject) {
_creator = newObject;
var _local2 = new Object({x:_creator.gun.emitter._x, y:_creator.gun.emitter._y});
_creator.gun.localToGlobal(_local2);
centerX = _local2.x;
centerY = _local2.y;
}
function onEnterFrame() {
if (_holdMovement == false) {
_x = _x + moveX;
_y = _y + moveY;
if (_orbital == true) {
var _local2 = 40;
var _local4 = (_local2 * Math.cos(rotateAngle)) + centerX;
var _local3 = (_local2 * Math.sin(rotateAngle)) + centerY;
rotateAngle = rotateAngle + rotateSpeed;
if (rotateAngle > 360) {
rotateAngle = 0;
}
_x = _local4;
_y = _local3;
}
}
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
return(_local2);
}
function Hit(varX, varY, enemyName) {
_root.game.DamageExplosionSmall(varX, varY, 0);
}
}
Symbol 1898 MovieClip [__Packages.BulletRemoteMissile] Frame 0
class BulletRemoteMissile extends MovieClip
{
var moveX, moveY, _damage, _holdMovement, _midX, _midY, _noTop, _turretCameFrom, _mine, _missile, avatarSpeed, _x, _y, _rotation, avatarAngleChange, emitter, localToGlobal, _width, _height;
function BulletRemoteMissile () {
super();
moveX = 0;
moveY = 0;
_damage = 1;
_holdMovement = false;
_midX = 0;
_midY = 0;
_noTop = false;
_turretCameFrom = "";
_mine = false;
_missile = true;
avatarSpeed = 0;
}
function onEnterFrame() {
if (_holdMovement == false) {
var vecDirection = new Vector();
vecDirection._x = _root._xmouse - _x;
vecDirection._y = _root._ymouse - _y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
var opposite = 0;
if (myDegrees != _rotation) {
if (_rotation >= 0) {
opposite = _rotation - 180;
if ((myDegrees < _rotation) && (myDegrees > opposite)) {
avatarAngleChange = -2 * avatarSpeed;
} else {
avatarAngleChange = 2 * avatarSpeed;
}
} else {
opposite = _rotation + 180;
if ((myDegrees < opposite) && (myDegrees > _rotation)) {
avatarAngleChange = 2 * avatarSpeed;
} else {
avatarAngleChange = -2 * avatarSpeed;
}
}
} else {
avatarAngleChange = 0;
}
var distance = Math.sqrt((vecDirection._x * vecDirection._x) + (vecDirection._y * vecDirection._y));
avatarSpeed = avatarSpeed + 0.25;
if (avatarSpeed > 5) {
avatarSpeed = 5;
}
_rotation = _rotation + avatarAngleChange;
var moveVector = new Vector();
moveVector._x = (Math.cos((Math.PI * _rotation) / 180) * avatarSpeed) + _x;
moveVector._y = (Math.sin((Math.PI * _rotation) / 180) * avatarSpeed) + _y;
_midX = (Math.cos((Math.PI * _rotation) / 180) * (avatarSpeed * 0.5)) + _x;
_midY = (Math.sin((Math.PI * _rotation) / 180) * (avatarSpeed * 0.5)) + _y;
_x = moveVector._x;
_y = moveVector._y;
var emitterRef = emitter;
var jetsPoint = new Object({x:emitterRef._x, y:emitterRef._y});
localToGlobal(jetsPoint);
_root.game.Jets(jetsPoint.x, jetsPoint.y);
}
}
function GetDistance() {
var _local4 = _x - _root.bg._x;
var _local3 = _y - _root.bg._y;
return(Math.sqrt((_local4 * _local4) + (_local3 * _local3)));
}
function InBounds() {
var _local2 = true;
if ((_x + (_width / 2)) < 0) {
_local2 = false;
} else if ((_x - (_width / 2)) > Stage.width) {
_local2 = false;
} else if ((_y - (_height / 2)) > Stage.height) {
_local2 = false;
}
if (_noTop == false) {
if ((_y + (_height / 2)) < 0) {
_local2 = false;
}
}
return(_local2);
}
function Hit(varX, varY, enemyName) {
_root.game.DamageExplosionSmall(varX, varY, _damage);
}
}
Symbol 1899 MovieClip [__Packages.Decoy] Frame 0
class Decoy extends MovieClip
{
var guns, arrEvents, damageZones, queueBullets, blnDestroyed, safetyTurn, numSpeed, fallingMomentum, blnHalt, numFramesToTurn, numAmountToTurn, minFramesToHoldTurning, holdMomentumTime, turnAroundBoundry, enemyOff, bufferX, bufferY, frameCount, maxLife, numLife, maxVelocity, momentum, velocity, type, deathType, movementStyle, blnControl, _x, _y, _name, removeMovieClip, _xscale;
function Decoy () {
super();
guns = new Array();
arrEvents = new Array();
damageZones = new Array();
queueBullets = new Array();
blnDestroyed = false;
safetyTurn = false;
numSpeed = 0.25;
fallingMomentum = 0;
blnHalt = false;
numFramesToTurn = 0;
numAmountToTurn = 0;
minFramesToHoldTurning = 0;
holdMomentumTime = 0;
turnAroundBoundry = 50;
enemyOff = false;
bufferX = 0;
bufferY = 0;
frameCount = 0;
Configure();
var _local3 = 0;
while (_local3 < guns.length) {
if ((guns[_local3].type == 13) || (guns[_local3].type == 21)) {
queueBullets.push({gunName:guns[_local3].name, bulletsLeft:0, bulletCounter:0});
}
_local3++;
}
maxLife = numLife;
maxVelocity = numSpeed;
momentum = new Vector();
velocity = new Vector();
velocity._x = 0;
velocity._y = 0;
}
function Configure() {
numLife = 5;
numSpeed = 1;
type = "Enemy_2";
deathType = "standard";
movementStyle = "drone";
}
function SetHealth(newHealth) {
numLife = (maxLife = newHealth);
}
function Activate() {
blnControl = true;
}
function Deactivate() {
blnControl = false;
}
function onEnterFrame() {
if (!enemyOff) {
Move();
OperateWeapons();
}
}
function TurnOff() {
enemyOff = true;
}
function TurnOn() {
enemyOff = false;
}
function Move() {
if (!enemyOff) {
if (movementStyle == "drone") {
MovementDrone();
} else if (movementStyle == "control") {
MovementControl();
}
}
}
function SetNewLocation(newX, newY) {
bufferX = newX;
bufferY = newY;
}
function MovementControl() {
if (blnControl == true) {
var _local3 = new Vector();
_local3._x = _root._xmouse - _x;
_local3._y = _root._ymouse - _y;
} else {
var _local3 = new Vector();
_local3._x = bufferX - _x;
_local3._y = bufferY - _y;
}
var _local4 = Math.sqrt((_local3._x * _local3._x) + (_local3._y * _local3._y));
var _local6 = _local4;
if ((_local4 < 5) && (blnControl == false)) {
_root.game.ReportFriendlyLanding(_name);
removeMovieClip();
}
_local3._x = _local3._x / _local4;
_local3._y = _local3._y / _local4;
var _local5 = 0;
if (Math.abs(_local4) > maxVelocity) {
_local5 = 0.2;
} else {
_local5 = (0.2 * Math.abs(_local4)) / maxVelocity;
}
momentum._x = _local3._x * _local5;
momentum._y = _local3._y * _local5;
velocity._x = velocity._x + momentum._x;
velocity._y = velocity._y + momentum._y;
if (Math.abs(velocity._x) > maxVelocity) {
velocity._x = (velocity._x / Math.abs(velocity._x)) * maxVelocity;
}
if (Math.abs(velocity._y) > maxVelocity) {
velocity._y = (velocity._y / Math.abs(velocity._y)) * maxVelocity;
}
if ((velocity._x < 0) && (_xscale > 0)) {
_xscale = -1 * _xscale;
} else if ((velocity._x > 0) && (_xscale < 0)) {
_xscale = -1 * _xscale;
}
_x = _x + velocity._x;
_y = _y + velocity._y;
}
function MovementDrone() {
var _local2 = false;
frameCount++;
if (frameCount == 2) {
if ((bufferX != 0) || (bufferY != 0)) {
_x = bufferX;
_y = bufferY;
bufferX = 0;
bufferY = 0;
}
}
if (_x <= turnAroundBoundry) {
momentum._x = 0.1;
_local2 = true;
}
if (_x >= (Stage.width - turnAroundBoundry)) {
momentum._x = -0.1;
_local2 = true;
}
if (_y <= turnAroundBoundry) {
momentum._y = 0.1;
_local2 = true;
}
if (_y >= (Stage.height - turnAroundBoundry)) {
momentum._y = -0.1;
_local2 = true;
}
if (_local2 == false) {
if (holdMomentumTime < 1) {
var _local3 = RandNum(0, 100);
if (_local3 < 35) {
momentum._y = -momentum._y;
}
holdMomentumTime = RandNum(60, 80);
} else {
holdMomentumTime--;
}
} else {
holdMomentumTime = 0;
}
velocity._x = velocity._x + momentum._x;
velocity._y = velocity._y + momentum._y;
if ((velocity._x < 0) && (_xscale < 0)) {
_xscale = -_xscale;
} else if ((velocity._x > 0) && (_xscale > 0)) {
_xscale = -_xscale;
}
if (Math.abs(velocity._x) > maxVelocity) {
velocity._x = (velocity._x / Math.abs(velocity._x)) * maxVelocity;
}
if (Math.abs(velocity._y) > maxVelocity) {
velocity._y = (velocity._y / Math.abs(velocity._y)) * maxVelocity;
}
_x = _x + velocity._x;
_y = _y + velocity._y;
}
function ReportDamage(numDamage, damageX, damageY) {
numLife = numLife - numDamage;
if (numLife <= 0) {
_root.game.ParticleExplosion(type, _x, _y);
if (deathType == "standard") {
_root.game.ReportFriendlyDeath(_name);
blnDestroyed = true;
removeMovieClip();
}
}
}
function Apocalypse() {
var _local2 = false;
ReportDamage(999999, -50, -50);
_local2 = true;
return(_local2);
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
function OperateWeapons() {
var i = 0;
while (i < guns.length) {
if (guns[i].type == 13) {
var targetEnemy = _root.game.SelectClosestEnemyTarget(this);
if (targetEnemy != undefined) {
var mgIndex = -1;
var t = 0;
while (t < queueBullets.length) {
if (queueBullets[t].gunName == guns[i].name) {
mgIndex = t;
break;
}
t++;
}
var ObjRef = eval ("this.hull." + guns[i].name);
var point = {x:ObjRef._x, y:ObjRef._y};
_root[_name].localToGlobal(point);
var startPoint = {x:_x, y:_y};
startPoint.x = startPoint.x + ObjRef._x;
startPoint.y = startPoint.y + ObjRef._y;
var vecDirection = new Vector();
vecDirection._x = targetEnemy._x - point.x;
vecDirection._y = targetEnemy._y - point.y;
var myRadians = Math.atan2(vecDirection._y, vecDirection._x);
var myDegrees = ((360 * myRadians) / (Math.PI*2));
var shootAngle = myDegrees;
if (_xscale > 0) {
if (myDegrees > 0) {
myDegrees = -1 * (180 + myDegrees);
} else {
myDegrees = 180 - myDegrees;
}
}
ObjRef._rotation = myDegrees;
if (guns[i].counter < 1) {
var posVector = new Vector();
var ObjRefTwo = eval (("this.hull." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
queueBullets[t].bulletsLeft = 2;
queueBullets[t].bulletCounter = 5;
ObjRef.gotoAndPlay("shoot");
_root.game.FriendlyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
guns[i].counter = Math.round(Math.random() * (guns[i].fireTimerMax - guns[i].fireTimerMin)) + guns[i].fireTimerMin;
} else {
guns[i].counter--;
}
if (queueBullets[t].bulletsLeft > 0) {
if (queueBullets[t].bulletCounter == 0) {
var posVector = new Vector();
var ObjRefTwo = eval (("this.hull." + guns[i].name) + ".emitter");
var pointTwo = {x:ObjRefTwo._x, y:ObjRefTwo._y};
ObjRef.localToGlobal(pointTwo);
posVector._x = pointTwo.x;
posVector._y = pointTwo.y;
_root.game.FriendlyFireMachineGun(posVector, shootAngle, guns[i].speed, guns[i].size, guns[i].damage, "machinegun");
queueBullets[t].bulletsLeft--;
if (queueBullets[t].bulletsLeft > 0) {
queueBullets[t].bulletCounter = 5;
} else {
ObjRef.gotoAndPlay("stop");
}
} else {
queueBullets[t].bulletCounter--;
}
}
}
}
i++;
}
}
}
Symbol 1900 MovieClip [__Packages.DecoyWGun] Frame 0
class DecoyWGun extends Decoy
{
var numLife, numSpeed, type, deathType, movementStyle, guns;
function DecoyWGun () {
super();
}
function Configure() {
numLife = 5;
numSpeed = 1;
type = "DecoyDrone";
deathType = "standard";
movementStyle = "drone";
guns.push({name:"gun_1", type:13, fireTimerMax:150, fireTimerMin:90, counter:60, speed:10, size:100, damage:0.5});
}
}
Symbol 1901 MovieClip [__Packages.ControlUnitOne] Frame 0
class ControlUnitOne extends Decoy
{
var numLife, numSpeed, type, deathType, movementStyle;
function ControlUnitOne () {
super();
}
function Configure() {
numLife = 20;
numSpeed = 1;
type = "ControlUnit";
deathType = "standard";
movementStyle = "control";
}
}
Symbol 1902 MovieClip [__Packages.Enemy_13] Frame 0
class Enemy_13 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_13 () {
super();
}
function ConfigureEnemy() {
numLife = 200;
numSpeed = 1;
type = "Enemy_13";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(380, 680);
goldWin = 500;
expWin = 150;
pointsWin = 500;
guns.push({name:"gun_1", type:22, fireTimerMax:240, fireTimerMin:150, counter:370, speed:3, size:999, damage:20});
guns.push({name:"gun_2", type:22, fireTimerMax:240, fireTimerMin:150, counter:340, speed:3, size:999, damage:20});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1});
}
}
Symbol 1903 MovieClip [__Packages.Enemy_MonsterBullet] Frame 0
class Enemy_MonsterBullet extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, _bullet, _enemy, damageZones;
function Enemy_MonsterBullet () {
super();
}
function ConfigureEnemy() {
numLife = 4;
numSpeed = 3;
type = "Enemy_MonsterBullet";
deathType = "standard";
movementStyle = "MonsterBullet";
goldWin = 0;
expWin = 0;
_bullet = true;
_enemy = true;
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
}
function Hit(varX, varY, enemyName) {
_root.game.DamageExplosionMedium(varX, varY, 0);
}
}
Symbol 1904 MovieClip [__Packages.Enemy_15] Frame 0
class Enemy_15 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_15 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 1;
type = "Enemy_15";
deathType = "standard";
movementStyle = "plane";
goldWin = 75;
expWin = 75;
pointsWin = 200;
guns.push({name:"gun_1", type:19, fireTimerMax:0, fireTimerMin:0, counter:1, speed:7, size:100, damage:15});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
}
}
Symbol 1905 MovieClip [__Packages.Enemy_16] Frame 0
class Enemy_16 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, damageZones;
function Enemy_16 () {
super();
}
function ConfigureEnemy() {
numLife = 30;
numSpeed = 1;
type = "Enemy_16";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(380, 420);
goldWin = 200;
expWin = 100;
pointsWin = 350;
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
}
}
Symbol 1906 MovieClip [__Packages.Enemy_17] Frame 0
class Enemy_17 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_17 () {
super();
}
function ConfigureEnemy() {
numLife = 30;
numSpeed = 1;
type = "Enemy_17";
deathType = "standard";
movementStyle = "miniboss";
intPointXStop = RandNum(460, 680);
goldWin = 175;
expWin = 75;
pointsWin = 350;
guns.push({name:"gun_1", type:22, fireTimerMax:210, fireTimerMin:130, counter:280, speed:3, size:999, damage:20});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:0.5});
}
}
Symbol 1907 MovieClip [__Packages.BulletAcid] Frame 0
class BulletAcid extends BulletTargetable
{
function BulletAcid () {
super();
}
function Hit(varX, varY, enemyName) {
_root.game.AcidGunHit(varX, varY);
}
}
Symbol 1908 MovieClip [__Packages.BulletAcidDrop] Frame 0
class BulletAcidDrop extends BulletTargetable
{
function BulletAcidDrop () {
super();
}
function Hit(varX, varY, enemyName) {
_root.game.AcidGunHit(varX, varY);
}
}
Symbol 1909 MovieClip [__Packages.BulletArtillery] Frame 0
class BulletArtillery extends BulletMachineGun
{
function BulletArtillery () {
super();
}
function Hit(varX, varY, enemyName) {
var _local2 = Math.round(Math.random() * 100);
if (_local2 < 60) {
_root.game.DamageExplosionSmall(varX, varY, 0);
} else {
_root.game.DamageExplosionMedium(varX, varY, 0);
}
}
}
Symbol 1910 MovieClip [__Packages.Enemy_19] Frame 0
class Enemy_19 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_19 () {
super();
}
function ConfigureEnemy() {
numLife = 100;
numSpeed = 1;
type = "Enemy_19";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(450, 680);
goldWin = 450;
expWin = 125;
pointsWin = 450;
guns.push({name:"gun_1", type:22, fireTimerMax:240, fireTimerMin:150, counter:370, speed:3, size:999, damage:20});
guns.push({name:"gun_2", type:22, fireTimerMax:240, fireTimerMin:150, counter:340, speed:3, size:999, damage:20});
guns.push({name:"gun_3", type:22, fireTimerMax:240, fireTimerMin:150, counter:370, speed:3, size:999, damage:20});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:0.5});
damageZones.push({name:"zone5", effect:"none", frame:0, percentage:1});
}
}
Symbol 1911 MovieClip [__Packages.Enemy_30] Frame 0
class Enemy_30 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_30 () {
super();
}
function ConfigureEnemy() {
numLife = 30;
numSpeed = 1;
type = "Enemy_30";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(340, 450);
goldWin = 200;
expWin = 100;
pointsWin = 200;
guns.push({name:"energy_mc", type:23, fireTimerMax:0, fireTimerMin:0, counter:-999, speed:0, size:0, damage:0});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
}
}
Symbol 1912 MovieClip [__Packages.Enemy_31] Frame 0
class Enemy_31 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_31 () {
super();
}
function ConfigureEnemy() {
numLife = 15;
numSpeed = 2;
type = "Enemy_31";
deathType = "standard";
movementStyle = "drone";
goldWin = 150;
expWin = 75;
pointsWin = 175;
guns.push({name:"energy_mc", type:23, fireTimerMax:0, fireTimerMin:0, counter:120, speed:0, size:0, damage:0});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.6});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:1});
}
}
Symbol 1913 MovieClip [__Packages.Enemy_32] Frame 0
class Enemy_32 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_32 () {
super();
}
function ConfigureEnemy() {
numLife = 125;
numSpeed = 1;
type = "Enemy_32";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(450, 550);
goldWin = 450;
expWin = 150;
pointsWin = 450;
guns.push({name:"gun_1", type:22, fireTimerMax:240, fireTimerMin:150, counter:370, speed:3, size:999, damage:20});
guns.push({name:"gun_2", type:21, fireTimerMax:180, fireTimerMin:140, counter:160, speed:10, size:100, damage:1});
guns.push({name:"energy_mc", type:23, fireTimerMax:0, fireTimerMin:0, counter:80, speed:0, size:0, damage:0});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone6", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1.5});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:3});
damageZones.push({name:"zone5", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone7", effect:"none", frame:0, percentage:1});
}
}
Symbol 1914 MovieClip [__Packages.Enemy_33] Frame 0
class Enemy_33 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_33 () {
super();
}
function ConfigureEnemy() {
numLife = 150;
numSpeed = 1;
type = "Enemy_33";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(492, 568);
goldWin = 450;
expWin = 175;
pointsWin = 500;
guns.push({name:"gun_1", type:22, fireTimerMax:240, fireTimerMin:200, counter:370, speed:3, size:999, damage:20});
guns.push({name:"gun_2", type:22, fireTimerMax:240, fireTimerMin:200, counter:450, speed:3, size:999, damage:20});
guns.push({name:"gun_3", type:22, fireTimerMax:240, fireTimerMin:200, counter:470, speed:3, size:999, damage:20});
guns.push({name:"spawn_1", type:24, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:0, damage:0});
guns.push({name:"spawn_2", type:24, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:0, damage:0});
guns.push({name:"spawn_3", type:24, fireTimerMax:0, fireTimerMin:0, counter:0, speed:0, size:0, damage:0});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:2});
}
}
Symbol 1915 MovieClip [__Packages.Enemy_34] Frame 0
class Enemy_34 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_34 () {
super();
}
function ConfigureEnemy() {
numLife = 40;
numSpeed = 1;
type = "Enemy_34";
deathType = "fall";
movementStyle = "miniboss";
intPointXStop = RandNum(411, 651);
goldWin = 250;
expWin = 150;
pointsWin = 200;
guns.push({name:"gun_1", type:20, fireTimerMax:150, fireTimerMin:150, counter:200, speed:10, size:999, damage:10});
guns.push({name:"gun_2", type:20, fireTimerMax:150, fireTimerMin:150, counter:230, speed:10, size:999, damage:10});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.4});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1});
damageZones.push({name:"zone4", effect:"none", frame:0, percentage:1.5});
}
}
Symbol 1916 MovieClip [__Packages.Enemy_22] Frame 0
class Enemy_22 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, turnAroundBoundry, blnTeleports, goldWin, expWin, pointsWin, guns, damageZones;
function Enemy_22 () {
super();
}
function ConfigureEnemy() {
numLife = 750;
numSpeed = 2;
type = "Enemy_22";
deathType = "fall";
movementStyle = "drone";
turnAroundBoundry = 70;
blnTeleports = true;
goldWin = 2000;
expWin = 1500;
pointsWin = 2000;
guns.push({name:"gun_1", type:21, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:1});
guns.push({name:"gun_2", type:21, fireTimerMax:180, fireTimerMin:140, counter:140, speed:10, size:100, damage:1});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.3});
damageZones.push({name:"zone2", effect:"none", frame:0, percentage:0.8});
damageZones.push({name:"zone3", effect:"none", frame:0, percentage:1.2});
}
}
Symbol 1917 MovieClip [__Packages.Enemy_18] Frame 0
class Enemy_18 extends Enemy
{
var numLife, numSpeed, type, deathType, movementStyle, intPointXStop, RandNum, goldWin, expWin, guns, damageZones, pointsWin;
function Enemy_18 () {
super();
}
function ConfigureEnemy() {
numLife = 30;
numSpeed = 1;
type = "Enemy_18";
deathType = "standard";
movementStyle = "ground";
intPointXStop = RandNum(380, 680);
goldWin = 150;
expWin = 75;
guns.push({name:"gun_1", type:22, fireTimerMax:250, fireTimerMin:150, counter:280, speed:3, size:999, damage:20});
damageZones.push({name:"zone1", effect:"none", frame:0, percentage:0.5});
pointsWin = 350;
}
}
Symbol 1918 MovieClip [__Packages.DataEncrypter] Frame 0
class DataEncrypter
{
var roundsArray, shiftOffsets, Nb, Nk, Nr;
function DataEncrypter (keySize, blockSize) {
if (keySize != null) {
this.keySize = keySize;
}
if (blockSize != null) {
this.blockSize = blockSize;
}
roundsArray = [0, 0, 0, 0, [0, 0, 0, 0, 10, 0, 12, 0, 14], 0, [0, 0, 0, 0, 12, 0, 12, 0, 14], 0, [0, 0, 0, 0, 14, 0, 14, 0, 14]];
shiftOffsets = [0, 0, 0, 0, [0, 1, 2, 3], 0, [0, 1, 2, 3], 0, [0, 1, 3, 4]];
Nb = blockSize / 32;
Nk = keySize / 32;
Nr = roundsArray[Nk][Nb];
}
function encrypt(src, key, mode) {
var _local5 = new Array();
var _local6 = new Array();
var _local4 = blockSize / 8;
if (mode == "CBC") {
_local5 = getRandomBytes(_local4);
}
var _local7 = formatPlaintext(strToChars(src));
var _local8 = keyExpansion(strToChars(key));
var _local3 = 0;
while (_local3 < (_local7.length / _local4)) {
_local6 = _local7.slice(_local3 * _local4, (_local3 + 1) * _local4);
if (mode == "CBC") {
var _local2 = 0;
while (_local2 < _local4) {
_local6[_local2] = _local6[_local2] ^ _local5[(_local3 * _local4) + _local2];
_local2++;
}
}
_local5 = _local5.concat(encryption(_local6, _local8));
_local3++;
}
return(charsToHex(_local5));
}
function decrypt(src, key, mode) {
var _local5 = new Array();
var _local7 = new Array();
var _local6 = hexToChars(src);
var _local4 = blockSize / 8;
var _local8 = keyExpansion(strToChars(key));
var _local3 = (_local6.length / _local4) - 1;
while (_local3 > 0) {
_local7 = decryption(_local6.slice(_local3 * _local4, (_local3 + 1) * _local4), _local8);
if (mode == "CBC") {
var _local2 = 0;
while (_local2 < _local4) {
_local5[((_local3 - 1) * _local4) + _local2] = _local7[_local2] ^ _local6[((_local3 - 1) * _local4) + _local2];
_local2++;
}
} else {
_local5 = _local7.concat(_local5);
}
_local3--;
}
if (mode == "ECB") {
_local5 = decryption(_local6.slice(0, _local4), _local8).concat(_local5);
}
return(charsToStr(_local5));
}
function cyclicShiftLeft(src, pos) {
var _local2 = src.slice(0, pos);
src = src.slice(pos).concat(_local2);
return(src);
}
function xtime(poly) {
poly = poly << 1;
return(((poly & 256) ? (poly ^ 283) : (poly)));
}
function mult_GF256(x, y) {
var _local4 = 0;
var _local2 = 1;
while (_local2 < 256) {
if (x & _local2) {
_local4 = _local4 ^ y;
}
_local2 = _local2 * 2;
y = xtime(y);
}
return(_local4);
}
function byteSub(state, dir) {
if (dir == "encrypt") {
var _local5 = SBox;
} else {
var _local5 = SBoxInverse;
}
var _local3 = 0;
while (_local3 < 4) {
var _local2 = 0;
while (_local2 < Nb) {
state[_local3][_local2] = _local5[state[_local3][_local2]];
_local2++;
}
_local3++;
}
}
function shiftRow(state, dir) {
var _local2 = 1;
while (_local2 < 4) {
if (dir == "encrypt") {
state[_local2] = cyclicShiftLeft(state[_local2], shiftOffsets[Nb][_local2]);
} else {
state[_local2] = cyclicShiftLeft(state[_local2], Nb - shiftOffsets[Nb][_local2]);
}
_local2++;
}
}
function mixColumn(state, dir) {
var _local5 = new Array();
var _local2 = 0;
while (_local2 < Nb) {
var _local4 = 0;
while (_local4 < 4) {
if (dir == "encrypt") {
_local5[_local4] = ((mult_GF256(state[_local4][_local2], 2) ^ mult_GF256(state[(_local4 + 1) % 4][_local2], 3)) ^ state[(_local4 + 2) % 4][_local2]) ^ state[(_local4 + 3) % 4][_local2];
} else {
_local5[_local4] = ((mult_GF256(state[_local4][_local2], 14) ^ mult_GF256(state[(_local4 + 1) % 4][_local2], 11)) ^ mult_GF256(state[(_local4 + 2) % 4][_local2], 13)) ^ mult_GF256(state[(_local4 + 3) % 4][_local2], 9);
}
_local4++;
}
_local4 = 0;
while (_local4 < 4) {
state[_local4][_local2] = _local5[_local4];
_local4++;
}
_local2++;
}
}
function addRoundKey(state, roundKey) {
var _local2 = 0;
while (_local2 < Nb) {
state[0][_local2] = state[0][_local2] ^ (roundKey[_local2] & 255);
state[1][_local2] = state[1][_local2] ^ ((roundKey[_local2] >> 8) & 255);
state[2][_local2] = state[2][_local2] ^ ((roundKey[_local2] >> 16) & 255);
state[3][_local2] = state[3][_local2] ^ ((roundKey[_local2] >> 24) & 255);
_local2++;
}
}
function keyExpansion(key) {
var _local2 = 0;
Nk = keySize / 32;
Nb = blockSize / 32;
var _local4 = new Array();
Nr = roundsArray[Nk][Nb];
var _local3 = 0;
while (_local3 < Nk) {
_local4[_local3] = ((key[4 * _local3] | (key[(4 * _local3) + 1] << 8)) | (key[(4 * _local3) + 2] << 16)) | (key[(4 * _local3) + 3] << 24);
_local3++;
}
_local3 = Nk;
while (_local3 < (Nb * (Nr + 1))) {
_local2 = _local4[_local3 - 1];
if ((_local3 % Nk) == 0) {
_local2 = (((SBox[(_local2 >> 8) & 255] | (SBox[(_local2 >> 16) & 255] << 8)) | (SBox[(_local2 >> 24) & 255] << 16)) | (SBox[_local2 & 255] << 24)) ^ Rcon[Math.floor(_local3 / Nk) - 1];
} else if ((Nk > 6) && ((_local3 % Nk) == 4)) {
_local2 = (((SBox[(_local2 >> 24) & 255] << 24) | (SBox[(_local2 >> 16) & 255] << 16)) | (SBox[(_local2 >> 8) & 255] << 8)) | SBox[_local2 & 255];
}
_local4[_local3] = _local4[_local3 - Nk] ^ _local2;
_local3++;
}
return(_local4);
}
function Round(state, roundKey) {
byteSub(state, "encrypt");
shiftRow(state, "encrypt");
mixColumn(state, "encrypt");
addRoundKey(state, roundKey);
}
function InverseRound(state, roundKey) {
addRoundKey(state, roundKey);
mixColumn(state, "decrypt");
shiftRow(state, "decrypt");
byteSub(state, "decrypt");
}
function FinalRound(state, roundKey) {
byteSub(state, "encrypt");
shiftRow(state, "encrypt");
addRoundKey(state, roundKey);
}
function InverseFinalRound(state, roundKey) {
addRoundKey(state, roundKey);
shiftRow(state, "decrypt");
byteSub(state, "decrypt");
}
function encryption(block, expandedKey) {
block = packBytes(block);
addRoundKey(block, expandedKey);
var _local2 = 1;
while (_local2 < Nr) {
Round(block, expandedKey.slice(Nb * _local2, Nb * (_local2 + 1)));
_local2++;
}
FinalRound(block, expandedKey.slice(Nb * Nr));
return(unpackBytes(block));
}
function decryption(block, expandedKey) {
block = packBytes(block);
InverseFinalRound(block, expandedKey.slice(Nb * Nr));
var _local2 = Nr - 1;
while (_local2 > 0) {
InverseRound(block, expandedKey.slice(Nb * _local2, Nb * (_local2 + 1)));
_local2--;
}
addRoundKey(block, expandedKey);
return(unpackBytes(block));
}
function packBytes(octets) {
var _local2 = new Array();
_local2[0] = new Array();
_local2[1] = new Array();
_local2[2] = new Array();
_local2[3] = new Array();
var _local1 = 0;
while (_local1 < octets.length) {
_local2[0][_local1 / 4] = octets[_local1];
_local2[1][_local1 / 4] = octets[_local1 + 1];
_local2[2][_local1 / 4] = octets[_local1 + 2];
_local2[3][_local1 / 4] = octets[_local1 + 3];
_local1 = _local1 + 4;
}
return(_local2);
}
function unpackBytes(packed) {
var _local1 = new Array();
var _local2 = 0;
while (_local2 < packed[0].length) {
_local1[_local1.length] = packed[0][_local2];
_local1[_local1.length] = packed[1][_local2];
_local1[_local1.length] = packed[2][_local2];
_local1[_local1.length] = packed[3][_local2];
_local2++;
}
return(_local1);
}
function formatPlaintext(plaintext) {
var _local3 = blockSize / 8;
var _local2 = _local3 - (plaintext.length % _local3);
while ((_local2 > 0) && (_local2 < _local3)) {
plaintext[plaintext.length] = 0;
_local2--;
}
return(plaintext);
}
function getRandomBytes(howMany) {
var _local2 = new Array();
var _local1 = 0;
while (_local1 < howMany) {
_local2[_local1] = Math.round(Math.random() * 255);
_local1++;
}
return(_local2);
}
function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
var Rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145];
var SBox = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22];
var SBoxInverse = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125];
var blockSize = 128;
var keySize = 128;
}
Symbol 1919 MovieClip [__Packages.StormWindsGame] Frame 0
#initclip
if (!_global.StormWindsGame) {
var _local1 = function () {
_global.levelClose = false;
_global.forceCampaignRestart = false;
this.myLevelManager = new LevelManager();
this.turretData = new TurretManager();
this.mouseListener = new Object();
this.mouseListener.onMouseDown = function () {
_root.game.ChargeGun();
};
this.mouseListener.onMouseUp = function () {
_root.game.ShootGun();
};
this.mouseMenuListener = new Object();
this.mouseMenuListener.onMouseDown = function () {
_root.game.PickUpGun();
};
this.mouseMenuListener.onMouseUp = function () {
_root.game.DropGun();
};
this._money = new DataObject();
this._level = new DataObject();
this.beatOceanCampaign = new DataObject();
this.beatSkyCampaign = new DataObject();
this.beatPlainsCampaign = new DataObject();
this.beatPeaksCampaign = new DataObject();
this.beatMountainCampaign = new DataObject();
this.beatCityCampaign = new DataObject();
this.beatSouthCampaign = new DataObject();
this.beatDesertCampaign = new DataObject();
this.arrBullets = new Array();
this.arrEnemies = new Array();
this.arrAllies = new Array();
this.arrEffects = new Array();
this.arrSlots = new Array();
this.arrStorage = new Array();
this.arrDebrisParticles = new Array();
this.arrUpgradeButtons = new Array();
this.arrMineQueue = new Array();
this.arrShields = new Array();
this.arrFriendlies = new Array();
this.arrFriendliesQueue = new Array();
this.arrFriendliesDeaths = new Array();
this.arrArtillery = new Array();
this.challengeTimer = new Timer();
this.intBulletDepth = 10000;
this.intStaticBulletDepth = 15050;
this.intUnitDepth = 5000;
this.effectDepth = 30000;
this.particleDepth = 25000;
this.rangeDepth = 40001;
this.dblGravity = 0.2;
_global.gravityConst = this.dblGravity;
this.dblMinGunPower = 2;
this.dblMaxGunPower = 12;
this.dblPowerIncrement = 0.2;
this.intLevelForMoreSlots = 99999 /* 0x01869F */;
this.intLastLevel = 10;
this.intLastDeluxeLevel = 10;
this.intGunSelected = 0;
this.dragGunName = "dragGun_40000";
this.dragGunDest = new Vector();
this.intPickedUp = 0;
this.strPickUpType = "";
this.intPickUpSlot = 0;
this.intRepairMax = 500;
this.intRepair = 0;
this.intSell = 0;
this.blnAlertLock = false;
this.blnGunInfoOpen = false;
this.intKeyLock = 0;
this.blnBreakIsDown = false;
this.blnHoldDelete = false;
this.intShakeDuration = 0;
this.intShakeCounter = 0;
this.intShakeStart = 0;
this.vecScreenCoords = new Vector();
this.vecScreenCoords._x = _root.bg_mc._x;
this.vecScreenCoords._y = _root.bg_mc._y;
this.vecShieldStart = new Vector();
this.blnShieldSelect = false;
this.intBulletsShot = 0;
this.intBulletsMissed = 0;
this._challengeUpgradeBonus = 0;
this.blnMeteors = false;
this.blnMeteorsInProgress = false;
this.intMeteorCounter = 0;
this.intMeteorMin = 0;
this.intMeteorMax = 0;
this.intMaxDamage = 0;
this.intMeteorDuration = 0;
this.intMeteorGun = 0;
this.intMeteorVelocity = 1;
this.intTimeDuration = 0;
this.intArtilleryState = -1;
this.intLightningMiss = 0;
_root.power1._visible = false;
_root.power2._visible = false;
_root.power3._visible = false;
_root.power4._visible = false;
_root.power5._visible = false;
_root.health1._visible = false;
_root.health2._visible = false;
_root.health3._visible = false;
_root.health4._visible = false;
_root.health5._visible = false;
_root.load1._visible = false;
_root.load2._visible = false;
_root.load3._visible = false;
_root.load4._visible = false;
_root.load5._visible = false;
_root.menu_mc._visible = false;
_root.tutorial._visible = false;
_root.waveMeter_mc._visible = false;
_root.slot1hotkey_txt.text = "";
_root.slot2hotkey_txt.text = "";
_root.slot3hotkey_txt.text = "";
_root.slot4hotkey_txt.text = "";
_root.slot5hotkey_txt.text = "";
_root.avatar_gun1_mc._visible = false;
_root.avatar_gun2_mc._visible = false;
_root.avatar_gun3_mc._visible = false;
_root.avatar_gun4_mc._visible = false;
_root.avatar_gun5_mc._visible = false;
_root.outline1._visible = false;
_root.outline2._visible = false;
_root.outline3._visible = false;
_root.outline4._visible = false;
_root.outline5._visible = false;
_root.output_mc._visible = false;
_root.flash_mc._visible = false;
_root.doors._visible = false;
_root.descriptionAnim_mc._visible = false;
this.blnBreakMode = false;
this.blnMouseActive = false;
this.blnMenuMouseActive = false;
this.blnDescription = false;
this.blnFrameOne = true;
this.curStatus = new DataObject();
this.curStatus.Set(0);
this.intPoints = new PointCounter();
this.intPoints.SetStartPoints(0);
this.intPoints.SetIncrement(3);
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrStorage.push({buttonName:"store0", iconName:"storeIcon0", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store1", iconName:"storeIcon1", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store2", iconName:"storeIcon2", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store3", iconName:"storeIcon3", blnInUse:false, gun:new GunData()});
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.SetupChallengeMission();
} else {
this.LoadGame(_global.loadSlot);
}
if (this._level.Get() == 1) {
this.StartTutorial();
} else {
this.StartBreakMode();
}
};
_global.StormWindsGame = _local1;
var _local2 = _local1.prototype;
_local2.Load = function () {
};
_local2.FrameOne = function () {
this.intSaveScreenEffectsDepth = _root.screenEffects_mc.getDepth();
this.intSaveFlashDepth = _root.flash_mc.getDepth();
this.intSaveOutputDepth = _root.output_mc.getDepth();
this.intSaveMenuDepth = _root.menu_mc.getDepth();
this.intSaveCoverDepth = _root.cover.getDepth();
this.intSaveWaveMeterDepth = _root.waveMeter_mc.getDepth();
_root.screenEffects_mc.swapDepths(99999);
_root.screenEffects_mc._visible = false;
_root.flash_mc.swapDepths(99997);
_root.flash_mc.visible = false;
_root.output_mc.swapDepths(100001);
_root.menu_mc.swapDepths(100000);
_root.cover.swapDepths(100002);
_root.waveMeter_mc.swapDepths(99992);
if (this.arrSlots.length > 3) {
_root.extraSlots_mc.gotoAndPlay("show");
}
};
_local2.Run = function () {
if (this.blnFrameOne == true) {
this.blnFrameOne = false;
this.FrameOne();
}
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.challengeTimer.Run();
}
if (_global.gamePaused == false) {
if (this.blnBreakMode == false) {
this.AimGun();
this.DisplayCharge();
this.CheckBulletCollision();
this.CheckHotKeys();
this.ManageMeteors();
this.ManageTime();
this.ManageWaveMeter();
this.ManageArtillery();
if (this.intTimeDuration == 0) {
this.myLevelManager.Run();
}
} else {
this.ShowAndHideDescription();
this.AnimateDroppedGun();
if (this.IsAChallengeMission(_global.currentCampaign) == false) {
this.CheckCheats();
}
}
} else if (this.blnAlertLock == false) {
if (this.intKeyLock == 0) {
if (this.blnBreakMode == false) {
if (Key.isDown(_global.pauseHotkey)) {
var _local4 = SharedObject.getLocal("settings");
_local4.data.musicOn = _global.musicOn;
_local4.data.soundOn = _global.soundOn;
_local4.data.graphics = _global.graphics;
_local4.data.hotKey1 = _global.hotKey1;
_local4.data.hotKey2 = _global.hotKey2;
_local4.data.hotKey3 = _global.hotKey3;
_local4.data.hotKey4 = _global.hotKey4;
_local4.data.hotKey5 = _global.hotKey5;
_local4.flush();
_root.menu_mc.gotoAndPlay(16);
this.intKeyLock = 15;
}
}
} else {
this.intKeyLock--;
}
}
_global.myMusicPlayer.RunPlayer();
this.ManageShaking();
this.AnimateEffects();
this.DrawLines();
this.intPoints.Run();
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.UpdateTimerText();
}
};
_local2.ManageWaveMeter = function () {
_root.waveMeter_mc.inside._xscale = this.myLevelManager.GetWaveCompleted();
};
_local2.UpdateTimerText = function () {
if (this.blnBreakMode == true) {
_root.timer_txt.text = "";
} else {
_root.timer_txt.text = this.challengeTimer.GetTimeString();
}
_root.score_txt.text = this.intPoints.GetDisplayScore();
};
_local2.ChargeGun = function () {
if (this.blnBreakMode == false) {
var _local5 = -1;
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
if (_root[this.arrAllies[_local4].selectField].hitTest(_xmouse, _ymouse)) {
if ((this.arrAllies[_local4].blnDestroyed == false) && (this.arrAllies[_local4].blnSelected == false)) {
if (((this.arrAllies[_local4].type != 4) && (this.arrAllies[_local4].type != 8)) && (this.arrAllies[_local4].type != 9)) {
this.arrAllies[_local4].blnSelected = true;
_local5 = _local4;
this.intGunSelected = _local4;
}
}
break;
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if ((_local4 != _local5) && (_local5 != -1)) {
this.arrAllies[_local4].blnSelected = false;
}
this.arrAllies[_local4].power = 0;
this.arrAllies[_local4].charging = false;
_local4++;
}
if (_local5 == -1) {
var _local7 = true;
switch (this.arrAllies[this.intGunSelected].type) {
case 2 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
case 21 :
case 23 :
case 7 :
case 3 :
case 4 :
case 8 :
case 9 :
_local7 = false;
}
if (_local7 == true) {
var _local8 = _root[this.arrAllies[this.intGunSelected].powerMeter];
_local8._visible = true;
_local8.inside._xscale = 0;
} else if (this.arrAllies[this.intGunSelected].blnDestroyed == false) {
if (((((this.arrAllies[this.intGunSelected].type == 2) || (this.arrAllies[this.intGunSelected].type == 19)) || (this.arrAllies[this.intGunSelected].type == 18)) || (this.arrAllies[this.intGunSelected].type == 11)) || (this.arrAllies[this.intGunSelected].type == 12)) {
_root[this.arrAllies[this.intGunSelected].name].gun.barrel.gotoAndPlay("shoot");
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
this.ShootMachineGun();
}
} else if (this.arrAllies[this.intGunSelected].type == 7) {
this.ShootLightningGun();
} else if (this.arrAllies[this.intGunSelected].type == 3) {
this.ShootSniperGun();
} else if (this.arrAllies[this.intGunSelected].type == 13) {
this.ShootApocalypseGun();
} else if (this.arrAllies[this.intGunSelected].type == 15) {
this.ShootTimeGun();
} else if (this.arrAllies[this.intGunSelected].type == 16) {
this.ShootRemoteMissile();
} else if (this.arrAllies[this.intGunSelected].type == 17) {
this.StartShieldSelect();
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local3 = 0;
while (_local3 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local3].creator == this.arrAllies[this.intGunSelected].name) {
_root[this.arrFriendlies[_local3].name].gun_1.gotoAndPlay("shoot");
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
this.ShootControllableMachineGun();
}
break;
}
_local3++;
}
}
}
this.arrAllies[this.intGunSelected].charging = true;
} else {
if (this.arrAllies[this.intGunSelected].type == 12) {
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (this.arrAllies[_local4].type == 12) {
_root[this.arrAllies[_local4].name].gun.radio_mc._visible = true;
}
_local4++;
}
} else {
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (this.arrAllies[_local4].type == 12) {
_root[this.arrAllies[_local4].name].gun.radio_mc._visible = false;
}
_local4++;
}
}
if (this.intArtilleryState != -1) {
if (this.intArtilleryState != this.intGunSelected) {
this.RemoveRangeIndicator();
}
}
if (this.arrAllies[this.intGunSelected].type == 21) {
var _local6 = -1;
_local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrAllies[this.intGunSelected].name == this.arrFriendlies[_local4].creator) {
_local6 = _local4;
break;
}
_local4++;
}
if (_local6 == -1) {
this.SpawnControllableUnit(this.intGunSelected);
} else {
_root[this.arrFriendlies[_local6].name].Activate();
}
}
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if ((this.arrAllies[_local4].type == 21) && (_local4 != this.intGunSelected)) {
var _local3 = 0;
while (_local3 < this.arrFriendlies.length) {
if (this.arrAllies[_local4].name == this.arrFriendlies[_local3].creator) {
_root[this.arrFriendlies[_local3].name].Deactivate();
break;
}
_local3++;
}
}
_local4++;
}
this.GunSelected(_root[this.arrAllies[this.intGunSelected].name]._x, _root[this.arrAllies[this.intGunSelected].name]._y);
}
}
};
_local2.CheckHotKeys = function () {
if (this.intKeyLock == 0) {
var _local7 = -1;
if (Key.isDown(_global.pauseHotkey)) {
if (_global.gamePaused == true) {
this.UnPauseGame();
this.intKeyLock = 15;
} else {
this.PauseGame();
this.StartMenu();
this.intKeyLock = 15;
}
}
if (Key.isDown(_global.hotKey1)) {
_local7 = 1;
} else if (Key.isDown(_global.hotKey2)) {
_local7 = 2;
} else if (Key.isDown(_global.hotKey3)) {
_local7 = 3;
} else if (Key.isDown(_global.hotKey4)) {
if (this.arrSlots.length > 3) {
_local7 = 4;
}
} else if (Key.isDown(_global.hotKey5)) {
if (this.arrSlots.length > 3) {
_local7 = 5;
}
}
if (_local7 != -1) {
this.intKeyLock = 15;
_local7 = _local7 - 1;
var _local6 = -1;
var _local5 = 0;
while (_local5 < this.arrAllies.length) {
if (this.arrSlots[_local7].gunName == this.arrAllies[_local5].name) {
_local6 = _local5;
break;
}
_local5++;
}
if (_local6 != -1) {
if ((this.intGunSelected != _local6) && (this.arrAllies[_local6].blnDestroyed == false)) {
if (((this.arrAllies[_local5].type != 4) && (this.arrAllies[_local5].type != 8)) && (this.arrAllies[_local5].type != 9)) {
if (((((this.arrAllies[this.intGunSelected].type == 2) || (this.arrAllies[this.intGunSelected].type == 11)) || (this.arrAllies[this.intGunSelected].type == 12)) || (this.arrAllies[_local5].type == 18)) || (this.arrAllies[this.intGunSelected].type == 19)) {
_root[this.arrAllies[this.intGunSelected].name].gun.barrel.gotoAndStop("stop");
_global.SoundManager.StopMachineGunSound();
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].creator == this.arrAllies[this.intGunSelected].name) {
_root[this.arrFriendlies[_local4].name].gun_1.gotoAndStop("stop");
break;
}
_local4++;
}
}
_root[this.arrAllies[this.intGunSelected].powerMeter]._visible = false;
_local5 = 0;
while (_local5 < this.arrAllies.length) {
if (_local5 != _local6) {
this.arrAllies[_local5].blnSelected = false;
} else {
this.arrAllies[_local5].blnSelected = true;
}
this.arrAllies[_local5].power = 0;
this.arrAllies[_local5].charging = false;
_local5++;
}
this.intGunSelected = _local6;
this.GunSelected(_root[this.arrAllies[this.intGunSelected].name]._x, _root[this.arrAllies[this.intGunSelected].name]._y);
if (this.arrAllies[this.intGunSelected].type == 12) {
_local5 = 0;
while (_local5 < this.arrAllies.length) {
if (this.arrAllies[_local5].type == 12) {
_root[this.arrAllies[_local5].name].gun.radio_mc._visible = true;
}
_local5++;
}
} else {
_local5 = 0;
while (_local5 < this.arrAllies.length) {
if (this.arrAllies[_local5].type == 12) {
_root[this.arrAllies[_local5].name].gun.radio_mc._visible = false;
}
_local5++;
}
}
if (this.arrAllies[this.intGunSelected].type == 21) {
var _local8 = -1;
_local5 = 0;
while (_local5 < this.arrFriendlies.length) {
if (this.arrAllies[this.intGunSelected].name == this.arrFriendlies[_local5].creator) {
_local8 = _local5;
break;
}
_local5++;
}
if (_local8 == -1) {
this.SpawnControllableUnit(this.intGunSelected);
} else {
_root[this.arrFriendlies[_local8].name].Activate();
}
}
_local5 = 0;
while (_local5 < this.arrAllies.length) {
if ((this.arrAllies[_local5].type == 21) && (_local5 != this.intGunSelected)) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrAllies[_local5].name == this.arrFriendlies[_local4].creator) {
_root[this.arrFriendlies[_local4].name].Deactivate();
break;
}
_local4++;
}
}
_local5++;
}
if (this.intArtilleryState != -1) {
if (this.intArtilleryState != this.intGunSelected) {
this.RemoveRangeIndicator();
}
}
if (this.arrAllies[this.intGunSelected].type == 23) {
this.CreateRangeIndicator();
}
}
}
}
}
} else {
this.intKeyLock--;
}
};
_local2.CheckCheats = function () {
if (this.intKeyLock == 0) {
if (_global.cheatsEnabled.Get() == -1) {
if (_global.var1.Get() != -1) {
if ((Key.isDown(17) && (Key.isDown(16))) && (Key.isDown(83))) {
this.intKeyLock = 15;
if (this._level.Get() < 10) {
this._level.Set(this._level.Get() + 1);
}
_root.icoOut.ico1.UpdateLevel();
} else if ((Key.isDown(17) && (Key.isDown(16))) && (Key.isDown(66))) {
this.intKeyLock = 15;
if (this._level.Get() > 1) {
this._level.Set(this._level.Get() - 1);
}
_root.icoOut.ico1.UpdateLevel();
} else if ((Key.isDown(17) && (Key.isDown(16))) && (Key.isDown(67))) {
this.intKeyLock = 15;
_global.cheatCheapGuns.mSet(1254367);
} else if ((Key.isDown(17) && (Key.isDown(16))) && (Key.isDown(85))) {
this.intKeyLock = 15;
_global.cheatUpgrades.mSet(1254367);
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
this.arrAllies[_local4].intPoints = this.arrAllies[_local4].intPoints + 2;
_local4++;
}
if (this.blnGunInfoOpen == true) {
_root.menu_mc.inside.points_txt.text = this.arrAllies[this.intInfoGun].intPoints;
}
} else if ((Key.isDown(17) && Key.isDown(16)) && Key.isDown(76)) {
this.intKeyLock = 15;
_global.cheatUnlock.mSet(1254367);
} else if ((Key.isDown(17) && Key.isDown(16)) && Key.isDown(77)) {
this.intKeyLock = 15;
_global.cheatUnlock.mSet(1254367);
this.MarkLevelAsComplete();
}
}
}
} else {
this.intKeyLock--;
}
};
_local2.DisplayCharge = function () {
var _local8 = true;
switch (this.arrAllies[this.intGunSelected].type) {
case 2 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
case 21 :
case 23 :
case 7 :
case 3 :
_local8 = false;
}
if (this.arrAllies[this.intGunSelected].charging == true) {
if (_local8 == true) {
this.arrAllies[this.intGunSelected].power = this.arrAllies[this.intGunSelected].power + this.arrAllies[this.intGunSelected].chargeRate;
if (this.arrAllies[this.intGunSelected].power > this.arrAllies[this.intGunSelected].chargeMax) {
this.arrAllies[this.intGunSelected].power = this.arrAllies[this.intGunSelected].chargeMax;
}
_root[this.arrAllies[this.intGunSelected].powerMeter].inside._xscale = (this.arrAllies[this.intGunSelected].power / this.arrAllies[this.intGunSelected].chargeMax) * 100;
if (this.arrAllies[this.intGunSelected].type == 10) {
if (this.arrAllies[this.intGunSelected].power == this.arrAllies[this.intGunSelected].chargeMax) {
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
if (this.blnMeteorsInProgress == false) {
this.ShootMeteorGun();
}
}
}
}
} else if (((((this.arrAllies[this.intGunSelected].type == 2) || (this.arrAllies[this.intGunSelected].type == 19)) || (this.arrAllies[this.intGunSelected].type == 18)) || (this.arrAllies[this.intGunSelected].type == 11)) || (this.arrAllies[this.intGunSelected].type == 12)) {
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
this.ShootMachineGun();
}
} else if (this.arrAllies[this.intGunSelected].type == 21) {
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
this.ShootControllableMachineGun();
}
}
}
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].blnDestroyed == false) {
if (this.arrAllies[_local3].timer == this.arrAllies[_local3].timerReady) {
} else {
this.arrAllies[_local3].timer = this.arrAllies[_local3].timer + this.arrAllies[_local3].timerRate;
if (this.arrAllies[_local3].type == 16) {
if ((this.arrAllies[_local3].timerReady - this.arrAllies[_local3].timer) == 38) {
_root[this.arrAllies[_local3].name].gun.gotoAndPlay("reload");
}
}
if (this.arrAllies[_local3].timer >= this.arrAllies[_local3].timerReady) {
this.arrAllies[_local3].timer = this.arrAllies[_local3].timerReady;
_root[this.arrAllies[_local3].loadMeter].gotoAndPlay(2);
if (this.arrAllies[_local3].type == 14) {
var _local6 = 0;
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
if (_root[this.arrBullets[_local4]]._mine == true) {
if (_root[this.arrBullets[_local4]]._creator._name == this.arrAllies[_local3].name) {
_local6++;
}
}
_local4++;
}
_local6++;
var _local5 = 0;
var _local7 = Math.round(360 / _local6);
_local4 = 0;
while (_local4 < this.arrBullets.length) {
if (_root[this.arrBullets[_local4]]._mine == true) {
if (_root[this.arrBullets[_local4]]._creator._name == this.arrAllies[_local3].name) {
_root[this.arrBullets[_local4]].ResetAngle(_local5);
_local5 = _local5 + _local7;
}
}
_local4++;
}
this.SpawnMine(_root[this.arrAllies[_local3].name], this.arrAllies[_local3].damage, true, _local5);
_local4 = 0;
while (_local4 < this.arrMineQueue.length) {
if ((this.arrMineQueue[_local4].name = this.arrAllies[_local3].name)) {
if (this.arrMineQueue[_local4].num > 1) {
this.arrMineQueue[_local4].num--;
this.arrAllies[_local3].timer = 0;
_root[this.arrAllies[_local3].loadMeter].gotoAndPlay(1);
} else {
this.arrMineQueue.splice(_local4, 1);
_local4--;
}
break;
}
_local4++;
}
}
if (this.arrAllies[_local3].type == 20) {
_root[this.arrAllies[_local3].name].gun.barrel.gotoAndPlay("shoot");
}
} else {
_root[this.arrAllies[_local3].loadMeter].inside._xscale = (this.arrAllies[_local3].timer / this.arrAllies[_local3].timerReady) * 100;
}
}
}
_local3++;
}
};
_local2.UpdateGunHealth = function (gunHit) {
if (this.arrAllies[gunHit].blnDestroyed == false) {
if (this.arrAllies[gunHit].damageTaken > this.arrAllies[gunHit].totalLife) {
this.arrAllies[gunHit].damageTaken = this.arrAllies[gunHit].totalLife;
}
if (this.arrAllies[gunHit].damageTaken == this.arrAllies[gunHit].totalLife) {
if (gunHit == this.intGunSelected) {
_global.SoundManager.StopMachineGunSound();
}
if (this.arrAllies[gunHit].saveType == 17) {
var _local4 = 0;
while (_local4 < this.arrShields.length) {
if (this.arrShields[_local4].from == this.arrAllies[gunHit].name) {
this.RemoveEffect(this.arrShields[_local4].name);
this.arrShields.splice(_local4, 1);
_local4--;
}
_local4++;
}
}
this.arrAllies[gunHit].blnDestroyed = true;
this.arrAllies[gunHit].type = 40;
_root[this.arrAllies[gunHit].name].gotoAndPlay(40);
this.arrAllies[gunHit].timer = 0;
_root[this.arrAllies[gunHit].loadMeter].gotoAndStop(1);
_root[this.arrAllies[gunHit].loadMeter].inside._xscale = 0;
this.UpdateBuffs();
if (this.CheckLoseConditions() == true) {
this.Lose();
}
}
_root[this.arrAllies[gunHit].healthMeter].inside._xscale = ((this.arrAllies[gunHit].totalLife - this.arrAllies[gunHit].damageTaken) / this.arrAllies[gunHit].totalLife) * 100;
} else if (_root[this.arrAllies[gunHit].healthMeter].inside._xscale != 0) {
this.arrAllies[gunHit].damageTaken = this.arrAllies[gunHit].totalLife;
_root[this.arrAllies[gunHit].healthMeter].inside._xscale = 0;
this.arrAllies[gunHit].timer = 0;
_root[this.arrAllies[gunHit].loadMeter].gotoAndStop(1);
_root[this.arrAllies[gunHit].loadMeter].inside._xscale = 0;
}
};
_local2.ReportBulletMiss = function () {
this.intBulletsMissed++;
};
_local2.ShootGun = function () {
if (this.blnBreakMode == false) {
var _local8 = true;
switch (this.arrAllies[this.intGunSelected].type) {
case 2 :
case 11 :
case 12 :
case 13 :
case 14 :
case 15 :
case 16 :
case 17 :
case 18 :
case 19 :
case 20 :
case 21 :
case 23 :
case 7 :
case 3 :
case 4 :
case 8 :
case 9 :
case 10 :
_local8 = false;
}
if (_local8 == true) {
if (this.arrAllies[this.intGunSelected].charging == true) {
if (this.arrAllies[this.intGunSelected].timer == this.arrAllies[this.intGunSelected].timerReady) {
var thisRef = this;
var _local5 = "avatarBullet_" + this.intBulletDepth;
var _local9 = new Vector();
var _local6 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local12 = (Math.PI * _local6.barrel._rotation) / 180;
var _local10 = this.arrAllies[this.intGunSelected].power + this.dblMinGunPower;
_local9._x = Math.cos((Math.PI * _local6.barrel._rotation) / 180) * (this.arrAllies[this.intGunSelected].power + this.dblMinGunPower);
_local9._y = Math.sin((Math.PI * _local6.barrel._rotation) / 180) * (this.arrAllies[this.intGunSelected].power + this.dblMinGunPower);
var _local7 = {x:_local6.barrel.emitter._x, y:_local6.barrel.emitter._y};
_local6.barrel.localToGlobal(_local7);
this.turretData.SetInternalData(this.arrAllies[this.intGunSelected].type, this.arrAllies[this.intGunSelected].exp);
this.intBulletsShot++;
if (this.arrAllies[this.intGunSelected].type == 6) {
_root.attachMovie("fireBullet", _local5, this.intBulletDepth);
_root[_local5]._data = this.arrAllies[this.intGunSelected].numBullets;
_global.SoundManager.PlaySound("FlameTurretFire");
} else if (this.arrAllies[this.intGunSelected].type == 22) {
_root.attachMovie("bulletAcid", _local5, this.intBulletDepth);
_root[_local5]._data = this.arrAllies[this.intGunSelected].range;
_root[_local5]._acidCounter = this.arrAllies[this.intGunSelected].data;
_global.SoundManager.PlaySound("FlameTurretFire");
} else if (this.arrAllies[this.intGunSelected].type == 5) {
_root.attachMovie("bullet2", _local5, this.intBulletDepth);
_root[_local5]._explodeCounter = this.RandNum(25, 40);
_root[_local5]._data = this.arrAllies[this.intGunSelected].numBullets;
_global.SoundManager.PlaySound("HeavyCannonFire");
} else {
_root.attachMovie("bullet2", _local5, this.intBulletDepth);
_global.SoundManager.PlaySound("HeavyCannonFire");
}
_root[_local5]._x = _local7.x;
_root[_local5]._y = _local7.y;
_root[_local5].SetGravityAndVelocity(this.dblGravity, _local10);
_root[_local5].SetAngle(_local12);
_root[_local5].SetStart(_root[_local5]._x, _root[_local5]._y);
_root[_local5]._enemy = false;
_root[_local5]._damage = this.arrAllies[this.intGunSelected].damage;
_root[_local5]._rotation = _local6.barrel._rotation;
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local5);
_root[_local5].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
}
this.arrAllies[this.intGunSelected].charging = false;
var _local11 = _root[this.arrAllies[this.intGunSelected].powerMeter];
_local11._visible = false;
}
} else if (((((this.arrAllies[this.intGunSelected].type == 2) || (this.arrAllies[this.intGunSelected].type == 18)) || (this.arrAllies[this.intGunSelected].type == 19)) || (this.arrAllies[this.intGunSelected].type == 11)) || (this.arrAllies[this.intGunSelected].type == 12)) {
this.arrAllies[this.intGunSelected].charging = false;
_root[this.arrAllies[this.intGunSelected].name].gun.barrel.gotoAndStop("stop");
_global.SoundManager.StopMachineGunSound();
} else if (this.arrAllies[this.intGunSelected].type == 10) {
this.arrAllies[this.intGunSelected].charging = false;
var _local11 = _root[this.arrAllies[this.intGunSelected].powerMeter];
_local11._visible = false;
} else if (this.arrAllies[this.intGunSelected].type == 17) {
this.EndShieldSelect();
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].creator == this.arrAllies[this.intGunSelected].name) {
_root[this.arrFriendlies[_local4].name].gun_1.gotoAndStop("stop");
this.arrAllies[this.intGunSelected].charging = false;
break;
}
_local4++;
}
} else if (this.arrAllies[this.intGunSelected].type == 23) {
if (this.blnBreakMode == false) {
if (this.arrAllies[this.intGunSelected].timer == this.arrAllies[this.intGunSelected].timerReady) {
if (this.intArtilleryState == -1) {
this.CreateRangeIndicator();
} else {
this.ShootArtillery();
}
}
}
}
}
};
_local2.ManageArtillery = function () {
var _local2 = 0;
while (_local2 < this.arrArtillery.length) {
this.arrArtillery[_local2].nextBulletCounter--;
if (this.arrArtillery[_local2].nextBulletCounter == 0) {
var _local3 = this.RandNum(this.arrArtillery[_local2].xMin, this.arrArtillery[_local2].xMax);
this.ShootArtilleryBullet(_local3, this.arrArtillery[_local2].speed, this.arrArtillery[_local2].damage);
this.arrArtillery[_local2].bulletsLeft--;
if (this.arrArtillery[_local2].bulletsLeft == 0) {
this.arrArtillery.splice(_local2, 1);
_local2--;
} else {
this.arrArtillery[_local2].nextBulletCounter = this.RandNum(2, 12);
}
}
_local2++;
}
};
_local2.ShootArtilleryBullet = function (xLoc, fallSpeed, doDamage) {
var _local5 = 50;
var thisRef = this;
var _local3 = "avatarBullet_" + this.intBulletDepth;
var _local4 = new Vector();
var _local7 = (Math.PI * _local5) / 180;
var _local6 = fallSpeed;
_local4 = new Vector();
_local4._x = Math.cos((Math.PI * _local5) / 180) * _local6;
_local4._y = Math.sin((Math.PI * _local5) / 180) * _local6;
_root.attachMovie("artillery", _local3, this.intBulletDepth);
_root[_local3]._x = xLoc;
_root[_local3]._y = -5;
_root[_local3]._noTop = true;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._enemy = false;
_root[_local3]._damage = doDamage;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.ShootArtillery = function () {
this.RemoveRangeIndicator();
this.turretData.SetInternalData(23, this.arrAllies[this.intGunSelected].exp);
var _local3 = new Vector();
_local3._x = 0.642787609686539 * this.turretData.GetBulletSpeed();
_local3._y = 0.766044443118978 * this.turretData.GetBulletSpeed();
var _local5 = _local3._y / _local3._x;
var _local6 = _root._ymouse - (_local5 * _root._xmouse);
var _local4 = (-5 - _local6) / _local5;
var _local8 = _local4 - (this.arrAllies[this.intGunSelected].range / 2);
var _local7 = _local4 + (this.arrAllies[this.intGunSelected].range / 2);
this.arrArtillery.push({damage:this.arrAllies[this.intGunSelected].damage, bulletsLeft:this.arrAllies[this.intGunSelected].numBullets, xMin:_local8, xMax:_local7, nextBulletCounter:30, speed:this.turretData.GetBulletSpeed()});
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
};
_local2.CreateRangeIndicator = function () {
this.intArtilleryState = this.intGunSelected;
_root.attachMovie("rangeIndicator", "range", this.rangeDepth);
_root.range._x = _root._xmouse;
_root.range._y = _root._ymouse;
_root.range._width = this.arrAllies[this.intGunSelected].range;
_root.range.startDrag();
};
_local2.RemoveRangeIndicator = function () {
this.intArtilleryState = -1;
_root.range.stopDrag();
_root.range.removeMovieClip();
};
_local2.SpawnMine = function (gunRef, myDamage, orbital, setAngle) {
var thisRef = this;
var _local3 = "avatarMine_" + this.intStaticBulletDepth;
_root.attachMovie("orbitalMine", _local3, this.intStaticBulletDepth);
_root[_local3]._x = gunRef._x;
_root[_local3]._y = gunRef._y;
_root[_local3]._enemy = false;
_root[_local3]._damage = myDamage;
_root[_local3]._orbital = orbital;
_root[_local3].SetCreator(gunRef);
_root[_local3].ResetAngle(setAngle);
this.intStaticBulletDepth++;
if (this.intStaticBulletDepth >= 20000) {
this.intStaticBulletDepth = 15050;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.StartMines = function () {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].type == 14) {
var _local5 = 0;
var _local6 = Math.round(360 / this.arrAllies[_local3].numBullets);
var _local4 = 0;
while (_local4 < this.arrAllies[_local3].numBullets) {
this.SpawnMine(_root[this.arrAllies[_local3].name], this.arrAllies[_local3].damage, true, _local5);
_local5 = _local5 + _local6;
_local4++;
}
}
_local3++;
}
};
_local2.DestroyMines = function () {
var _local3 = 0;
while (_local3 < this.arrBullets.length) {
if (_root[this.arrBullets[_local3]]._mine == true) {
_root[this.arrBullets[_local3]].removeMovieClip();
this.arrBullets.splice(_local3, 1);
_local3--;
}
_local3++;
}
};
_local2.ReportMineDestroyed = function (gunName) {
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
if (this.arrAllies[_local4].name == gunName) {
if (this.arrAllies[_local4].timer == this.arrAllies[_local4].timerReady) {
this.arrAllies[_local4].timer = 0;
_root[this.arrAllies[_local4].loadMeter].gotoAndStop(1);
}
var _local5 = false;
var _local3 = 0;
while (_local3 < this.arrMineQueue.length) {
if ((this.arrMineQueue[_local3].name = gunName)) {
this.arrMineQueue[_local3].num++;
_local5 = true;
break;
}
_local3++;
}
if (_local5 == false) {
this.arrMineQueue.push({name:gunName, num:1});
}
break;
}
_local4++;
}
};
_local2.StartDecoys = function () {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].type == 20) {
_root[this.arrAllies[_local3].name].gun.barrel.gotoAndPlay("shoot");
var _local4 = this.arrAllies[_local3].numBullets - 1;
if (_local4 > 0) {
this.arrFriendliesQueue.push({name:this.arrAllies[_local3].name, num:_local4});
}
}
_local3++;
}
};
_local2.SpawnDecoy = function (gunRef) {
var _local5 = -1;
var _local7 = false;
var _local6;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].name == gunRef._name) {
_local6 = this.arrAllies[_local3].data;
_local5 = _local3;
_local7 = true;
break;
}
_local3++;
}
var _local8 = "friendly_" + this.intStaticBulletDepth;
if (_local6 == 1) {
_root.attachMovie("decoyWGun", _local8, this.intStaticBulletDepth);
} else {
_root.attachMovie("decoy", _local8, this.intStaticBulletDepth);
}
var _local9 = new Object({x:gunRef.gun.barrel.emitter._x, y:gunRef.gun.barrel.emitter._y});
gunRef.gun.barrel.localToGlobal(_local9);
_root[_local8].SetHealth(this.arrAllies[_local5].range);
_root[_local8].SetNewLocation(_local9.x, _local9.y);
this.intStaticBulletDepth++;
if (this.intStaticBulletDepth >= 20000) {
this.intStaticBulletDepth = 15050;
}
this.arrFriendlies.push({name:_local8, stay:false, creator:gunRef._name});
_local3 = 0;
while (_local3 < this.arrFriendliesQueue.length) {
if (this.arrFriendliesQueue[_local3].name == gunRef._name) {
this.arrAllies[_local5].timer = 0;
_root[this.arrAllies[_local5].loadMeter].gotoAndStop(1);
if (this.arrFriendliesQueue[_local3].num > 1) {
this.arrFriendliesQueue[_local3].num--;
} else {
this.arrFriendliesQueue.splice(_local3, 1);
_local3--;
}
break;
}
_local3++;
}
};
_local2.SpawnControllableUnit = function (allyIndex) {
var _local4 = true;
var _local3 = 0;
while (_local3 < this.arrFriendliesDeaths.length) {
if (this.arrFriendliesDeaths[_local3] == this.arrAllies[allyIndex].name) {
_local4 = false;
break;
}
_local3++;
}
if (_local4 == true) {
var _local7 = _root[this.arrAllies[allyIndex].name];
var _local5 = "friendly_" + this.intStaticBulletDepth;
_root.attachMovie("controlUnitOne", _local5, this.intStaticBulletDepth);
var _local8 = new Object({x:_local7.gun.emitter._x, y:_local7.gun.emitter._y});
_local7.gun.localToGlobal(_local8);
_root[_local5]._x = _local8.x;
_root[_local5]._y = _local8.y;
_root[_local5].SetNewLocation(_local8.x, _local8.y);
_root[_local5].Activate();
_local7.gun.gotoAndStop("shoot");
this.intStaticBulletDepth++;
if (this.intStaticBulletDepth >= 20000) {
this.intStaticBulletDepth = 15050;
}
this.arrFriendlies.push({name:_local5, stay:false, creator:_local7._name});
}
};
_local2.ReleaseDecoy = function (myName) {
if (this.blnBreakMode == false) {
this.SpawnDecoy(_root[myName]);
}
};
_local2.ReportFriendlyDeath = function (objName) {
var _local2 = 0;
while (_local2 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local2].name == objName) {
this.arrFriendliesDeaths.push(this.arrFriendlies[_local2].creator);
this.arrFriendlies.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.ReportFriendlyLanding = function (objName) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].name == objName) {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].name == this.arrFriendlies[_local4].creator) {
_root[this.arrAllies[_local3].name].gun.gotoAndStop("stop");
break;
}
_local3++;
}
this.arrFriendlies.splice(_local4, 1);
break;
}
_local4++;
}
};
_local2.ShootApocalypseGun = function () {
if (this.blnBreakMode == false) {
if (this.arrAllies[this.intGunSelected].timer == this.arrAllies[this.intGunSelected].timerReady) {
this.FlashScreen();
var _local6 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local7 = new Object({x:_local6.emitter._x, y:_local6.emitter._y});
_local6.localToGlobal(_local7);
var _local5 = new Vector();
_local5._x = _local7.x;
_local5._y = _local7.y;
this.CreateEffect("apocalypseEffect", _local5, false, "", "");
this.ShakeScreen(30);
var _local4 = false;
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
_local4 = _root[this.arrEnemies[_local3]].Apocalypse();
if (_local4 == true) {
_local3--;
}
_local3++;
}
_local3 = 0;
while (_local3 < this.arrFriendlies.length) {
if (_root[this.arrFriendlies[_local3].name].Apocalypse()) {
_local3--;
}
_local3++;
}
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
}
}
};
_local2.ShootControllableMachineGun = function () {
if (this.blnBreakMode == false) {
var thisRef = this;
var _local4 = "avatarBullet_" + this.intBulletDepth;
var _local9 = new Vector();
var _local6 = -1;
var _local3 = 0;
while (_local3 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local3].creator == this.arrAllies[this.intGunSelected].name) {
_local6 = _local3;
break;
}
_local3++;
}
if (_local6 != -1) {
var _local5 = _root[this.arrFriendlies[_local3].name];
var _local10 = new Object({x:_local5.gun_1._x, y:_local5.gun_1._y});
_local5.localToGlobal(_local10);
var _local8 = new Vector();
_local8._x = _xmouse - _local10.x;
_local8._y = _ymouse - _local10.y;
var _local14 = Math.atan2(_local8._y, _local8._x);
var _local7 = (360 * _local14) / (Math.PI*2);
var _local11 = _local7;
if (_local5._xscale < 0) {
if (_local7 < 0) {
_local7 = -1 * (180 + _local7);
} else {
_local7 = 180 - _local7;
}
}
_local5.gun_1._rotation = _local7;
this.turretData.SetInternalData(this.arrAllies[this.intGunSelected].type, this.arrAllies[this.intGunSelected].exp);
var _local16 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local15 = _local14;
var _local13 = this.turretData.GetBulletSpeed();
_local9._x = Math.cos((Math.PI * _local11) / 180) * _local13;
_local9._y = Math.sin((Math.PI * _local11) / 180) * _local13;
var _local20;
var _local19;
var _local12;
_local12 = {x:_local5.gun_1.emitter._x, y:_local5.gun_1.emitter._y};
_local5.gun_1.localToGlobal(_local12);
_root.attachMovie("bulletMachine", _local4, this.intBulletDepth);
_root[_local4]._x = _local12.x;
_root[_local4]._y = _local12.y;
_root[_local4].SetMovement(_local9._x, _local9._y);
_root[_local4]._enemy = false;
_root[_local4]._damage = this.arrAllies[this.intGunSelected].damage;
_root[_local4]._rotation = _local11;
this.intBulletsShot++;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
}
}
};
_local2.ShootMachineGun = function () {
if (this.blnBreakMode == false) {
var thisRef = this;
var _local4 = "avatarBullet_" + this.intBulletDepth;
var _local8 = new Vector();
this.turretData.SetInternalData(this.arrAllies[this.intGunSelected].type, this.arrAllies[this.intGunSelected].exp);
var _local5 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local10 = (Math.PI * _local5.barrel._rotation) / 180;
var _local9 = this.turretData.GetBulletSpeed();
_local8._x = Math.cos((Math.PI * _local5.barrel._rotation) / 180) * _local9;
_local8._y = Math.sin((Math.PI * _local5.barrel._rotation) / 180) * _local9;
var _local12;
var _local11;
var _local7;
if ((((this.arrAllies[this.intGunSelected].type == 2) || (this.arrAllies[this.intGunSelected].type == 19)) || (this.arrAllies[this.intGunSelected].type == 12)) || (this.arrAllies[this.intGunSelected].type == 18)) {
_local7 = {x:_local5.barrel.emitter._x, y:_local5.barrel.emitter._y};
_local5.barrel.localToGlobal(_local7);
} else if (this.arrAllies[this.intGunSelected].type == 11) {
_local12 = {x:_local5.barrel.top.emitter._x, y:_local5.barrel.top.emitter._y};
_local5.barrel.top.localToGlobal(_local12);
_local11 = {x:_local5.barrel.bottom.emitter._x, y:_local5.barrel.bottom.emitter._y};
_local5.barrel.bottom.localToGlobal(_local11);
}
if (this.arrAllies[this.intGunSelected].type == 12) {
_root.attachMovie("bulletPlasma", _local4, this.intBulletDepth);
} else if (this.arrAllies[this.intGunSelected].type == 18) {
_root.attachMovie("bulletRail", _local4, this.intBulletDepth);
_global.SoundManager.PlayMachineGunSound("machinegun");
} else if (this.arrAllies[this.intGunSelected].type == 19) {
_root.attachMovie("bulletFlamethrower", _local4, this.intBulletDepth);
_root[_local4]._lastTime = 30;
} else {
_root.attachMovie("bulletMachine", _local4, this.intBulletDepth);
_global.SoundManager.PlayMachineGunSound("machinegun");
}
if (this.arrAllies[this.intGunSelected].type == 11) {
_root[_local4]._x = _local12.x;
_root[_local4]._y = _local12.y;
} else {
_root[_local4]._x = _local7.x;
_root[_local4]._y = _local7.y;
}
_root[_local4].SetMovement(_local8._x, _local8._y);
_root[_local4]._enemy = false;
_root[_local4]._damage = this.arrAllies[this.intGunSelected].damage;
_root[_local4]._rotation = _local5.barrel._rotation;
this.intBulletsShot++;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
if (this.arrAllies[this.intGunSelected].type == 11) {
this.intBulletsShot++;
_local4 = "avatarBullet_" + this.intBulletDepth;
_root.attachMovie("bulletMachine", _local4, this.intBulletDepth);
_root[_local4]._x = _local11.x;
_root[_local4]._y = _local11.y;
_root[_local4].SetMovement(_local8._x, _local8._y);
_root[_local4]._enemy = false;
_root[_local4]._damage = this.arrAllies[this.intGunSelected].damage;
_root[_local4]._rotation = _local5.barrel._rotation;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
} else if (this.arrAllies[this.intGunSelected].type == 12) {
var _local6 = 0;
while (_local6 < this.arrAllies.length) {
if (_local6 != this.intGunSelected) {
if (this.arrAllies[_local6].type == 12) {
_local5 = _root[this.arrAllies[_local6].name].gun;
_local7 = {x:_local5.barrel.emitter._x, y:_local5.barrel.emitter._y};
_local5.barrel.localToGlobal(_local7);
_local4 = "avatarBullet_" + this.intBulletDepth;
_root.attachMovie("bulletPlasma", _local4, this.intBulletDepth);
_root[_local4]._x = _local7.x;
_root[_local4]._y = _local7.y;
_local10 = (Math.PI * _local5.barrel._rotation) / 180;
_local8._x = Math.cos((Math.PI * _local5.barrel._rotation) / 180) * _local9;
_local8._y = Math.sin((Math.PI * _local5.barrel._rotation) / 180) * _local9;
_root[_local4].SetMovement(_local8._x, _local8._y);
_root[_local4]._enemy = false;
_root[_local4]._damage = this.arrAllies[_local6].damage;
_root[_local4]._rotation = _local5.barrel._rotation;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local4);
_root[_local4].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
}
}
_local6++;
}
} else if (this.arrAllies[this.intGunSelected].type == 18) {
_local7 = {x:_local5.barrel.shells._x, y:_local5.barrel.shells._y};
_local5.barrel.localToGlobal(_local7);
this.ParticleExplosion("casing", _local7.x, _local7.y);
}
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
}
};
_local2.ShootSniperGun = function () {
if (this.blnBreakMode == false) {
if (this.arrAllies[this.intGunSelected].timer == this.arrAllies[this.intGunSelected].timerReady) {
_global.SoundManager.PlaySound("SniperCannonFire");
var _local6;
var _local5;
var _local11 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local10 = new Vector();
var _local14 = (Math.PI * _local11.barrel._rotation) / 180;
var _local13 = 3;
_local10._x = Math.cos((Math.PI * _local11.barrel._rotation) / 180) * _local13;
_local10._y = Math.sin((Math.PI * _local11.barrel._rotation) / 180) * _local13;
var _local12 = {x:_local11.barrel.emitter._x, y:_local11.barrel.emitter._y};
_local11.barrel.localToGlobal(_local12);
_local6 = _local12.x;
_local5 = _local12.y;
var _local8 = false;
var _local9 = 0;
while (_local9 < 500) {
_local6 = _local6 + _local10._x;
_local5 = _local5 + _local10._y;
if ((_local6 > Stage.width) || (_local6 < 0)) {
_local8 = false;
break;
}
if ((_local5 > Stage.height) || (_local5 < 0)) {
_local8 = false;
break;
}
var _local4 = 0;
while (_local4 < this.arrEnemies.length) {
if (_root[this.arrEnemies[_local4]].hull.hitTest(_local6, _local5, true)) {
var _local7 = this.arrAllies[this.intGunSelected].damage;
_root[this.arrEnemies[_local4]].ReportDamage(_local7, _local6, _local5);
this.Explosion(_local6, _local5);
_local8 = true;
break;
}
_local4++;
}
if (_local8 == true) {
break;
}
_local9++;
}
if (_local8 == false) {
this.AlertMiss();
}
_local11.barrel.gotoAndPlay("shoot");
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
}
}
};
_local2.ShootLightningGun = function () {
if (this.blnBreakMode == false) {
if (this.arrAllies[this.intGunSelected].timer == this.arrAllies[this.intGunSelected].timerReady) {
var _local25 = false;
var _local16 = 0;
while (_local16 < this.arrEnemies.length) {
if (_root[this.arrEnemies[_local16]].hull.hitTest(_xmouse, _ymouse, false)) {
_global.SoundManager.PlaySound("LightningGun");
_local25 = true;
this.intLightningMiss = 0;
var _local4 = new Array();
var _local8 = 0;
while (_local8 < this.arrEnemies.length) {
if (_local8 != _local16) {
_local4.push({name:this.arrEnemies[_local8], hit:false});
}
_local8++;
}
var _local18 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local19 = {x:_local18.barrel.emitter._x, y:_local18.barrel.emitter._y};
_local18.barrel.localToGlobal(_local19);
this.Lightning(_local19.x, _local19.y, _xmouse, _ymouse);
var _local12 = this.arrAllies[this.intGunSelected].damage;
this.ParticleExplosion("spark", _xmouse, _ymouse);
_root[this.arrEnemies[_local16]].ReportDamage(_local12, _xmouse, _ymouse);
this.turretData.SetInternalData(7, this.arrAllies[this.intGunSelected].exp);
var _local22 = this.arrAllies[this.intGunSelected].numBullets;
var _local17 = this.arrAllies[this.intGunSelected].data;
_local12 = Math.round(_local12 * _local17);
var _local14;
var _local6;
var _local7 = _xmouse;
var _local13 = _ymouse;
var _local10 = 0;
var _local9 = 0;
var _local11 = 0;
var _local15 = 0;
while (_local15 < _local22) {
_local14 = 99999999 /* 0x5F5E0FF */;
_local6 = -1;
var _local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5].hit == false) {
_local10 = _root[_local4[_local5].name]._x - _local7;
_local9 = _root[_local4[_local5].name]._y - _local7;
_local11 = Math.sqrt((_local10 * _local10) + (_local9 * _local9));
if (_local11 < _local14) {
_local14 = _local11;
_local6 = _local5;
}
}
_local5++;
}
if (_local6 == -1) {
break;
}
this.Lightning(_local7, _local13, _root[_local4[_local6].name]._x, _root[_local4[_local6].name]._y);
_local7 = _root[_local4[_local6].name]._x;
_local13 = _root[_local4[_local6].name]._y;
_local4[_local6].hit = true;
this.ParticleExplosion("spark", _local7, _local13);
_root[_local4[_local6].name].ReportDamage(_local12, _local7, _local13);
_local12 = Math.round(_local12 * _local17);
_local15++;
}
this.FlashScreen();
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
break;
}
_local16++;
}
if (_local25 == false) {
this.intLightningMiss++;
if (this.intLightningMiss >= 2) {
this.intLightningMiss = 0;
this.AlertLightning();
}
}
}
}
};
_local2.ShootTimeGun = function () {
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
if (this.intTimeDuration == 0) {
this.intTimeDuration = this.arrAllies[this.intGunSelected].data;
_root.screenEffects_mc._visible = true;
_root.screenEffects_mc.gotoAndStop(2);
_root.screenEffects_mc.inside_mc.gotoAndPlay("start");
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
_root[this.arrEnemies[_local3]].SetTimeStatus(0);
_local3++;
}
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
}
}
};
_local2.ManageTime = function () {
if (this.intTimeDuration > 0) {
this.intTimeDuration--;
if (this.intTimeDuration == 0) {
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
_root[this.arrEnemies[_local3]].SetTimeStatus(1);
_local3++;
}
_root.screenEffects_mc.inside_mc.gotoAndPlay("stop");
}
}
};
_local2.ShootRemoteMissile = function () {
if (this.blnBreakMode == false) {
if (this.arrAllies[this.intGunSelected].timer >= this.arrAllies[this.intGunSelected].timerReady) {
var _local4 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local5 = new Object({x:_local4.emitter._x, y:_local4.emitter._y});
_local4.localToGlobal(_local5);
var thisRef = this;
var _local3 = "avatarBullet_" + this.intBulletDepth;
_root.attachMovie("remoteMissile", _local3, this.intBulletDepth);
_root[_local3]._x = _local5.x;
_root[_local3]._y = _local5.y;
_root[_local3]._enemy = false;
_root[_local3]._damage = this.arrAllies[this.intGunSelected].damage;
_root[_local3]._rotation = -45;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
_local4.gotoAndStop("fired");
}
}
};
_local2.ShootMeteorGun = function () {
_root[this.arrAllies[this.intGunSelected].name].gun.gotoAndPlay("shoot");
this.arrAllies[this.intGunSelected].timer = 0;
_root[this.arrAllies[this.intGunSelected].loadMeter].gotoAndStop(1);
this.arrAllies[this.intGunSelected].charging = false;
this.blnMeteorsInProgress = true;
this.intMeteorGun = this.intGunSelected;
};
} else {
// unexpected jump
}
_local2.StartMeteors = function () {
this.blnMeteors = true;
this.turretData.SetInternalData(10, this.arrAllies[this.intMeteorGun].exp);
this.intMeteorVelocity = this.turretData.GetBulletSpeed();
this.intMeteorMin = this.arrAllies[this.intMeteorGun].numBullets - this.arrAllies[this.intMeteorGun].range;
this.intMeteorMax = this.arrAllies[this.intMeteorGun].numBullets + this.arrAllies[this.intMeteorGun].range;
this.intMeteorCounter = 10;
this.intMaxDamage = this.arrAllies[this.intMeteorGun].damage;
this.intMeteorDuration = this.arrAllies[this.intMeteorGun].data;
this.ShakeScreen(this.arrAllies[this.intMeteorGun].data);
};
_local2.ManageMeteors = function () {
if (this.blnMeteors == true) {
if (this.intMeteorDuration > 0) {
if (this.intMeteorCounter <= 0) {
this.ShootMeteor();
this.intMeteorCounter = this.RandNum(this.intMeteorMin, this.intMeteorMax);
} else {
this.intMeteorCounter--;
}
this.intMeteorDuration--;
} else {
this.blnMeteors = false;
this.blnMeteorsInProgress = false;
_root[this.arrAllies[this.intMeteorGun].name].gun.gotoAndPlay("close");
}
}
};
_local2.ShootMeteor = function () {
var _local4 = 50;
var thisRef = this;
var _local3 = "avatarBullet_" + this.intBulletDepth;
var _local5 = new Vector();
var _local7 = (Math.PI * _local4) / 180;
var _local6 = this.intMeteorVelocity;
_local5._x = Math.cos((Math.PI * _local4) / 180) * _local6;
_local5._y = Math.sin((Math.PI * _local4) / 180) * _local6;
_root.attachMovie("meteor", _local3, this.intBulletDepth);
_root[_local3]._x = this.RandNum(0, 600);
_root[_local3]._y = -25;
_root[_local3]._noTop = true;
_root[_local3].SetMovement(_local5._x, _local5._y);
_root[_local3]._xscale = this.RandNum(30, 100);
_root[_local3]._yscale = _root[_local3]._xscale;
_root[_local3]._enemy = false;
_root[_local3]._damage = Math.round(this.intMaxDamage * (_root[_local3]._xscale / 100));
_root[_local3]._rotation = _local4;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.UpdateBuffs = function () {
var _local12 = 0;
var _local8 = 0;
var _local7 = 0;
var _local2 = 0;
while (_local2 < this.arrAllies.length) {
this.turretData.SetInternalData(this.arrAllies[_local2].type, this.arrAllies[_local2].exp);
this.arrAllies[_local2].data = this.turretData.GetData();
this.arrAllies[_local2].numBullets = this.turretData.GetNumBullets();
this.arrAllies[_local2].range = this.turretData.GetRange();
var _local3 = 0;
while (_local3 < this.arrAllies[_local2].arrUpgrades.length) {
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 4) {
this.arrAllies[_local2].data = this.arrAllies[_local2].data + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 4) {
this.arrAllies[_local2].data = this.arrAllies[_local2].data + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 5) {
this.arrAllies[_local2].numBullets = this.arrAllies[_local2].numBullets + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 5) {
this.arrAllies[_local2].numBullets = this.arrAllies[_local2].numBullets + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 6) {
this.arrAllies[_local2].range = this.arrAllies[_local2].range + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 6) {
this.arrAllies[_local2].range = this.arrAllies[_local2].range + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < this.arrAllies.length) {
if (((this.arrAllies[_local2].type == 4) || (this.arrAllies[_local2].type == 8)) || (this.arrAllies[_local2].type == 9)) {
if (this.arrAllies[_local2].blnDestroyed == false) {
if (this.arrAllies[_local2].type == 4) {
_local12 = _local12 + this.arrAllies[_local2].data;
} else if (this.arrAllies[_local2].type == 8) {
_local8 = _local8 + this.arrAllies[_local2].data;
} else if (this.arrAllies[_local2].type == 9) {
_local7 = _local7 + this.arrAllies[_local2].data;
}
}
}
_local2++;
}
_local7 = 1 - _local7;
if (_local7 < 0.25) {
_local7 = 0.25;
}
_local2 = 0;
while (_local2 < this.arrAllies.length) {
if (this.arrAllies[_local2].type != 4) {
if (this.arrAllies[_local2].blnDestroyed == false) {
this.turretData.SetInternalData(this.arrAllies[_local2].type, this.arrAllies[_local2].exp);
var _local4 = 0;
var _local6 = 0;
var _local5 = 0;
var _local3 = 0;
while (_local3 < this.arrAllies[_local2].arrUpgrades.length) {
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 1) {
_local4 = _local4 + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 1) {
_local4 = _local4 + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 2) {
_local6 = _local6 + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 2) {
_local6 = _local6 + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[_local2].arrUpgrades[_local3].type == 3) {
_local5 = _local5 + this.arrAllies[_local2].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local2].arrUpgrades[_local3].secondType == 3) {
_local5 = _local5 + this.arrAllies[_local2].arrUpgrades[_local3].secondValue;
}
_local3++;
}
_local4 = _local4 + this.turretData.GetDamage();
_local6 = _local6 + this.turretData.GetLife();
_local5 = _local5 + this.turretData.GetReloadMax();
var _local11 = _local6 + Math.round(_local6 * _local12);
this.arrAllies[_local2].totalLife = _local11;
var _local10 = _local4 + Math.round(_local4 * _local8);
this.arrAllies[_local2].damage = _local10;
var _local9 = Math.round(_local5 * _local7);
this.arrAllies[_local2].timerReady = _local9;
}
}
this.UpdateGunHealth(_local2);
_local2++;
}
};
_local2.EnemyFire = function (emitterPos, direction, speed, size, damage, bulletType) {
var thisRef = this;
var _local3 = "enemyBullet_" + this.intBulletDepth;
var _local4 = new Vector();
var _local7 = (Math.PI * direction) / 180;
var _local5 = speed;
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
_root.attachMovie("bullet2", _local3, this.intBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3].SetGravityAndVelocity(this.dblGravity, _local5);
_root[_local3].SetAngle(_local7);
_root[_local3].SetStart(_root[_local3]._x, _root[_local3]._y);
_root[_local3]._damage = damage;
_root[_local3]._enemy = true;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.EnemyFireBulletEnemy = function (emitterPos, direction, speed, size, damage, bulletType) {
var thisRef = this;
var _local4 = new Vector();
var _local3 = "enemy_" + this.intUnitDepth;
_root.attachMovie(bulletType, _local3, this.intUnitDepth);
var _local8 = (Math.PI * direction) / 180;
var _local7 = speed;
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._bullet = true;
_root[_local3]._rotation = direction;
_root[_local3]._damage = damage;
_root[_local3]._enemy = true;
_root[_local3].SetMovement(_local4._x, _local4._y);
this.arrEnemies.push(_local3);
_root[_local3].removeCallback = function (thisName) {
thisRef.RemoveEnemy(thisName);
};
this.intUnitDepth++;
if (this.intUnitDepth > 7000) {
this.intUnitDepth = 5000;
}
};
_local2.DroneDeath = function (xScale, startX, startY, velX, velY) {
var thisRef = this;
var _local3 = "deadDrone" + this.intBulletDepth;
_root.attachMovie("droneDestroyed", _local3, this.intBulletDepth);
_root[_local3]._x = startX;
_root[_local3]._y = startY;
_root[_local3]._xscale = xScale;
_root[_local3].SetMovement(velX, velY);
_root[_local3].SetGravity(this.dblGravity);
_root[_local3]._damage = 35;
_root[_local3]._enemy = false;
this.intBulletDepth++;
if (this.intBulletDepth >= 15000) {
this.intBulletDepth = 10000;
}
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.DropBomb = function (emitterPos, speed, size, damage) {
var thisRef = this;
var _local3 = "enemyBullet_" + this.intBulletDepth;
var _local5 = new Vector();
var _local4 = 180;
var _local8 = (Math.PI * _local4) / 180;
var _local6 = speed;
_local5._x = Math.cos((Math.PI * _local4) / 180) * speed;
_local5._y = Math.sin((Math.PI * _local4) / 180) * speed;
_root.attachMovie("bomb", _local3, this.intBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3]._xscale = size;
_root[_local3]._yscale = size;
_root[_local3].SetGravityAndVelocity(this.dblGravity, _local6);
_root[_local3].SetAngle(_local8);
_root[_local3].SetStart(_root[_local3]._x, _root[_local3]._y);
_root[_local3]._damage = damage;
_root[_local3]._enemy = true;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.EnemyFireMachineGun = function (emitterPos, direction, speed, size, damage, bulletType) {
var thisRef = this;
var _local3 = "enemyBullet_" + this.intBulletDepth;
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
_root.attachMovie("bulletMachine", _local3, this.intBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._damage = damage;
_root[_local3]._enemy = true;
_root[_local3]._rotation = direction;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.FriendlyFireMachineGun = function (emitterPos, direction, speed, size, damage, bulletType) {
var thisRef = this;
var _local3 = "friendlyBullet_" + this.intBulletDepth;
var _local4 = new Vector();
_local4._x = Math.cos((Math.PI * direction) / 180) * speed;
_local4._y = Math.sin((Math.PI * direction) / 180) * speed;
_root.attachMovie("bulletMachine", _local3, this.intBulletDepth);
_root[_local3]._x = emitterPos._x;
_root[_local3]._y = emitterPos._y;
_root[_local3].SetMovement(_local4._x, _local4._y);
_root[_local3]._subBullet = true;
_root[_local3]._damage = damage;
_root[_local3]._enemy = false;
_root[_local3]._rotation = direction;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.RemoveBullet = function (strName) {
var _local2 = 0;
while (_local2 < this.arrBullets.length) {
if (strName == this.arrBullets[_local2]) {
this.arrBullets.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.AimGun = function () {
if (((this.arrAllies[this.intGunSelected].type != 7) && (this.arrAllies[this.intGunSelected].type != 20)) && (this.arrAllies[this.intGunSelected].type != 21)) {
var _local5 = _root[this.arrAllies[this.intGunSelected].name].gun;
var _local10 = new Object({x:_local5.barrel._x, y:_local5.barrel._y});
_root[this.arrAllies[this.intGunSelected].name].gun.localToGlobal(_local10);
var _local9 = new Vector();
_local9._x = _xmouse - _local10.x;
_local9._y = _ymouse - _local10.y;
var _local11 = Math.atan2(_local9._y, _local9._x);
var _local7 = (360 * _local11) / (Math.PI*2);
if ((this.arrAllies[this.intGunSelected].type != 11) && (this.arrAllies[this.intGunSelected].type != 12)) {
if (_local7 > 15) {
_local7 = 15;
} else if (_local7 < -130) {
_local7 = -130;
}
} else if (this.arrAllies[this.intGunSelected].type == 12) {
if (_local7 > 35) {
_local7 = 35;
} else if (_local7 < -130) {
_local7 = -130;
}
}
_local5.barrel._rotation = _local7;
if (this.arrAllies[this.intGunSelected].type == 12) {
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (_local3 != this.intGunSelected) {
if (this.arrAllies[_local3].type == 12) {
_local5 = _root[this.arrAllies[_local3].name].gun;
_local10 = new Object({x:_local5.barrel._x, y:_local5.barrel._y});
_root[this.arrAllies[_local3].name].gun.localToGlobal(_local10);
_local9._x = _xmouse - _local10.x;
_local9._y = _ymouse - _local10.y;
_local11 = Math.atan2(_local9._y, _local9._x);
_local7 = (360 * _local11) / (Math.PI*2);
if (_local7 > 35) {
_local7 = 35;
} else if (_local7 < -130) {
_local7 = -130;
}
_local5.barrel._rotation = _local7;
}
}
_local3++;
}
}
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local6 = -1;
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].creator == this.arrAllies[this.intGunSelected].name) {
_local6 = _local4;
break;
}
_local4++;
}
if (_local6 != -1) {
var _local8 = _root[this.arrFriendlies[_local4].name];
var _local10 = new Object({x:_local8.gun_1._x, y:_local8.gun_1._y});
_local8.localToGlobal(_local10);
var _local9 = new Vector();
_local9._x = _xmouse - _local10.x;
_local9._y = _ymouse - _local10.y;
var _local11 = Math.atan2(_local9._y, _local9._x);
var _local7 = (360 * _local11) / (Math.PI*2);
var _local12 = _local7;
if (_local8._xscale < 0) {
if (_local7 < 0) {
_local7 = -1 * (180 + _local7);
} else {
_local7 = 180 - _local7;
}
}
_local8.gun_1._rotation = _local7;
}
}
};
_local2.DealSplashDamageToEnemies = function (sourceX, sourceY, maxDistance, maxDamage) {
if ((maxDistance != 0) && (maxDistance != undefined)) {
var _local4 = 0;
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
_local7 = _root[this.arrEnemies[_local3]]._x - sourceX;
_local6 = _root[this.arrEnemies[_local3]]._y - sourceY;
_local4 = Math.sqrt((_local7 * _local7) + (_local6 + _local6));
if (_root[this.arrEnemies[_local3]]._width > _root[this.arrEnemies[_local3]]._height) {
_local4 = _local4 - ((_root[this.arrEnemies[_local3]]._width / 2) * 0.75);
} else {
_local4 = _local4 - ((_root[this.arrEnemies[_local3]]._height / 2) * 0.75);
}
if (_local4 <= maxDistance) {
_local9 = (maxDistance - _local4) / maxDistance;
_local8 = Math.round(maxDamage * _local9);
_root[this.arrEnemies[_local3]].ReportDamage(_local8, _root[this.arrEnemies[_local3]]._x, _root[this.arrEnemies[_local3]]._y);
}
_local3++;
}
}
};
_local2.CheckBulletCollision = function () {
var _local4 = false;
var _local3 = 0;
while (_local3 < this.arrBullets.length) {
if (_root[this.arrBullets[_local3]]._enemy == false) {
var _local5 = 0;
while (_local5 < this.arrEnemies.length) {
_local4 = _root[this.arrEnemies[_local5]].DetectHit(this.arrBullets[_local3]);
if (_local4 == true) {
_local3--;
break;
}
_local5++;
}
} else {
if (_root[this.arrBullets[_local3]]._mine == false) {
var _local9 = false;
var _local5 = 0;
while (_local5 < this.arrAllies.length) {
if (this.arrAllies[_local5].blnDestroyed == false) {
if ((Math.abs(_root[this.arrBullets[_local3]]._x - _root[this.arrAllies[_local5].name]._x) < 50) && (Math.abs(_root[this.arrBullets[_local3]]._y - _root[this.arrAllies[_local5].name]._y) < 50)) {
_local4 = _root[this.arrAllies[_local5].name].hitTest(_root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y, true);
if (_local4 == true) {
var _local7 = 0;
var _local6 = 0;
while (_local6 < this.arrShields.length) {
if (this.arrShields[_local6].to == this.arrAllies[_local5].name) {
this.ShieldHit(_root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y);
_local7 = _local7 + this.arrShields[_local6].power;
}
_local6++;
}
_local7 = 1 - _local7;
var _local8 = Math.round(_root[this.arrBullets[_local3]]._damage * _local7);
if ((_local7 < 1) && (_root[this.arrBullets[_local3]]._damage <= 1)) {
_local8 = 0;
}
this.arrAllies[_local5].damageTaken = this.arrAllies[_local5].damageTaken + _local8;
this.UpdateGunHealth(_local5);
_root[this.arrBullets[_local3]].Hit(_root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y, "HitTurret1");
_root[this.arrBullets[_local3]].removeMovieClip();
_local9 = true;
} else {
_local4 = _root[this.arrAllies[_local5].name].hitTest(_root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY, true);
if (_local4 == true) {
var _local7 = 0;
var _local6 = 0;
while (_local6 < this.arrShields.length) {
if (this.arrShields[_local6].to == this.arrAllies[_local5].name) {
this.ShieldHit(_root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY);
_local7 = _local7 + this.arrShields[_local6].power;
}
_local6++;
}
_local7 = 1 - _local7;
var _local8 = Math.round(_root[this.arrBullets[_local3]]._damage * _local7);
if ((_local7 < 1) && (_root[this.arrBullets[_local3]]._damage <= 1)) {
_local8 = 0;
}
this.arrAllies[_local5].damageTaken = this.arrAllies[_local5].damageTaken + _local8;
this.UpdateGunHealth(_local5);
_root[this.arrBullets[_local3]].Hit(_root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY, "HitTurret2");
_root[this.arrBullets[_local3]].removeMovieClip();
_local9 = true;
}
}
}
}
_local5++;
}
}
if (_local9 == false) {
var _local5 = 0;
while (_local5 < this.arrFriendlies.length) {
_local4 = _root[this.arrFriendlies[_local5].name].hitTest(_root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y, true);
if (_local4 == true) {
_root[this.arrFriendlies[_local5].name].ReportDamage(_root[this.arrBullets[_local3]]._damage, _root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y);
_root[this.arrBullets[_local3]].Hit(_root[this.arrBullets[_local3]]._x, _root[this.arrBullets[_local3]]._y, "HitFriendly");
_root[this.arrBullets[_local3]].removeMovieClip();
var _local9 = true;
} else {
_local4 = _root[this.arrFriendlies[_local5].name].hitTest(_root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY, true);
if (_local4 == true) {
_root[this.arrFriendlies[_local5].name].ReportDamage(_root[this.arrBullets[_local3]]._damage, _root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY);
_root[this.arrBullets[_local3]].Hit(_root[this.arrBullets[_local3]]._midX, _root[this.arrBullets[_local3]]._midY, "HitFriendly");
_root[this.arrBullets[_local3]].removeMovieClip();
var _local9 = true;
}
}
_local5++;
}
}
if (_local9 == true) {
this.arrBullets.splice(_local3, 1);
_local3--;
}
}
_local3++;
}
_local3 = 0;
while (_local3 < this.arrEnemies.length) {
if ((_root[this.arrEnemies[_local3]]._bullet == true) && (_root[this.arrEnemies[_local3]]._enemy == true)) {
var _local9 = false;
var _local5 = 0;
while (_local5 < this.arrAllies.length) {
if (this.arrAllies[_local5].blnDestroyed == false) {
_local4 = _root[this.arrAllies[_local5].name].hitTest(_root[this.arrEnemies[_local3]]._x, _root[this.arrEnemies[_local3]]._y, true);
if (_local4 == true) {
var _local7 = 0;
var _local6 = 0;
while (_local6 < this.arrShields.length) {
if (this.arrShields[_local6].to == this.arrAllies[_local5].name) {
this.ShieldHit(_root[this.arrEnemies[_local3]]._x, _root[this.arrEnemies[_local3]]._y);
_local7 = _local7 + this.arrShields[_local6].power;
}
_local6++;
}
_local7 = 1 - _local7;
var _local8 = Math.round(_root[this.arrEnemies[_local3]]._damage * _local7);
if ((_local7 > 0) && (_root[this.arrEnemies[_local3]]._damage <= 1)) {
_local8 = 0;
}
this.arrAllies[_local5].damageTaken = this.arrAllies[_local5].damageTaken + _local8;
this.UpdateGunHealth(_local5);
_root[this.arrEnemies[_local3]].Hit(_root[this.arrEnemies[_local3]]._x, _root[this.arrEnemies[_local3]]._y, "EnemyHit");
_root[this.arrEnemies[_local3]].Cleanup();
_root[this.arrEnemies[_local3]].removeMovieClip();
this.arrEnemies.splice(_local3, 1);
_local3--;
_local9 = true;
if (this.arrEnemies.length == 0) {
if (this.myLevelManager.GetEnemiesLeft() < 1) {
this.FinishLevel();
}
}
}
}
_local5++;
}
}
_local3++;
}
};
_local2.Explosion = function (xloc, yloc) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
this.CreateEffect("explosion_2", _local3, false, "", "");
_global.SoundManager.PlaySound("ShellHit");
};
_local2.GunSmoke = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("gunsmoke", _local2, false, "", "");
};
_local2.LaunchShieldEffect = function (xloc, yloc, to, from) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
return(this.CreateEffect("shield", _local2, true, to, from));
};
_local2.ShieldHit = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("shieldHit", _local2, false, "", "");
};
_local2.MachineGunHit = function (xloc, yloc) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
_root[this.CreateEffect("machineGunHit", _local3, false, "", "")]._rotation = this.RandNum(0, 360);
};
_local2.PlasmaGunHit = function (xloc, yloc) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
_root[this.CreateEffect("plasmaGunHit", _local3, false, "", "")]._rotation = this.RandNum(0, 360);
};
_local2.AcidGunHit = function (xloc, yloc) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
_root[this.CreateEffect("acidGunHit", _local3, false, "", "")]._rotation = this.RandNum(0, 360);
};
_local2.Jets = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("jets", _local2, false, "", "");
};
_local2.SmokeTrail = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("smoketrail", _local2, false, "", "");
};
_local2.GunSelected = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("selectGun", _local2, false, "", "");
};
_local2.StarBurst = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("starBurst", _local2, false, "", "");
};
_local2.Teleport = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("teleport", _local2, false, "", "");
};
_local2.TeleportAppear = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("teleportAppear", _local2, false, "", "");
};
_local2.SellAnimation = function (xloc, yloc) {
var _local2 = new Vector();
_local2._x = xloc;
_local2._y = yloc;
this.CreateEffect("sellAnimation", _local2, false, "", "");
};
_local2.AlertLightning = function () {
var _local2 = new Vector();
_local2._x = 187;
_local2._y = 11;
this.CreateEffect("alertLightning", _local2, false, "", "");
};
_local2.AlertMiss = function () {
var _local2 = new Vector();
_local2._x = 296;
_local2._y = 11;
this.CreateEffect("alertMiss", _local2, false, "", "");
};
_local2.AlertStart = function () {
var _local2 = new Vector();
_local2._x = 184;
_local2._y = 11;
this.CreateEffect("alertStart", _local2, false, "", "");
};
_local2.CreateEffect = function (effectName, effectLocation, lockLocation, lockTarget, lockRotateTarget) {
var _local3 = "effect_" + this.effectDepth;
_root.attachMovie(effectName, _local3, this.effectDepth);
_root[_local3]._x = effectLocation._x;
_root[_local3]._y = effectLocation._y;
this.arrEffects.push({name:_local3, locked:lockLocation, target:lockTarget, rotate:lockRotateTarget});
this.effectDepth++;
if (this.effectDepth > 35000) {
this.effectDepth = 30000;
}
return(_local3);
};
_local2.AwardPoints = function (xloc, yloc, goldWon, expWon, enemyType, pointsWon) {
if (((enemyType == "Enemy_20") || (enemyType == "Enemy_21")) || (enemyType == "Enemy_22")) {
this.myLevelManager.BossDead();
}
this.curStatus.Set(this.curStatus.Get() + pointsWon);
this.intPoints.SetScore(this.curStatus.Get());
var _local4 = new Vector();
_local4._x = xloc;
_local4._y = yloc;
var _local5 = this.CreateEffect("award", _local4, false, "", "");
_root[_local5].textClip_mc.gold_txt.text = goldWon + " G";
_root[_local5].textClip_mc.exp_txt.text = expWon + " Exp";
var _local6 = 0;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].blnDestroyed == false) {
_local6++;
}
_local3++;
}
var _local8 = Math.round(expWon / _local6);
var _local7 = false;
_local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].blnDestroyed == false) {
this.arrAllies[_local3].exp = this.arrAllies[_local3].exp + _local8;
this.turretData.SetInternalData(this.arrAllies[_local3].type, this.arrAllies[_local3].exp);
if (this.turretData.GetLevel() != this.arrAllies[_local3].intLevel) {
this.arrAllies[_local3].intLevel = this.turretData.GetLevel();
_local7 = true;
_local4 = new Vector();
_local4._x = _root[this.arrAllies[_local3].name]._x;
_local4._y = _root[this.arrAllies[_local3].name]._y - 10;
this.arrAllies[_local3].intPoints = this.arrAllies[_local3].intPoints + 2;
_local5 = this.CreateEffect("levelUp", _local4, false, "", "");
_root[_local5].textClip_mc.level_txt.text = ("Level " + this.arrAllies[_local3].intLevel) + "!";
}
}
_local3++;
}
if (_local7 == true) {
this.UpdateGunStats();
this.UpdateBuffs();
}
this._money.Set(this._money.Get() + goldWon);
};
_local2.UpdateGunStats = function () {
var _local2 = 0;
while (_local2 < this.arrAllies.length) {
_local2++;
}
};
_local2.AwardDamage = function (xloc, yloc, damageWon) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
var _local4 = this.CreateEffect("award2", _local3, false, "", "");
_root[_local4].textClip_mc.damage_txt.text = damageWon + "";
};
_local2.CleanEffects = function () {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
_root[this.arrEffects[_local3].name].removeMovieClip();
_local3++;
}
delete this.arrEffects;
this.arrEffects = new Array();
};
_local2.RemoveEffect = function (strName) {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
if (strName == this.arrEffects[_local3].name) {
_root[this.arrEffects[_local3].name].removeMovieClip();
this.arrEffects.splice(_local3, 1);
break;
}
_local3++;
}
};
_local2.AnimateEffects = function () {
var _local3 = 0;
while (_local3 < this.arrEffects.length) {
if (this.arrEffects[_local3].locked == true) {
_root[this.arrEffects[_local3].name]._x = _root[this.arrEffects[_local3].target]._x;
_root[this.arrEffects[_local3].name]._y = _root[this.arrEffects[_local3].target]._y;
}
if (this.arrEffects[_local3].rotate != "") {
var _local4 = new Vector();
_local4._x = _root[this.arrEffects[_local3].name]._x;
_local4._y = _root[this.arrEffects[_local3].name]._y;
var _local5 = new Vector();
_local5._x = _root[this.arrEffects[_local3].rotate]._x - _local4._x;
_local5._y = _root[this.arrEffects[_local3].rotate]._y - _local4._y;
var _local6 = Math.atan2(_local5._y, _local5._x);
var _local7 = (360 * _local6) / (Math.PI*2);
_root[this.arrEffects[_local3].name]._rotation = _local7;
}
_local3++;
}
};
_local2.GetClosestAlly = function (selectedUnit) {
var _local5 = 0;
var _local4 = 0;
var _local6 = 0;
var _local7 = 9999999999999;
var _local9 = -1;
var _local10;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].blnDestroyed == false) {
_local5 = selectedUnit._x - _root[this.arrAllies[_local3].name]._x;
_local4 = selectedUnit._y - _root[this.arrAllies[_local3].name]._y;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < _local7) {
_local7 = _local6;
_local9 = _local3;
}
}
_local3++;
}
_local10 = _root[this.arrAllies[_local9].name];
_local9 = -1;
_local3 = 0;
while (_local3 < this.arrFriendlies.length) {
_local5 = selectedUnit._x - _root[this.arrFriendlies[_local3].name]._x;
_local4 = selectedUnit._y - _root[this.arrFriendlies[_local3].name]._y;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < _local7) {
_local7 = _local6;
_local9 = _local3;
}
_local3++;
}
if (_local9 > -1) {
_local10 = _root[this.arrFriendlies[_local9].name];
}
return(_local10);
};
_local2.SelectClosestEnemyTarget = function (selectedUnit) {
var _local5 = 0;
var _local4 = 0;
var _local6 = 0;
var _local7 = 9999999999999;
var _local9 = -1;
var _local10;
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
if (_root[this.arrEnemies[_local3]].blnDestroyed == false) {
_local5 = selectedUnit._x - _root[this.arrEnemies[_local3]]._x;
_local4 = selectedUnit._y - _root[this.arrEnemies[_local3]]._y;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < _local7) {
_local7 = _local6;
_local9 = _local3;
}
}
_local3++;
}
_local10 = _root[this.arrEnemies[_local9]];
return(_local10);
};
_local2.GetRandomAlly = function () {
var _local5;
var _local4 = this.arrAllies.slice();
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].blnDestroyed == true) {
_local4.splice(_local3, 1);
_local3--;
}
_local3++;
}
var _local7 = _local4.length + this.arrFriendlies.length;
var _local6 = this.RandNum(1, _local7);
if (_local6 <= _local4.length) {
var _local8 = this.RandNum(0, _local4.length - 1);
_local3 = 0;
while (_local3 < this.arrAllies.length) {
if (_local4[_local8].name == this.arrAllies[_local3].name) {
_local8 = _local3;
_local5 = _root[this.arrAllies[_local8].name];
break;
}
_local3++;
}
} else {
var _local8 = this.RandNum(0, this.arrFriendlies.length - 1);
_local5 = _root[this.arrFriendlies[_local8].name];
}
return(_local5);
};
_local2.GetRandomAllyBelow = function (varTest) {
var _local3 = this.arrAllies.slice();
var _local4 = 0;
while (_local4 < _local3.length) {
if (_root[_local3[_local4].name]._y < varTest) {
_local3.splice(_local4, 1);
_local4--;
} else if (_local3[_local4].blnDestroyed == true) {
_local3.splice(_local4, 1);
_local4--;
}
_local4++;
}
var _local5 = this.RandNum(0, _local3.length - 1);
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (_local3[_local5].name == this.arrAllies[_local4].name) {
_local5 = _local4;
break;
}
_local4++;
}
return(_root[this.arrAllies[_local5].name]);
};
_local2.StartMouse = function () {
if (this.blnMouseActive == false) {
Mouse.addListener(this.mouseListener);
this.blnMouseActive = true;
}
};
_local2.StopMouse = function () {
if (this.blnMouseActive == true) {
Mouse.removeListener(this.mouseListener);
this.blnMouseActive = false;
}
};
_local2.StopMenuMouse = function () {
if (this.blnMenuMouseActive == true) {
Mouse.removeListener(this.mouseMenuListener);
this.blnMenuMouseActive = false;
}
};
_local2.StartMenuMouse = function () {
if (this.blnMenuMouseActive == false) {
Mouse.addListener(this.mouseMenuListener);
this.blnMenuMouseActive = true;
}
};
_local2.UpdateStorageSlots = function () {
var i = 0;
while (i < this.arrStorage.length) {
var clipRef = eval ("_root.icoOut.ico1." + this.arrStorage[i].iconName);
if (this.arrStorage[i].blnInUse == false) {
clipRef._visible = false;
} else {
clipRef._visible = true;
clipRef.gotoAndStop(this.arrStorage[i].gun.type);
}
i++;
}
};
_local2.CreateExtraSlots = function () {
_root.extraSlots_mc.gotoAndPlay("show");
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
};
_local2.StartBreakMode = function () {
this.StopMouse();
this.StartMenuMouse();
this.HideMeters();
this.HaltShaking();
this.HideHotkeyTips();
this.StopAllGuns();
this.blnBreakMode = true;
this.challengeTimer.Pause();
_root.icoOut.gotoAndPlay("show");
delete this.arrFriendliesDeaths;
this.arrFriendliesDeaths = new Array();
var clipRef;
var i = 0;
while (i < this.arrSlots.length) {
_root[this.arrSlots[i].outline]._visible = true;
_root[this.arrSlots[i].outline].gotoAndPlay(1);
var gunFound = -1;
clipRef = eval (("_root." + this.arrSlots[i].outline) + ".turretButton_mc");
var t = 0;
while (t < this.arrAllies.length) {
if (this.arrAllies[t].name == this.arrSlots[i].gunName) {
if (this.arrAllies[t].intLevel < 10) {
clipRef.level_txt.text = "0" + this.arrAllies[t].intLevel;
} else {
clipRef.level_txt.text = "" + this.arrAllies[t].intLevel;
}
if (this.arrAllies[t].intLevel == 0) {
clipRef.more_mc._visible = false;
clipRef.inside_mc._visible = false;
clipRef.border_mc._visible = false;
} else {
clipRef.more_mc._visible = true;
clipRef.inside_mc._visible = true;
clipRef.border_mc._visible = true;
clipRef.inside_mc._xscale = this.turretData.GetExpPercentage(this.arrAllies[t].exp);
}
gunFound = t;
break;
}
t++;
}
if (gunFound == -1) {
clipRef.more_mc._visible = false;
clipRef.inside_mc._visible = false;
clipRef.border_mc._visible = false;
}
i++;
}
_global.ResumeSong = "recharge";
if (_global.musicOn == true) {
_global.myMusicPlayer.SetMaxVolume(18);
_global.myMusicPlayer.SetTrack("recharge");
_global.myMusicPlayer.PlayWithCrossFade(8);
}
};
_local2.UpdateSlotInfo = function (slotIndex) {
var _local5 = -1;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
if (this.arrAllies[_local3].name == this.arrSlots[slotIndex].gunName) {
_root[this.arrSlots[slotIndex].outline].updateLevel = this.arrAllies[_local3].intLevel;
_root[this.arrSlots[slotIndex].outline].gotoAndPlay("refresh");
_root[this.arrSlots[slotIndex].outline].updateExp = this.turretData.GetExpPercentage(this.arrAllies[_local3].exp);
_local5 = _local3;
break;
}
_local3++;
}
if (_local5 == -1) {
_root[this.arrSlots[slotIndex].outline].updateLevel = 0;
_root[this.arrSlots[slotIndex].outline].updateExp = 0;
_root[this.arrSlots[slotIndex].outline].gotoAndPlay("refresh");
}
};
_local2.CloseBreakMode = function () {
if ((this.CheckLoseConditions() == false) || (this.blnAlertLock == true)) {
if (this.intPickedUp != 2) {
this.StopMenuMouse();
this.StartMouse();
this.challengeTimer.UnPause();
this.blnBreakMode = false;
_root.icoOut.gotoAndPlay("hide");
var _local4 = 0;
while (_local4 < this.arrSlots.length) {
_root[this.arrSlots[_local4].outline]._visible = false;
_local4++;
}
var _local5 = 0;
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (_root[this.arrAllies[_local4].blnSelected] == true) {
_local5++;
}
_local4++;
}
if (_local5 > 1) {
_local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].blnSelected] = false;
_local4++;
}
_local5 = 0;
}
if (_local5 == 0) {
_root[this.arrAllies[0].blnSelected] = true;
this.intGunSelected = 0;
_local4 = 1;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].blnSelected] = false;
_local4++;
}
}
if (this.arrAllies[this.intGunSelected].type == 12) {
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (this.arrAllies[_local4].type == 12) {
_root[this.arrAllies[_local4].name].gun.radio_mc._visible = true;
}
_local4++;
}
}
this.SetupMeters();
this.DisplayHotkeyTips();
this.RepairGunsInStorage();
this.myLevelManager.UpdateLevel(this._level.Get(), _global.currentCampaign);
this.myLevelManager.Start();
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.myLevelManager.GenerateChallengeLevel();
}
this.StartMines();
this.StartDecoys();
if ((this._level.Get() == 10) || (this._level.Get() == 35)) {
_global.ResumeSong = "bossIntro";
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack(_global.ResumeSong);
_global.myMusicPlayer.SetMaxVolume(70);
_global.myMusicPlayer.PlayWithCrossFade(4);
}
} else {
_global.ResumeSong = "main";
if (_global.musicOn == true) {
_global.myMusicPlayer.SetTrack(_global.ResumeSong);
_global.myMusicPlayer.SetMaxVolume(60);
_global.myMusicPlayer.PlayWithCrossFade(4);
}
}
}
} else if ((this.CheckLoseConditions() == true) && (this.blnAlertLock == false)) {
this.AlertStart();
}
};
_local2.StopAllGuns = function () {
var _local6 = 0;
while (_local6 < this.arrAllies.length) {
if (((((this.arrAllies[_local6].type == 2) || (this.arrAllies[this.intGunSelected].type == 19)) || (this.arrAllies[_local6].type == 11)) || (this.arrAllies[_local6].type == 12)) || (this.arrAllies[_local6].type == 18)) {
_root[this.arrAllies[_local6].name].gun.barrel.gotoAndStop("stop");
_global.SoundManager.StopMachineGunSound();
} else if (this.arrAllies[_local6].type == 10) {
if (this.blnMeteorsInProgress) {
_root[this.arrAllies[_local6].name].gun.gotoAndPlay("close");
this.blnMeteorsInProgress = false;
this.blnMeteors = false;
this.intMeteorDuration = 0;
}
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].creator == this.arrAllies[this.intGunSelected].name) {
_root[this.arrFriendlies[_local4].name].gun_1.gotoAndStop("stop");
break;
}
_local4++;
}
}
if (this.arrAllies[_local6].type == 12) {
_root[this.arrAllies[_local6].name].gun.radio_mc._visible = false;
}
if (this.arrAllies[_local6].type == 17) {
_root[this.arrAllies[_local6].name].gun.energy_mc._visible = false;
}
var _local5 = 0;
while (_local5 < this.arrShields.length) {
this.RemoveEffect(this.arrShields[_local5].name);
_local5++;
}
delete this.arrShields;
this.arrShields = new Array();
delete this.arrMineQueue;
this.arrMineQueue = new Array();
delete this.arrArtillery;
this.arrArtillery = new Array();
_local6++;
}
var _local7 = 0;
while (_local7 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local7].stay == false) {
_local6 = 0;
while (_local6 < this.arrAllies.length) {
if (this.arrAllies[_local6].name == this.arrFriendlies[_local7].creator) {
_root[this.arrAllies[_local6].name].gun.gotoAndStop("stop");
break;
}
_local6++;
}
_root[this.arrFriendlies[_local7].name].removeMovieClip();
this.arrFriendlies.splice(_local7, 1);
_local7--;
}
_local7++;
}
_local7 = 0;
while (_local7 < this.arrFriendliesDeaths.length) {
_local6 = 0;
while (_local6 < this.arrAllies.length) {
if (this.arrAllies[_local6].name == this.arrFriendliesDeaths[_local7]) {
if (this.arrAllies[_local6].type == 21) {
_root[this.arrAllies[_local6].name].gun.gotoAndStop("stop");
break;
}
}
_local6++;
}
_local7++;
}
this.DestroyMines();
_local6 = 0;
while (_local6 < this.arrBullets.length) {
if (_root[this.arrBullets[_local6]]._missile == true) {
_root[this.arrBullets[_local6]].removeMovieClip();
this.arrBullets.splice(_local6, 1);
_local6--;
}
_local6++;
}
};
_local2.SetupGun = function (myType, mySlotName, startUP) {
this.dragType = myType;
var _local2 = new GunData();
var _local3 = 0;
while (_local3 < this.arrSlots.length) {
if (this.arrSlots[_local3].name == mySlotName) {
this.arrSlots[_local3].blnOpen = false;
this.turretData.SetInternalData(this.dragType, 0);
_local2 = new GunData();
_local2.name = this.arrSlots[_local3].gunName;
_local2.timer = this.turretData.GetReloadMax();
_local2.timerReady = this.turretData.GetReloadMax();
_local2.timerRate = this.turretData.GetReloadRate();
_local2.power = 0;
_local2.chargeRate = this.turretData.GetChargeRate();
_local2.chargeMax = this.turretData.GetChargeMax();
_local2.blnSelected = false;
_local2.powerMeter = this.arrSlots[_local3].powerMeter;
_local2.loadMeter = this.arrSlots[_local3].loadMeter;
_local2.healthMeter = this.arrSlots[_local3].healthMeter;
_local2.intLevel = 1;
_local2.charging = false;
_local2.selectField = this.arrSlots[_local3].name;
_local2.type = this.dragType;
_local2.exp = 0;
_local2.damage = this.turretData.GetDamage();
_local2.damageTaken = 0;
_local2.totalLife = this.turretData.GetLife();
_local2.saveType = this.dragType;
_local2.blnDestroyed = false;
_local2.intPoints = startUP + this._challengeUpgradeBonus;
_local2.data = this.turretData.GetData();
_local2.numBullets = this.turretData.GetNumBullets();
_local2.range = this.turretData.GetRange();
this.arrAllies.push(_local2);
}
_local3++;
}
};
_local2.SetupUpgrade = function (mySlot, myUpgrade) {
var _local6 = "";
var _local4 = 0;
while (_local4 < this.arrSlots.length) {
if (this.arrSlots[_local4].name == mySlot) {
_local6 = this.arrSlots[_local4].gunName;
break;
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrSlots.length) {
if (this.arrAllies[_local4].name == _local6) {
var _local3 = this.turretData.GetUpgrades(this.arrAllies[_local4].saveType);
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].id == myUpgrade) {
this.arrAllies[_local4].arrUpgrades.push(_local3[_local2]);
break;
}
_local2++;
}
break;
}
_local4++;
}
};
_local2.IsAChallengeMission = function (myCampaign) {
var _local1 = false;
if (myCampaign == "challenge1_bt") {
_local1 = true;
} else if (myCampaign == "challenge2_bt") {
_local1 = true;
} else if (myCampaign.substr(0, 9) == "challenge") {
_local1 = true;
}
return(_local1);
};
// unexpected jump
// unexpected jump
_local2.SetupChallengeMission = function () {
var _local5 = SharedObject.getLocal(_global.loadSlot);
this._name = _local5.data.strName;
this._difficulty = _local5.data.strDifficulty;
if (this._name == undefined) {
this._name = _global.currentProfile.strName;
this._difficulty = _global.currentProfile.strDifficulty;
this.beatOceanCampaign.Load(_global.currentProfile.data5);
this.beatSkyCampaign.Load(_global.currentProfile.data6);
this.beatPlainsCampaign.Load(_global.currentProfile.data7);
this.beatPeaksCampaign.Load(_global.currentProfile.data8);
this.beatMountainCampaign.Load(_global.currentProfile.data9);
this.beatCityCampaign.Load(_global.currentProfile.data10);
this.beatSouthCampaign.Load(_global.currentProfile.data11);
this.beatDesertCampaign.Load(_global.currentProfile.data18);
if (_global.cheatsEnabled.Get() != -1) {
_global.cheatsEnabled.Load(_global.currentProfile.data12);
}
} else {
this.beatOceanCampaign.Load(_local5.data.data5);
this.beatSkyCampaign.Load(_local5.data.data6);
this.beatPlainsCampaign.Load(_local5.data.data7);
this.beatPeaksCampaign.Load(_local5.data.data8);
this.beatMountainCampaign.Load(_local5.data.data9);
this.beatCityCampaign.Load(_local5.data.data10);
this.beatSouthCampaign.Load(_local5.data.data11);
this.beatDesertCampaign.Load(_local5.data.data18);
if (_global.cheatsEnabled.Get() != -1) {
_global.cheatsEnabled.Load(_local5.data.data12);
}
}
this._campaign = _global.currentCampaign;
this._level.Set(1);
this._difficulty = "Challenge";
delete this.arrAllies;
delete this.arrStorage;
delete this.arrSlots;
this.arrStorage = new Array();
this.arrStorage.push({buttonName:"store0", iconName:"storeIcon0", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store1", iconName:"storeIcon1", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store2", iconName:"storeIcon2", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store3", iconName:"storeIcon3", blnInUse:false, gun:new GunData()});
this.arrSlots = new Array();
this.arrAllies = new Array();
if (_global.currentCampaign == "challenge1_bt") {
this._money.Set(0);
this._level.Set(1);
this._challengeUpgradeBonus = 0;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.SetupGun(1, "select1", 0);
this.SetupUpgrade("select1", 101);
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge2_bt") {
this._money.Set(60000);
this._level.Set(1);
this._challengeUpgradeBonus = 15;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge3_bt") {
this._money.Set(15000);
this._level.Set(1);
this._challengeUpgradeBonus = 10;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
this.SetupGun(16, "select2", 0);
this.SetupGun(9, "select5", 0);
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge4_bt") {
this._money.Set(0);
this._level.Set(1);
this._challengeUpgradeBonus = 0;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.SetupGun(22, "select1", 10);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2203);
this.SetupUpgrade("select1", 2202);
this.SetupUpgrade("select1", 2202);
this.SetupUpgrade("select1", 2202);
this.SetupUpgrade("select1", 2202);
this.SetupUpgrade("select1", 2202);
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge5_bt") {
this._money.Set(10000);
this._level.Set(1);
this._challengeUpgradeBonus = 10;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.SetupGun(8, "select1", 0);
this.SetupGun(5, "select2", 0);
this.SetupGun(5, "select3", 0);
this.SetupGun(5, "select4", 0);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 503);
this.SetupUpgrade("select2", 501);
this.SetupUpgrade("select2", 501);
this.SetupUpgrade("select2", 501);
this.SetupUpgrade("select2", 501);
this.SetupUpgrade("select2", 504);
this.SetupUpgrade("select2", 504);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 503);
this.SetupUpgrade("select3", 501);
this.SetupUpgrade("select3", 501);
this.SetupUpgrade("select3", 501);
this.SetupUpgrade("select3", 501);
this.SetupUpgrade("select3", 504);
this.SetupUpgrade("select3", 504);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 503);
this.SetupUpgrade("select4", 501);
this.SetupUpgrade("select4", 501);
this.SetupUpgrade("select4", 501);
this.SetupUpgrade("select4", 501);
this.SetupUpgrade("select4", 504);
this.SetupUpgrade("select4", 504);
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge6_bt") {
this._money.Set(12000);
this._level.Set(1);
this._challengeUpgradeBonus = 0;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.SetupGun(23, "select1", 12);
this.SetupGun(23, "select3", 12);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select1", 2303);
this.SetupUpgrade("select3", 2303);
this.SetupUpgrade("select3", 2303);
this.SetupUpgrade("select3", 2303);
this.SetupUpgrade("select3", 2303);
this.SetupUpgrade("select3", 2303);
this.SetupUpgrade("select3", 2303);
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge7_bt") {
this._money.Set(85000);
this._level.Set(1);
this._challengeUpgradeBonus = 15;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge8_bt") {
this._money.Set(25000);
this._level.Set(1);
this._challengeUpgradeBonus = 20;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.challengeTimer.Start();
} else if (_global.currentCampaign == "challenge9_bt") {
this._money.Set(75000);
this._level.Set(1);
this._challengeUpgradeBonus = 15;
this.intLastDeluxeLevel = 1;
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.challengeTimer.Start();
}
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].name]._visible = true;
_root[this.arrAllies[_local4].name].gotoAndStop(this.arrAllies[_local4].type);
_local4++;
}
};
_local2.GetChallengeTitle = function () {
var _local2 = 0;
while (_local2 < _global.Challenges.length) {
if (_global.Challenges[_local2].strButton == _global.currentCampaign) {
return(_global.Challenges[_local2].strTitle);
}
_local2++;
}
};
_local2.GetChallengeDescription = function () {
var _local2 = 0;
while (_local2 < _global.Challenges.length) {
if (_global.Challenges[_local2].strButton == _global.currentCampaign) {
return(_global.Challenges[_local2].strDescription);
}
_local2++;
}
};
_local2.GetChallengeURL = function () {
var _local3 = 0;
while (_local3 < _global.Challenges.length) {
if (_global.Challenges[_local3].strButton == this.savedChallenge) {
return(_global.Challenges[_local3].url);
}
_local3++;
}
};
_local2.LoadGame = function (intSlot) {
var _local5 = SharedObject.getLocal(_global.loadSlot);
this._money.Load(_local5.data.data1);
this._name = _local5.data.strName;
this._challengeUpgradeBonus = 0;
if (this._name != undefined) {
this._level.Load(_local5.data.data2);
this._difficulty = _local5.data.strDifficulty;
this._campaign = _local5.data.strCampaign;
if (_global.currentCampaign != this._campaign) {
this._level.Set(1);
this._campaign = _global.currentCampaign;
}
if (_global.forceCampaignRestart == true) {
this._level.Set(1);
_global.forceCampaignRestart = false;
}
this.beatOceanCampaign.Load(_local5.data.data5);
this.beatSkyCampaign.Load(_local5.data.data6);
this.beatPlainsCampaign.Load(_local5.data.data7);
this.beatPeaksCampaign.Load(_local5.data.data8);
this.beatMountainCampaign.Load(_local5.data.data9);
this.beatCityCampaign.Load(_local5.data.data10);
this.beatSouthCampaign.Load(_local5.data.data11);
this.beatDesertCampaign.Load(_local5.data.data18);
if (_global.cheatsEnabled.Get() != -1) {
_global.cheatsEnabled.Load(_local5.data.data12);
}
delete this.arrAllies;
delete this.arrStorage;
delete this.arrSlots;
var _local8 = new DataObject();
var _local9 = new DataObject();
var _local10 = new DataObject();
var _local6 = new DataObject();
var _local7 = new DataObject();
_local8.Load(_local5.data.data13);
_local9.Load(_local5.data.data14);
_local10.Load(_local5.data.data15);
_local6.Load(_local5.data.data16);
_local7.Load(_local5.data.data17);
if (this._level.Get() > 1) {
this.arrStorage = _local5.data.arrStorage;
this.arrSlots = _local5.data.arrSlots;
this.arrAllies = _local5.data.arrAllies;
if (this.arrAllies.length > 0) {
if (_local8.Get() != this.arrAllies[0].intPoints) {
this.arrAllies[0].intPoints = 0;
}
}
if (this.arrAllies.length > 1) {
if (_local9.Get() != this.arrAllies[1].intPoints) {
this.arrAllies[1].intPoints = 0;
}
}
if (this.arrAllies.length > 2) {
if (_local10.Get() != this.arrAllies[2].intPoints) {
this.arrAllies[2].intPoints = 0;
}
}
if (this.arrAllies.length > 3) {
if (_local6.Get() != this.arrAllies[3].intPoints) {
this.arrAllies[3].intPoints = 0;
}
}
if (this.arrAllies.length > 4) {
if (_local7.Get() != this.arrAllies[4].intPoints) {
this.arrAllies[4].intPoints = 0;
}
}
} else {
if (_global.currentCampaign == "ocean_bt") {
_global.startMoney = 2500;
} else if (_global.currentCampaign == "peaks_bt") {
_global.startMoney = 7500;
} else if (_global.currentCampaign == "plains_bt") {
_global.startMoney = 10000;
} else if (_global.currentCampaign == "pass_bt") {
_global.startMoney = 10000;
} else if (_global.currentCampaign == "city_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "desert_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "sky_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "south_bt") {
_global.startMoney = 30000;
}
if (_global.currentCampaign == "ocean_bt") {
this._difficulty = "Easy";
} else if (_global.currentCampaign == "peaks_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "plains_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "pass_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "city_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "desert_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "sky_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "south_bt") {
this._difficulty = "Insane";
}
this._money.Set(_global.startMoney + (this.GetNumCampaignsWon() * 5000));
this.arrAllies = new Array();
this.arrStorage = new Array();
this.arrStorage.push({buttonName:"store0", iconName:"storeIcon0", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store1", iconName:"storeIcon1", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store2", iconName:"storeIcon2", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store3", iconName:"storeIcon3", blnInUse:false, gun:new GunData()});
this.arrSlots = new Array();
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
if ((((_global.currentCampaign == "peaks_bt") || (_global.currentCampaign == "ocean_bt")) || (_global.currentCampaign == "pass_bt")) || (_global.currentCampaign == "plains_bt")) {
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
} else if ((((_global.currentCampaign == "south_bt") || (_global.currentCampaign == "city_bt")) || (_global.currentCampaign == "sky_bt")) || (_global.currentCampaign == "desert_bt")) {
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
}
}
} else {
this._money.Load(_global.currentProfile.data1);
this._name = _global.currentProfile.strName;
this._level.Load(_global.currentProfile.data2);
this._difficulty = _global.currentProfile.strDifficulty;
this._campaign = _global.currentProfile.strCampaign;
if (_global.currentCampaign != this._campaign) {
this._level.Set(1);
this._money.Set(_global.startMoney);
this._campaign = _global.currentCampaign;
}
if (_global.forceCampaignRestart == true) {
this._level.Set(1);
_global.forceCampaignRestart = false;
}
this.beatOceanCampaign.Load(_global.currentProfile.data5);
this.beatSkyCampaign.Load(_global.currentProfile.data6);
this.beatPlainsCampaign.Load(_global.currentProfile.data7);
this.beatPeaksCampaign.Load(_global.currentProfile.data8);
this.beatMountainCampaign.Load(_global.currentProfile.data9);
this.beatCityCampaign.Load(_global.currentProfile.data10);
this.beatSouthCampaign.Load(_global.currentProfile.data11);
this.beatDesertCampaign.Load(_global.currentProfile.data18);
if (_global.cheatsEnabled.Get() != -1) {
_global.cheatsEnabled.Load(_global.currentProfile.data12);
}
if (this._level.Get() > 1) {
this.arrStorage = _global.currentProfile.arrStorage;
this.arrSlots = _global.currentProfile.arrSlots;
this.arrAllies = _global.currentProfile.arrAllies;
} else {
if (_global.currentCampaign == "ocean_bt") {
_global.startMoney = 2500;
} else if (_global.currentCampaign == "peaks_bt") {
_global.startMoney = 7500;
} else if (_global.currentCampaign == "plains_bt") {
_global.startMoney = 10000;
} else if (_global.currentCampaign == "pass_bt") {
_global.startMoney = 10000;
} else if (_global.currentCampaign == "city_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "desert_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "sky_bt") {
_global.startMoney = 15000;
} else if (_global.currentCampaign == "south_bt") {
_global.startMoney = 30000;
}
if (_global.currentCampaign == "ocean_bt") {
this._difficulty = "Easy";
} else if (_global.currentCampaign == "peaks_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "plains_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "pass_bt") {
this._difficulty = "Normal";
} else if (_global.currentCampaign == "city_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "desert_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "sky_bt") {
this._difficulty = "Hard";
} else if (_global.currentCampaign == "south_bt") {
this._difficulty = "Insane";
}
this._money.Set(_global.startMoney + (this.GetNumCampaignsWon() * 5000));
this.arrAllies = new Array();
this.arrStorage = new Array();
this.arrStorage.push({buttonName:"store0", iconName:"storeIcon0", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store1", iconName:"storeIcon1", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store2", iconName:"storeIcon2", blnInUse:false, gun:new GunData()});
this.arrStorage.push({buttonName:"store3", iconName:"storeIcon3", blnInUse:false, gun:new GunData()});
this.arrSlots = new Array();
this.arrSlots.push({name:"select1", blnOpen:true, powerMeter:"power1", loadMeter:"load1", healthMeter:"health1", gunName:"avatar_gun1_mc", outline:"outline1"});
this.arrSlots.push({name:"select2", blnOpen:true, powerMeter:"power2", loadMeter:"load2", healthMeter:"health2", gunName:"avatar_gun2_mc", outline:"outline2"});
this.arrSlots.push({name:"select3", blnOpen:true, powerMeter:"power3", loadMeter:"load3", healthMeter:"health3", gunName:"avatar_gun3_mc", outline:"outline3"});
if ((((_global.currentCampaign == "peaks_bt") || (_global.currentCampaign == "ocean_bt")) || (_global.currentCampaign == "pass_bt")) || (_global.currentCampaign == "plains_bt")) {
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
} else if ((((_global.currentCampaign == "south_bt") || (_global.currentCampaign == "city_bt")) || (_global.currentCampaign == "sky_bt")) || (_global.currentCampaign == "desert_bt")) {
this.arrSlots.push({name:"select4", blnOpen:true, powerMeter:"power4", loadMeter:"load4", healthMeter:"health4", gunName:"avatar_gun4_mc", outline:"outline4"});
this.arrSlots.push({name:"select5", blnOpen:true, powerMeter:"power5", loadMeter:"load5", healthMeter:"health5", gunName:"avatar_gun5_mc", outline:"outline5"});
}
}
}
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].name]._visible = true;
_root[this.arrAllies[_local4].name].gotoAndStop(this.arrAllies[_local4].type);
_local4++;
}
};
_local2.StartTutorial = function () {
this.PauseGame();
this.blnAlertLock = true;
_root.tutorial._visible = true;
_root.tutorial.gotoAndPlay(1);
};
_local2.EndTutorial = function () {
this.UnPauseGame();
this.blnAlertLock = false;
_root.tutorial._visible = false;
};
_local2.EndTutorialAndStart = function () {
this.StartBreakMode();
this.UnPauseGame();
this.blnAlertLock = false;
_root.tutorial._visible = false;
};
_local2.SlideScreenUp = function () {
this.CloseBreakMode();
this.PauseGame();
};
_local2.SlideScreenDown = function () {
this.StartBreakMode();
this.PauseGame();
};
_local2.PauseGame = function () {
_global.gamePaused = true;
var _local5 = 0;
while (_local5 < this.arrBullets.length) {
_root[this.arrBullets[_local5]]._holdMovement = true;
_local5++;
}
_local5 = 0;
while (_local5 < this.arrEnemies.length) {
_root[this.arrEnemies[_local5]].TurnOff();
_local5++;
}
_local5 = 0;
while (_local5 < this.arrFriendlies.length) {
_root[this.arrFriendlies[_local5].name].TurnOff();
_local5++;
}
if (this.blnBreakMode == true) {
this.StopMenuMouse();
} else {
this.StopMouse();
}
this.challengeTimer.Pause();
_local5 = 0;
while (_local5 < this.arrAllies.length) {
if (((((this.arrAllies[_local5].type == 2) || (this.arrAllies[_local5].type == 11)) || (this.arrAllies[_local5].type == 12)) || (this.arrAllies[_local5].type == 18)) || (this.arrAllies[this.intGunSelected].type == 19)) {
if (this.arrAllies[_local5].charging == true) {
this.arrAllies[_local5].charging = false;
_root[this.arrAllies[_local5].name].gun.barrel.gotoAndStop("stop");
_global.SoundManager.StopMachineGunSound();
}
} else if (this.arrAllies[this.intGunSelected].type == 21) {
var _local4 = 0;
while (_local4 < this.arrFriendlies.length) {
if (this.arrFriendlies[_local4].creator == this.arrAllies[this.intGunSelected].name) {
_root[this.arrFriendlies[_local4].name].gun_1.gotoAndStop("stop");
this.arrAllies[this.intGunSelected].charging = false;
break;
}
_local4++;
}
}
_local5++;
}
};
_local2.UnPauseGame = function () {
_global.gamePaused = false;
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]]._holdMovement = false;
_local4++;
}
_local4 = 0;
while (_local4 < this.arrEnemies.length) {
_root[this.arrEnemies[_local4]].TurnOn();
_local4++;
}
_local4 = 0;
while (_local4 < this.arrFriendlies.length) {
_root[this.arrFriendlies[_local4].name].TurnOn();
_local4++;
}
this.challengeTimer.UnPause();
if (this.blnBreakMode == true) {
this.StartMenuMouse();
} else {
this.StartMouse();
}
};
_local2.ResetGame = function () {
if (this.blnBreakMode == false) {
this.StopAllGuns();
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < this.arrEnemies.length) {
_root[this.arrEnemies[_local4]].Cleanup();
_root[this.arrEnemies[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < this.arrFriendlies.length) {
_root[this.arrFriendlies[_local4].name].removeMovieClip();
_local4++;
}
delete this.arrBullets;
this.arrBullets = new Array();
delete this.arrEnemies;
this.arrEnemies = new Array();
delete this.arrFriendlies;
this.arrFriendlies = new Array();
_local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].name]._visible = false;
_local4++;
}
_global.gamePaused = false;
this.curStatus.Set(0);
this.intPoints.SetStartPoints(0);
_root.score_txt.text = 0;
this.intBulletsShot = 0;
this.intBulletsMissed = 0;
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.SetupChallengeMission();
} else {
this.LoadGame(_global.loadSlot);
}
this.StartBreakMode();
}
};
_local2.ResetCampaign = function () {
if (this.blnBreakMode == false) {
_global.forceCampaignRestart = true;
this.ResetGame();
}
};
_local2.CloseGame = function () {
var _local4 = 0;
while (_local4 < this.arrBullets.length) {
_root[this.arrBullets[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < this.arrEnemies.length) {
_root[this.arrEnemies[_local4]].Cleanup();
_root[this.arrEnemies[_local4]].removeMovieClip();
_local4++;
}
_local4 = 0;
while (_local4 < this.arrFriendlies.length) {
_root[this.arrFriendlies[_local4].name].removeMovieClip();
_local4++;
}
delete this.arrBullets;
this.arrBullets = new Array();
delete this.arrEnemies;
this.arrEnemies = new Array();
delete this.arrFriendlies;
this.arrFriendlies = new Array();
_root.screenEffects_mc.swapDepths(this.intSaveScreenEffectsDepth);
_root.flash_mc.swapDepths(this.intSaveFlashDepth);
_root.output_mc.swapDepths(this.intSaveOutputDepth);
_root.menu_mc.swapDepths(this.intSaveMenuDepth);
_root.cover.swapDepths(this.intSaveCoverDepth);
_root.waveMeter_mc.swapDepths(this.intSaveWaveMeterDepth);
this.StopMouse();
this.StopMenuMouse();
_root.doors._visible = true;
_global.levelClose = true;
_root.doors.gotoAndPlay("closing");
};
_local2.WonGame = function () {
if (_global.currentCampaign == "ocean_bt") {
this.beatOceanCampaign.Set(872406);
} else if (_global.currentCampaign == "peaks_bt") {
this.beatPeaksCampaign.Set(872406);
} else if (_global.currentCampaign == "plains_bt") {
this.beatPlainsCampaign.Set(872406);
} else if (_global.currentCampaign == "pass_bt") {
this.beatMountainCampaign.Set(872406);
} else if (_global.currentCampaign == "city_bt") {
this.beatCityCampaign.Set(872406);
} else if (_global.currentCampaign == "sky_bt") {
this.beatSkyCampaign.Set(872406);
} else if (_global.currentCampaign == "south_bt") {
this.beatSouthCampaign.Set(872406);
} else if (_global.currentCampaign == "desert_bt") {
this.beatDesertCampaign.Set(445973);
}
this._level.Set(1);
_global.currentCampaign = "none";
this.SaveGame();
};
_local2.CheckLoseConditions = function () {
var _local3 = true;
var _local2 = 0;
while (_local2 < this.arrAllies.length) {
if (this.arrAllies[_local2].blnDestroyed == false) {
if (((this.arrAllies[_local2].type != 4) && (this.arrAllies[_local2].type != 8)) && (this.arrAllies[_local2].type != 9)) {
_local3 = false;
}
}
_local2++;
}
return(_local3);
};
_local2.Lose = function () {
_root.output_mc._visible = true;
this.savedChallenge = _global.currentCampaign;
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
_root.output_mc.gotoAndPlay("LoseChallenge");
} else {
_root.output_mc.gotoAndPlay("lose");
}
this.HaltShaking();
this.PauseGame();
};
_local2.MenuPressed = function () {
if (_global.gamePaused == true) {
} else {
this.PauseGame();
this.StartMenu();
}
};
_local2.StartMenu = function () {
_root.menu_mc._visible = true;
_root.menu_mc.gotoAndPlay(1);
};
_local2.CloseMenu = function () {
_root.menu_mc._visible = false;
this.UnPauseGame();
};
_local2.HideMeters = function () {
_root.waveMeter_mc._visible = false;
var _local3 = 0;
while (_local3 < this.arrSlots.length) {
_root[this.arrSlots[_local3].powerMeter]._visible = false;
_root[this.arrSlots[_local3].loadMeter]._visible = false;
_root[this.arrSlots[_local3].healthMeter]._visible = false;
_local3++;
}
};
_local2.SetupMeters = function () {
this.UpdateBuffs();
_root.waveMeter_mc._visible = true;
_root.waveMeter_mc.inside._xscale = 0;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
_root[this.arrAllies[_local3].healthMeter]._visible = true;
this.UpdateGunHealth(_local3);
_root[this.arrAllies[_local3].loadMeter]._visible = true;
if (this.arrAllies[_local3].blnDestroyed == false) {
this.arrAllies[_local3].timer = this.arrAllies[_local3].timerReady;
_root[this.arrAllies[_local3].loadMeter].gotoAndPlay(2);
}
_local3++;
}
};
_local2.PickUpGun = function () {
if (this.intPickedUp != 0) {
return(undefined);
}
var hitFlag = false;
if (_root.newGun_mc.hitTest(_xmouse, _ymouse, false)) {
this.dragType = Number(_root.icoOut.ico1.GetTurretType().substr(6, 2));
this.CreateDragGun(this.dragType);
this.dragGunDest._x = (_root.newGun_mc._x - 5) + (_root.newGun_mc._width / 2);
this.dragGunDest._y = _root.newGun_mc._y + (_root.newGun_mc._height / 2);
_root[this.dragGunName].startDrag(true);
_root.icoOut.ico1.turret_transition.gotoAndStop("hide");
this.intPickedUp = 1;
this.strPickUpType = "buy";
hitFlag = true;
}
if (hitFlag == false) {
var i = 0;
while (i < this.arrStorage.length) {
if (this.arrStorage[i].blnInUse == true) {
if (_root[this.arrStorage[i].buttonName].hitTest(_xmouse, _ymouse, false)) {
this.dragType = Number(this.arrStorage[i].gun.type);
this.CreateDragGun(this.dragType);
var clipRef = eval ("_root.icoOut.ico1." + this.arrStorage[i].iconName);
var pointObj = new Object({x:clipRef._x, y:clipRef._y});
_root.icoOut.ico1.localToGlobal(pointObj);
this.dragGunDest._x = pointObj.x;
this.dragGunDest._y = pointObj.y;
clipRef._visible = false;
_root[this.dragGunName].startDrag(true);
this.intPickedUp = 1;
this.strPickUpType = "storage";
this.intPickUpSlot = i;
this.UpdateRepairSell(false, this.arrStorage[i].gun.type, this.arrStorage[i].gun.totalLife, this.arrStorage[i].gun.damageTaken, this.arrStorage[i].gun.saveType);
hitFlag = true;
break;
}
}
i++;
}
}
if (hitFlag == false) {
var i = 0;
while (i < this.arrSlots.length) {
if (this.arrSlots[i].blnOpen == false) {
if (_root[this.arrSlots[i].name].hitTest(_xmouse, _ymouse, false)) {
var selectedGun = -1;
var p = 0;
while (p < this.arrAllies.length) {
if (this.arrAllies[p].name == this.arrSlots[i].gunName) {
selectedGun = p;
break;
}
p++;
}
this.dragType = Number(this.arrAllies[selectedGun].type);
this.CreateDragGun(this.dragType);
this.dragGunDest._x = _root[this.arrSlots[i].gunName]._x;
this.dragGunDest._y = _root[this.arrSlots[i].gunName]._y;
_root[this.arrSlots[i].gunName]._visible = false;
_root[this.dragGunName].startDrag(true);
this.intPickedUp = 1;
this.strPickUpType = "slot";
this.intPickUpSlot = i;
this.UpdateRepairSell(false, this.arrAllies[selectedGun].type, this.arrAllies[selectedGun].totalLife, this.arrAllies[selectedGun].damageTaken, this.arrAllies[selectedGun].saveType);
hitFlag = true;
return;
}
}
i++;
}
}
};
_local2.DropGun = function () {
if (this.intPickedUp == 1) {
var blnHit = false;
this.intAutoMoveCounter = 0;
var blnValid = true;
var tempGun;
if (this.strPickUpType == "buy") {
if (this._money.Get() < _root.icoOut.ico1.GetTurretCost()) {
blnValid = false;
}
}
if (blnValid == true) {
var i = 0;
while (i < this.arrSlots.length) {
if (_root[this.arrSlots[i].name].hitTest(_xmouse, _ymouse, false)) {
if (this.arrSlots[i].blnOpen == true) {
_root[this.dragGunName].stopDrag();
_root[this.dragGunName].removeMovieClip();
_root[this.arrSlots[i].gunName]._visible = true;
_root[this.arrSlots[i].gunName].gotoAndStop(this.dragType);
if (this.strPickUpType == "storage") {
this.arrStorage[this.intPickUpSlot].blnInUse = false;
this.turretData.SetInternalData(this.dragType, this.arrStorage[this.intPickUpSlot].gun.exp);
this.arrStorage[this.intPickUpSlot].gun.name = this.arrSlots[i].gunName;
this.arrStorage[this.intPickUpSlot].gun.powerMeter = this.arrSlots[i].powerMeter;
this.arrStorage[this.intPickUpSlot].gun.loadMeter = this.arrSlots[i].loadMeter;
this.arrStorage[this.intPickUpSlot].gun.healthMeter = this.arrSlots[i].healthMeter;
this.arrStorage[this.intPickUpSlot].gun.selectField = this.arrSlots[i].name;
this.arrAllies.push(this.arrStorage[this.intPickUpSlot].gun);
this.UpdateSlotInfo(i);
} else if (this.strPickUpType == "buy") {
this._money.Set(this._money.Get() - _root.icoOut.ico1.GetTurretCost());
_root.icoOut.ico1.UpdateGold();
_root.icoOut.ico1.turret_transition.gotoAndStop(("turret" + this.dragType) + "_APPEAR");
this.turretData.SetInternalData(this.dragType, 0);
tempGun = new GunData();
tempGun.name = this.arrSlots[i].gunName;
tempGun.timer = this.turretData.GetReloadMax();
tempGun.timerReady = this.turretData.GetReloadMax();
tempGun.timerRate = this.turretData.GetReloadRate();
tempGun.power = 0;
tempGun.chargeRate = this.turretData.GetChargeRate();
tempGun.chargeMax = this.turretData.GetChargeMax();
tempGun.blnSelected = false;
tempGun.powerMeter = this.arrSlots[i].powerMeter;
tempGun.loadMeter = this.arrSlots[i].loadMeter;
tempGun.healthMeter = this.arrSlots[i].healthMeter;
tempGun.intLevel = 1;
tempGun.charging = false;
tempGun.selectField = this.arrSlots[i].name;
tempGun.type = this.dragType;
tempGun.exp = 0;
tempGun.damage = this.turretData.GetDamage();
tempGun.damageTaken = 0;
tempGun.totalLife = this.turretData.GetLife();
tempGun.saveType = this.dragType;
tempGun.blnDestroyed = false;
tempGun.intPoints = (0 + (this.GetNumCampaignsWon() * 2)) + this._challengeUpgradeBonus;
tempGun.data = this.turretData.GetData();
tempGun.numBullets = this.turretData.GetNumBullets();
tempGun.range = this.turretData.GetRange();
this.arrAllies.push(tempGun);
this.UpdateSlotInfo(i);
} else if (this.strPickUpType == "slot") {
this.arrSlots[this.intPickUpSlot].blnOpen = true;
var deleteGun = -1;
var t = 0;
while (t < this.arrAllies.length) {
if (this.arrAllies[t].name == this.arrSlots[this.intPickUpSlot].gunName) {
deleteGun = t;
break;
}
t++;
}
this.turretData.SetInternalData(this.arrAllies[deleteGun].type, this.arrAllies[deleteGun].exp);
tempGun = this.arrAllies[deleteGun];
tempGun.name = this.arrSlots[i].gunName;
tempGun.powerMeter = this.arrSlots[i].powerMeter;
tempGun.loadMeter = this.arrSlots[i].loadMeter;
tempGun.healthMeter = this.arrSlots[i].healthMeter;
tempGun.selectField = this.arrSlots[i].name;
this.arrAllies.push(tempGun);
this.UpdateSlotInfo(i);
this.UpdateSlotInfo(this.intPickUpSlot);
if (deleteGun != -1) {
this.arrAllies.splice(deleteGun, 1);
}
}
this.arrSlots[i].blnOpen = false;
this.intPickedUp = 0;
blnHit = true;
break;
}
var selectedStorage = -1;
var j = 0;
while (j < this.arrStorage.length) {
if (this.arrStorage[j].blnInUse == false) {
selectedStorage = j;
break;
}
j++;
}
if (this.strPickUpType == "storage") {
selectedStorage = this.intPickUpSlot;
}
if (this.strPickUpType == "slot") {
if (this.intPickUpSlot == i) {
selectedStorage = -1;
}
}
if (selectedStorage == -1) {
_root[this.dragGunName].stopDrag();
this.intPickedUp = 2;
blnHit = true;
break;
}
var selectedGun = -1;
var p = 0;
while (p < this.arrAllies.length) {
if (this.arrAllies[p].name == this.arrSlots[i].gunName) {
selectedGun = p;
break;
}
p++;
}
if (this.strPickUpType == "buy") {
this._money.Set(this._money.Get() - _root.icoOut.ico1.GetTurretCost());
_root.icoOut.ico1.UpdateGold();
this.arrStorage[selectedStorage].blnInUse = true;
this.arrStorage[selectedStorage].gun = this.arrAllies[selectedGun];
this.turretData.SetInternalData(this.dragType, 0);
delete this.arrAllies[selectedGun];
this.arrAllies.splice(selectedGun, 1);
tempGun = new GunData();
tempGun.name = this.arrSlots[i].gunName;
tempGun.timer = this.turretData.GetReloadMax();
tempGun.timerReady = this.turretData.GetReloadMax();
tempGun.timerRate = this.turretData.GetReloadRate();
tempGun.power = 0;
tempGun.chargeRate = this.turretData.GetChargeRate();
tempGun.chargeMax = this.turretData.GetChargeMax();
tempGun.blnSelected = false;
tempGun.powerMeter = this.arrSlots[i].powerMeter;
tempGun.loadMeter = this.arrSlots[i].loadMeter;
tempGun.healthMeter = this.arrSlots[i].healthMeter;
tempGun.intLevel = 1;
tempGun.charging = false;
tempGun.selectField = this.arrSlots[i].name;
tempGun.type = this.dragType;
tempGun.exp = 0;
tempGun.damage = this.turretData.GetDamage();
tempGun.damageTaken = 0;
tempGun.totalLife = this.turretData.GetLife();
tempGun.saveType = this.dragType;
tempGun.blnDestroyed = false;
tempGun.intPoints = (0 + (this.GetNumCampaignsWon() * 2)) + this._challengeUpgradeBonus;
tempGun.data = this.turretData.GetData();
tempGun.numBullets = this.turretData.GetNumBullets();
tempGun.range = this.turretData.GetRange();
this.arrAllies.push(tempGun);
this.UpdateSlotInfo(i);
} else if (this.strPickUpType == "storage") {
tempGun = this.arrStorage[selectedStorage].gun;
this.arrStorage[selectedStorage].blnInUse = true;
this.arrStorage[selectedStorage].gun = this.arrAllies[selectedGun];
tempGun.name = this.arrSlots[i].gunName;
tempGun.powerMeter = this.arrSlots[i].powerMeter;
tempGun.loadMeter = this.arrSlots[i].loadMeter;
tempGun.healthMeter = this.arrSlots[i].healthMeter;
tempGun.selectField = this.arrSlots[i].name;
this.arrAllies[selectedGun] = tempGun;
this.UpdateSlotInfo(i);
} else if (this.strPickUpType == "slot") {
var otherGun = -1;
var p = 0;
while (p < this.arrAllies.length) {
if (this.arrAllies[p].name == this.arrSlots[this.intPickUpSlot].gunName) {
otherGun = p;
break;
}
p++;
}
this.arrStorage[selectedStorage].blnInUse = true;
this.arrStorage[selectedStorage].gun = this.arrAllies[selectedGun];
this.turretData.SetInternalData(this.dragType, this.arrAllies[this.intPickUpSlot].exp);
this.arrAllies[selectedGun] = this.arrAllies[otherGun];
this.arrAllies[selectedGun].name = this.arrSlots[i].gunName;
this.arrAllies[selectedGun].powerMeter = this.arrSlots[i].powerMeter;
this.arrAllies[selectedGun].loadMeter = this.arrSlots[i].loadMeter;
this.arrAllies[selectedGun].healthMeter = this.arrSlots[i].healthMeter;
this.arrAllies[selectedGun].selectField = this.arrSlots[i].name;
this.arrSlots[this.intPickUpSlot].blnOpen = true;
delete this.arrAllies[otherGun];
if (otherGun != -1) {
this.arrAllies.splice(otherGun, 1);
}
this.UpdateSlotInfo(i);
this.UpdateSlotInfo(this.intPickUpSlot);
}
_root[this.dragGunName].gotoAndStop(this.arrStorage[selectedStorage].gun.type);
_root[this.dragGunName].stopDrag();
this.intPickedUp = 2;
var clipRef = eval ("_root.icoOut.ico1." + this.arrStorage[selectedStorage].iconName);
var pointObj = new Object({x:clipRef._x, y:clipRef._y});
_root.icoOut.ico1.localToGlobal(pointObj);
this.dragGunDest._x = pointObj.x;
this.dragGunDest._y = pointObj.y;
_root[this.arrSlots[i].gunName]._visible = true;
_root[this.arrSlots[i].gunName].gotoAndStop(this.dragType);
if (this.strPickUpType == "buy") {
_root.icoOut.ico1.turret_transition.gotoAndStop(("turret" + this.dragType) + "_APPEAR");
}
this.strPickUpType = "storage";
this.intPickUpSlot = selectedStorage;
blnHit = true;
break;
}
i++;
}
var i = 0;
while (i < this.arrStorage.length) {
if (_root[this.arrStorage[i].buttonName].hitTest(_xmouse, _ymouse, false)) {
if (this.arrStorage[i].blnInUse == false) {
if (this.strPickUpType == "storage") {
this.arrStorage[this.intPickUpSlot].blnInUse = false;
this.arrStorage[i].blnInUse = true;
this.arrStorage[i].gun = this.arrStorage[this.intPickUpSlot].gun;
} else if (this.strPickUpType == "buy") {
this._money.Set(this._money.Get() - _root.icoOut.ico1.GetTurretCost());
_root.icoOut.ico1.UpdateGold();
_root.icoOut.ico1.turret_transition.gotoAndStop(("turret" + this.dragType) + "_APPEAR");
this.arrStorage[i].blnInUse = true;
tempGun = new GunData();
tempGun.name = this.arrSlots[i].gunName;
tempGun.timer = this.turretData.GetReloadMax();
tempGun.timerReady = this.turretData.GetReloadMax();
tempGun.timerRate = this.turretData.GetReloadRate();
tempGun.power = 0;
tempGun.chargeRate = this.turretData.GetChargeRate();
tempGun.chargeMax = this.turretData.GetChargeMax();
tempGun.blnSelected = false;
tempGun.powerMeter = this.arrSlots[i].powerMeter;
tempGun.loadMeter = this.arrSlots[i].loadMeter;
tempGun.healthMeter = this.arrSlots[i].healthMeter;
tempGun.intLevel = 1;
tempGun.charging = false;
tempGun.selectField = this.arrSlots[i].name;
tempGun.type = this.dragType;
tempGun.exp = 0;
tempGun.damage = this.turretData.GetDamage();
tempGun.damageTaken = 0;
tempGun.totalLife = this.turretData.GetLife();
tempGun.saveType = this.dragType;
tempGun.blnDestroyed = false;
tempGun.intPoints = 0 + (this.GetNumCampaignsWon() * 2);
tempGun.data = this.turretData.GetData();
tempGun.numBullets = this.turretData.GetNumBullets();
tempGun.range = this.turretData.GetRange();
this.arrStorage[i].gun = tempGun;
} else if (this.strPickUpType == "slot") {
this.arrSlots[this.intPickUpSlot].blnOpen = true;
var deleteGun = -1;
var t = 0;
while (t < this.arrAllies.length) {
if (this.arrAllies[t].name == this.arrSlots[this.intPickUpSlot].gunName) {
deleteGun = t;
break;
}
t++;
}
this.arrStorage[i].blnInUse = true;
this.arrStorage[i].gun = this.arrAllies[deleteGun];
if (deleteGun != -1) {
this.arrAllies.splice(deleteGun, 1);
}
this.UpdateSlotInfo(this.intPickUpSlot);
}
var clipRef = eval ("_root.icoOut.ico1." + this.arrStorage[i].iconName);
clipRef.gotoAndStop(this.arrStorage[i].gun.type);
clipRef._visible = true;
_root[this.dragGunName].stopDrag();
_root[this.dragGunName].removeMovieClip();
this.intPickedUp = 0;
blnHit = true;
break;
}
_root[this.dragGunName].stopDrag();
this.intPickedUp = 2;
blnHit = true;
break;
}
i++;
}
if (_root.repair.hitTest(_xmouse, _ymouse, false)) {
if (((this._money.Get() >= this.intRepair) && (this.intRepair != 0)) && (this.strPickUpType != "buy")) {
this._money.Set(this._money.Get() - this.intRepair);
_root.icoOut.ico1.UpdateGold();
if (this.strPickUpType == "storage") {
this.StarBurst(_root[this.dragGunName]._x, _root[this.dragGunName]._y);
this.arrStorage[this.intPickUpSlot].gun.damageTaken = 0;
this.arrStorage[this.intPickUpSlot].gun.type = this.arrStorage[this.intPickUpSlot].gun.saveType;
this.arrStorage[this.intPickUpSlot].gun.blnDestroyed = false;
_root[this.dragGunName].gotoAndStop(this.arrStorage[this.intPickUpSlot].gun.type);
} else if (this.strPickUpType == "slot") {
var repairGun = -1;
var t = 0;
while (t < this.arrAllies.length) {
if (this.arrAllies[t].name == this.arrSlots[this.intPickUpSlot].gunName) {
repairGun = t;
break;
}
t++;
}
this.StarBurst(_root[this.dragGunName]._x, _root[this.dragGunName]._y);
this.arrAllies[repairGun].damageTaken = 0;
this.arrAllies[repairGun].type = this.arrAllies[repairGun].saveType;
this.arrAllies[repairGun].blnDestroyed = false;
_root[this.dragGunName].gotoAndStop(this.arrAllies[repairGun].type);
}
this.intAutoMoveCounter = 35;
this.intPickedUp = 2;
_root[this.dragGunName].stopDrag();
blnHit = true;
}
}
if (_root.sell.hitTest(_xmouse, _ymouse, false)) {
if (this.strPickUpType != "buy") {
_global.gamePaused = true;
this.blnAlertLock = true;
blnHit = true;
_root[this.dragGunName].stopDrag();
_root.menu_mc._visible = true;
this.blnHoldDelete = false;
_root.menu_mc.gotoAndPlay("confirm");
}
}
}
if (blnHit == false) {
this.intPickedUp = 2;
_root[this.dragGunName].stopDrag();
}
this.UpdateRepairSell(true, 0, 0, 0, 0);
}
};
_local2.OpenTurretInfo = function (outlineName) {
if (this.intPickedUp == 0) {
var p = 0;
while (p < this.arrSlots.length) {
if (this.arrSlots[p].outline == outlineName) {
var i = 0;
while (i < this.arrAllies.length) {
if (this.arrAllies[i].name == this.arrSlots[p].gunName) {
this.intInfoGun = i;
this.PauseGame();
this.blnAlertLock = true;
this.blnGunInfoOpen = true;
_root.menu_mc._visible = true;
_root.menu_mc.gotoAndPlay("info");
_root.menu_mc.inside.gunIcon_mc.gotoAndStop(this.arrAllies[i].saveType);
_root.menu_mc.inside.name_txt.text = this.GetGunName(this.arrAllies[i].saveType);
_root.menu_mc.inside.info_txt.text = this.GetGunDescription(this.arrAllies[i].saveType);
_root.menu_mc.inside.level_txt.text = this.arrAllies[i].intLevel;
_root.menu_mc.inside.points_txt.text = this.arrAllies[i].intPoints;
this.UpdateInfoStats(i);
var t = 0;
while (t < this.arrUpgradeButtons.length) {
eval ("_root.menu_mc.inside." + this.arrUpgradeButtons[t]).removeMovieClip();
t++;
}
delete this.arrUpgradeButtons;
this.arrUpgradeButtons = new Array();
var intUpgradeButtonDepth = 1;
var arrUpgradesPossible = this.turretData.GetUpgrades(this.arrAllies[i].saveType);
var startX = 408;
var startY = 139.9;
var strButtonName;
var buttonRef;
var p = 0;
while (p < arrUpgradesPossible.length) {
strButtonName = arrUpgradesPossible[p].id + "_mc";
_root.menu_mc.inside.attachMovie(arrUpgradesPossible[p].icon, strButtonName, intUpgradeButtonDepth);
buttonRef = eval ("_root.menu_mc.inside." + strButtonName);
this.arrUpgradeButtons.push(strButtonName);
buttonRef._x = startX;
buttonRef._y = startY;
startX = startX + 62;
intUpgradeButtonDepth++;
var totalUpgrades = 0;
var t = 0;
while (t < this.arrAllies[i].arrUpgrades.length) {
if (this.arrAllies[i].arrUpgrades[t].id == arrUpgradesPossible[p].id) {
totalUpgrades++;
}
t++;
}
buttonRef.amount_txt.text = "x " + totalUpgrades;
if (totalUpgrades < arrUpgradesPossible[p].limit) {
buttonRef.onRelease = function () {
_root.game.UpgradeSelected(this._name);
};
buttonRef.onRollOver = function () {
_root.game.UpgradeRolledOver(this._name);
};
buttonRef.onRollOut = function () {
_root.game.UpgradeRolledOff(this._name);
};
} else {
buttonRef.gotoAndStop(2);
buttonRef.onRollOver = function () {
_root.game.UpgradeRolledOver(this._name);
};
buttonRef.onRollOut = function () {
_root.game.UpgradeRolledOff(this._name);
};
}
p++;
}
break;
}
i++;
}
return;
}
p++;
}
}
};
_local2.CloseTurretInfo = function () {
this.UnPauseGame();
this.blnAlertLock = false;
this.blnGunInfoOpen = false;
_root.menu_mc._visible = false;
};
_local2.UpgradeSelected = function (upgradeName) {
var selectedUpgradeID = Number(upgradeName.substr(0, upgradeName.length - 3));
var t = 0;
while (t < this.arrUpgradeButtons.length) {
if (upgradeName == this.arrUpgradeButtons[t]) {
var arrUpgradesPossible = this.turretData.GetUpgrades(this.arrAllies[this.intInfoGun].saveType);
var p = 0;
while (p < arrUpgradesPossible.length) {
if (arrUpgradesPossible[p].id == selectedUpgradeID) {
if (this.arrAllies[this.intInfoGun].intPoints >= arrUpgradesPossible[p].cost) {
var totalUpgrades = 0;
var j = 0;
while (j < this.arrAllies[this.intInfoGun].arrUpgrades.length) {
if (this.arrAllies[this.intInfoGun].arrUpgrades[j].id == selectedUpgradeID) {
totalUpgrades++;
}
j++;
}
if (totalUpgrades < arrUpgradesPossible[p].limit) {
this.arrAllies[this.intInfoGun].intPoints = this.arrAllies[this.intInfoGun].intPoints - arrUpgradesPossible[p].cost;
_root.menu_mc.inside.points_txt.text = this.arrAllies[this.intInfoGun].intPoints;
this.arrAllies[this.intInfoGun].arrUpgrades.push(arrUpgradesPossible[p]);
totalUpgrades++;
var buttonRef = eval (("_root.menu_mc.inside." + selectedUpgradeID) + "_mc");
buttonRef.amount_txt.text = "x " + totalUpgrades;
if (totalUpgrades == arrUpgradesPossible[p].limit) {
buttonRef.gotoAndStop(2);
delete buttonRef.onRelease;
}
}
}
break;
}
p++;
}
break;
}
t++;
}
this.UpdateInfoStats(this.intInfoGun);
};
_local2.UpgradeRolledOver = function (upgradeName) {
var _local6 = Number(upgradeName.substr(0, upgradeName.length - 3));
var _local5 = 0;
while (_local5 < this.arrUpgradeButtons.length) {
if (upgradeName == this.arrUpgradeButtons[_local5]) {
var _local4 = this.turretData.GetUpgrades(this.arrAllies[this.intInfoGun].saveType);
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].id == _local6) {
_root.menu_mc.inside.title_txt.text = _local4[_local3].title;
_root.menu_mc.inside.description_txt.text = ((_local4[_local3].description + newline) + "Cost: ") + _local4[_local3].cost;
break;
}
_local3++;
}
break;
}
_local5++;
}
};
// unexpected jump
// unexpected jump
_local2.UpgradeRolledOff = function (upgradeName) {
_root.menu_mc.inside.title_txt.text = "";
_root.menu_mc.inside.description_txt.text = "";
};
_local2.GetGunName = function (myType) {
var _local3 = 0;
while (_local3 < _global.Campaigns.length) {
if (_global.Campaigns[_local3].strButton == "pass_bt") {
var _local2 = 0;
while (_local2 < _global.Campaigns[_local3].arrGuns.length) {
if (_global.Campaigns[_local3].arrGuns[_local2].type == myType) {
return(_global.Campaigns[_local3].arrGuns[_local2].title);
}
_local2++;
}
break;
}
_local3++;
}
};
_local2.GetGunDescription = function (myType) {
var _local3 = 0;
while (_local3 < _global.Campaigns.length) {
if (_global.Campaigns[_local3].strButton == "pass_bt") {
var _local2 = 0;
while (_local2 < _global.Campaigns[_local3].arrGuns.length) {
if (_global.Campaigns[_local3].arrGuns[_local2].type == myType) {
return(_global.Campaigns[_local3].arrGuns[_local2].description);
}
_local2++;
}
break;
}
_local3++;
}
};
_local2.UpdateInfoStats = function (q) {
this.turretData.SetInternalData(this.arrAllies[q].saveType, this.arrAllies[q].exp);
var _local14;
var _local12;
var _local13;
_local14 = this.turretData.GetDamage();
_root.menu_mc.inside.baseDamage_txt.text = _local14;
_local12 = this.turretData.GetLife();
_root.menu_mc.inside.baseHealth_txt.text = _local12;
_local13 = this.turretData.GetReloadMax();
_root.menu_mc.inside.baseReload_txt.text = _local13;
var _local8 = 0;
var _local6 = 0;
var _local7 = 0;
var _local3 = 0;
while (_local3 < this.arrAllies[q].arrUpgrades.length) {
if (this.arrAllies[q].arrUpgrades[_local3].type == 1) {
_local8 = _local8 + this.arrAllies[q].arrUpgrades[_local3].value;
} else if (this.arrAllies[q].arrUpgrades[_local3].secondType == 1) {
_local8 = _local8 + this.arrAllies[q].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[q].arrUpgrades[_local3].type == 2) {
_local6 = _local6 + this.arrAllies[q].arrUpgrades[_local3].value;
} else if (this.arrAllies[q].arrUpgrades[_local3].secondType == 2) {
_local6 = _local6 + this.arrAllies[q].arrUpgrades[_local3].secondValue;
}
if (this.arrAllies[q].arrUpgrades[_local3].type == 3) {
_local7 = _local7 + this.arrAllies[q].arrUpgrades[_local3].value;
} else if (this.arrAllies[q].arrUpgrades[_local3].secondType == 3) {
_local7 = _local7 + this.arrAllies[q].arrUpgrades[_local3].secondValue;
}
_local3++;
}
_root.menu_mc.inside.upgradeDamage_txt.text = _local8;
_root.menu_mc.inside.upgradeHealth_txt.text = _local6;
_root.menu_mc.inside.upgradeReload_txt.text = _local7;
_local14 = _local14 + _local8;
_local12 = _local12 + _local6;
_local13 = _local13 + _local7;
var _local11 = 0;
var _local10 = 0;
var _local9 = 0;
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
this.turretData.SetInternalData(this.arrAllies[_local4].saveType, this.arrAllies[_local4].exp);
this.arrAllies[_local4].data = this.turretData.GetData();
_local3 = 0;
while (_local3 < this.arrAllies[_local4].arrUpgrades.length) {
if (this.arrAllies[_local4].arrUpgrades[_local3].type == 4) {
this.arrAllies[_local4].data = this.arrAllies[_local4].data + this.arrAllies[_local4].arrUpgrades[_local3].value;
} else if (this.arrAllies[_local4].arrUpgrades[_local3].secondType == 4) {
this.arrAllies[_local4].data = this.arrAllies[_local4].data + this.arrAllies[_local4].arrUpgrades[_local3].secondValue;
}
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 < this.arrAllies.length) {
if (((this.arrAllies[_local4].type == 4) || (this.arrAllies[_local4].type == 8)) || (this.arrAllies[_local4].type == 9)) {
if (this.arrAllies[_local4].blnDestroyed == false) {
if (this.arrAllies[_local4].type == 4) {
_local11 = _local11 + this.arrAllies[_local4].data;
} else if (this.arrAllies[_local4].type == 8) {
_local10 = _local10 + this.arrAllies[_local4].data;
} else if (this.arrAllies[_local4].type == 9) {
_local9 = _local9 + this.arrAllies[_local4].data;
}
}
}
_local4++;
}
if (_local9 > 0.75) {
_local9 = 0.75;
}
_root.menu_mc.inside.buffDamage_txt.text = Math.round(_local10 * 100) + "%";
_root.menu_mc.inside.buffHealth_txt.text = Math.round(_local11 * 100) + "%";
_root.menu_mc.inside.buffReload_txt.text = Math.round(_local9 * 100) + "%";
var _local15 = Math.round(_local10 * _local14);
var _local17 = Math.round(_local11 * _local12);
var _local16 = -1 * Math.round(_local9 * _local13);
_root.menu_mc.inside.actualDamage_txt.text = _local15;
_root.menu_mc.inside.actualHealth_txt.text = _local17;
_root.menu_mc.inside.actualReload_txt.text = _local16;
_root.menu_mc.inside.totalDamage_txt.text = _local15 + _local14;
_root.menu_mc.inside.totalHealth_txt.text = _local17 + _local12;
_root.menu_mc.inside.totalReload_txt.text = _local16 + _local13;
};
_local2.ConfirmDeleteGun = function () {
if (this.blnHoldDelete == false) {
this.blnHoldDelete = true;
this._money.Set(this._money.Get() + this.intSell);
_root.icoOut.ico1.UpdateGold();
if (this.strPickUpType == "storage") {
this.arrStorage[this.intPickUpSlot].blnInUse = false;
} else if (this.strPickUpType == "slot") {
this.arrSlots[this.intPickUpSlot].blnOpen = true;
var _local5 = -1;
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
if (this.arrAllies[_local4].name == this.arrSlots[this.intPickUpSlot].gunName) {
_local5 = _local4;
break;
}
_local4++;
}
if (_local5 != -1) {
this.arrAllies.splice(_local5, 1);
}
}
this.UpdateSlotInfo(this.intPickUpSlot);
this.SellAnimation(_root[this.dragGunName]._x, _root[this.dragGunName]._y);
this.intPickedUp = 0;
_root[this.dragGunName].removeMovieClip();
_global.gamePaused = false;
this.blnAlertLock = false;
}
};
_local2.CancelDeleteGun = function () {
if (this.blnHoldDelete == false) {
this.blnHoldDelete = true;
this.intPickedUp = 2;
_global.gamePaused = false;
this.blnAlertLock = false;
}
};
_local2.RepairGunsInStorage = function () {
var _local2 = 0;
while (_local2 < this.arrStorage.length) {
if (this.arrStorage[_local2].blnInUse == true) {
this.arrStorage[_local2].gun.damageTaken = 0;
this.arrStorage[_local2].gun.type = this.arrStorage[_local2].gun.saveType;
this.arrStorage[_local2].gun.blnDestroyed = false;
}
_local2++;
}
};
_local2.AnimateDroppedGun = function () {
if (this.intPickedUp == 2) {
if (this.intAutoMoveCounter == 0) {
_root[this.dragGunName]._x = _root[this.dragGunName]._x + ((this.dragGunDest._x - _root[this.dragGunName]._x) * 0.2);
_root[this.dragGunName]._y = _root[this.dragGunName]._y + ((this.dragGunDest._y - _root[this.dragGunName]._y) * 0.2);
if ((Math.abs(this.dragGunDest._x - _root[this.dragGunName]._x) < 1) && (Math.abs(this.dragGunDest._y - _root[this.dragGunName]._y) < 1)) {
this.intPickedUp = 0;
_root[this.dragGunName].removeMovieClip();
if (this.strPickUpType == "buy") {
_root.icoOut.ico1.turret_transition.gotoAndStop(("turret" + this.dragType) + "_APPEAR");
} else if (this.strPickUpType == "storage") {
var clipRef = eval ("_root.icoOut.ico1." + this.arrStorage[this.intPickUpSlot].iconName);
clipRef.gotoAndStop(this.arrStorage[this.intPickUpSlot].gun.type);
clipRef._visible = true;
} else if (this.strPickUpType == "slot") {
var selectedGun = -1;
var p = 0;
while (p < this.arrAllies.length) {
if (this.arrAllies[p].name == this.arrSlots[this.intPickUpSlot].gunName) {
selectedGun = p;
break;
}
p++;
}
var clipRef = _root[this.arrSlots[this.intPickUpSlot].gunName];
clipRef.gotoAndStop(this.arrAllies[selectedGun].type);
clipRef._visible = true;
}
}
} else {
this.intAutoMoveCounter--;
}
}
};
_local2.CreateDragGun = function (type) {
_root.attachMovie("turret", this.dragGunName, 40000);
_root[this.dragGunName].gotoAndPlay(type);
_root[this.dragGunName]._x = _xmouse;
_root[this.dragGunName]._y = _ymouse;
};
_local2.ShowAndHideDescription = function () {
if ((this.intPickedUp == 0) && (_root.game.blnBreakIsDown == true)) {
if (_root.newGun_mc.hitTest(_xmouse, _ymouse, false)) {
if (this.blnDescription == false) {
_root.descriptionAnim_mc._visible = true;
_root.descriptionAnim_mc.gotoAndStop("full");
_root.descriptionAnim_mc.description_mc.description_txt.text = _root.icoOut.ico1.GetTurretDescription();
_root.descriptionAnim_mc.description_mc.title_txt.text = _root.icoOut.ico1.GetTurretTitle();
_root.descriptionAnim_mc.description_mc.cost_txt.text = _root.icoOut.ico1.GetTurretCost();
_root.descriptionAnim_mc.description_mc.weaponType_txt.text = _root.icoOut.ico1.GetWeaponType();
this.blnDescription = true;
}
_root.descriptionAnim_mc._x = _xmouse;
_root.descriptionAnim_mc._y = _ymouse;
} else if (this.blnDescription == true) {
_root.descriptionAnim_mc._visible = false;
this.blnDescription = false;
}
} else if (this.blnDescription == true) {
_root.descriptionAnim_mc._visible = false;
this.blnDescription = false;
}
};
_local2.RemoveClouds = function () {
_root.clouds.swapDepths(1);
_root.clouds.removeMovieClip();
};
_local2.SpawnEnemy = function (selectedType) {
var _local4 = "enemy_" + this.intUnitDepth;
_root.attachMovie(selectedType, _local4, this.intUnitDepth);
if (_root[_local4].GetMovementStyle() == "float") {
_root[_local4]._x = this.RandNum(350, 675);
_root[_local4]._y = Stage.height + _root[_local4]._height;
} else if (_root[_local4].GetMovementStyle() == "plane") {
_root[_local4]._x = 710;
_root[_local4]._y = this.RandNum(25, 125);
_root[_local4].RecalcTargets();
} else if (_root[_local4].GetMovementStyle() == "boss") {
_root[_local4]._x = Stage.width + _root[_local4]._width;
_root[_local4]._y = this.RandNum(170, 190);
} else if (_root[_local4].GetMovementStyle() == "miniboss") {
_root[_local4]._x = Stage.width + _root[_local4]._width;
_root[_local4]._y = this.RandNum(85, 300);
} else if (_root[_local4].GetMovementStyle() == "ground") {
_root[_local4]._x = Stage.width + _root[_local4]._width;
_root[_local4]._y = this.RandNum(325, 343);
} else {
_root[_local4]._x = 702;
_root[_local4]._y = this.RandNum(0, 325);
}
this.arrEnemies.push(_local4);
this.intUnitDepth++;
if (this.intUnitDepth > 7000) {
this.intUnitDepth = 5000;
}
if (_root[_local4].type == "Enemy_18") {
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
if (_root[this.arrEnemies[_local3]].type == "Enemy_18") {
if (_root[_local4]._y < _root[this.arrEnemies[_local3]]._y) {
_root[_local4].swapDepths(_root[this.arrEnemies[_local3]]);
}
}
_local3++;
}
}
};
_local2.SpawnEnemyAtLocation = function (selectedType, startPos) {
var _local3 = "enemy_" + this.intUnitDepth;
_root.attachMovie(selectedType, _local3, this.intUnitDepth);
_root[_local3]._x = startPos._x;
_root[_local3]._y = startPos._y;
this.arrEnemies.push(_local3);
this.intUnitDepth++;
if (this.intUnitDepth > 7000) {
this.intUnitDepth = 5000;
}
return(_local3);
};
_local2.EnemiesAlive = function () {
var _local4 = 0;
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
if (((_root[this.arrEnemies[_local3]].type == "Enemy_20") || (_root[this.arrEnemies[_local3]].type == "Enemy_21")) || (_root[this.arrEnemies[_local3]].type == "Enemy_22")) {
_local4++;
}
_local3++;
}
return(this.arrEnemies.length - _local4);
};
_local2.RandNum = function (minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
};
_local2.LaunchDebrisParticle = function (type, startX, startY) {
var thisRef = this;
var particleName = ("particle_" + this.particleDepth);
_root.attachMovie(type, particleName, this.particleDepth);
_root[particleName]._x = startX;
_root[particleName]._y = startY;
_root[particleName].SetGravityAndRandomVector(this.dblGravity);
if (type == "casing") {
_root[particleName].SetCasingDrop();
}
this.particleDepth++;
this.arrDebrisParticles.push(particleName);
if (this.particleDepth > 27000) {
this.particleDepth = 25000;
}
_root[particleName].removeCallback = function (myName) {
thisRef.RemoveParticle(particleName);
};
};
_local2.RemoveParticle = function (strName) {
var _local2 = 0;
while (_local2 < this.arrDebrisParticles.length) {
if (strName == this.arrDebrisParticles[_local2]) {
this.arrDebrisParticles.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.BoomSound = function () {
};
_local2.ParticleExplosion = function (strName, xloc, yloc) {
var _local4 = 0;
var _local3 = new Array();
if (strName == "Enemy_2") {
_local3.push("piece1");
_local4 = this.RandNum(2, 7);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "Enemy_3") {
_local3.push("piece1");
_local4 = this.RandNum(4, 8);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "Enemy_4") {
_local3.push("piece1");
_local4 = this.RandNum(4, 8);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_5") {
_local3.push("piece1");
_local4 = this.RandNum(2, 7);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "Enemy_6") {
_local3.push("piece1");
_local4 = this.RandNum(4, 7);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "spark") {
_local3.push("spark");
_local4 = this.RandNum(5, 8);
} else if (strName == "Enemy_7") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(4, 7);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "Enemy_8") {
_local3.push("piece1");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_9") {
_local3.push("piece1");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_10") {
_local3.push("piece1");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_11") {
_local3.push("piece1");
_local4 = this.RandNum(5, 10);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_12") {
_local3.push("piece1");
_local4 = this.RandNum(5, 10);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_20") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(15, 25);
this.BoomSound();
} else if (strName == "Enemy_21") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(15, 25);
this.BoomSound();
} else if (strName == "casing") {
_local3.push("casing");
_local4 = this.RandNum(1, 1);
} else if (strName == "DecoyDrone") {
_local3.push("piece1");
_local4 = this.RandNum(2, 7);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "ControlUnit") {
_local3.push("piece1");
_local4 = this.RandNum(2, 7);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_MonsterBullet") {
_local3.push("piece1");
_local4 = this.RandNum(2, 3);
this.DamageExplosionSmall(xloc, yloc, 0);
} else if (strName == "Enemy_15") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(4, 7);
_global.SoundManager.PlaySound("SmallUnitDie");
} else if (strName == "Enemy_17") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(7, 9);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_18") {
_local3.push("piece1");
_local4 = this.RandNum(7, 9);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_13") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_19") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_30") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(6, 10);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_31") {
_local3.push("piece1");
_local4 = this.RandNum(4, 7);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_32") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_33") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
} else if (strName == "Enemy_34") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(6, 10);
_global.SoundManager.PlaySound("MediumUnitDie");
} else if (strName == "Enemy_22") {
_local3.push("piece1");
_local3.push("piece2");
_local4 = this.RandNum(9, 15);
_global.SoundManager.PlaySound("BigUnitDie");
}
var _local6 = 0;
while (_local6 < _local4) {
var _local7 = this.RandNum(0, _local3.length - 1);
this.LaunchDebrisParticle(_local3[_local7], xloc, yloc);
_local6++;
}
};
_local2.FlameShards = function (startX, startY, numCreate, protectedName, startDamage) {
var thisRef = this;
var _local4 = 0;
while (_local4 < numCreate) {
var _local3 = "avatarBullet_" + this.intBulletDepth;
var _local5 = this.RandNum(0, 360);
var _local7 = (Math.PI * _local5) / 180;
var _local6 = this.RandNum(1, 7);
_root.attachMovie("BulletFlameShard", _local3, this.intBulletDepth);
_root[_local3]._x = startX;
_root[_local3]._y = startY;
_root[_local3].SetGravityAndVelocity(this.dblGravity, _local6);
_root[_local3].SetAngle(_local7);
_root[_local3].SetStart(_root[_local3]._x, _root[_local3]._y);
_root[_local3]._subBullet = true;
_root[_local3]._enemy = false;
_root[_local3]._damage = Math.round(startDamage * 0.25);
_root[_local3]._rotation = _local5;
_root[_local3]._enemyProtected = protectedName;
_root[_local3]._protectedCounter = 15;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
_local4++;
}
};
_local2.SpawnAcidDrop = function (startX, startY, myRotation, myDamage) {
var thisRef = this;
var _local3 = "acidBullet_" + this.intBulletDepth;
var _local4 = myRotation;
var _local6 = (Math.PI * _local4) / 180;
var _local5 = 4;
_root.attachMovie("acidDropBullet", _local3, this.intBulletDepth);
_root[_local3]._x = startX;
_root[_local3]._y = startY;
_root[_local3].SetGravityAndVelocity(this.dblGravity, _local5);
_root[_local3].SetAngle(_local6);
_root[_local3].SetStart(_root[_local3]._x, _root[_local3]._y);
_root[_local3]._subBullet = true;
_root[_local3]._enemy = false;
_root[_local3]._damage = myDamage;
_root[_local3]._rotation = _local4;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
};
_local2.BulletShards = function (startX, startY, numCreate, myDamage) {
var thisRef = this;
var _local9 = 360 / numCreate;
var _local8 = 0;
var _local4 = 0;
while (_local4 < numCreate) {
var _local3 = "avatarBullet_" + this.intBulletDepth;
var _local5 = _local8;
_local8 = _local8 + _local9;
var _local7 = (Math.PI * _local5) / 180;
var _local6 = 8;
_root.attachMovie("bullet2", _local3, this.intBulletDepth);
_root[_local3]._x = startX;
_root[_local3]._y = startY;
_root[_local3]._xscale = 75;
_root[_local3]._yscale = _root[_local3]._xscale;
_root[_local3].SetGravityAndVelocity(this.dblGravity, _local6);
_root[_local3].SetAngle(_local7);
_root[_local3].SetStart(_root[_local3]._x, _root[_local3]._y);
_root[_local3]._subBullet = true;
_root[_local3]._enemy = false;
_root[_local3]._damage = myDamage;
_root[_local3]._rotation = _local5;
this.intBulletDepth++;
this.arrBullets.push(_local3);
_root[_local3].removeCallback = function (myName) {
thisRef.RemoveBullet(myName);
};
_local4++;
}
};
_local2.ReportEnemyDeath = function (strName) {
var _local2 = 0;
while (_local2 < this.arrEnemies.length) {
if (this.arrEnemies[_local2] == strName) {
this.arrEnemies.splice(_local2, 1);
break;
}
_local2++;
}
if (this.arrEnemies.length == 0) {
if (this.myLevelManager.GetEnemiesLeft() < 1) {
this.FinishLevel();
}
}
};
_local2.RemoveEnemy = function (strName) {
var _local2 = 0;
while (_local2 < this.arrEnemies.length) {
if (this.arrEnemies[_local2] == strName) {
this.arrEnemies.splice(_local2, 1);
break;
}
_local2++;
}
};
_local2.FinishLevel = function () {
this._level.Set(this._level.Get() + 1);
_root.output_mc._visible = true;
if (this._level.Get() > this.intLastDeluxeLevel) {
if (this.IsAChallengeMission(_global.currentCampaign) == true) {
this.StopAllGuns();
_root.output_mc.gotoAndPlay("EndChallenge");
this.savedChallenge = _global.currentCampaign;
} else if (_global.var1.Get() != -1) {
if (this.GetNumCampaignsWon() == 7) {
this.StopAllGuns();
_root.output_mc.gotoAndPlay("EndAllCampaigns");
} else {
this.StopAllGuns();
_root.output_mc.gotoAndPlay("EndGameDeluxe");
}
} else if (this.GetNumCampaignsWon() == 5) {
this.StopAllGuns();
_root.output_mc.gotoAndPlay("EndNonDeluxeCampaigns");
} else {
this.StopAllGuns();
_root.output_mc.gotoAndPlay("EndGame");
}
this.WonGame();
} else {
_root.output_mc.gotoAndPlay("win");
}
};
_local2.UpdateChallengeStats = function (blnCompletedChallenge) {
_root.output_mc.inside.score_txt.text = this.curStatus.Get() + " Points";
_root.output_mc.inside.time_txt.text = this.challengeTimer.GetTimeString();
var _local10 = 100 - Math.round((this.intBulletsMissed / this.intBulletsShot) * 100);
if (this.intBulletsMissed == 0) {
_local10 = 100;
}
if (this.intBulletsShot == 0) {
_local10 = 100;
}
_root.output_mc.inside.accuracy_txt.text = _local10 + " %";
var _local6 = 0;
var _local7 = 0;
var _local8 = 0;
var _local4 = 0;
while (_local4 < _global.Challenges.length) {
if (_global.Challenges[_local4].strButton == this.savedChallenge) {
_local6 = _global.Challenges[_local4].maxTimeInSeconds * 1000;
_local7 = _global.Challenges[_local4].maxTimeBonus;
_local8 = _global.Challenges[_local4].maxAccuracyBonus;
break;
}
_local4++;
}
var _local5 = _local6 - this.challengeTimer.GetTime();
if (_local5 < 0) {
_local5 = 0;
}
_local5 = Math.round((_local5 / _local6) * _local7);
if (blnCompletedChallenge == false) {
_local5 = 0;
}
var _local9 = Math.round((_local10 / 100) * _local8);
_local5 = Math.round(_local5 / 10) * 10;
_local9 = Math.round(_local9 / 10) * 10;
_root.output_mc.inside.timeBonus_txt.text = _local5 + " Points";
_root.output_mc.inside.accuracyBonus_txt.text = _local9 + " Points";
var _local11 = (this.curStatus.Get() + _local5) + _local9;
_root.output_mc.inside.total_txt.text = _local11 + " Points!";
_root.score_txt.text = this.curStatus.Get();
this.SubmitScore(_local11);
};
_local2.SubmitScore = function (myScore) {
var _local5 = "";
var _local4 = "";
var _local3 = 0;
while (_local3 < _global.Challenges.length) {
if (_global.Challenges[_local3].strButton == this.savedChallenge) {
_local5 = _global.Challenges[_local3].parameter1;
_local4 = _global.Challenges[_local3].parameter2;
break;
}
_local3++;
}
this.bXlnYW1lX25hbWVfdmFyaWFibGU = this._name;
this.bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = myScore;
this.__rankz_send__(_local5, _local4, this.bXlnYW1lX25hbWVfdmFyaWFibGU, this.bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
};
_local2.__rankz_send__ = function (par1, par2, par3, par4) {
var _local1 = new LoadVars();
var par228 = new LoadVars();
_local1.flashkey = par2;
_local1.SU0249 = par1;
_local1.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
_local1.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
_local1.flashkey = _local1.flashkey.split("=").join("");
_local1.SU0249 = _local1.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
}
};
_local1.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
};
_local2.ReportOutputFinished = function (strType) {
if (strType == "win") {
_root.output_mc._visible = false;
if (this._level.Get() == this.intLevelForMoreSlots) {
this.CreateExtraSlots();
}
if (this.IsAChallengeMission(_global.currentCampaign) == false) {
this.SaveGame();
}
this.StartBreakMode();
} else if (strType == "dead") {
this.ResetGame();
}
};
_local2.SaveGame = function () {
var _local3 = SharedObject.getLocal(_global.loadSlot);
_local3.data.blnInUse = true;
_local3.data.strName = this._name;
_local3.data.strDifficulty = this._difficulty;
_local3.data.strCampaign = _global.currentCampaign;
_local3.data.data1 = this._money.Store();
_local3.data.data2 = this._level.Store();
var _local9 = new DataObject();
var _local10 = new DataObject();
_local9.Set(4);
_local10.Set(2000);
var _local8 = new DataObject();
var _local5 = new DataObject();
var _local4 = new DataObject();
var _local7 = new DataObject();
var _local6 = new DataObject();
_local3.data.data5 = this.beatOceanCampaign.Store();
_local3.data.data6 = this.beatSkyCampaign.Store();
_local3.data.data7 = this.beatPlainsCampaign.Store();
_local3.data.data8 = this.beatPeaksCampaign.Store();
_local3.data.data9 = this.beatMountainCampaign.Store();
_local3.data.data10 = this.beatCityCampaign.Store();
_local3.data.data11 = this.beatSouthCampaign.Store();
_local3.data.data18 = this.beatDesertCampaign.Store();
if (_global.cheatsEnabled.Get() == -1) {
_local3.data.data12 = _global.cheatsEnabled.Store();
}
_local3.data.data3 = _local9.Store();
_local3.data.data4 = _local10.Store();
if (this.arrAllies.length > 0) {
_local8.Set(this.arrAllies[0].intPoints);
_local3.data.data13 = _local8.Store();
} else {
_local8.Set(45624);
_local3.data.data13 = _local8.Store();
}
if (this.arrAllies.length > 1) {
_local5.Set(this.arrAllies[1].intPoints);
_local3.data.data14 = _local5.Store();
} else {
_local5.Set(45624);
_local3.data.data14 = _local5.Store();
}
if (this.arrAllies.length > 2) {
_local4.Set(this.arrAllies[2].intPoints);
_local3.data.data15 = _local4.Store();
} else {
_local4.Set(45624);
_local3.data.data15 = _local4.Store();
}
if (this.arrAllies.length > 3) {
_local7.Set(this.arrAllies[3].intPoints);
_local3.data.data16 = _local7.Store();
} else {
_local7.Set(45624);
_local3.data.data16 = _local7.Store();
}
if (this.arrAllies.length > 4) {
_local6.Set(this.arrAllies[4].intPoints);
_local3.data.data17 = _local6.Store();
} else {
_local6.Set(45624);
_local3.data.data17 = _local6.Store();
}
_local3.data.arrAllies = this.arrAllies;
_local3.data.arrStorage = this.arrStorage;
_local3.data.arrSlots = this.arrSlots;
_local3.flush();
_global.currentProfile.blnInUse = true;
_global.currentProfile.strName = this._name;
_global.currentProfile.strDifficulty = this._difficulty;
_global.currentProfile.strCampaign = _global.currentCampaign;
_global.currentProfile.data1 = this._money.Store();
_global.currentProfile.data2 = this._level.Store();
_global.currentProfile.data3 = _local9.Store();
_global.currentProfile.data4 = _local10.Store();
_global.currentProfile.data5 = this.beatOceanCampaign.Store();
_global.currentProfile.data6 = this.beatSkyCampaign.Store();
_global.currentProfile.data7 = this.beatPlainsCampaign.Store();
_global.currentProfile.data8 = this.beatPeaksCampaign.Store();
_global.currentProfile.data9 = this.beatMountainCampaign.Store();
_global.currentProfile.data10 = this.beatCityCampaign.Store();
_global.currentProfile.data11 = this.beatSouthCampaign.Store();
_global.currentProfile.data18 = this.beatDesertCampaign.Store();
if (_global.cheatsEnabled.Get() == -1) {
_global.currentProfile.data12 = _global.cheatsEnabled.Store();
}
_global.currentProfile.arrAllies = this.arrAllies;
_global.currentProfile.arrStorage = this.arrStorage;
_global.currentProfile.arrSlots = this.arrSlots;
};
_local2.UpdateRepairSell = function (blnHide, type, totalLife, damageTaken, saveType) {
if (blnHide == true) {
_root.icoOut.ico1.repair_txt.text = "";
_root.icoOut.ico1.sell_txt.text = "";
this.intRepair = 0;
} else {
this.intRepair = this.intRepairMax - Math.round(((totalLife - damageTaken) / totalLife) * this.intRepairMax);
if (this.intRepair > this.intRepairMax) {
this.intRepair = this.intRepairMax;
}
this.intSell = Math.round(_root.icoOut.ico1.GetTurretCostForType(saveType) * 0.8);
_root.icoOut.ico1.repair_txt.text = this.intRepair + " g";
_root.icoOut.ico1.sell_txt.text = this.intSell + " g";
}
};
_local2.HideHotkeyTips = function () {
_root.slot1hotkey_txt.text = "";
_root.slot2hotkey_txt.text = "";
_root.slot3hotkey_txt.text = "";
_root.slot4hotkey_txt.text = "";
_root.slot5hotkey_txt.text = "";
};
_local2.DisplayHotkeyTips = function () {
_root.slot1hotkey_txt.text = this.OutputValue(_global.hotKey1);
_root.slot2hotkey_txt.text = this.OutputValue(_global.hotKey2);
_root.slot3hotkey_txt.text = this.OutputValue(_global.hotKey3);
if (this.arrSlots.length > 3) {
_root.slot4hotkey_txt.text = this.OutputValue(_global.hotKey4);
_root.slot5hotkey_txt.text = this.OutputValue(_global.hotKey5);
}
};
_local2.Lightning = function (startX, startY, endX, endY) {
var _local5 = new Vector();
_local5._x = startX;
_local5._y = startY;
var _local4;
_local4 = _root[this.CreateEffect("lightning", _local5, false, "", "")];
var _local3 = new Vector();
_local3._x = endX - startX;
_local3._y = endY - startY;
var _local6 = Math.sqrt((_local3._x * _local3._x) + (_local3._y * _local3._y));
var _local7 = Math.atan2(_local3._y, _local3._x);
var _local8 = (360 * _local7) / (Math.PI*2);
if (_local6 > 400) {
_local4.inside.gotoAndStop(3);
} else if (_local6 > 200) {
_local4.inside.gotoAndStop(2);
} else {
_local4.inside.gotoAndStop(1);
}
_local4._width = _local6;
_local4._rotation = _local8;
};
_local2.OutputValue = function (keyCode) {
var _local1 = "";
switch (keyCode) {
case 8 :
_local1 = "BACKSPACE";
break;
case 20 :
_local1 = "CAPSLOCK";
break;
case 17 :
_local1 = "CONTROL";
break;
case 46 :
_local1 = "DELETE";
break;
case 40 :
_local1 = "DOWN";
break;
case 35 :
_local1 = "END";
break;
case 13 :
_local1 = "ENTER";
break;
case 27 :
_local1 = "ESCAPE";
break;
case 36 :
_local1 = "HOME";
break;
case 45 :
_local1 = "INSERT";
break;
case 37 :
_local1 = "LEFT";
break;
case 34 :
_local1 = "PGDN";
break;
case 33 :
_local1 = "PGUP";
break;
case 39 :
_local1 = "RIGHT";
break;
case 16 :
_local1 = "SHIFT";
break;
case 32 :
_local1 = "SPACE";
break;
case 9 :
_local1 = "TAB";
break;
case 38 :
_local1 = "UP";
break;
case 186 :
_local1 = ";";
break;
case 187 :
_local1 = "=";
break;
case 189 :
_local1 = "-";
break;
case 191 :
_local1 = "/";
break;
case 192 :
_local1 = "`";
break;
case 219 :
_local1 = "[";
break;
case 220 :
_local1 = "\\";
break;
case 221 :
_local1 = "]";
break;
case 222 :
_local1 = "'";
break;
case 188 :
_local1 = ",";
break;
case 190 :
_local1 = ".";
break;
case 96 :
_local1 = "NUMPAD 0";
break;
case 97 :
_local1 = "NUMPAD 1";
break;
case 98 :
_local1 = "NUMPAD 2";
break;
case 99 :
_local1 = "NUMPAD 3";
break;
case 100 :
_local1 = "NUMPAD 4";
break;
case 101 :
_local1 = "NUMPAD 5";
break;
case 102 :
_local1 = "NUMPAD 6";
break;
case 103 :
_local1 = "NUMPAD 7";
break;
case 104 :
_local1 = "NUMPAD 8";
break;
case 105 :
_local1 = "NUMPAD 9";
break;
case 106 :
_local1 = "MULTIPLY";
break;
case 107 :
_local1 = "ADD";
break;
case 109 :
_local1 = "SUBTRACT";
break;
case 110 :
_local1 = "DECIMAL";
break;
case 111 :
_local1 = "DIVIDE";
break;
default :
_local1 = chr(keyCode);
_local1.toUpperCase();
}
return(_local1);
};
_local2.FlashScreen = function () {
_root.flash_mc._visible = true;
_root.flash_mc.gotoAndStop(2);
_root.flash_mc.inside.gotoAndPlay(1);
};
_local2.ShakeScreen = function (newDuration) {
if (this.intShakeDuration == 0) {
this.intShakeDuration = newDuration;
this.intShakeStart = newDuration;
this.intShakeCounter = 3;
this.vecScreenCoords._x = _root.bg_mc._x;
this.vecScreenCoords._y = _root.bg_mc._y;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
this.arrAllies[_local3].startX = _root[this.arrAllies[_local3].name]._x;
this.arrAllies[_local3].startY = _root[this.arrAllies[_local3].name]._y;
_local3++;
}
}
};
_local2.HaltShaking = function () {
if ((this.vecScreenCoords._x != _root.bg_mc._x) || (this.vecScreenCoords._y != _root.bg_mc._y)) {
this.intShakeDuration = 0;
var _local5 = this.vecScreenCoords._x - _root.bg_mc._x;
var _local4 = this.vecScreenCoords._y - _root.bg_mc._y;
_root.bg_mc._x = this.vecScreenCoords._x;
_root.bg_mc._y = this.vecScreenCoords._y;
var _local3 = 0;
while (_local3 < this.arrAllies.length) {
_root[this.arrAllies[_local3].name]._x = this.arrAllies[_local3].startX;
_root[this.arrAllies[_local3].name]._y = this.arrAllies[_local3].startY;
_local3++;
}
_local3 = 0;
while (_local3 < this.arrEnemies.length) {
_root[this.arrEnemies[_local3]]._x = _root[this.arrEnemies[_local3]]._x + _local5;
_root[this.arrEnemies[_local3]]._y = _root[this.arrEnemies[_local3]]._y + _local4;
_local3++;
}
}
};
_local2.ManageShaking = function () {
if (_global.gamePaused == false) {
if (this.intShakeDuration > 0) {
this.intShakeDuration--;
if (this.intShakeDuration == 0) {
var _local6 = this.vecScreenCoords._x - _root.bg_mc._x;
var _local5 = this.vecScreenCoords._y - _root.bg_mc._y;
_root.bg_mc._x = this.vecScreenCoords._x;
_root.bg_mc._y = this.vecScreenCoords._y;
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].name]._x = this.arrAllies[_local4].startX;
_root[this.arrAllies[_local4].name]._y = this.arrAllies[_local4].startY;
_local4++;
}
_local4 = 0;
while (_local4 < this.arrEnemies.length) {
_root[this.arrEnemies[_local4]]._x = _root[this.arrEnemies[_local4]]._x + _local6;
_root[this.arrEnemies[_local4]]._y = _root[this.arrEnemies[_local4]]._y + _local5;
_local4++;
}
} else {
this.intShakeCounter--;
if (this.intShakeCounter == 0) {
this.intShakeCounter = 3;
var _local7 = this.intShakeDuration / this.intShakeStart;
var _local9 = this.vecScreenCoords._x + (this.RandNum(-4, 4) * _local7);
var _local8 = this.vecScreenCoords._y + (this.RandNum(-4, 4) * _local7);
var _local6 = _local9 - _root.bg_mc._x;
var _local5 = _local8 - _root.bg_mc._y;
_root.bg_mc._x = _local9;
_root.bg_mc._y = _local8;
var _local4 = 0;
while (_local4 < this.arrAllies.length) {
_root[this.arrAllies[_local4].name]._x = _root[this.arrAllies[_local4].name]._x + _local6;
_root[this.arrAllies[_local4].name]._y = _root[this.arrAllies[_local4].name]._y + _local5;
_local4++;
}
_local4 = 0;
while (_local4 < this.arrEnemies.length) {
_root[this.arrEnemies[_local4]]._x = _root[this.arrEnemies[_local4]]._x + _local6;
_root[this.arrEnemies[_local4]]._y = _root[this.arrEnemies[_local4]]._y + _local5;
_local4++;
}
}
}
}
}
};
_local2.DamageExplosionSmall = function (xloc, yloc, maxDamage) {
var _local4 = new Vector();
_local4._x = xloc;
_local4._y = yloc;
var _local5 = this.CreateEffect("damageExplosionSmall", _local4, false, "", "");
_root[_local5]._width = this.RandNum(80, 150);
_root[_local5]._yscale = _root[_local5]._xscale;
_global.SoundManager.PlaySound("SmallExplosion");
};
_local2.DamageExplosionMedium = function (xloc, yloc, maxDamage) {
var _local4 = new Vector();
_local4._x = xloc;
_local4._y = yloc;
var _local5 = this.CreateEffect("damageExplosionBig", _local4, false, "", "");
_root[_local5]._width = this.RandNum(100, 175);
_root[_local5]._yscale = _root[_local5]._xscale;
_global.SoundManager.PlaySound("MediumExplosion");
this.FlashScreen();
this.ShakeScreen(20);
};
_local2.DamageExplosionBig = function (xloc, yloc, maxDamage) {
var _local3 = new Vector();
_local3._x = xloc;
_local3._y = yloc;
var _local4 = this.CreateEffect("damageExplosionBig", _local3, false, "", "");
_root[_local4]._width = this.RandNum(150, 250);
_root[_local4]._yscale = _root[_local4]._xscale;
this.FlashScreen();
this.ShakeScreen(20);
};
_local2.StartShieldSelect = function () {
if (_global.gamePaused == false) {
if (this.blnBreakMode == false) {
if (_root[this.arrAllies[this.intGunSelected].selectField].hitTest(_xmouse, _ymouse)) {
this.blnShieldSelect = true;
this.vecShieldStart._x = _root[this.arrAllies[this.intGunSelected].name]._x;
this.vecShieldStart._y = _root[this.arrAllies[this.intGunSelected].name]._y;
}
}
}
};
_local2.EndShieldSelect = function () {
if (this.blnShieldSelect == true) {
this.blnShieldSelect = false;
_root.lines.clear();
if (_global.gamePaused == false) {
if (this.blnBreakMode == false) {
var _local5 = 0;
while (_local5 < this.arrAllies.length) {
if (_local5 != this.intGunSelected) {
if (_root[this.arrAllies[_local5].selectField].hitTest(_xmouse, _ymouse)) {
var _local8 = false;
var _local4 = 0;
while (_local4 < this.arrShields.length) {
if (this.arrShields[_local4].from == this.arrAllies[this.intGunSelected].name) {
this.RemoveEffect(this.arrShields[_local4].name);
_root[this.arrAllies[this.intGunSelected].name].gun.energy_mc._visible = true;
_root[this.arrAllies[this.intGunSelected].name].gun.energy_mc.gotoAndPlay(1);
var _local6 = new Vector();
_local6._x = _root[this.arrAllies[_local5].name]._x;
_local6._y = _root[this.arrAllies[_local5].name]._y - 15;
var _local7 = new Vector();
_local7._x = this.vecShieldStart._x - _local6._x;
_local7._y = this.vecShieldStart._y - _local6._y;
var _local10 = Math.atan2(_local7._y, _local7._x);
var _local11 = (360 * _local10) / (Math.PI*2);
var _local9 = this.CreateEffect("shield", _local6, false, "", "");
this.arrShields[_local4].to = this.arrAllies[_local5].name;
this.arrShields[_local4].from = this.arrAllies[this.intGunSelected].name;
this.arrShields[_local4].power = 0.3;
this.arrShields[_local4].avoid = false;
this.arrShields[_local4].name = _local9;
_root[_local9]._rotation = _local11;
_local8 = true;
break;
}
_local4++;
}
if (_local8 == false) {
_root[this.arrAllies[this.intGunSelected].name].gun.energy_mc._visible = true;
_root[this.arrAllies[this.intGunSelected].name].gun.energy_mc.gotoAndPlay(1);
var _local6 = new Vector();
_local6._x = _root[this.arrAllies[_local5].name]._x;
_local6._y = _root[this.arrAllies[_local5].name]._y - 15;
var _local7 = new Vector();
_local7._x = this.vecShieldStart._x - _local6._x;
_local7._y = this.vecShieldStart._y - _local6._y;
var _local10 = Math.atan2(_local7._y, _local7._x);
var _local11 = (360 * _local10) / (Math.PI*2);
var _local9 = this.CreateEffect("shield", _local6, false, "", "");
this.arrShields.push({to:this.arrAllies[_local5].name, from:this.arrAllies[this.intGunSelected].name, power:this.arrAllies[this.intGunSelected].data, avoid:false, name:_local9});
_root[_local9]._rotation = _local11;
}
break;
}
}
_local5++;
}
}
}
}
};
_local2.DrawLines = function () {
if (this.blnShieldSelect == true) {
_root.lines.clear();
_root.lines.lineStyle(2, 16724889, 80);
var _local3 = new Object();
var _local4 = new Object();
_local3.x = this.vecShieldStart._x;
_local3.y = this.vecShieldStart._y;
_local4.x = _xmouse;
_local4.y = _ymouse;
_root.lines.globalToLocal(_local3);
_root.lines.globalToLocal(_local4);
_root.lines.moveTo(_local3.x, _local3.y);
_root.lines.lineTo(_local4.x, _local4.y);
var _local5 = new Vector();
_local5._x = this.vecShieldStart._x - _xmouse;
_local5._y = this.vecShieldStart._y - _ymouse;
var _local9 = Math.atan2(_local5._y, _local5._x);
var _local7 = (360 * _local9) / (Math.PI*2);
var _local8 = (Math.PI * (_local7 + 35)) / 180;
var _local6 = (Math.PI * (_local7 - 35)) / 180;
_local5._x = Math.cos(_local8) * 8;
_local5._y = Math.sin(_local8) * 8;
_local3.x = _xmouse;
_local3.y = _ymouse;
_local4.x = _local5._x + _xmouse;
_local4.y = _local5._y + _ymouse;
_root.lines.globalToLocal(_local3);
_root.lines.globalToLocal(_local4);
_root.lines.moveTo(_local3.x, _local3.y);
_root.lines.lineTo(_local4.x, _local4.y);
_local5._x = Math.cos(_local6) * 8;
_local5._y = Math.sin(_local6) * 8;
_local3.x = _xmouse;
_local3.y = _ymouse;
_local4.x = _local5._x + _xmouse;
_local4.y = _local5._y + _ymouse;
_root.lines.globalToLocal(_local3);
_root.lines.globalToLocal(_local4);
_root.lines.moveTo(_local3.x, _local3.y);
_root.lines.lineTo(_local4.x, _local4.y);
}
};
_local2.GetNumCampaignsWon = function () {
var _local2 = 0;
if (this.beatOceanCampaign.Get() != -1) {
_local2++;
}
if (this.beatSkyCampaign.Get() != -1) {
_local2++;
}
if (this.beatPlainsCampaign.Get() != -1) {
_local2++;
}
if (this.beatPeaksCampaign.Get() != -1) {
_local2++;
}
if (this.beatMountainCampaign.Get() != -1) {
_local2++;
}
if (this.beatCityCampaign.Get() != -1) {
_local2++;
}
if (this.beatSouthCampaign.Get() != -1) {
_local2++;
}
if (this.beatDesertCampaign.Get() != -1) {
_local2++;
}
return(_local2);
};
_local2.MarkLevelAsComplete = function () {
var _local2 = false;
if (this.beatOceanCampaign.Get() == -1) {
this.beatOceanCampaign.Set(230600);
_local2 = true;
}
if (_local2 == false) {
if (this.beatPeaksCampaign.Get() == -1) {
this.beatPeaksCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatPlainsCampaign.Get() == -1) {
this.beatPlainsCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatMountainCampaign.Get() == -1) {
this.beatMountainCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatCityCampaign.Get() == -1) {
this.beatCityCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatDesertCampaign.Get() == -1) {
this.beatDesertCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatSkyCampaign.Get() == -1) {
this.beatSkyCampaign.Set(230600);
_local2 = true;
}
}
if (_local2 == false) {
if (this.beatSouthCampaign.Get() == -1) {
this.beatSouthCampaign.Set(230600);
_local2 = true;
}
}
};
_local2.GetShieldTarget = function (excludeTarget) {
var _local5 = new Array();
var _local4 = 0;
var _local3 = 0;
while (_local3 < this.arrEnemies.length) {
if (this.arrEnemies[_local3] != excludeTarget) {
if (((((_root[this.arrEnemies[_local3]].type == "Enemy_19") || (_root[this.arrEnemies[_local3]].type == "Enemy_13")) || (_root[this.arrEnemies[_local3]].type == "Enemy_22")) || (_root[this.arrEnemies[_local3]].type == "Enemy_33")) || (_root[this.arrEnemies[_local3]].type == "Enemy_34")) {
_local4 = _local4 + 4;
} else if ((_root[this.arrEnemies[_local3]].type == "Enemy_10") || (_root[this.arrEnemies[_local3]].type == "Enemy_8")) {
_local4 = _local4 + 2;
} else if ((((_root[this.arrEnemies[_local3]].type == "Enemy_30") || (_root[this.arrEnemies[_local3]].type == "Enemy_31")) || (_root[this.arrEnemies[_local3]].type == "Enemy_16")) || (_root[this.arrEnemies[_local3]].type == "Enemy_7")) {
_local4 = _local4 + -3;
} else if (((_root[this.arrEnemies[_local3]].type == "Enemy_2") || (_root[this.arrEnemies[_local3]].type == "Enemy_5")) || (_root[this.arrEnemies[_local3]].type == "Enemy_32")) {
_local4 = _local4 + -1;
} else if (_root[this.arrEnemies[_local3]].type == "Enemy_MonsterBullet") {
_local4 = _local4 + -20;
}
_local4 = _local4 - _root[this.arrEnemies[_local3]].GetNumShields();
_local5.push({name:this.arrEnemies[_local3], points:_local4});
_local4 = 0;
}
_local3++;
}
var _local8 = "";
_local5.sortOn(["points", "name"]);
if (_local5.length == 0) {
_local8 = "";
} else if (_local5[_local5.length - 1].points < -2) {
_local8 = "";
} else {
_local8 = _local5[_local5.length - 1].name;
}
return(_local8);
};
ASSetPropFlags(_global.StormWindsGame.prototype, null, 1);
#endinitclip
Symbol 1920 MovieClip [__Packages.LevelManager] Frame 0
#initclip
if (!_global.LevelManager) {
var _local1 = function () {
this.intLevel = 0;
this.intEnemiesThisLevel = 0;
this.strCampaign = "pass_bt";
this.arrEnemyQueue = new Array();
this.blnBossOut = false;
this.blnBossKilled = false;
this.endWaveWait = 0;
this.waitCounter = 0;
this.blnRunning = false;
};
_global.LevelManager = _local1;
var _local2 = _local1.prototype;
_local2.Run = function () {
if (this.blnRunning == true) {
if (this.waitCounter == 0) {
if (this.intCreatedThisLevel < this.intEnemiesThisLevel) {
var _local3 = -1;
if (this.arrEnemyQueue.length == 0) {
this.GenerateWave();
}
if (this.strCampaign.substr(0, 9) == "challenge") {
_local3 = 0;
} else {
_local3 = Math.round(Math.random() * (this.arrEnemyQueue.length - 1));
}
_root.game.SpawnEnemy(this.arrEnemyQueue[_local3].name);
this.waitCounter = this.arrEnemyQueue[_local3].wait;
if (this.arrEnemyQueue.length == 1) {
this.waitCounter = this.endWaveWait;
}
this.arrEnemyQueue.splice(_local3, 1);
this.intCreatedThisLevel++;
if (this.intCreatedThisLevel >= this.intEnemiesThisLevel) {
}
}
} else {
if (this.waitCounter != 999999) {
this.waitCounter--;
}
if (_root.game.EnemiesAlive() == 0) {
this.waitCounter = 0;
}
}
}
};
_local2.UpdateLevel = function (newLevel, newCampaign) {
this.intLevel = newLevel;
this.strCampaign = newCampaign;
this.ResetLevel();
};
_local2.ResetLevel = function () {
this.intCreatedThisLevel = 0;
delete this.arrEnemyQueue;
this.arrEnemyQueue = new Array();
this.blnBossKilled = false;
this.blnBossOut = false;
if (this.strCampaign == "pass_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 20;
break;
case 4 :
this.intEnemiesThisLevel = 25;
break;
case 5 :
this.intEnemiesThisLevel = 25;
break;
case 6 :
this.intEnemiesThisLevel = 30;
break;
case 7 :
this.intEnemiesThisLevel = 30;
break;
case 8 :
this.intEnemiesThisLevel = 35;
break;
case 9 :
this.intEnemiesThisLevel = 40;
break;
case 10 :
this.intEnemiesThisLevel = 45;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "peaks_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 20;
break;
case 4 :
this.intEnemiesThisLevel = 25;
break;
case 5 :
this.intEnemiesThisLevel = 25;
break;
case 6 :
this.intEnemiesThisLevel = 30;
break;
case 7 :
this.intEnemiesThisLevel = 30;
break;
case 8 :
this.intEnemiesThisLevel = 30;
break;
case 9 :
this.intEnemiesThisLevel = 30;
break;
case 10 :
this.intEnemiesThisLevel = 30;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "ocean_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 15;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 20;
break;
case 4 :
this.intEnemiesThisLevel = 25;
break;
case 5 :
this.intEnemiesThisLevel = 25;
break;
case 6 :
this.intEnemiesThisLevel = 30;
break;
case 7 :
this.intEnemiesThisLevel = 30;
break;
case 8 :
this.intEnemiesThisLevel = 30;
break;
case 9 :
this.intEnemiesThisLevel = 30;
break;
case 10 :
this.intEnemiesThisLevel = 30;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "sky_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 25;
break;
case 4 :
this.intEnemiesThisLevel = 30;
break;
case 5 :
this.intEnemiesThisLevel = 35;
break;
case 6 :
this.intEnemiesThisLevel = 35;
break;
case 7 :
this.intEnemiesThisLevel = 40;
break;
case 8 :
this.intEnemiesThisLevel = 30;
break;
case 9 :
this.intEnemiesThisLevel = 40;
break;
case 10 :
this.intEnemiesThisLevel = 45;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "city_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 25;
break;
case 4 :
this.intEnemiesThisLevel = 30;
break;
case 5 :
this.intEnemiesThisLevel = 35;
break;
case 6 :
this.intEnemiesThisLevel = 35;
break;
case 7 :
this.intEnemiesThisLevel = 35;
break;
case 8 :
this.intEnemiesThisLevel = 35;
break;
case 9 :
this.intEnemiesThisLevel = 40;
break;
case 10 :
this.intEnemiesThisLevel = 999999 /* 0x0F423F */;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "south_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 30;
break;
case 3 :
this.intEnemiesThisLevel = 35;
break;
case 4 :
this.intEnemiesThisLevel = 35;
break;
case 5 :
this.intEnemiesThisLevel = 35;
break;
case 6 :
this.intEnemiesThisLevel = 50;
break;
case 7 :
this.intEnemiesThisLevel = 50;
break;
case 8 :
this.intEnemiesThisLevel = 50;
break;
case 9 :
this.intEnemiesThisLevel = 70;
break;
case 10 :
this.intEnemiesThisLevel = 999999 /* 0x0F423F */;
break;
default :
this.intEnemiesThisLevel = 20;
}
} else if (this.strCampaign == "plains_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 20;
break;
case 4 :
this.intEnemiesThisLevel = 25;
break;
case 5 :
this.intEnemiesThisLevel = 25;
break;
case 6 :
this.intEnemiesThisLevel = 30;
break;
case 7 :
this.intEnemiesThisLevel = 30;
break;
case 8 :
this.intEnemiesThisLevel = 30;
break;
case 9 :
this.intEnemiesThisLevel = 30;
break;
case 10 :
this.intEnemiesThisLevel = 45;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "desert_bt") {
switch (this.intLevel) {
case 1 :
this.intEnemiesThisLevel = 20;
break;
case 2 :
this.intEnemiesThisLevel = 20;
break;
case 3 :
this.intEnemiesThisLevel = 25;
break;
case 4 :
this.intEnemiesThisLevel = 30;
break;
case 5 :
this.intEnemiesThisLevel = 35;
break;
case 6 :
this.intEnemiesThisLevel = 35;
break;
case 7 :
this.intEnemiesThisLevel = 35;
break;
case 8 :
this.intEnemiesThisLevel = 20;
break;
case 9 :
this.intEnemiesThisLevel = 30;
break;
case 10 :
this.intEnemiesThisLevel = 999999 /* 0x0F423F */;
break;
default :
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge1_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 20;
}
} else if (this.strCampaign == "challenge2_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge3_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge4_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge5_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge6_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 40;
}
} else if (this.strCampaign == "challenge7_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 75;
}
} else if (this.strCampaign == "challenge8_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
} else if (this.strCampaign == "challenge9_bt") {
if (!(this.intLevel === 1)) {
} else {
this.intEnemiesThisLevel = 30;
}
}
};
_local2.GeneratePassWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_6", 1, 2, 100, 200, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
_local3 = new WorldInstruction(80);
_local3.AddInstruction("Enemy_3", 0, 1, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 1, 2, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 1, 2, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 0, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_3", 0, 1, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 1, 2, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_17", 3, 5, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 5, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 2, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_3", 1, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_17", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_3", 3, 4, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_17", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 1, 2, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 1, 2, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_6", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 1, 2, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_15", 2, 5, 40, 70, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_6", 3, 4, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 240);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 3, 5, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_15", 2, 5, 40, 70, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 15, 15, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 10 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
}
return(_local2);
};
_local2.GeneratePeaksWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 3, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 2, 60, 150, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 2, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_2", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 2, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 1, 2, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 2, 3, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 400);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(340, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 2, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 1, 2, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 2, 3, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 400);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 5 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 6 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_15", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 400);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 7 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 1, 3, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 400);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 8 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 3, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 9 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 400);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
break;
case 10 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_16", 1, 1, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 2, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
}
return(_local2);
};
_local2.GenerateDesertWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_3", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_34", 1, 3, 20, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_3", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_34", 1, 3, 20, 70, 0, 0);
_local3.AddInstruction("Enemy_31", 1, 2, 20, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(120, 300);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_32", 1, 1, 20, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 3, 5, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(120, 300);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 340);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_34", 1, 3, 20, 70, 0, 0);
_local3.AddInstruction("Enemy_32", 1, 1, 120, 150, 0, 0);
_local3.endOfWaveWait = this.RandNum(280, 380);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 1, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_15", 2, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(120, 300);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(150, 200);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_34", 2, 4, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_32", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(280, 380);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_34", 2, 4, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_32", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(280, 380);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_34", 1, 2, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(280, 380);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_5", 2, 4, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_33", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 1, 3, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_5", 2, 4, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_33", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_6", 1, 3, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_34", 1, 2, 50, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(220, 350);
_local2.push(_local3);
break;
case 10 :
this.bossName = "Enemy_22";
_local3 = new WorldInstruction(100);
_local3.AddInstruction("Enemy_31", 2, 3, 30, 40, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
}
return(_local2);
};
_local2.GenerateOceanWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 1, 60, 100, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_2", 1, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 1, 1, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 140, 0, 0);
_local3.AddInstruction("Enemy_2", 1, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 3, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 1, 4, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 3, 6, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 1, 3, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 3, 6, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 2, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 3, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 1, 3, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_4", 3, 7, 60, 160, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 3, 7, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_2", 1, 3, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 1, 4, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 3, 6, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 3, 7, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 1, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_4", 6, 10, 60, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 3, 6, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_15", 4, 10, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 3, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 160);
_local2.push(_local3);
break;
case 10 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_3", 2, 4, 100, 160, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(240, 540);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_15", 3, 7, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_10", 1, 1, 120, 160, 0, 0);
_local3.AddInstruction("Enemy_2", 0, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(40, 60);
_local2.push(_local3);
}
return(_local2);
};
} else {
// unexpected jump
}
_local2.GeneratePlainsWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(250, 500);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 1, 4, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(250, 500);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local3.endOfWaveWait = this.RandNum(250, 500);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(250, 500);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 1, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(250, 500);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(250, 500);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 550);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_3", 1, 2, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 1, 2, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_15", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(160, 300);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_3", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(160, 300);
_local3 = new WorldInstruction(10);
_local3.AddInstruction("Enemy_3", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 1, 3, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 2, 5, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 4, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_18", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(160, 300);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_3", 2, 4, 80, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 3, 4, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 2, 5, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_3", 2, 5, 80, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 5, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(50);
_local3.AddInstruction("Enemy_7", 2, 5, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(80);
_local3.AddInstruction("Enemy_18", 3, 5, 60, 90, 0, 0);
_local3.AddInstruction("Enemy_3", 3, 6, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(200, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(50);
_local3.AddInstruction("Enemy_7", 2, 5, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
break;
case 10 :
_local3 = new WorldInstruction(80);
_local3.AddInstruction("Enemy_18", 3, 5, 60, 90, 0, 0);
_local3.AddInstruction("Enemy_3", 4, 6, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 9, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(130, 250);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_7", 2, 5, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(60, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_18", 2, 4, 60, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 120);
_local2.push(_local3);
}
return(_local2);
};
_local2.GenerateCityWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 1, 1, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 7, 20, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_6", 1, 1, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_15", 2, 3, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 6, 20, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_6", 1, 1, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_7", 15, 15, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_6", 1, 1, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 3, 5, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_15", 2, 5, 40, 70, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 240);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 3, 5, 50, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 3, 5, 50, 120, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 120, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 3, 5, 50, 110, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 2, 70, 110, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 170);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 4, 20, 40, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 70, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 170);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 4, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 170);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(80);
_local3.AddInstruction("Enemy_7", 4, 6, 50, 110, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 70, 110, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 4, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 20, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 120);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 110, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 110, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 40, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(50);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 2, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
break;
case 10 :
this.bossName = "Enemy_20";
_local3 = new WorldInstruction(100);
_local3.AddInstruction("Enemy_2", 0, 1, 30, 40, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 5, 20, 50, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
}
return(_local2);
};
_local2.GenerateSkyWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_9", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 5, 6, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(110, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 1, 2, 40, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 5, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(110, 140);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_9", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 5, 6, 40, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(110, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 2, 3, 40, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 40, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(110, 140);
_local2.push(_local3);
break;
case 3 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_9", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 5, 6, 30, 60, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 90);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 2, 3, 40, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 4, 6, 40, 70, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 90, 0, 0);
_local3.endOfWaveWait = this.RandNum(80, 90);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_16", 1, 1, 40, 80, 0, 0);
_local3.AddInstruction("Enemy_17", 2, 3, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(150, 160);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_9", 1, 1, 90, 140, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 40, 60, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(60, 80);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 1, 1, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 4, 40, 70, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 40, 80, 0, 0);
_local3.endOfWaveWait = this.RandNum(60, 80);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 1, 2, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_5", 0, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 100);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 100);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 100);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 100);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_12", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(60, 100);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(100);
_local3.AddInstruction("Enemy_11", 2, 3, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 5, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(70, 100);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 1, 2, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_11", 1, 2, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 1, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 2, 3, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_11", 2, 3, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
break;
case 10 :
_local3 = new WorldInstruction(100);
_local3.AddInstruction("Enemy_17", 3, 5, 65, 90, 0, 0);
_local3.AddInstruction("Enemy_13", 3, 4, 220, 250, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
}
return(_local2);
};
_local2.GenerateSouthWave = function () {
var _local2 = new Array();
switch (this.intLevel) {
case 1 :
var _local3;
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_11", 2, 3, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_11", 2, 3, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_17", 1, 2, 70, 120, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 200);
_local2.push(_local3);
break;
case 2 :
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_7", 2, 4, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 4, 6, 60, 140, 0, 0);
_local3.AddInstruction("Enemy_6", 3, 4, 60, 150, 0, 0);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 2, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
_local2.push(_local3);
_local3 = new WorldInstruction(40);
_local3.AddInstruction("Enemy_13", 1, 1, 300, 350, 0, 0);
_local3.endOfWaveWait = this.RandNum(300, 350);
_local2.push(_local3);
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_17", 2, 3, 100, 200, 0, 0);
_local3.AddInstruction("Enemy_11", 1, 1, 70, 90, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 3, 60, 140, 0, 0);
_local3.endOfWaveWait = this.RandNum(140, 180);
break;
case 3 :
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 110, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 110, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 40, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(50);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 2, 60, 120, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
break;
case 4 :
_local3 = new WorldInstruction(20);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 100, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 240, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 110, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 40, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
_local3 = new WorldInstruction(50);
_local3.AddInstruction("Enemy_13", 1, 1, 200, 220, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 50, 0, 0);
_local3.AddInstruction("Enemy_7", 1, 2, 60, 100, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
break;
case 5 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 100, 0, 0);
_local3.AddInstruction("Enemy_13", 2, 2, 300, 340, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_12", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 20, 40, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
break;
case 6 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 100, 0, 0);
_local3.AddInstruction("Enemy_13", 2, 2, 300, 340, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 10, 20, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_12", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_6", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_11", 2, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
break;
case 7 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 80, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 90, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 70, 100, 0, 0);
_local3.AddInstruction("Enemy_13", 2, 3, 300, 340, 0, 0);
_local3.AddInstruction("Enemy_11", 2, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 240);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 80, 0, 0);
_local3.AddInstruction("Enemy_12", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 10, 30, 0, 0);
_local3.AddInstruction("Enemy_11", 2, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
break;
case 8 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 80, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 50, 70, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 70, 100, 0, 0);
_local3.AddInstruction("Enemy_13", 2, 3, 300, 340, 0, 0);
_local3.AddInstruction("Enemy_11", 2, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(180, 220);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 70, 0, 0);
_local3.AddInstruction("Enemy_12", 1, 2, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 60, 100, 0, 0);
_local3.AddInstruction("Enemy_5", 2, 3, 10, 30, 0, 0);
_local3.AddInstruction("Enemy_11", 2, 3, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 120);
_local2.push(_local3);
break;
case 9 :
_local3 = new WorldInstruction(70);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 80, 0, 0);
_local3.AddInstruction("Enemy_7", 3, 4, 40, 60, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 70, 80, 0, 0);
_local3.AddInstruction("Enemy_13", 3, 4, 200, 240, 0, 0);
_local3.AddInstruction("Enemy_11", 3, 4, 30, 50, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 140);
_local2.push(_local3);
_local3 = new WorldInstruction(30);
_local3.AddInstruction("Enemy_17", 2, 3, 50, 70, 0, 0);
_local3.AddInstruction("Enemy_12", 1, 2, 60, 80, 0, 0);
_local3.AddInstruction("Enemy_8", 2, 3, 60, 80, 0, 0);
_local3.AddInstruction("Enemy_5", 3, 4, 10, 30, 0, 0);
_local3.AddInstruction("Enemy_11", 3, 4, 30, 50, 0, 0);
_local3.AddInstruction("Enemy_13", 1, 2, 180, 200, 0, 0);
_local3.endOfWaveWait = this.RandNum(100, 140);
_local2.push(_local3);
break;
case 10 :
this.bossName = "Enemy_21";
_local3 = new WorldInstruction(60);
_local3.AddInstruction("Enemy_7", 3, 3, 40, 60, 0, 0);
_local3.AddInstruction("Enemy_11", 3, 4, 30, 70, 0, 0);
_local3.endOfWaveWait = 999999 /* 0x0F423F */;
_local2.push(_local3);
}
return(_local2);
};
_local2.GenerateWave = function () {
var _local2;
this.bossName = "";
if (this.strCampaign == "pass_bt") {
_local2 = this.GeneratePassWave();
} else if (this.strCampaign == "peaks_bt") {
_local2 = this.GeneratePeaksWave();
} else if (this.strCampaign == "ocean_bt") {
_local2 = this.GenerateOceanWave();
} else if (this.strCampaign == "sky_bt") {
_local2 = this.GenerateSkyWave();
} else if (this.strCampaign == "city_bt") {
_local2 = this.GenerateCityWave();
} else if (this.strCampaign == "south_bt") {
_local2 = this.GenerateSouthWave();
} else if (this.strCampaign == "plains_bt") {
_local2 = this.GeneratePlainsWave();
} else if (this.strCampaign == "desert_bt") {
_local2 = this.GenerateDesertWave();
}
var _local12 = 0;
var _local13 = 0;
var _local16 = 0;
var _local14 = 0;
var _local5 = 0;
while (_local5 < _local2.length) {
_local16 = _local16 + _local2[_local5].chance;
_local5++;
}
_local14 = Math.round(Math.random() * _local16);
_local5 = 0;
while (_local5 < _local2.length) {
_local13 = _local12 + _local2[_local5].chance;
_local2[_local5].minChance = _local12;
_local2[_local5].maxChance = _local13;
_local12 = _local13;
_local5++;
}
var _local4 = -1;
_local5 = 0;
while (_local5 < _local2.length) {
if ((_local14 >= _local2[_local5].minChance) && (_local14 < _local2[_local5].maxChance)) {
_local4 = _local5;
break;
}
_local5++;
}
if (_local4 == -1) {
_local4 = _local2.length - 1;
}
if (this.bossName != "") {
if ((this.blnBossOut == false) && (this.blnBossKilled == false)) {
this.blnBossOut = true;
this.arrEnemyQueue.push({name:this.bossName, wait:40});
}
}
_local2[_local4].Begin();
var _local17 = _local2[_local4].GetNumInstructions();
var _local10 = 0;
while (_local10 < _local17) {
var _local7 = _local2[_local4].enemyNum;
var _local11 = _local2[_local4].enemyType;
var _local8 = _local2[_local4].nextEnemyWait;
var _local15 = _local2[_local4].miniWaveWait;
var _local3 = 0;
while (_local3 < _local7) {
this.arrEnemyQueue.push({name:_local11, wait:_local8});
_local3++;
}
_local2[_local4].Next();
_local10++;
}
this.endWaveWait = _local2[_local4].endOfWaveWait;
this.waitCounter = 0;
};
_local2.GenerateChallengeLevel = function () {
if (this.strCampaign == "challenge1_bt") {
this.BuildChallenge1();
} else if (this.strCampaign == "challenge2_bt") {
this.BuildChallenge2();
} else if (this.strCampaign == "challenge3_bt") {
this.BuildChallenge3();
} else if (this.strCampaign == "challenge4_bt") {
this.BuildChallenge4();
} else if (this.strCampaign == "challenge5_bt") {
this.BuildChallenge5();
} else if (this.strCampaign == "challenge6_bt") {
this.BuildChallenge6();
} else if (this.strCampaign == "challenge7_bt") {
this.BuildChallenge7();
} else if (this.strCampaign == "challenge8_bt") {
this.BuildChallenge8();
} else if (this.strCampaign == "challenge9_bt") {
this.BuildChallenge9();
}
};
_local2.BuildChallenge1 = function () {
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:50});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:140});
this.arrEnemyQueue.push({name:"Enemy_2", wait:40});
this.arrEnemyQueue.push({name:"Enemy_2", wait:40});
this.arrEnemyQueue.push({name:"Enemy_2", wait:40});
this.arrEnemyQueue.push({name:"Enemy_2", wait:40});
this.arrEnemyQueue.push({name:"Enemy_2", wait:140});
this.arrEnemyQueue.push({name:"Enemy_2", wait:20});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:140});
this.arrEnemyQueue.push({name:"Enemy_2", wait:20});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
this.arrEnemyQueue.push({name:"Enemy_2", wait:30});
};
_local2.BuildChallenge2 = function () {
this.arrEnemyQueue.push({name:"Enemy_13", wait:305});
this.arrEnemyQueue.push({name:"Enemy_13", wait:305});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:294});
this.arrEnemyQueue.push({name:"Enemy_13", wait:294});
this.arrEnemyQueue.push({name:"Enemy_13", wait:294});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:322});
this.arrEnemyQueue.push({name:"Enemy_13", wait:322});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:281});
this.arrEnemyQueue.push({name:"Enemy_13", wait:281});
this.arrEnemyQueue.push({name:"Enemy_13", wait:281});
this.arrEnemyQueue.push({name:"Enemy_13", wait:281});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:279});
this.arrEnemyQueue.push({name:"Enemy_13", wait:279});
this.arrEnemyQueue.push({name:"Enemy_13", wait:279});
this.arrEnemyQueue.push({name:"Enemy_13", wait:279});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:243});
this.arrEnemyQueue.push({name:"Enemy_13", wait:243});
this.arrEnemyQueue.push({name:"Enemy_13", wait:243});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:320});
this.arrEnemyQueue.push({name:"Enemy_13", wait:320});
this.arrEnemyQueue.push({name:"Enemy_13", wait:320});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_13", wait:288});
this.arrEnemyQueue.push({name:"Enemy_13", wait:288});
this.arrEnemyQueue.push({name:"Enemy_13", wait:288});
this.arrEnemyQueue.push({name:"Enemy_13", wait:288});
this.arrEnemyQueue.push({name:"Enemy_13", wait:999999});
};
_local2.BuildChallenge3 = function () {
this.arrEnemyQueue.push({name:"Enemy_17", wait:142});
this.arrEnemyQueue.push({name:"Enemy_11", wait:109});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_2", wait:64});
this.arrEnemyQueue.push({name:"Enemy_10", wait:387});
this.arrEnemyQueue.push({name:"Enemy_11", wait:109});
this.arrEnemyQueue.push({name:"Enemy_2", wait:64});
this.arrEnemyQueue.push({name:"Enemy_17", wait:142});
this.arrEnemyQueue.push({name:"Enemy_16", wait:369});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:347});
this.arrEnemyQueue.push({name:"Enemy_2", wait:106});
this.arrEnemyQueue.push({name:"Enemy_5", wait:20});
this.arrEnemyQueue.push({name:"Enemy_16", wait:396});
this.arrEnemyQueue.push({name:"Enemy_10", wait:377});
this.arrEnemyQueue.push({name:"Enemy_11", wait:91});
this.arrEnemyQueue.push({name:"Enemy_17", wait:152});
this.arrEnemyQueue.push({name:"Enemy_17", wait:152});
this.arrEnemyQueue.push({name:"Enemy_2", wait:344});
this.arrEnemyQueue.push({name:"Enemy_11", wait:94});
this.arrEnemyQueue.push({name:"Enemy_5", wait:24});
this.arrEnemyQueue.push({name:"Enemy_17", wait:190});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_10", wait:361});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_17", wait:319});
this.arrEnemyQueue.push({name:"Enemy_17", wait:197});
this.arrEnemyQueue.push({name:"Enemy_5", wait:25});
this.arrEnemyQueue.push({name:"Enemy_5", wait:25});
this.arrEnemyQueue.push({name:"Enemy_17", wait:197});
this.arrEnemyQueue.push({name:"Enemy_10", wait:360});
this.arrEnemyQueue.push({name:"Enemy_2", wait:102});
this.arrEnemyQueue.push({name:"Enemy_11", wait:108});
this.arrEnemyQueue.push({name:"Enemy_2", wait:337});
};
_local2.BuildChallenge4 = function () {
this.arrEnemyQueue.push({name:"Enemy_5", wait:50});
this.arrEnemyQueue.push({name:"Enemy_15", wait:98});
this.arrEnemyQueue.push({name:"Enemy_5", wait:50});
this.arrEnemyQueue.push({name:"Enemy_5", wait:50});
this.arrEnemyQueue.push({name:"Enemy_15", wait:98});
this.arrEnemyQueue.push({name:"Enemy_5", wait:50});
this.arrEnemyQueue.push({name:"Enemy_5", wait:303});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:34});
this.arrEnemyQueue.push({name:"Enemy_5", wait:529});
this.arrEnemyQueue.push({name:"Enemy_5", wait:35});
this.arrEnemyQueue.push({name:"Enemy_5", wait:35});
this.arrEnemyQueue.push({name:"Enemy_5", wait:35});
this.arrEnemyQueue.push({name:"Enemy_5", wait:441});
this.arrEnemyQueue.push({name:"Enemy_5", wait:27});
this.arrEnemyQueue.push({name:"Enemy_5", wait:27});
this.arrEnemyQueue.push({name:"Enemy_5", wait:546});
this.arrEnemyQueue.push({name:"Enemy_5", wait:47});
this.arrEnemyQueue.push({name:"Enemy_5", wait:47});
this.arrEnemyQueue.push({name:"Enemy_5", wait:340});
this.arrEnemyQueue.push({name:"Enemy_5", wait:38});
this.arrEnemyQueue.push({name:"Enemy_5", wait:38});
this.arrEnemyQueue.push({name:"Enemy_5", wait:38});
this.arrEnemyQueue.push({name:"Enemy_15", wait:98});
this.arrEnemyQueue.push({name:"Enemy_5", wait:38});
this.arrEnemyQueue.push({name:"Enemy_15", wait:301});
this.arrEnemyQueue.push({name:"Enemy_5", wait:23});
this.arrEnemyQueue.push({name:"Enemy_5", wait:23});
this.arrEnemyQueue.push({name:"Enemy_5", wait:23});
this.arrEnemyQueue.push({name:"Enemy_5", wait:343});
};
_local2.BuildChallenge5 = function () {
this.arrEnemyQueue.push({name:"Enemy_15", wait:65});
this.arrEnemyQueue.push({name:"Enemy_15", wait:65});
this.arrEnemyQueue.push({name:"Enemy_7", wait:108});
this.arrEnemyQueue.push({name:"Enemy_15", wait:65});
this.arrEnemyQueue.push({name:"Enemy_7", wait:108});
this.arrEnemyQueue.push({name:"Enemy_15", wait:65});
this.arrEnemyQueue.push({name:"Enemy_8", wait:214});
this.arrEnemyQueue.push({name:"Enemy_15", wait:108});
this.arrEnemyQueue.push({name:"Enemy_15", wait:216});
this.arrEnemyQueue.push({name:"Enemy_15", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_15", wait:97});
this.arrEnemyQueue.push({name:"Enemy_15", wait:306});
this.arrEnemyQueue.push({name:"Enemy_15", wait:89});
this.arrEnemyQueue.push({name:"Enemy_15", wait:200});
this.arrEnemyQueue.push({name:"Enemy_15", wait:79});
this.arrEnemyQueue.push({name:"Enemy_15", wait:79});
this.arrEnemyQueue.push({name:"Enemy_7", wait:97});
this.arrEnemyQueue.push({name:"Enemy_8", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_15", wait:79});
this.arrEnemyQueue.push({name:"Enemy_8", wait:210});
this.arrEnemyQueue.push({name:"Enemy_15", wait:79});
this.arrEnemyQueue.push({name:"Enemy_15", wait:97});
this.arrEnemyQueue.push({name:"Enemy_15", wait:79});
this.arrEnemyQueue.push({name:"Enemy_15", wait:234});
this.arrEnemyQueue.push({name:"Enemy_15", wait:77});
this.arrEnemyQueue.push({name:"Enemy_7", wait:107});
this.arrEnemyQueue.push({name:"Enemy_15", wait:77});
this.arrEnemyQueue.push({name:"Enemy_15", wait:77});
this.arrEnemyQueue.push({name:"Enemy_15", wait:999999});
this.arrEnemyQueue.push({name:"Enemy_15", wait:77});
this.arrEnemyQueue.push({name:"Enemy_8", wait:224});
this.arrEnemyQueue.push({name:"Enemy_8", wait:224});
this.arrEnemyQueue.push({name:"Enemy_7", wait:107});
this.arrEnemyQueue.push({name:"Enemy_15", wait:203});
};
_local2.BuildChallenge6 = function () {
this.arrEnemyQueue.push({name:"Enemy_2", wait:51});
this.arrEnemyQueue.push({name:"Enemy_3", wait:185});
this.arrEnemyQueue.push({name:"Enemy_2", wait:51});
this.arrEnemyQueue.push({name:"Enemy_3", wait:152});
this.arrEnemyQueue.push({name:"Enemy_3", wait:233});
this.arrEnemyQueue.push({name:"Enemy_2", wait:39});
this.arrEnemyQueue.push({name:"Enemy_2", wait:39});
this.arrEnemyQueue.push({name:"Enemy_3", wait:151});
this.arrEnemyQueue.push({name:"Enemy_6", wait:80});
this.arrEnemyQueue.push({name:"Enemy_10", wait:217});
this.arrEnemyQueue.push({name:"Enemy_15", wait:69});
this.arrEnemyQueue.push({name:"Enemy_15", wait:69});
this.arrEnemyQueue.push({name:"Enemy_15", wait:69});
this.arrEnemyQueue.push({name:"Enemy_6", wait:80});
this.arrEnemyQueue.push({name:"Enemy_15", wait:106});
this.arrEnemyQueue.push({name:"Enemy_15", wait:75});
this.arrEnemyQueue.push({name:"Enemy_15", wait:75});
this.arrEnemyQueue.push({name:"Enemy_15", wait:75});
this.arrEnemyQueue.push({name:"Enemy_6", wait:80});
this.arrEnemyQueue.push({name:"Enemy_15", wait:116});
this.arrEnemyQueue.push({name:"Enemy_3", wait:194});
this.arrEnemyQueue.push({name:"Enemy_3", wait:194});
this.arrEnemyQueue.push({name:"Enemy_10", wait:217});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_3", wait:202});
this.arrEnemyQueue.push({name:"Enemy_3", wait:202});
this.arrEnemyQueue.push({name:"Enemy_2", wait:157});
this.arrEnemyQueue.push({name:"Enemy_15", wait:67});
this.arrEnemyQueue.push({name:"Enemy_15", wait:67});
this.arrEnemyQueue.push({name:"Enemy_6", wait:68});
this.arrEnemyQueue.push({name:"Enemy_15", wait:67});
this.arrEnemyQueue.push({name:"Enemy_6", wait:68});
this.arrEnemyQueue.push({name:"Enemy_15", wait:118});
this.arrEnemyQueue.push({name:"Enemy_15", wait:63});
this.arrEnemyQueue.push({name:"Enemy_6", wait:61});
this.arrEnemyQueue.push({name:"Enemy_15", wait:63});
this.arrEnemyQueue.push({name:"Enemy_15", wait:63});
this.arrEnemyQueue.push({name:"Enemy_15", wait:63});
this.arrEnemyQueue.push({name:"Enemy_6", wait:139});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_3", wait:222});
this.arrEnemyQueue.push({name:"Enemy_2", wait:68});
this.arrEnemyQueue.push({name:"Enemy_10", wait:217});
};
// unexpected jump
// unexpected jump
_local2.BuildChallenge7 = function () {
this.arrEnemyQueue.push({name:"Enemy_13", wait:304});
this.arrEnemyQueue.push({name:"Enemy_11", wait:37});
this.arrEnemyQueue.push({name:"Enemy_7", wait:66});
this.arrEnemyQueue.push({name:"Enemy_13", wait:304});
this.arrEnemyQueue.push({name:"Enemy_8", wait:74});
this.arrEnemyQueue.push({name:"Enemy_11", wait:37});
this.arrEnemyQueue.push({name:"Enemy_17", wait:61});
this.arrEnemyQueue.push({name:"Enemy_8", wait:74});
this.arrEnemyQueue.push({name:"Enemy_13", wait:304});
this.arrEnemyQueue.push({name:"Enemy_8", wait:74});
this.arrEnemyQueue.push({name:"Enemy_17", wait:61});
this.arrEnemyQueue.push({name:"Enemy_7", wait:66});
this.arrEnemyQueue.push({name:"Enemy_7", wait:193});
this.arrEnemyQueue.push({name:"Enemy_16", wait:93});
this.arrEnemyQueue.push({name:"Enemy_8", wait:88});
this.arrEnemyQueue.push({name:"Enemy_8", wait:88});
this.arrEnemyQueue.push({name:"Enemy_7", wait:62});
this.arrEnemyQueue.push({name:"Enemy_7", wait:62});
this.arrEnemyQueue.push({name:"Enemy_13", wait:333});
this.arrEnemyQueue.push({name:"Enemy_8", wait:88});
this.arrEnemyQueue.push({name:"Enemy_17", wait:74});
this.arrEnemyQueue.push({name:"Enemy_7", wait:62});
this.arrEnemyQueue.push({name:"Enemy_13", wait:333});
this.arrEnemyQueue.push({name:"Enemy_17", wait:74});
this.arrEnemyQueue.push({name:"Enemy_7", wait:62});
this.arrEnemyQueue.push({name:"Enemy_11", wait:44});
this.arrEnemyQueue.push({name:"Enemy_11", wait:44});
this.arrEnemyQueue.push({name:"Enemy_17", wait:183});
this.arrEnemyQueue.push({name:"Enemy_13", wait:208});
this.arrEnemyQueue.push({name:"Enemy_8", wait:74});
this.arrEnemyQueue.push({name:"Enemy_13", wait:208});
this.arrEnemyQueue.push({name:"Enemy_11", wait:49});
this.arrEnemyQueue.push({name:"Enemy_17", wait:63});
this.arrEnemyQueue.push({name:"Enemy_11", wait:49});
this.arrEnemyQueue.push({name:"Enemy_13", wait:208});
this.arrEnemyQueue.push({name:"Enemy_8", wait:74});
this.arrEnemyQueue.push({name:"Enemy_11", wait:49});
this.arrEnemyQueue.push({name:"Enemy_17", wait:63});
this.arrEnemyQueue.push({name:"Enemy_7", wait:59});
this.arrEnemyQueue.push({name:"Enemy_7", wait:59});
this.arrEnemyQueue.push({name:"Enemy_7", wait:59});
this.arrEnemyQueue.push({name:"Enemy_7", wait:59});
this.arrEnemyQueue.push({name:"Enemy_16", wait:106});
this.arrEnemyQueue.push({name:"Enemy_17", wait:63});
this.arrEnemyQueue.push({name:"Enemy_11", wait:135});
this.arrEnemyQueue.push({name:"Enemy_11", wait:36});
this.arrEnemyQueue.push({name:"Enemy_11", wait:36});
this.arrEnemyQueue.push({name:"Enemy_16", wait:90});
this.arrEnemyQueue.push({name:"Enemy_17", wait:78});
this.arrEnemyQueue.push({name:"Enemy_8", wait:76});
this.arrEnemyQueue.push({name:"Enemy_7", wait:55});
this.arrEnemyQueue.push({name:"Enemy_17", wait:78});
this.arrEnemyQueue.push({name:"Enemy_7", wait:55});
this.arrEnemyQueue.push({name:"Enemy_13", wait:215});
this.arrEnemyQueue.push({name:"Enemy_13", wait:215});
this.arrEnemyQueue.push({name:"Enemy_13", wait:215});
this.arrEnemyQueue.push({name:"Enemy_7", wait:55});
this.arrEnemyQueue.push({name:"Enemy_8", wait:76});
this.arrEnemyQueue.push({name:"Enemy_13", wait:215});
this.arrEnemyQueue.push({name:"Enemy_8", wait:76});
this.arrEnemyQueue.push({name:"Enemy_11", wait:36});
this.arrEnemyQueue.push({name:"Enemy_11", wait:36});
this.arrEnemyQueue.push({name:"Enemy_17", wait:115});
this.arrEnemyQueue.push({name:"Enemy_8", wait:73});
this.arrEnemyQueue.push({name:"Enemy_7", wait:48});
this.arrEnemyQueue.push({name:"Enemy_7", wait:48});
this.arrEnemyQueue.push({name:"Enemy_11", wait:42});
this.arrEnemyQueue.push({name:"Enemy_13", wait:159});
this.arrEnemyQueue.push({name:"Enemy_13", wait:159});
this.arrEnemyQueue.push({name:"Enemy_7", wait:48});
this.arrEnemyQueue.push({name:"Enemy_17", wait:50});
this.arrEnemyQueue.push({name:"Enemy_13", wait:159});
this.arrEnemyQueue.push({name:"Enemy_8", wait:73});
this.arrEnemyQueue.push({name:"Enemy_16", wait:83});
this.arrEnemyQueue.push({name:"Enemy_17", wait:50});
this.arrEnemyQueue.push({name:"Enemy_11", wait:42});
this.arrEnemyQueue.push({name:"Enemy_17", wait:50});
this.arrEnemyQueue.push({name:"Enemy_11", wait:42});
this.arrEnemyQueue.push({name:"Enemy_13", wait:112});
this.arrEnemyQueue.push({name:"Enemy_5", wait:13});
this.arrEnemyQueue.push({name:"Enemy_13", wait:173});
this.arrEnemyQueue.push({name:"Enemy_13", wait:173});
this.arrEnemyQueue.push({name:"Enemy_13", wait:173});
this.arrEnemyQueue.push({name:"Enemy_13", wait:173});
this.arrEnemyQueue.push({name:"Enemy_5", wait:13});
this.arrEnemyQueue.push({name:"Enemy_13", wait:173});
this.arrEnemyQueue.push({name:"Enemy_5", wait:13});
this.arrEnemyQueue.push({name:"Enemy_21", wait:111});
};
_local2.BuildChallenge8 = function () {
this.arrEnemyQueue.push({name:"Enemy_2", wait:31});
this.arrEnemyQueue.push({name:"Enemy_15", wait:130});
this.arrEnemyQueue.push({name:"Enemy_2", wait:31});
this.arrEnemyQueue.push({name:"Enemy_15", wait:130});
this.arrEnemyQueue.push({name:"Enemy_2", wait:31});
this.arrEnemyQueue.push({name:"Enemy_15", wait:130});
this.arrEnemyQueue.push({name:"Enemy_15", wait:130});
this.arrEnemyQueue.push({name:"Enemy_15", wait:130});
this.arrEnemyQueue.push({name:"Enemy_15", wait:113});
this.arrEnemyQueue.push({name:"Enemy_15", wait:120});
this.arrEnemyQueue.push({name:"Enemy_15", wait:120});
this.arrEnemyQueue.push({name:"Enemy_10", wait:145});
this.arrEnemyQueue.push({name:"Enemy_15", wait:132});
this.arrEnemyQueue.push({name:"Enemy_3", wait:26});
this.arrEnemyQueue.push({name:"Enemy_3", wait:49});
this.arrEnemyQueue.push({name:"Enemy_3", wait:53});
this.arrEnemyQueue.push({name:"Enemy_2", wait:48});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_3", wait:137});
this.arrEnemyQueue.push({name:"Enemy_2", wait:514});
this.arrEnemyQueue.push({name:"Enemy_15", wait:128});
this.arrEnemyQueue.push({name:"Enemy_2", wait:33});
this.arrEnemyQueue.push({name:"Enemy_15", wait:128});
this.arrEnemyQueue.push({name:"Enemy_15", wait:128});
this.arrEnemyQueue.push({name:"Enemy_15", wait:128});
this.arrEnemyQueue.push({name:"Enemy_10", wait:122});
};
_local2.BuildChallenge9 = function () {
this.arrEnemyQueue.push({name:"Enemy_15", wait:70});
this.arrEnemyQueue.push({name:"Enemy_15", wait:70});
this.arrEnemyQueue.push({name:"Enemy_5", wait:46});
this.arrEnemyQueue.push({name:"Enemy_15", wait:70});
this.arrEnemyQueue.push({name:"Enemy_5", wait:46});
this.arrEnemyQueue.push({name:"Enemy_15", wait:70});
this.arrEnemyQueue.push({name:"Enemy_15", wait:160});
this.arrEnemyQueue.push({name:"Enemy_19", wait:60});
this.arrEnemyQueue.push({name:"Enemy_5", wait:46});
this.arrEnemyQueue.push({name:"Enemy_5", wait:460});
this.arrEnemyQueue.push({name:"Enemy_6", wait:80});
this.arrEnemyQueue.push({name:"Enemy_6", wait:70});
this.arrEnemyQueue.push({name:"Enemy_5", wait:41});
this.arrEnemyQueue.push({name:"Enemy_6", wait:70});
this.arrEnemyQueue.push({name:"Enemy_5", wait:126});
this.arrEnemyQueue.push({name:"Enemy_6", wait:100});
this.arrEnemyQueue.push({name:"Enemy_6", wait:60});
this.arrEnemyQueue.push({name:"Enemy_5", wait:41});
this.arrEnemyQueue.push({name:"Enemy_6", wait:120});
this.arrEnemyQueue.push({name:"Enemy_30", wait:49});
this.arrEnemyQueue.push({name:"Enemy_30", wait:52});
this.arrEnemyQueue.push({name:"Enemy_6", wait:240});
this.arrEnemyQueue.push({name:"Enemy_6", wait:150});
this.arrEnemyQueue.push({name:"Enemy_19", wait:150});
this.arrEnemyQueue.push({name:"Enemy_30", wait:49});
this.arrEnemyQueue.push({name:"Enemy_30", wait:460});
this.arrEnemyQueue.push({name:"Enemy_19", wait:100});
this.arrEnemyQueue.push({name:"Enemy_30", wait:460});
this.arrEnemyQueue.push({name:"Enemy_19", wait:100});
this.arrEnemyQueue.push({name:"Enemy_19", wait:999999});
};
_local2.GenerateScript = function () {
var _local3 = 25;
while (this.arrEnemyQueue.length < _local3) {
this.GenerateWaveArray();
this.arrEnemyQueue[this.arrEnemyQueue.length - 1].wait = this.endWaveWait;
}
var _local2 = 0;
while (_local2 < this.arrEnemyQueue.length) {
_local2++;
}
};
_local2.GenerateWaveArray = function () {
var _local2;
this.bossName = "";
_local2 = this.BuildChallengeEnemies();
var _local12 = 0;
var _local13 = 0;
var _local18 = 0;
var _local14 = 0;
var _local6 = 0;
while (_local6 < _local2.length) {
_local18 = _local18 + _local2[_local6].chance;
_local6++;
}
_local14 = Math.round(Math.random() * _local18);
_local6 = 0;
while (_local6 < _local2.length) {
_local13 = _local12 + _local2[_local6].chance;
_local2[_local6].minChance = _local12;
_local2[_local6].maxChance = _local13;
_local12 = _local13;
_local6++;
}
var _local5 = -1;
_local6 = 0;
while (_local6 < _local2.length) {
if ((_local14 >= _local2[_local6].minChance) && (_local14 < _local2[_local6].maxChance)) {
_local5 = _local6;
break;
}
_local6++;
}
if (_local5 == -1) {
_local5 = _local2.length - 1;
}
if (this.bossName != "") {
if ((this.blnBossOut == false) && (this.blnBossKilled == false)) {
this.blnBossOut = true;
this.arrEnemyQueue.push({name:this.bossName, wait:40});
}
}
_local2[_local5].Begin();
var _local19 = _local2[_local5].GetNumInstructions();
var _local4 = new Array();
var _local10 = 0;
while (_local10 < _local19) {
var _local8 = _local2[_local5].enemyNum;
var _local11 = _local2[_local5].enemyType;
var _local9 = _local2[_local5].nextEnemyWait;
var _local16 = _local2[_local5].miniWaveWait;
var _local3 = 0;
while (_local3 < _local8) {
_local4.push({name:_local11, wait:_local9});
_local3++;
}
_local2[_local5].Next();
_local10++;
}
this.endWaveWait = _local2[_local5].endOfWaveWait;
this.waitCounter = 0;
while (_local4.length > 0) {
var _local7 = Math.round(Math.random() * (_local4.length - 1));
this.arrEnemyQueue.push({name:_local4[_local7].name, wait:_local4[_local7].wait});
_local4.splice(_local7, 1);
}
};
_local2.BuildChallengeEnemies = function () {
var _local3 = new Array();
var _local2;
_local2 = new WorldInstruction(30);
_local2.AddInstruction("Enemy_5", 0, 2, 40, 60, 0, 0);
_local2.AddInstruction("Enemy_6", 2, 3, 40, 70, 0, 0);
_local2.endOfWaveWait = this.RandNum(90, 150);
_local3.push(_local2);
_local2 = new WorldInstruction(10);
_local2.AddInstruction("Enemy_30", 0, 2, 40, 60, 0, 0);
_local2.endOfWaveWait = this.RandNum(40, 60);
_local3.push(_local2);
return(_local3);
};
_local2.Start = function () {
this.blnRunning = true;
};
_local2.Stop = function () {
this.blnRunning = false;
};
_local2.GetEnemiesLeft = function () {
return(this.intEnemiesThisLevel - this.intCreatedThisLevel);
};
_local2.GetWaveCompleted = function () {
return(Math.round((this.intCreatedThisLevel / this.intEnemiesThisLevel) * 100));
};
_local2.RandNum = function (minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
};
_local2.BossDead = function () {
this.intEnemiesThisLevel = 0;
this.blnBossOut = false;
this.blnBossKilled = true;
};
ASSetPropFlags(_global.LevelManager.prototype, null, 1);
#endinitclip
Symbol 1921 MovieClip [__Packages.WorldInstruction] Frame 0
class WorldInstruction
{
var minChance, maxChance, chance, iterator, subInstructions, enemyType, enemyNum, endOfWaveWait, eof, nextEnemyWait, miniWaveWait;
function WorldInstruction (myChance) {
minChance = 0;
maxChance = 0;
chance = myChance;
iterator = -1;
subInstructions = new Array();
enemyType = "";
enemyNum = 0;
endOfWaveWait = 0;
eof = true;
}
function SetRange(loChance, hiChance) {
minChance = loChance;
maxChance = hiChance;
}
function GetNumInstructions() {
return(subInstructions.length);
}
function AddInstruction(enemyType, minNum, maxNum, minWait, maxWait, minWaveWait, maxWaveWait) {
subInstructions.push({linkage:enemyType, numAmount:RandNum(minNum, maxNum), nextEnemyWait:RandNum(minWait, maxWait), miniWaveWait:RandNum(minWaveWait, maxWaveWait)});
if (iterator == subInstructions.length) {
eof = true;
} else {
eof = false;
}
}
function Begin() {
iterator = 0;
if (iterator == subInstructions.length) {
eof = true;
}
enemyType = subInstructions[iterator].linkage;
enemyNum = subInstructions[iterator].numAmount;
nextEnemyWait = subInstructions[iterator].nextEnemyWait;
miniWaveWait = subInstructions[iterator].miniWaveWait;
}
function Next() {
iterator++;
if (iterator == subInstructions.length) {
iterator--;
eof = true;
}
enemyType = subInstructions[iterator].linkage;
enemyNum = subInstructions[iterator].numAmount;
nextEnemyWait = subInstructions[iterator].nextEnemyWait;
miniWaveWait = subInstructions[iterator].miniWaveWait;
}
function RandNum(minVal, maxVal) {
return(Math.round(Math.random() * (maxVal - minVal)) + minVal);
}
}
Symbol 1922 MovieClip [__Packages.TurretManager] Frame 0
class TurretManager
{
var intLevel1, intLevel2, intLevel3, intLevel4, intLevel5, intLevel6, intLevel7, intLevel8, intLevel9, intLevel10, intLevel11, intLevel12, intLevel13, intLevel14, intLevel15, intLevel16, intLevel17, intLevel18, intLevel19, arrUpgrades, intLevel, dblDamage, dblBulletSpeed, intNumBullets, intRange, dblData, dblReloadRate, dblReloadMax, dblChargeRate, dblChargeMax, dblLife;
function TurretManager () {
intLevel1 = 0;
intLevel2 = 300;
intLevel3 = 600;
intLevel4 = 1000;
intLevel5 = 2000;
intLevel6 = 3000;
intLevel7 = 4000;
intLevel8 = 5000;
intLevel9 = 6000;
intLevel10 = 7000;
intLevel11 = 8000;
intLevel12 = 9000;
intLevel13 = 10000;
intLevel14 = 11000;
intLevel15 = 12000;
intLevel16 = 13000;
intLevel17 = 14000;
intLevel18 = 15000;
intLevel19 = 16000;
arrUpgrades = new Array();
SetInternalData(0, 0);
}
function GetExpPercentage(exp) {
var _local3 = 0;
if (exp >= intLevel19) {
_local3 = 0;
} else if (exp >= intLevel18) {
_local3 = (exp - intLevel18) / (intLevel19 - intLevel18);
} else if (exp >= intLevel17) {
_local3 = (exp - intLevel17) / (intLevel18 - intLevel17);
} else if (exp >= intLevel16) {
_local3 = (exp - intLevel16) / (intLevel17 - intLevel16);
} else if (exp >= intLevel15) {
_local3 = (exp - intLevel15) / (intLevel16 - intLevel15);
} else if (exp >= intLevel14) {
_local3 = (exp - intLevel14) / (intLevel15 - intLevel14);
} else if (exp >= intLevel13) {
_local3 = (exp - intLevel13) / (intLevel14 - intLevel13);
} else if (exp >= intLevel12) {
_local3 = (exp - intLevel12) / (intLevel13 - intLevel12);
} else if (exp >= intLevel11) {
_local3 = (exp - intLevel11) / (intLevel12 - intLevel11);
} else if (exp >= intLevel10) {
_local3 = (exp - intLevel10) / (intLevel11 - intLevel10);
} else if (exp >= intLevel9) {
_local3 = (exp - intLevel9) / (intLevel10 - intLevel19);
} else if (exp >= intLevel8) {
_local3 = (exp - intLevel8) / (intLevel9 - intLevel8);
} else if (exp >= intLevel7) {
_local3 = (exp - intLevel7) / (intLevel8 - intLevel7);
} else if (exp >= intLevel6) {
_local3 = (exp - intLevel6) / (intLevel7 - intLevel6);
} else if (exp >= intLevel5) {
_local3 = (exp - intLevel5) / (intLevel6 - intLevel5);
} else if (exp >= intLevel4) {
_local3 = (exp - intLevel4) / (intLevel5 - intLevel4);
} else if (exp >= intLevel3) {
_local3 = (exp - intLevel3) / (intLevel4 - intLevel3);
} else if (exp >= intLevel2) {
_local3 = (exp - intLevel2) / (intLevel3 - intLevel2);
} else {
_local3 = exp / intLevel2;
}
_local3 = Math.round(_local3 * 100);
return(_local3);
}
function SetInternalData(gunType, exp) {
switch (gunType) {
case 1 :
intLevel = 1;
dblDamage = 4;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 15;
dblChargeRate = 0.2;
dblChargeMax = 12;
dblLife = 100;
break;
case 2 :
intLevel = 1;
dblDamage = 1;
dblBulletSpeed = 12;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 10;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 3 :
intLevel = 1;
dblDamage = 15;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 600;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 4 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 0.2;
dblReloadRate = 1;
dblReloadMax = 1;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 5 :
intLevel = 1;
dblDamage = 20;
dblBulletSpeed = 0;
intNumBullets = 10;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 600;
dblChargeRate = 0.2;
dblChargeMax = 12;
dblLife = 75;
break;
case 6 :
intLevel = 1;
dblDamage = 10;
dblBulletSpeed = 0;
intNumBullets = 6;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 300;
dblChargeRate = 0.2;
dblChargeMax = 12;
dblLife = 100;
break;
case 7 :
intLevel = 1;
dblDamage = 30;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 0;
dblData = 0.4;
dblReloadRate = 1;
dblReloadMax = 1200;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 65;
break;
case 8 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 0.2;
dblReloadRate = 1;
dblReloadMax = 1;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 95;
break;
case 9 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 0.2;
dblReloadRate = 1;
dblReloadMax = 1;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 95;
break;
case 10 :
intLevel = 1;
dblDamage = 30;
dblBulletSpeed = 11;
intNumBullets = 12;
intRange = 8;
dblData = 450;
dblReloadRate = 1;
dblReloadMax = 4500;
dblChargeRate = 1;
dblChargeMax = 30;
dblLife = 75;
break;
case 11 :
intLevel = 1;
dblDamage = 1;
dblBulletSpeed = 12;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 10;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 12 :
intLevel = 1;
dblDamage = 2;
dblBulletSpeed = 11;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 18;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 13 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 11;
intNumBullets = 0;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 2000;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 50;
break;
case 14 :
intLevel = 1;
dblDamage = 15;
dblBulletSpeed = 11;
intNumBullets = 2;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 200;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 15 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 200;
dblReloadRate = 1;
dblReloadMax = 1200;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 16 :
intLevel = 1;
dblDamage = 15;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 0.3;
dblReloadRate = 1;
dblReloadMax = 300;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 17 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 0;
intRange = 0;
dblData = 0.2;
dblReloadRate = 1;
dblReloadMax = 0;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 50;
break;
case 18 :
intLevel = 1;
dblDamage = 3;
dblBulletSpeed = 20;
intNumBullets = 0;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 5;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 85;
break;
case 19 :
intLevel = 1;
dblDamage = 4;
dblBulletSpeed = 4;
intNumBullets = 0;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 4;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 100;
break;
case 20 :
intLevel = 1;
dblDamage = 0;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 5;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 400;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 85;
break;
case 21 :
intLevel = 1;
dblDamage = 1;
dblBulletSpeed = 12;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 10;
dblChargeRate = 0;
dblChargeMax = 0;
dblLife = 75;
break;
case 22 :
intLevel = 1;
dblDamage = 10;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 2;
dblData = 40;
dblReloadRate = 1;
dblReloadMax = 550;
dblChargeRate = 0.2;
dblChargeMax = 12;
dblLife = 95;
break;
case 23 :
intLevel = 1;
dblDamage = 10;
dblBulletSpeed = 11;
intNumBullets = 10;
intRange = 75;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 700;
dblChargeRate = 1;
dblChargeMax = 30;
dblLife = 85;
break;
default :
intLevel = 1;
dblDamage = 4;
dblBulletSpeed = 0;
intNumBullets = 1;
intRange = 0;
dblData = 0;
dblReloadRate = 1;
dblReloadMax = 15;
dblChargeRate = 0.2;
dblChargeMax = 12;
dblLife = 50;
}
if (exp >= intLevel19) {
intLevel = 19;
} else if (exp >= intLevel18) {
intLevel = 18;
} else if (exp >= intLevel17) {
intLevel = 17;
} else if (exp >= intLevel16) {
intLevel = 16;
} else if (exp >= intLevel15) {
intLevel = 15;
} else if (exp >= intLevel14) {
intLevel = 14;
} else if (exp >= intLevel13) {
intLevel = 13;
} else if (exp >= intLevel12) {
intLevel = 12;
} else if (exp >= intLevel11) {
intLevel = 11;
} else if (exp >= intLevel10) {
intLevel = 10;
} else if (exp >= intLevel9) {
intLevel = 9;
} else if (exp >= intLevel8) {
intLevel = 8;
} else if (exp >= intLevel7) {
intLevel = 7;
} else if (exp >= intLevel6) {
intLevel = 6;
} else if (exp >= intLevel5) {
intLevel = 5;
} else if (exp >= intLevel4) {
intLevel = 4;
} else if (exp >= intLevel3) {
intLevel = 3;
} else if (exp >= intLevel2) {
intLevel = 2;
} else {
intLevel = 1;
}
}
function GetUpgrades(gunType) {
delete arrUpgrades;
arrUpgrades = new Array();
switch (gunType) {
case 1 :
arrUpgrades.push({id:101, type:1, value:3, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your cannon's damage by 3", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:102, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
break;
case 2 :
arrUpgrades.push({id:201, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:8});
arrUpgrades.push({id:202, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:203, type:3, value:-1, secondType:0, secondValue:0, title:"Faster Fire Rate", description:"Increases fire rate by 1", icon:"upgradeReload", limit:5, cost:2});
break;
case 3 :
arrUpgrades.push({id:301, type:1, value:3, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 3", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:302, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:303, type:3, value:-50, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 50", icon:"upgradeReload", limit:6, cost:2});
break;
case 4 :
arrUpgrades.push({id:402, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:404, type:4, value:0.03, secondType:0, secondValue:0, title:"Buff Strength", description:"Increases buff strength by 3%", icon:"upgradeBuff", limit:15, cost:2});
break;
case 5 :
arrUpgrades.push({id:501, type:1, value:2, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 2", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:502, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:503, type:3, value:-50, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 50", icon:"upgradeReload", limit:6, cost:2});
arrUpgrades.push({id:505, type:5, value:1, secondType:0, secondValue:0, title:"Fragment Increase", description:"Increases the number of shards by 1", icon:"upgradeFragment", limit:100, cost:1});
break;
case 6 :
arrUpgrades.push({id:601, type:1, value:2, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 2", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:602, type:2, value:25, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 25", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:603, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:8, cost:1});
arrUpgrades.push({id:605, type:5, value:1, secondType:0, secondValue:0, title:"Fragment Increase", description:"Increases the number of shards by 1", icon:"upgradeFragment", limit:100, cost:2});
break;
case 7 :
arrUpgrades.push({id:701, type:1, value:5, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 5", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:702, type:2, value:10, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 10", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:703, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:6, cost:2});
arrUpgrades.push({id:705, type:5, value:1, secondType:0, secondValue:0, title:"Chain Increase", description:"Increases the number of chain jumps by 1", icon:"upgradeJump", limit:100, cost:2});
arrUpgrades.push({id:704, type:4, value:0.05, secondType:0, secondValue:0, title:"Secondary Damage Increase", description:"Increases damage done each chain jump by 5%", icon:"upgradeSecondary", limit:6, cost:1});
break;
case 8 :
arrUpgrades.push({id:802, type:2, value:25, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 25", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:804, type:4, value:0.03, secondType:0, secondValue:0, title:"Buff Strength", description:"Increases buff strength by 3%", icon:"upgradeBuff", limit:15, cost:2});
break;
case 9 :
arrUpgrades.push({id:902, type:2, value:20, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 20", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:904, type:4, value:0.02, secondType:0, secondValue:0, title:"Buff Strength", description:"Increases buff strength by 2%", icon:"upgradeBuff", limit:15, cost:3});
break;
case 10 :
arrUpgrades.push({id:1001, type:1, value:5, secondType:0, secondValue:0, title:"Damage Increase", description:"Increase meteor max damage by 5", icon:"upgradeDamage", limit:100, cost:2});
arrUpgrades.push({id:1002, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1003, type:3, value:-100, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 100", icon:"upgradeReload", limit:20, cost:2});
arrUpgrades.push({id:1056, type:5, value:-1, secondType:6, secondValue:-1, title:"Density Increase", description:"Increases the intensity of the meteor storm", icon:"upgradeDensity", limit:4, cost:4});
arrUpgrades.push({id:1004, type:4, value:20, secondType:0, secondValue:0, title:"Duration Increase", description:"Increases length of meteor storm by 20", icon:"upgradeDuration", limit:20, cost:2});
break;
case 11 :
arrUpgrades.push({id:1101, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:10});
arrUpgrades.push({id:1102, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1103, type:3, value:-1, secondType:0, secondValue:0, title:"Faster Fire Rate", description:"Increases fire rate by 1", icon:"upgradeReload", limit:5, cost:3});
break;
case 12 :
arrUpgrades.push({id:1201, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:10});
arrUpgrades.push({id:1202, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1203, type:3, value:-1, secondType:0, secondValue:0, title:"Faster Fire Rate", description:"Increases fire rate by 1", icon:"upgradeReload", limit:5, cost:3});
break;
case 13 :
arrUpgrades.push({id:1302, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1303, type:3, value:-50, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 50", icon:"upgradeReload", limit:10, cost:2});
break;
case 14 :
arrUpgrades.push({id:1401, type:1, value:2, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases mine damage by 2", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:1402, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1403, type:3, value:-20, secondType:0, secondValue:0, title:"Decrease Build Time", description:"Decreases build time by 20", icon:"upgradeReload", limit:4, cost:2});
arrUpgrades.push({id:1405, type:5, value:1, secondType:0, secondValue:0, title:"Mine Increase", description:"Increases the number of mines by 1", icon:"upgradeMineNumber", limit:5, cost:5});
break;
case 15 :
arrUpgrades.push({id:1502, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1503, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:5, cost:1});
arrUpgrades.push({id:1504, type:4, value:20, secondType:0, secondValue:0, title:"Duration Increase", description:"Increases length of time freeze by 20", icon:"upgradeDuration", limit:20, cost:2});
break;
case 16 :
arrUpgrades.push({id:1601, type:1, value:2, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 2", icon:"upgradeDamage", limit:100, cost:1});
arrUpgrades.push({id:1602, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1603, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:6, cost:2});
break;
case 17 :
arrUpgrades.push({id:1702, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:1704, type:4, value:0.03, secondType:0, secondValue:0, title:"Shield Strength", description:"Increases shield strength by 5%", icon:"upgradeBuff", limit:5, cost:4});
break;
case 18 :
arrUpgrades.push({id:1801, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:14});
arrUpgrades.push({id:1802, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
break;
case 19 :
arrUpgrades.push({id:1901, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:10});
arrUpgrades.push({id:1902, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
break;
case 20 :
arrUpgrades.push({id:2002, type:2, value:25, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 25", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:2003, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Building Time", description:"Decreases building time by 25 if you have more than 1 drone", icon:"upgradeReload", limit:4, cost:2});
arrUpgrades.push({id:2004, type:4, value:1, secondType:0, secondValue:0, title:"Machine Gun Upgrade", description:"Drones fight back with machine guns!", icon:"upgradeMachineGuns", limit:1, cost:8});
arrUpgrades.push({id:2005, type:5, value:1, secondType:0, secondValue:0, title:"More Drones", description:"1 more drone will be released each level", icon:"upgradeDecoyNumber", limit:5, cost:2});
arrUpgrades.push({id:2006, type:6, value:4, secondType:0, secondValue:0, title:"Drone Health Increase", description:"Each of your drones gets a little more life", icon:"upgradeDecoyHealth", limit:100, cost:1});
break;
case 21 :
arrUpgrades.push({id:2101, type:1, value:1, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases your gun's damage by 1", icon:"upgradeDamage", limit:100, cost:8});
arrUpgrades.push({id:2102, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:2103, type:3, value:-1, secondType:0, secondValue:0, title:"Faster Fire Rate", description:"Increases fire rate by 1", icon:"upgradeReload", limit:5, cost:2});
break;
case 22 :
arrUpgrades.push({id:2201, type:1, value:5, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases main canister damage by 5", icon:"upgradeDamage", limit:100, cost:2});
arrUpgrades.push({id:2202, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:2203, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:12, cost:1});
arrUpgrades.push({id:2204, type:4, value:5, secondType:0, secondValue:0, title:"Duration Increase", description:"Increases length of spilling acid by 5", icon:"upgradeDuration", limit:20, cost:2});
arrUpgrades.push({id:2206, type:6, value:1, secondType:0, secondValue:0, title:"Secondary Damage Increase", description:"Increases spilling acid damage by 1", icon:"upgradeSecondary", limit:50, cost:2});
break;
case 23 :
arrUpgrades.push({id:2301, type:1, value:2, secondType:0, secondValue:0, title:"Damage Increase", description:"Increases main canister damage by 2", icon:"upgradeDamage", limit:100, cost:2});
arrUpgrades.push({id:2302, type:2, value:15, secondType:0, secondValue:0, title:"Health Increase", description:"Raises your max health by 15", icon:"upgradeHealth", limit:100, cost:1});
arrUpgrades.push({id:2303, type:3, value:-25, secondType:0, secondValue:0, title:"Decrease Reload Time", description:"Decreases reload time by 25", icon:"upgradeReload", limit:12, cost:1});
arrUpgrades.push({id:2306, type:6, value:25, secondType:0, secondValue:0, title:"Increase Range", description:"Increase the horizontal range by 25", icon:"upgradeRange", limit:25, cost:1});
arrUpgrades.push({id:2305, type:5, value:2, secondType:0, secondValue:0, title:"Shell Increase", description:"Increase the number of shells launched by 2", icon:"upgradeNumArtillery", limit:12, cost:3});
}
return(arrUpgrades);
}
function GetDamage() {
return(dblDamage);
}
function GetBulletSpeed() {
return(dblBulletSpeed);
}
function GetNumBullets() {
return(intNumBullets);
}
function GetRange() {
return(intRange);
}
function GetData() {
return(dblData);
}
function GetReloadRate() {
return(dblReloadRate);
}
function GetReloadMax() {
return(dblReloadMax);
}
function GetChargeRate() {
return(dblChargeRate);
}
function GetChargeMax() {
return(dblChargeMax);
}
function GetLevel() {
return(intLevel);
}
function GetLife() {
return(dblLife);
}
}
Symbol 1923 MovieClip [__Packages.PointCounter] Frame 0
class PointCounter
{
var increment, currentScore, displayScore;
function PointCounter () {
increment = 1;
currentScore = 0;
displayScore = 0;
}
function SetStartPoints(myScore) {
currentScore = myScore;
displayScore = myScore;
}
function SetIncrement(inc) {
increment = inc;
}
function AddPoints(inc) {
currentScore = currentScore + inc;
}
function SetScore(num) {
currentScore = num;
}
function Run() {
if (currentScore != displayScore) {
displayScore = displayScore + increment;
if (currentScore == undefined) {
currentScore = 0;
}
if (displayScore > currentScore) {
displayScore = currentScore;
}
}
}
function GetDisplayScore() {
return(displayScore);
}
function GetScore() {
return(currentScore);
}
function Reset() {
currentScore = 0;
displayScore = 0;
}
}
Symbol 1924 MovieClip [__Packages.Timer] Frame 0
class Timer
{
var intTimer, blnCountUp, intStartTime, intEndTime, blnPaused, intPauseStart, intPauseTime;
function Timer () {
intTimer = 0;
blnCountUp = true;
intStartTime = 0;
intEndTime = 0;
blnPaused = false;
intPauseStart = 0;
intPauseTime = 0;
}
function Run() {
if (blnPaused == false) {
if (blnCountUp == true) {
intTimer = (getTimer() - intStartTime) - intPauseTime;
} else {
intTimer = (intEndTime - intStartTime) - ((getTimer() - intStartTime) + intPauseTime);
}
} else {
intPauseTime = intPauseTime + (getTimer() - intPauseStart);
intPauseStart = getTimer();
}
}
function Pause() {
if (blnPaused == false) {
blnPaused = true;
intPauseStart = getTimer();
}
}
function UnPause() {
if (blnPaused == true) {
intPauseTime = intPauseTime + (getTimer() - intPauseStart);
blnPaused = false;
}
}
function GetTime() {
return(intTimer);
}
function GetTimeString() {
return(MillisecondsToTimeString(intTimer));
}
function Start(countUp) {
SetCountUp(countUp);
}
function SetCountUp() {
blnCountUp = true;
Reset();
}
function SetCountDown(durationInMilliseconds) {
blnCountUp = false;
intEndTime = getTimer() + durationInMilliseconds;
Reset();
}
function Reset() {
intStartTime = getTimer();
blnPaused = false;
intPauseStart = 0;
intPauseTime = 0;
if (blnCountUp == true) {
intTimer = 0;
} else {
intTimer = intEndTime - intStartTime;
}
}
function MillisecondsToTimeString(intMilliSecs) {
var _local5 = intMilliSecs;
var _local4 = Math.floor(_local5 / 1000);
if (_local4 >= 60) {
var _local1 = _local5 / 1000;
var _local3 = _local1 / 60;
if (_local1 > 59) {
_local1 = _local1 - (Math.floor(_local3) * 60);
}
var _local6;
var _local2;
if (_local3 < 10) {
_local2 = "0" + Math.floor(_local3);
} else {
_local2 = "" + Math.floor(_local3);
}
if (_local1 < 10) {
_local6 = (_local2 + ":0") + Math.floor(_local1);
} else if (_local1 == 0) {
_local6 = _local2 + ":00";
} else {
_local6 = (_local2 + ":") + Math.floor(_local1);
}
return(_local6);
}
if (_local4 < 10) {
var _local6 = "00:0" + Math.floor(_local4);
} else {
var _local6 = "00:" + Math.floor(_local4);
}
return(_local6);
}
}
Symbol 1925 MovieClip [__Packages.GunData] Frame 0
class GunData
{
var name, timer, timerReady, timerRate, power, chargeRate, chargeMax, blnSelected, powerMeter, loadMeter, healthMeter, intLevel, charging, selectField, type, exp, damage, damageTaken, totalLife, saveType, blnDestroyed, intPoints, data, numBullets, range, startX, startY, arrUpgrades;
function GunData () {
name = "";
timer = 0;
timerReady = 0;
timerRate = 0;
power = 0;
chargeRate = 0;
chargeMax = 0;
blnSelected = false;
powerMeter = "";
loadMeter = "";
healthMeter = "";
intLevel = 0;
charging = false;
selectField = "";
type = 0;
exp = 0;
damage = 0;
damageTaken = 0;
totalLife = 0;
saveType = 0;
blnDestroyed = false;
intPoints = 0;
data = 0;
numBullets = 0;
range = 0;
startX = 0;
startY = 0;
arrUpgrades = new Array();
}
}
Symbol 1926 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("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", "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", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 815 MovieClip Frame 220
stop();
Instance of Symbol 815 MovieClip in Symbol 823 MovieClip Frame 80
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Instance of Symbol 818 MovieClip in Symbol 823 MovieClip Frame 329
on (release) {
getURL ("http://www.herointeractive.com", "_blank");
}
Instance of Symbol 818 MovieClip in Symbol 823 MovieClip Frame 358
on (release) {
getURL ("http://www.herointeractive.com", "_blank");
}
Symbol 823 MovieClip Frame 565
if (_global.var1.Get() != -1) {
_root.gotoAndPlay("main");
}
Symbol 823 MovieClip Frame 800
_root.gotoAndPlay("main");
Symbol 1004 MovieClip Frame 1
stop();
Symbol 1004 MovieClip Frame 2
stop();
Symbol 1004 MovieClip Frame 3
stop();
Symbol 1004 MovieClip Frame 4
stop();
Symbol 1004 MovieClip Frame 5
stop();
Symbol 1004 MovieClip Frame 6
stop();
Symbol 1004 MovieClip Frame 7
stop();
Symbol 1004 MovieClip Frame 8
stop();
Symbol 1004 MovieClip Frame 9
stop();
Symbol 1004 MovieClip Frame 10
stop();
Symbol 1004 MovieClip Frame 11
stop();
Symbol 1004 MovieClip Frame 12
stop();
Symbol 1004 MovieClip Frame 13
stop();
Symbol 1004 MovieClip Frame 14
stop();
Symbol 1004 MovieClip Frame 15
stop();
Symbol 1004 MovieClip Frame 16
stop();
Symbol 1004 MovieClip Frame 17
stop();
Symbol 1009 MovieClip Frame 180
gotoAndPlay (60);
Symbol 1014 MovieClip Frame 10
stop();
Symbol 1016 Button
on (release) {
_root.CampaignSelected("south_bt");
}
Symbol 1019 MovieClip Frame 10
stop();
Symbol 1020 Button
on (release) {
_root.CampaignSelected("ocean_bt");
}
Symbol 1023 MovieClip Frame 10
stop();
Symbol 1024 Button
on (release) {
_root.CampaignSelected("plains_bt");
}
Symbol 1027 MovieClip Frame 10
stop();
Symbol 1028 Button
on (release) {
_root.CampaignSelected("sky_bt");
}
Symbol 1031 MovieClip Frame 10
stop();
Symbol 1032 Button
on (release) {
_root.CampaignSelected("pass_bt");
}
Symbol 1035 MovieClip Frame 10
stop();
Symbol 1036 Button
on (release) {
_root.CampaignSelected("peaks_bt");
}
Symbol 1039 MovieClip Frame 10
stop();
Symbol 1040 Button
on (release) {
_root.CampaignSelected("challenge_bt");
}
Symbol 1043 MovieClip Frame 10
stop();
Symbol 1044 Button
on (release) {
_root.CampaignSelected("city_bt");
}
Symbol 1047 MovieClip Frame 10
stop();
Symbol 1048 Button
on (release) {
_root.CampaignSelected("desert_bt");
}
Symbol 1054 MovieClip Frame 161
stop();
Symbol 1055 MovieClip Frame 1
stop();
Symbol 1055 MovieClip Frame 120
_root.SetNextCampaign();
stop();
Symbol 1055 MovieClip Frame 140
stop();
Symbol 1062 MovieClip Frame 1
stop();
Symbol 1062 MovieClip Frame 20
stop();
Symbol 1065 MovieClip Frame 1
stop();
Symbol 1065 MovieClip Frame 20
stop();
Symbol 1079 Button
on (release) {
getURL ("http://www.herointeractive.com/stormwinds1-5.html", "_blank");
}
Symbol 1094 Button
on (release) {
_root.StartCampaign(this._parent._parent.strSelectedCampaign);
}
Symbol 1114 Button
on (release) {
_root.ExitChallengeMissions();
}
Symbol 1129 Button
on (release) {
_root.PlayMission();
}
Symbol 1133 Button
on (release) {
_root.ViewHighScoreBoard();
}
Symbol 1140 Button
on (release) {
getURL ("http://www.herointeractive.com/stormwinds1-5.html", "_blank");
}
Symbol 1142 MovieClip Frame 1
stop();
Symbol 1142 MovieClip Frame 2
stop();
var strSelectedCampaign;
Symbol 1142 MovieClip Frame 3
stop();
Symbol 1142 MovieClip Frame 4
stop();
Symbol 1142 MovieClip Frame 5
stop();
Instance of Symbol 1120 MovieClip "scrollButton_mc" in Symbol 1142 MovieClip Frame 5
on (press) {
_root.StartScroll(this._y);
}
on (release) {
_root.StopScroll();
}
on (releaseOutside) {
_root.StopScroll();
}
Symbol 1144 MovieClip Frame 20
stop();
Symbol 1147 MovieClip Frame 1
stop();
Symbol 1147 MovieClip Frame 20
stop();
Symbol 1150 MovieClip Frame 1
stop();
Symbol 1150 MovieClip Frame 20
stop();
Symbol 1153 MovieClip Frame 1
stop();
Symbol 1153 MovieClip Frame 20
stop();
Symbol 1156 MovieClip Frame 1
stop();
Symbol 1156 MovieClip Frame 20
stop();
Symbol 1158 MovieClip Frame 20
stop();
Symbol 1173 MovieClip Frame 1
stop();
Symbol 1173 MovieClip Frame 23
if (_global.theBigOpen) {
_parent._parent._parent.lock.gotoAndPlay("unlock");
_parent._parent._parent.lock2.gotoAndPlay("unlock");
}
Symbol 1173 MovieClip Frame 88
stop();
Symbol 1184 MovieClip Frame 1
stop();
Symbol 1184 MovieClip Frame 2
play();
Symbol 1184 MovieClip Frame 15
stop();
Symbol 1184 MovieClip Frame 16
play();
Symbol 1184 MovieClip Frame 30
if (_global.theCampaignOpen == false) {
_parent.gotoAndPlay(75);
} else {
_parent.gotoAndPlay("campaignOpen");
}
stop();
Symbol 1188 MovieClip Frame 1
stop();
Symbol 1188 MovieClip Frame 26
stop();
Symbol 1188 MovieClip Frame 51
stop();
Symbol 1196 MovieClip Frame 2
_root.doorGear.gotoAndPlay("forward");
Symbol 1196 MovieClip Frame 50
this.sliderGear.gotoAndPlay("lock");
this.sliderGear2.gotoAndPlay("lock");
Symbol 1196 MovieClip Frame 73
if (_global.theFinalOpen == false) {
_root.title.gotoAndPlay(2);
}
Symbol 1196 MovieClip Frame 74
this.lock.gotoAndPlay("lock");
this.lock2.gotoAndPlay("lock");
_root.doors2.leftdoor.v1.steam.gotoAndPlay(2);
_root.doors2.leftdoor.v2.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v1.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v2.steam.gotoAndPlay(2);
if (_global.theFinalOpen == true) {
_root.campaign._visible = false;
gotoAndPlay (75);
}
stop();
Symbol 1196 MovieClip Frame 75
this.sliderGear.gotoAndPlay("unlock");
Symbol 1196 MovieClip Frame 160
_root.doors.gotoAndPlay("opening");
Symbol 1196 MovieClip Frame 240
stop();
Symbol 1196 MovieClip Frame 241
play();
this.sliderGear.gotoAndPlay("unlock");
Symbol 1196 MovieClip Frame 242
Symbol 1196 MovieClip Frame 390
stop();
Symbol 1196 MovieClip Frame 391
Symbol 1196 MovieClip Frame 440
this.sliderGear.gotoAndPlay("lock");
this.sliderGear2.gotoAndPlay("lock");
Symbol 1196 MovieClip Frame 464
this.lock.gotoAndPlay("lock");
this.lock2.gotoAndPlay("lock");
_root.doors2.leftdoor.v1.steam.gotoAndPlay(2);
_root.doors2.leftdoor.v2.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v1.steam.gotoAndPlay(2);
_root.doors2.rightdoor.v2.steam.gotoAndPlay(2);
_root.TriggerLevelClose();
stop();
Symbol 1212 MovieClip Frame 1
stop();
Symbol 1219 MovieClip Frame 400
gotoAndPlay ("flash");
Symbol 1220 MovieClip Frame 1
stop();
Symbol 1220 MovieClip Frame 40
_root.mainMenu.gotoAndPlay(2);
stop();
Symbol 1220 MovieClip Frame 71
stop();
Symbol 1228 Button
on (rollOver) {
this.playOd.play();
}
on (rollOut) {
this.playOd.stop();
}
on (press) {
_global.pageSelected = "play";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.mainMenu.gotoAndPlay(46);
_root.title.gotoAndPlay(56);
}
Symbol 1231 MovieClip Frame 1
var timeToCheat;
timeToCheat = false;
stop();
Symbol 1231 MovieClip Frame 2
timeToCheat = false;
Symbol 1231 MovieClip Frame 46
timeToCheat = true;
Symbol 1231 MovieClip Frame 62
timeToCheat = false;
Symbol 1231 MovieClip Frame 100
gotoAndPlay (2);
timeToCheat = false;
Instance of Symbol 1231 MovieClip "playOd" in Symbol 1232 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.timeToCheat == true) {
_global.cheat1 = true;
}
}
Symbol 1233 Button
on (rollOver) {
this.moreGamesOd.play();
}
on (rollOut) {
this.moreGamesOd.stop();
}
on (press) {
_global.pageSelected = "more";
_global.SoundManager.PlaySound(_global.buttonClickSound);
getURL ("http://www.armorgames.com/", "_blank");
}
Instance of Symbol 1231 MovieClip "moreGamesOd" in Symbol 1235 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.timeToCheat == true) {
_global.cheat5 = true;
}
}
Symbol 1236 Button
on (rollOver) {
this.settingsOd.play();
}
on (rollOut) {
this.settingsOd.stop();
}
on (press) {
_global.pageSelected = "settings";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.mainMenu.gotoAndPlay(46);
}
Instance of Symbol 1231 MovieClip "settingsOd" in Symbol 1238 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.timeToCheat == true) {
_global.cheat2 = true;
}
}
Symbol 1239 Button
on (rollOver) {
this.deluxeOd.play();
}
on (rollOut) {
this.deluxeOd.stop();
}
on (press) {
_global.pageSelected = "deluxe";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.mainMenu.gotoAndPlay(46);
}
Instance of Symbol 1231 MovieClip "deluxeOd" in Symbol 1241 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.timeToCheat == true) {
_global.cheat4 = true;
}
}
Symbol 1242 Button
on (rollOver) {
this.creditsOd.play();
}
on (rollOut) {
this.creditsOd.stop();
}
on (press) {
_global.pageSelected = "credits";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.mainMenu.gotoAndPlay(46);
}
Instance of Symbol 1231 MovieClip "creditsOd" in Symbol 1244 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.timeToCheat == true) {
_global.cheat3 = true;
}
}
Symbol 1245 MovieClip Frame 1
stop();
Symbol 1245 MovieClip Frame 45
stop();
Symbol 1245 MovieClip Frame 90
_root.ButtonSelected();
stop();
Symbol 1253 Button
on (press) {
var mySharedObject = SharedObject.getLocal("settings");
mySharedObject.data.musicOn = _global.musicOn;
mySharedObject.data.soundOn = _global.soundOn;
mySharedObject.data.graphics = _global.graphics;
mySharedObject.data.hotKey1 = _global.hotKey1;
mySharedObject.data.hotKey2 = _global.hotKey2;
mySharedObject.data.hotKey3 = _global.hotKey3;
mySharedObject.data.hotKey4 = _global.hotKey4;
mySharedObject.data.hotKey5 = _global.hotKey5;
mySharedObject.flush();
_global.settingsNum = "2";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.infoPage.gotoAndPlay("settingsOut");
}
Symbol 1258 Button
on (press) {
_global.settingsNum = "1";
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.infoPage.gotoAndPlay("settingsOut");
}
Symbol 1262 MovieClip Frame 1
stop();
Symbol 1262 MovieClip Frame 2
stop();
Instance of Symbol 1262 MovieClip "low" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "LOW") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "LOW") {
this.gotoAndStop("off");
}
}
on (release) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_quality = "LOW";
this._parent.high.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 1262 MovieClip "med" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "MEDIUM") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "MEDIUM") {
this.gotoAndStop("off");
}
}
on (release) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_quality = "MEDIUM";
this._parent.high.gotoAndStop("off");
this._parent.low.gotoAndStop("off");
}
Instance of Symbol 1262 MovieClip "high" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_quality == "HIGH") {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_quality != "HIGH") {
this.gotoAndStop("off");
}
}
on (release) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_quality = "HIGH";
this._parent.low.gotoAndStop("off");
this._parent.med.gotoAndStop("off");
}
Instance of Symbol 1262 MovieClip "musicOn" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = true;
this._parent.musicOff.gotoAndStop("off");
_global.myMusicPlayer.SetTrack("titleMusic");
_global.myMusicPlayer.SetMaxVolume(100);
_global.myMusicPlayer.Play();
}
Instance of Symbol 1262 MovieClip "musicOff" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_global.musicOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.musicOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.musicOn = false;
_global.SoundManager.PlaySound(_global.buttonClickSound);
this._parent.musicOn.gotoAndStop("off");
_global.myMusicPlayer.Stop();
}
Instance of Symbol 1262 MovieClip "soundsOn" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == true) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn != true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = true;
_global.SoundManager.PlaySound(_global.buttonClickSound);
this._parent.soundsOff.gotoAndStop("off");
}
Instance of Symbol 1262 MovieClip "soundsOff" in Symbol 1263 MovieClip Frame 1
onClipEvent (load) {
if (_global.soundOn == false) {
this.gotoAndStop("on");
}
}
on (rollOver) {
this.gotoAndStop("on");
}
on (rollOut) {
if (_global.soundOn == true) {
this.gotoAndStop("off");
}
}
on (release) {
_global.soundOn = false;
this._parent.soundsOn.gotoAndStop("off");
}
Symbol 1273 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.infoPage.gotoAndPlay("creditsOut");
}
Symbol 1281 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.infoPage.gotoAndPlay("deluxeOut");
}
Symbol 1283 MovieClip Frame 1
if (_global.var1.Get() != -1) {
this.submit_mc._visible = false;
this.text_mc.gotoAndStop(2);
}
Symbol 1285 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.playButt = "3";
_parent.gotoAndPlay("playOut");
}
Symbol 1291 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.playButt = "1";
_parent.gotoAndPlay("playOut");
}
Symbol 1297 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.overWriteSlot = false;
_global.playButt = "2";
_parent.gotoAndPlay("playOut");
}
Symbol 1302 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
if ((pName_txt.text == "") || (pName_txt.text == "Please Enter A Name")) {
pName_txt.text = "Please A Enter Name";
} else {
_global.play2Butt = "1";
_root.CreateProfile(pName_txt.text, "Medium");
_parent.gotoAndPlay("play2Out");
}
}
Symbol 1303 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
pName_txt.text = "";
_global.play2Butt = "3";
_parent.gotoAndPlay("play2Out");
}
Symbol 1308 Button
on (press) {
var mySharedObject = SharedObject.getLocal("settings");
mySharedObject.data.musicOn = _global.musicOn;
mySharedObject.data.soundOn = _global.soundOn;
mySharedObject.data.graphics = _global.graphics;
mySharedObject.data.hotKey1 = _global.hotKey1;
mySharedObject.data.hotKey2 = _global.hotKey2;
mySharedObject.data.hotKey3 = _global.hotKey3;
mySharedObject.data.hotKey4 = _global.hotKey4;
mySharedObject.data.hotKey5 = _global.hotKey5;
mySharedObject.flush();
_global.SoundManager.PlaySound(_global.buttonClickSound);
_root.infoPage.gotoAndPlay("hotkeysOut");
}
Symbol 1319 MovieClip Frame 1
stop();
Symbol 1319 MovieClip Frame 2
stop();
Symbol 1320 MovieClip Frame 1
function OutputValue(fieldName, keyCode) {
var textRef = eval ("this." + fieldName);
var returnValue = "";
switch (keyCode) {
case 8 :
returnValue = "BACKSPACE";
break;
case 20 :
returnValue = "CAPSLOCK";
break;
case 17 :
returnValue = "CONTROL";
break;
case 46 :
returnValue = "DELETE";
break;
case 40 :
returnValue = "DOWN";
break;
case 35 :
returnValue = "END";
break;
case 13 :
returnValue = "ENTER";
break;
case 27 :
returnValue = "ESCAPE";
break;
case 36 :
returnValue = "HOME";
break;
case 45 :
returnValue = "INSERT";
break;
case 37 :
returnValue = "LEFT";
break;
case 34 :
returnValue = "PGDN";
break;
case 33 :
returnValue = "PGUP";
break;
case 39 :
returnValue = "RIGHT";
break;
case 16 :
returnValue = "SHIFT";
break;
case 32 :
returnValue = "SPACE";
break;
case 9 :
returnValue = "TAB";
break;
case 38 :
returnValue = "UP";
break;
case 186 :
returnValue = ";";
break;
case 187 :
returnValue = "=";
break;
case 189 :
returnValue = "-";
break;
case 191 :
returnValue = "/";
break;
case 192 :
returnValue = "`";
break;
case 219 :
returnValue = "[";
break;
case 220 :
returnValue = "\\";
break;
case 221 :
returnValue = "]";
break;
case 222 :
returnValue = "'";
break;
case 188 :
returnValue = ",";
break;
case 190 :
returnValue = ".";
break;
case 96 :
returnValue = "NUMPAD 0";
break;
case 97 :
returnValue = "NUMPAD 1";
break;
case 98 :
returnValue = "NUMPAD 2";
break;
case 99 :
returnValue = "NUMPAD 3";
break;
case 100 :
returnValue = "NUMPAD 4";
break;
case 101 :
returnValue = "NUMPAD 5";
break;
case 102 :
returnValue = "NUMPAD 6";
break;
case 103 :
returnValue = "NUMPAD 7";
break;
case 104 :
returnValue = "NUMPAD 8";
break;
case 105 :
returnValue = "NUMPAD 9";
break;
case 106 :
returnValue = "MULTIPLY";
break;
case 107 :
returnValue = "ADD";
break;
case 109 :
returnValue = "SUBTRACT";
break;
case 110 :
returnValue = "DECIMAL";
break;
case 111 :
returnValue = "DIVIDE";
break;
default :
returnValue = chr(keyCode);
returnValue.toUpperCase();
}
textRef.text = returnValue;
}
function UnselectOthers(myName) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
if (myName != "oneClip") {
this.oneClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "twoClip") {
this.twoClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "threeClip") {
this.threeClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "fourClip") {
this.fourClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
if (myName != "fiveClip") {
this.fiveClip.gotoAndStop(1);
} else {
hasFocus = myName;
}
}
stop();
var hasFocus = "";
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (hasFocus == "oneClip") {
_global.hotKey1 = Key.getCode();
OutputValue("one_txt", _global.hotKey1);
}
if (hasFocus == "twoClip") {
_global.hotKey2 = Key.getCode();
OutputValue("two_txt", _global.hotKey2);
}
if (hasFocus == "threeClip") {
_global.hotKey3 = Key.getCode();
OutputValue("three_txt", _global.hotKey3);
}
if (hasFocus == "fourClip") {
_global.hotKey4 = Key.getCode();
OutputValue("four_txt", _global.hotKey4);
}
if (hasFocus == "fiveClip") {
_global.hotKey5 = Key.getCode();
OutputValue("five_txt", _global.hotKey5);
}
};
Key.addListener(keyListener);
OutputValue("one_txt", _global.hotKey1);
OutputValue("two_txt", _global.hotKey2);
OutputValue("three_txt", _global.hotKey3);
OutputValue("four_txt", _global.hotKey4);
OutputValue("five_txt", _global.hotKey5);
Instance of Symbol 1319 MovieClip "oneClip" in Symbol 1320 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1319 MovieClip "twoClip" in Symbol 1320 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1319 MovieClip "threeClip" in Symbol 1320 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1319 MovieClip "fourClip" in Symbol 1320 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Instance of Symbol 1319 MovieClip "fiveClip" in Symbol 1320 MovieClip Frame 1
on (release) {
this.gotoAndStop(2);
this._parent.UnselectOthers(this._name);
}
on (releaseOutside) {
this.gotoAndStop(1);
}
Symbol 1321 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.loadButt = 4;
_root.infoPage.gotoAndPlay("loadOut");
}
Symbol 1324 MovieClip Frame 1
stop();
Symbol 1324 MovieClip Frame 2
stop();
Symbol 1340 MovieClip Frame 1
stop();
Symbol 1340 MovieClip Frame 2
stop();
Symbol 1340 MovieClip Frame 3
this._alpha = 40;
stop();
Symbol 1349 Button
on (press) {
_parent.gotoAndPlay("loadOut");
_global.loadButt = "5";
}
Symbol 1350 MovieClip Frame 1
function ConvertButtonToCampaignName(testString) {
var _local3 = false;
var _local2 = 0;
while (_local2 < _global.Campaigns.length) {
if (_global.Campaigns[_local2].strButton == testString) {
return(_global.Campaigns[_local2].strTitle);
}
_local2++;
}
if (_local3 == false) {
return("No Campaign");
}
}
Instance of Symbol 1324 MovieClip in Symbol 1350 MovieClip Frame 1
onClipEvent (load) {
if (_global.overWriteSlot == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
Instance of Symbol 1340 MovieClip "slot1" in Symbol 1350 MovieClip Frame 1
onClipEvent (load) {
var shouldTest = false;
var strReturnValue = "none";
var bufferCampaign;
var mySharedObject = SharedObject.getLocal("slot1");
if (mySharedObject.data.blnInUse != undefined) {
strReturnValue = "slot1";
}
if (strReturnValue != "none") {
var tempData = new DataObject();
this.loadName.text = mySharedObject.data.strName;
tempData.Load(mySharedObject.data.data2);
this.loadLevel.text = tempData.Get();
var beatOceanCampaign = new DataObject();
var beatSkyCampaign = new DataObject();
var beatPlainsCampaign = new DataObject();
var beatPeaksCampaign = new DataObject();
var beatMountainCampaign = new DataObject();
var beatCityCampaign = new DataObject();
var beatSouthCampaign = new DataObject();
var beatDesertCampaign = new DataObject();
beatOceanCampaign.Load(mySharedObject.data.data5);
beatSkyCampaign.Load(mySharedObject.data.data6);
beatPlainsCampaign.Load(mySharedObject.data.data7);
beatPeaksCampaign.Load(mySharedObject.data.data8);
beatMountainCampaign.Load(mySharedObject.data.data9);
beatCityCampaign.Load(mySharedObject.data.data10);
beatSouthCampaign.Load(mySharedObject.data.data11);
beatDesertCampaign.Load(mySharedObject.data.data18);
var totalCompleted = 0;
if (beatOceanCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSkyCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPlainsCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPeaksCampaign.Get() != -1) {
totalCompleted++;
}
if (beatMountainCampaign.Get() != -1) {
totalCompleted++;
}
if (beatCityCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSouthCampaign.Get() != -1) {
totalCompleted++;
}
if (beatDesertCampaign.Get() != -1) {
totalCompleted++;
}
if (totalCompleted == 1) {
this.loadCompleted.text = "1 Campaign";
} else {
this.loadCompleted.text = totalCompleted + " Campaigns";
}
bufferCampaign = mySharedObject.data.strCampaign;
this.loadCampaign.text = this._parent.ConvertButtonToCampaignName(bufferCampaign);
}
if (this.loadName.text == "NA") {
this.gotoAndPlay(3);
shouldTest = false;
} else {
shouldTest = true;
}
}
on (rollOver) {
if (shouldTest) {
this.gotoAndPlay(2);
}
}
on (rollOut) {
if (shouldTest) {
this.gotoAndPlay(1);
}
}
on (press) {
if (shouldTest) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.loadSlot = "slot1";
_global.loadButt = "1";
_global.currentCampaign = bufferCampaign;
_root.infoPage.gotoAndPlay("loadOut");
}
}
Instance of Symbol 1340 MovieClip "slot2" in Symbol 1350 MovieClip Frame 1
onClipEvent (load) {
var shouldTest = false;
var strReturnValue = "none";
var bufferCampaign;
var mySharedObject = SharedObject.getLocal("slot2");
if (mySharedObject.data.blnInUse != undefined) {
strReturnValue = "slot2";
}
if (strReturnValue != "none") {
var tempData = new DataObject();
this.loadName.text = mySharedObject.data.strName;
tempData.Load(mySharedObject.data.data2);
this.loadLevel.text = tempData.Get();
var beatOceanCampaign = new DataObject();
var beatSkyCampaign = new DataObject();
var beatPlainsCampaign = new DataObject();
var beatPeaksCampaign = new DataObject();
var beatMountainCampaign = new DataObject();
var beatCityCampaign = new DataObject();
var beatSouthCampaign = new DataObject();
var beatDesertCampaign = new DataObject();
beatOceanCampaign.Load(mySharedObject.data.data5);
beatSkyCampaign.Load(mySharedObject.data.data6);
beatPlainsCampaign.Load(mySharedObject.data.data7);
beatPeaksCampaign.Load(mySharedObject.data.data8);
beatMountainCampaign.Load(mySharedObject.data.data9);
beatCityCampaign.Load(mySharedObject.data.data10);
beatSouthCampaign.Load(mySharedObject.data.data11);
beatDesertCampaign.Load(mySharedObject.data.data18);
var totalCompleted = 0;
if (beatOceanCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSkyCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPlainsCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPeaksCampaign.Get() != -1) {
totalCompleted++;
}
if (beatMountainCampaign.Get() != -1) {
totalCompleted++;
}
if (beatCityCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSouthCampaign.Get() != -1) {
totalCompleted++;
}
if (beatDesertCampaign.Get() != -1) {
totalCompleted++;
}
if (totalCompleted == 1) {
this.loadCompleted.text = "1 Campaign";
} else {
this.loadCompleted.text = totalCompleted + " Campaigns";
}
bufferCampaign = mySharedObject.data.strCampaign;
this.loadCampaign.text = this._parent.ConvertButtonToCampaignName(bufferCampaign);
}
if (this.loadName.text == "NA") {
this.gotoAndPlay(3);
shouldTest = false;
} else {
shouldTest = true;
}
}
on (rollOver) {
if (shouldTest) {
this.gotoAndPlay(2);
}
}
on (rollOut) {
if (shouldTest) {
this.gotoAndPlay(1);
}
}
on (press) {
if (shouldTest) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.loadSlot = "slot2";
_global.loadButt = "2";
_global.currentCampaign = bufferCampaign;
_root.infoPage.gotoAndPlay("loadOut");
}
}
Instance of Symbol 1340 MovieClip "slot3" in Symbol 1350 MovieClip Frame 1
onClipEvent (load) {
var shouldTest = false;
var strReturnValue = "none";
var bufferCampaign;
var mySharedObject = SharedObject.getLocal("slot3");
if (mySharedObject.data.blnInUse != undefined) {
strReturnValue = "slot3";
}
if (strReturnValue != "none") {
var tempData = new DataObject();
this.loadName.text = mySharedObject.data.strName;
tempData.Load(mySharedObject.data.data2);
this.loadLevel.text = tempData.Get();
var beatOceanCampaign = new DataObject();
var beatSkyCampaign = new DataObject();
var beatPlainsCampaign = new DataObject();
var beatPeaksCampaign = new DataObject();
var beatMountainCampaign = new DataObject();
var beatCityCampaign = new DataObject();
var beatSouthCampaign = new DataObject();
var beatDesertCampaign = new DataObject();
beatOceanCampaign.Load(mySharedObject.data.data5);
beatSkyCampaign.Load(mySharedObject.data.data6);
beatPlainsCampaign.Load(mySharedObject.data.data7);
beatPeaksCampaign.Load(mySharedObject.data.data8);
beatMountainCampaign.Load(mySharedObject.data.data9);
beatCityCampaign.Load(mySharedObject.data.data10);
beatSouthCampaign.Load(mySharedObject.data.data11);
beatDesertCampaign.Load(mySharedObject.data.data18);
var totalCompleted = 0;
if (beatOceanCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSkyCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPlainsCampaign.Get() != -1) {
totalCompleted++;
}
if (beatPeaksCampaign.Get() != -1) {
totalCompleted++;
}
if (beatMountainCampaign.Get() != -1) {
totalCompleted++;
}
if (beatCityCampaign.Get() != -1) {
totalCompleted++;
}
if (beatSouthCampaign.Get() != -1) {
totalCompleted++;
}
if (beatDesertCampaign.Get() != -1) {
totalCompleted++;
}
if (totalCompleted == 1) {
this.loadCompleted.text = "1 Campaign";
} else {
this.loadCompleted.text = totalCompleted + " Campaigns";
}
bufferCampaign = mySharedObject.data.strCampaign;
this.loadCampaign.text = this._parent.ConvertButtonToCampaignName(bufferCampaign);
}
if (this.loadName.text == "NA") {
this.gotoAndPlay(3);
shouldTest = false;
} else {
shouldTest = true;
}
}
on (rollOver) {
if (shouldTest) {
this.gotoAndPlay(2);
}
}
on (rollOut) {
if (shouldTest) {
this.gotoAndPlay(1);
}
}
on (press) {
if (shouldTest) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.loadSlot = "slot3";
_global.loadButt = "3";
_global.currentCampaign = bufferCampaign;
_root.infoPage.gotoAndPlay("loadOut");
}
}
Symbol 1352 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.OverWriteButt = "3";
_parent.gotoAndPlay("overwriteOut");
}
Symbol 1359 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.OverWriteButt = "1";
_global.currentCampaign = "none";
_root.OverWriteSlot();
_parent.gotoAndPlay("overwriteOut");
}
Symbol 1365 Button
on (press) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
_global.OverWriteButt = "2";
_parent.gotoAndPlay("overwriteOut");
}
Symbol 1367 MovieClip Frame 1
stop();
Symbol 1367 MovieClip Frame 2
play();
Symbol 1367 MovieClip Frame 20
stop();
Symbol 1367 MovieClip Frame 21
play();
Symbol 1367 MovieClip Frame 40
if (_global.settingsNum == "1") {
gotoAndPlay ("hotkeysIn");
} else if (_global.settingsNum == "2") {
_root.mainMenu.gotoAndPlay(2);
}
stop();
Symbol 1367 MovieClip Frame 41
play();
Symbol 1367 MovieClip Frame 60
stop();
Symbol 1367 MovieClip Frame 61
play();
Symbol 1367 MovieClip Frame 80
_root.mainMenu.gotoAndPlay(2);
stop();
Symbol 1367 MovieClip Frame 81
play();
Symbol 1367 MovieClip Frame 100
stop();
Symbol 1367 MovieClip Frame 101
play();
Symbol 1367 MovieClip Frame 120
_root.mainMenu.gotoAndPlay(2);
stop();
Symbol 1367 MovieClip Frame 121
play();
Symbol 1367 MovieClip Frame 140
stop();
Symbol 1367 MovieClip Frame 141
play();
Symbol 1367 MovieClip Frame 160
if (_global.playButt == "1") {
_root.infoPage.gotoAndPlay("play2In");
} else if (_global.playButt == "2") {
_root.infoPage.gotoAndPlay("loadIn");
} else if (_global.playButt == "3") {
_root.title.gotoAndPlay(2);
}
stop();
Symbol 1367 MovieClip Frame 161
play();
Symbol 1367 MovieClip Frame 180
stop();
Symbol 1367 MovieClip Frame 181
play();
Symbol 1367 MovieClip Frame 200
if (_global.play2Butt == "1") {
if (_global.overWriteSlot == false) {
_root.triggerDoors();
} else {
gotoAndPlay ("loadIn");
}
} else if (_global.play2Butt == "2") {
if (_global.overWriteSlot == false) {
_root.triggerDoors();
} else {
gotoAndPlay ("loadIn");
}
} else if (_global.play2Butt == "3") {
_root.title.gotoAndPlay(2);
_global.theBigOpen = false;
} else if (_global.play2Butt == "4") {
if (_global.overWriteSlot == false) {
_root.triggerDoors();
} else {
gotoAndPlay ("loadIn");
}
}
stop();
Symbol 1367 MovieClip Frame 201
play();
Symbol 1367 MovieClip Frame 220
stop();
Symbol 1367 MovieClip Frame 221
play();
Symbol 1367 MovieClip Frame 240
_root.mainMenu.gotoAndPlay(2);
stop();
Symbol 1367 MovieClip Frame 241
play();
Symbol 1367 MovieClip Frame 260
stop();
Symbol 1367 MovieClip Frame 261
play();
Symbol 1367 MovieClip Frame 280
if (_global.loadButt == "1") {
if (_global.overWriteSlot == false) {
if (_global.currentCampaign == "none") {
_root.triggerDoors();
} else {
_root.StopMouse();
_root.background_mc.gotoAndStop(_global.currentCampaign);
_root.triggerDoorsOld();
}
} else {
_root.infoPage.gotoAndPlay("overwriteIn");
}
} else if (_global.loadButt == "2") {
if (_global.overWriteSlot == false) {
if (_global.currentCampaign == "none") {
_root.triggerDoors();
} else {
_root.StopMouse();
_root.background_mc.gotoAndStop(_global.currentCampaign);
_root.triggerDoorsOld();
}
} else {
_root.infoPage.gotoAndPlay("overwriteIn");
}
} else if (_global.loadButt == "3") {
if (_global.overWriteSlot == false) {
if (_global.currentCampaign == "none") {
_root.triggerDoors();
} else {
_root.StopMouse();
_root.background_mc.gotoAndStop(_global.currentCampaign);
_root.triggerDoorsOld();
}
} else {
_root.infoPage.gotoAndPlay("overwriteIn");
}
} else if (_global.loadButt == "4") {
_root.title.gotoAndPlay(2);
_global.theBigOpen = false;
} else if (_global.loadButt == "5") {
_root.infoPage.gotoAndPlay("overwriteIn");
}
stop();
Symbol 1367 MovieClip Frame 281
play();
Symbol 1367 MovieClip Frame 300
stop();
Symbol 1367 MovieClip Frame 301
play();
Symbol 1367 MovieClip Frame 320
if (_global.OverWriteButt == "1") {
if (_global.currentCampaign == "none") {
_root.triggerDoors();
} else {
_root.background_mc.gotoAndStop(_global.currentCampaign);
_root.triggerDoorsOld();
}
} else if (_global.OverWriteButt == "2") {
_root.infoPage.gotoAndPlay("playIn");
} else if (_global.OverWriteButt == "3") {
_root.title.gotoAndPlay(2);
_global.theBigOpen = false;
}
stop();
Symbol 1369 MovieClip Frame 1
stop();
Symbol 1376 Button
on (release) {
_root.game.OpenTurretInfo(this._parent._parent._name);
}
Symbol 1389 MovieClip Frame 1
var updateLevel = 0;
var updateExp = 0;
Symbol 1389 MovieClip Frame 45
stop();
Symbol 1389 MovieClip Frame 60
if (updateLevel < 10) {
this.turretButton_mc.level_txt.text = "0" + updateLevel;
} else {
this.turretButton_mc.level_txt.text = "" + updateLevel;
}
if (updateLevel == 0) {
this.turretButton_mc.more_mc._visible = false;
this.turretButton_mc.inside_mc._visible = false;
this.turretButton_mc.border_mc._visible = false;
} else {
this.turretButton_mc.more_mc._visible = true;
this.turretButton_mc.inside_mc._visible = true;
this.turretButton_mc.border_mc._visible = true;
this.turretButton_mc.inside_mc._xscale = updateExp;
}
Symbol 1389 MovieClip Frame 75
gotoAndStop (45);
Symbol 1397 Button
on (release) {
if (_global.gamePaused == false) {
_root.game.CloseBreakMode();
}
}
Symbol 1409 MovieClip Frame 1
stop();
this.betweenName_txt.text = _root.game._name;
this.betweenDifficulty_txt.text = _root.game._difficulty;
this.betweenLevel_txt.text = _root.game._level.Get();
this.betweenGold_txt.text = _root.game._money.Get();
Symbol 1424 Button
on (release) {
if (_global.gamePaused == false) {
_global.fOrB = "backward";
_parent.controlList();
}
}
Symbol 1425 MovieClip Frame 1
stop();
Symbol 1426 Button
on (release) {
if (_global.gamePaused == false) {
_global.fOrB = "forward";
_parent.controlList();
}
}
Symbol 1427 MovieClip Frame 1
stop();
Symbol 1428 MovieClip Frame 1
stop();
Symbol 1428 MovieClip Frame 2
play();
Symbol 1428 MovieClip Frame 10
stop();
Symbol 1428 MovieClip Frame 11
play();
Symbol 1428 MovieClip Frame 20
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 21
play();
Symbol 1428 MovieClip Frame 30
stop();
Symbol 1428 MovieClip Frame 31
play();
Symbol 1428 MovieClip Frame 40
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 41
play();
Symbol 1428 MovieClip Frame 50
stop();
Symbol 1428 MovieClip Frame 51
play();
Symbol 1428 MovieClip Frame 60
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 61
play();
Symbol 1428 MovieClip Frame 70
stop();
Symbol 1428 MovieClip Frame 71
play();
Symbol 1428 MovieClip Frame 80
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 81
play();
Symbol 1428 MovieClip Frame 90
stop();
Symbol 1428 MovieClip Frame 91
play();
Symbol 1428 MovieClip Frame 100
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 101
play();
Symbol 1428 MovieClip Frame 110
stop();
Symbol 1428 MovieClip Frame 111
play();
Symbol 1428 MovieClip Frame 120
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 121
play();
Symbol 1428 MovieClip Frame 130
stop();
Symbol 1428 MovieClip Frame 131
play();
Symbol 1428 MovieClip Frame 140
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 141
play();
Symbol 1428 MovieClip Frame 150
stop();
Symbol 1428 MovieClip Frame 151
play();
Symbol 1428 MovieClip Frame 160
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 161
play();
Symbol 1428 MovieClip Frame 170
stop();
Symbol 1428 MovieClip Frame 171
play();
Symbol 1428 MovieClip Frame 180
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 181
play();
Symbol 1428 MovieClip Frame 190
stop();
Symbol 1428 MovieClip Frame 191
play();
Symbol 1428 MovieClip Frame 200
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 201
play();
Symbol 1428 MovieClip Frame 210
stop();
Symbol 1428 MovieClip Frame 211
play();
Symbol 1428 MovieClip Frame 220
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 221
play();
Symbol 1428 MovieClip Frame 230
stop();
Symbol 1428 MovieClip Frame 231
play();
Symbol 1428 MovieClip Frame 240
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 241
play();
Symbol 1428 MovieClip Frame 250
stop();
Symbol 1428 MovieClip Frame 251
play();
Symbol 1428 MovieClip Frame 260
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 261
play();
Symbol 1428 MovieClip Frame 270
stop();
Symbol 1428 MovieClip Frame 271
play();
Symbol 1428 MovieClip Frame 280
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 281
play();
Symbol 1428 MovieClip Frame 290
stop();
Symbol 1428 MovieClip Frame 291
play();
Symbol 1428 MovieClip Frame 300
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 301
play();
Symbol 1428 MovieClip Frame 310
stop();
Symbol 1428 MovieClip Frame 311
play();
Symbol 1428 MovieClip Frame 320
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 321
play();
Symbol 1428 MovieClip Frame 330
stop();
Symbol 1428 MovieClip Frame 331
play();
Symbol 1428 MovieClip Frame 340
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 341
play();
Symbol 1428 MovieClip Frame 350
stop();
Symbol 1428 MovieClip Frame 351
play();
Symbol 1428 MovieClip Frame 360
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 361
play();
Symbol 1428 MovieClip Frame 370
stop();
Symbol 1428 MovieClip Frame 371
play();
Symbol 1428 MovieClip Frame 380
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 381
play();
Symbol 1428 MovieClip Frame 390
stop();
Symbol 1428 MovieClip Frame 391
play();
Symbol 1428 MovieClip Frame 400
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 401
play();
Symbol 1428 MovieClip Frame 410
stop();
Symbol 1428 MovieClip Frame 411
play();
Symbol 1428 MovieClip Frame 420
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 421
play();
Symbol 1428 MovieClip Frame 430
stop();
Symbol 1428 MovieClip Frame 431
play();
Symbol 1428 MovieClip Frame 440
_parent.playIn();
stop();
Symbol 1428 MovieClip Frame 441
play();
Symbol 1428 MovieClip Frame 450
stop();
Symbol 1428 MovieClip Frame 451
play();
Symbol 1428 MovieClip Frame 460
_parent.playIn();
stop();
Symbol 1431 MovieClip Frame 1
function controlList() {
if (_global.firstTime) {
tName = list[0].name + "_OUT";
this.turret_transition.gotoAndPlay(tName);
if (_global.fOrB == "forward") {
traverseListForward();
} else if (_global.fOrB == "backward") {
traverseListBackward();
}
_global.firstTime = false;
} else if (!_global.firstTime) {
this.turret_transition.gotoAndPlay(tName);
if (_global.fOrB == "forward") {
traverseListForward();
} else if (_global.fOrB == "backward") {
traverseListBackward();
}
}
}
function UpdateGold() {
this.dataBox_mc.betweenGold_txt.text = _root.game._money.Get();
}
function UpdateLevel() {
this.dataBox_mc.betweenLevel_txt.text = _root.game._level.Get();
}
function GetTurretType() {
return(list[selectedListIndex].name);
}
function GetWeaponType() {
return(list[selectedListIndex].weaponType);
}
function GetTurretTitle() {
return(list[selectedListIndex].title);
}
function GetTurretDescription() {
return(list[selectedListIndex].description);
}
function GetTurretCost() {
var _local2 = list[selectedListIndex].cost;
if (_global.cheatsEnabled.Get() == -1) {
if (_global.var1.Get() != -1) {
if (_global.cheatCheapGuns.Get() == -1) {
_local2 = 100;
}
}
}
return(_local2);
}
function GetTurretCostForType(getType) {
var _local1 = 0;
while (_local1 < list.length) {
if (list[_local1].name == ("turret" + getType)) {
return(list[_local1].cost);
}
_local1++;
}
return(0);
}
function playIn() {
tName = list[selectedListIndex].name + "_IN";
this.turret_transition.gotoAndPlay(tName);
tName = list[selectedListIndex].name + "_OUT";
}
function traverseListForward() {
selectedListIndex++;
if (selectedListIndex == list.length) {
selectedListIndex = 0;
}
}
function traverseListBackward() {
selectedListIndex--;
if (selectedListIndex == -1) {
selectedListIndex = list.length - 1;
}
}
stop();
var list = new Array();
var selectedListIndex = 0;
var tName;
var i = 0;
while (i < _global.Campaigns.length) {
var blnDidCheat = false;
if (_global.cheatsEnabled.Get() == -1) {
if (_global.var1.Get() != -1) {
if (_global.cheatUnlock.Get() == -1) {
if (_root.game.IsAChallengeMission(_global.currentCampaign) == false) {
if (_global.Campaigns[i].strButton == "all_bt") {
list = _global.Campaigns[i].arrGuns.slice();
}
}
blnDidCheat = true;
}
}
}
if (blnDidCheat == false) {
if (_global.Campaigns[i].strButton == _global.currentCampaign) {
list = _global.Campaigns[i].arrGuns.slice();
}
}
var tempGoName = (list[0].name + "_APPEAR");
this.turret_transition.gotoAndStop(tempGoName);
i++;
}
_root.game.UpdateStorageSlots();
Instance of Symbol 1428 MovieClip "turret_transition" in Symbol 1431 MovieClip Frame 1
onClipEvent (load) {
}
Symbol 1432 MovieClip Frame 1
stop();
Symbol 1432 MovieClip Frame 2
play();
Symbol 1432 MovieClip Frame 16
_global.firstTime = true;
_root.game.blnBreakIsDown = true;
stop();
Symbol 1432 MovieClip Frame 17
_root.game.blnBreakIsDown = false;
Symbol 1432 MovieClip Frame 31
gotoAndPlay ("hidden");
Symbol 1435 MovieClip Frame 1
stop();
Symbol 1444 MovieClip Frame 15
stop();
Symbol 1448 MovieClip Frame 1
stop();
Symbol 1452 MovieClip Frame 1
stop();
Symbol 1452 MovieClip Frame 18
gotoAndPlay (2);
Symbol 1458 Button
on (release) {
_root.game.MenuPressed();
}
Symbol 1470 MovieClip Frame 1
r = random(200);
r = r + 50;
gotoAndPlay(r);
Symbol 1471 MovieClip Frame 6
stop();
Symbol 1471 MovieClip Frame 12
_root.screenEffects_mc._visible = false;
stop();
Symbol 1472 MovieClip Frame 1
stop();
Symbol 1472 MovieClip Frame 2
stop();
Symbol 1474 MovieClip Frame 6
_root.flash_mc._visible = false;
stop();
Symbol 1475 MovieClip Frame 1
stop();
Symbol 1475 MovieClip Frame 2
stop();
Symbol 1479 Button
on (release) {
var mySharedObject = SharedObject.getLocal("settings");
mySharedObject.data.musicOn = _global.musicOn;
mySharedObject.data.soundOn = _global.soundOn;
mySharedObject.data.graphics = _global.graphics;
mySharedObject.flush();
this._parent.play();
}
Symbol 1482 Button
on (release) {
_quality = "MEDIUM";
gotoAndStop (2);
}
Symbol 1484 Button
on (release) {
_quality = "LOW";
gotoAndStop (3);
}
Symbol 1486 Button
on (release) {
_quality = "HIGH";
gotoAndStop (1);
}
Symbol 1487 MovieClip Frame 1
stop();
Symbol 1487 MovieClip Frame 2
stop();
Symbol 1487 MovieClip Frame 3
stop();
Symbol 1490 Button
on (release) {
_global.soundOn = false;
gotoAndStop (2);
}
Symbol 1493 Button
on (release) {
_global.soundOn = true;
gotoAndStop (1);
}
Symbol 1494 MovieClip Frame 1
stop();
Symbol 1494 MovieClip Frame 2
stop();
Symbol 1497 Button
on (release) {
_global.musicOn = false;
_global.myMusicPlayer.Stop();
gotoAndStop (2);
}
Symbol 1500 Button
on (release) {
_global.musicOn = true;
_global.myMusicPlayer.SetTrack(_global.ResumeSong);
if (_global.ResumeSong == "recharge") {
_global.myMusicPlayer.SetMaxVolume(18);
} else {
_global.myMusicPlayer.SetMaxVolume(100);
}
_global.myMusicPlayer.Play();
gotoAndStop (1);
}
Symbol 1501 MovieClip Frame 1
stop();
Symbol 1501 MovieClip Frame 2
stop();
Symbol 1505 Button
on (release) {
getURL ("http://www.armorgames.com");
}
Symbol 1508 Button
on (release) {
_root.game.CloseGame();
}
Symbol 1511 Button
on (release) {
this._parent._parent.play();
_root.game.ResetGame();
}
Symbol 1516 MovieClip Frame 1
stop();
Symbol 1516 MovieClip Frame 2
stop();
Symbol 1519 Button
on (release) {
this._parent._parent.play();
_root.game.ResetCampaign();
}
Symbol 1523 MovieClip Frame 1
stop();
Symbol 1523 MovieClip Frame 2
stop();
Symbol 1529 Button
on (release) {
_root.game.ConfirmDeleteGun();
this._parent.play();
}
Symbol 1533 Button
on (release) {
_root.game.CancelDeleteGun();
this._parent.play();
}
Symbol 1536 Button
on (release) {
this._parent.play();
}
Symbol 1582 MovieClip Frame 1
function SetupScreen() {
if (_global.musicOn == true) {
this.inside.music_mc.gotoAndStop(1);
} else {
this.inside.music_mc.gotoAndStop(2);
}
if (_global.soundOn == true) {
this.inside.sound_mc.gotoAndStop(1);
} else {
this.inside.sound_mc.gotoAndStop(2);
}
if (_quality == "HIGH") {
this.inside.graphics_mc.gotoAndStop(1);
} else if (_quality == "MEDIUM") {
this.inside.graphics_mc.gotoAndStop(2);
} else if (_quality == "LOW") {
this.inside.graphics_mc.gotoAndStop(3);
}
if (_root.game.blnBreakMode == true) {
this.inside.restart_mc.gotoAndStop(2);
this.inside.restartCampaign_mc.gotoAndStop(2);
} else {
this.inside.restart_mc.gotoAndStop(1);
this.inside.restartCampaign_mc.gotoAndStop(1);
}
}
SetupScreen();
Symbol 1582 MovieClip Frame 15
stop();
Symbol 1582 MovieClip Frame 30
_root.game.CloseMenu();
Symbol 1582 MovieClip Frame 46
stop();
Symbol 1582 MovieClip Frame 61
this._visible = false;
stop();
Symbol 1582 MovieClip Frame 77
stop();
Symbol 1582 MovieClip Frame 92
_root.game.CloseTurretInfo();
this._visible = false;
stop();
Symbol 1592 Button
on (release) {
this._parent._parent.nextFrame();
}
Symbol 1597 Button
on (release) {
_root.game.EndTutorialAndStart();
}
Symbol 1613 MovieClip Frame 30
stop();
Symbol 1613 MovieClip Frame 60
stop();
Symbol 1613 MovieClip Frame 90
stop();
Symbol 1613 MovieClip Frame 120
stop();
Symbol 1613 MovieClip Frame 121
stop();
Symbol 1613 MovieClip Frame 151
stop();
Symbol 1613 MovieClip Frame 181
stop();
Symbol 1613 MovieClip Frame 211
stop();
Symbol 1615 Button
on (release) {
nextFrame();
}
Symbol 1619 Button
on (release) {
_root.game.EndTutorial();
}
Symbol 1653 Button
on (release) {
_root.game.EndTutorial();
}
Symbol 1655 MovieClip Frame 2
stop();
if ((((((_global.currentCampaign == "peaks_bt") || (_global.currentCampaign == "plains_bt")) || (_global.currentCampaign == "south_bt")) || (_global.currentCampaign == "sky_bt")) || (_global.currentCampaign == "city_bt")) || (_global.currentCampaign == "pass_bt")) {
this.inside.gotoAndPlay(_global.currentCampaign);
} else if (_root.game.IsAChallengeMission(_global.currentCampaign) == true) {
this.inside.gotoAndPlay("challenge");
this.inside.title_txt.text = _root.game.GetChallengeTitle();
this.inside.description_txt.text = _root.game.GetChallengeDescription();
}
Symbol 1655 MovieClip Frame 3
stop();
_root.game.SlideScreenDown();
Symbol 1655 MovieClip Frame 4
stop();
Symbol 1655 MovieClip Frame 5
stop();
Symbol 1655 MovieClip Frame 6
stop();
Symbol 1655 MovieClip Frame 7
stop();
Symbol 1655 MovieClip Frame 8
stop();
Symbol 1655 MovieClip Frame 9
stop();
_root.game.SlideScreenUp();
Symbol 1655 MovieClip Frame 10
stop();
Symbol 1655 MovieClip Frame 11
stop();
Symbol 1655 MovieClip Frame 12
stop();
Symbol 1655 MovieClip Frame 13
stop();
_root.game.SlideScreenDown();
Symbol 1655 MovieClip Frame 14
stop();
Symbol 1655 MovieClip Frame 15
stop();
Symbol 1655 MovieClip Frame 16
stop();
Symbol 1655 MovieClip Frame 17
stop();
Symbol 1670 Button
on (release) {
_global.SoundManager.PlaySound(_global.buttonClickSound);
this._parent.play();
}
Symbol 1675 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 1684 Button
on (release) {
getURL ("http://www.herointeractive.com/stormwinds1-5.html", "_blank");
}
Symbol 1691 Button
on (release) {
_root.game.CloseGame();
}
Symbol 1727 Button
on (release) {
getURL (_root.game.GetChallengeURL(), "_blank");
}
Symbol 1746 MovieClip Frame 1
stop();
Symbol 1746 MovieClip Frame 221
_root.game.ReportOutputFinished("win");
gotoAndStop ("hide");
stop();
Symbol 1746 MovieClip Frame 301
stop();
Symbol 1746 MovieClip Frame 352
_root.game.ReportOutputFinished("dead");
gotoAndStop ("hide");
stop();
Symbol 1746 MovieClip Frame 425
stop();
Symbol 1746 MovieClip Frame 498
stop();
Symbol 1746 MovieClip Frame 571
stop();
Symbol 1746 MovieClip Frame 644
stop();
Symbol 1746 MovieClip Frame 647
_root.game.UpdateChallengeStats(true);
Symbol 1746 MovieClip Frame 717
stop();
Symbol 1746 MovieClip Frame 720
_root.game.UpdateChallengeStats(false);
Symbol 1746 MovieClip Frame 790
stop();