Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
Security.allowDomain("server.cpmstar.com");
var _local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 2
//ag_intro_mc_176 (vector_boom_fla.ag_intro_mc_176)
package vector_boom_fla {
import flash.display.*;
public dynamic class ag_intro_mc_176 extends MovieClip {
public function ag_intro_mc_176(){
addFrameScript(0, frame1, 178, frame179);
}
function frame1(){
gotoAndPlay(2);
}
function frame179(){
stop();
}
}
}//package vector_boom_fla
Section 3
//animatedparticles1_58 (vector_boom_fla.animatedparticles1_58)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles1_58 extends MovieClip {
public function animatedparticles1_58(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package vector_boom_fla
Section 4
//animatedparticles2_60 (vector_boom_fla.animatedparticles2_60)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles2_60 extends MovieClip {
public function animatedparticles2_60(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package vector_boom_fla
Section 5
//animatedparticles3_62 (vector_boom_fla.animatedparticles3_62)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles3_62 extends MovieClip {
public function animatedparticles3_62(){
addFrameScript(47, frame48);
}
function frame48(){
stop();
}
}
}//package vector_boom_fla
Section 6
//animatedparticles4_69 (vector_boom_fla.animatedparticles4_69)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles4_69 extends MovieClip {
public function animatedparticles4_69(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package vector_boom_fla
Section 7
//animatedparticles5_140 (vector_boom_fla.animatedparticles5_140)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles5_140 extends MovieClip {
public function animatedparticles5_140(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package vector_boom_fla
Section 8
//animatedparticles6_142 (vector_boom_fla.animatedparticles6_142)
package vector_boom_fla {
import flash.display.*;
public dynamic class animatedparticles6_142 extends MovieClip {
public function animatedparticles6_142(){
addFrameScript(66, frame67);
}
function frame67(){
stop();
}
}
}//package vector_boom_fla
Section 9
//back_btn_16 (vector_boom_fla.back_btn_16)
package vector_boom_fla {
import flash.display.*;
public dynamic class back_btn_16 extends MovieClip {
public function back_btn_16(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 10
//bar_174 (vector_boom_fla.bar_174)
package vector_boom_fla {
import flash.display.*;
public dynamic class bar_174 extends MovieClip {
public function bar_174(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package vector_boom_fla
Section 11
//BossDestroyed_157 (vector_boom_fla.BossDestroyed_157)
package vector_boom_fla {
import flash.display.*;
public dynamic class BossDestroyed_157 extends MovieClip {
public function BossDestroyed_157(){
addFrameScript(63, frame64);
}
function frame64(){
stop();
try {
Main(root).RemoveBoss(MovieClip(this.parent));
} catch(e:Error) {
};
}
}
}//package vector_boom_fla
Section 12
//continue_game_118 (vector_boom_fla.continue_game_118)
package vector_boom_fla {
import flash.display.*;
public dynamic class continue_game_118 extends MovieClip {
public function continue_game_118(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 13
//Explosion_Boss1_57 (vector_boom_fla.Explosion_Boss1_57)
package vector_boom_fla {
import flash.display.*;
public dynamic class Explosion_Boss1_57 extends MovieClip {
public var inside:MovieClip;
public function Explosion_Boss1_57(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame32(){
stop();
}
}
}//package vector_boom_fla
Section 14
//Explosion_Boss2_59 (vector_boom_fla.Explosion_Boss2_59)
package vector_boom_fla {
import flash.display.*;
public dynamic class Explosion_Boss2_59 extends MovieClip {
public var inside:MovieClip;
public function Explosion_Boss2_59(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame22(){
stop();
}
}
}//package vector_boom_fla
Section 15
//Explosion_Boss3_61 (vector_boom_fla.Explosion_Boss3_61)
package vector_boom_fla {
import flash.display.*;
public dynamic class Explosion_Boss3_61 extends MovieClip {
public var inside:MovieClip;
public function Explosion_Boss3_61(){
addFrameScript(0, frame1, 57, frame58);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame58(){
stop();
}
}
}//package vector_boom_fla
Section 16
//Explosion_Boss4_68 (vector_boom_fla.Explosion_Boss4_68)
package vector_boom_fla {
import flash.display.*;
public dynamic class Explosion_Boss4_68 extends MovieClip {
public var inside:MovieClip;
public function Explosion_Boss4_68(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame32(){
stop();
}
}
}//package vector_boom_fla
Section 17
//magnet_pu_167 (vector_boom_fla.magnet_pu_167)
package vector_boom_fla {
import flash.display.*;
public dynamic class magnet_pu_167 extends MovieClip {
public function magnet_pu_167(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package vector_boom_fla
Section 18
//max_stop_117 (vector_boom_fla.max_stop_117)
package vector_boom_fla {
import flash.display.*;
public dynamic class max_stop_117 extends MovieClip {
public function max_stop_117(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
}
}//package vector_boom_fla
Section 19
//max_stop_black_116 (vector_boom_fla.max_stop_black_116)
package vector_boom_fla {
import flash.display.*;
public dynamic class max_stop_black_116 extends MovieClip {
public function max_stop_black_116(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
}
}//package vector_boom_fla
Section 20
//maxPower_pu_165 (vector_boom_fla.maxPower_pu_165)
package vector_boom_fla {
import flash.display.*;
public dynamic class maxPower_pu_165 extends MovieClip {
public function maxPower_pu_165(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package vector_boom_fla
Section 21
//MothershipBayDoors_125 (vector_boom_fla.MothershipBayDoors_125)
package vector_boom_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MothershipBayDoors_125 extends MovieClip {
public function MothershipBayDoors_125(){
addFrameScript(0, frame1, 15, frame16, 64, frame65);
}
function frame16(){
stop();
Main(root).PlaceSpawn(MovieClip(this.parent));
}
function frame65(){
try {
if (MovieClip(this.parent).AmIAlive() == true){
Main(root).PreCreateShield(MovieClip(this.parent));
};
} catch(e:Error) {
};
gotoAndStop(1);
}
function frame1(){
stop();
}
}
}//package vector_boom_fla
Section 22
//normal_mode_btn_36 (vector_boom_fla.normal_mode_btn_36)
package vector_boom_fla {
import flash.display.*;
public dynamic class normal_mode_btn_36 extends MovieClip {
public function normal_mode_btn_36(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 23
//pmg_button_106 (vector_boom_fla.pmg_button_106)
package vector_boom_fla {
import flash.display.*;
public dynamic class pmg_button_106 extends MovieClip {
public function pmg_button_106(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 24
//pmg_fail_10 (vector_boom_fla.pmg_fail_10)
package vector_boom_fla {
import flash.display.*;
public dynamic class pmg_fail_10 extends MovieClip {
public function pmg_fail_10(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 25
//power_bar_109 (vector_boom_fla.power_bar_109)
package vector_boom_fla {
import flash.display.*;
public dynamic class power_bar_109 extends MovieClip {
public function power_bar_109(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package vector_boom_fla
Section 26
//shield_pu_163 (vector_boom_fla.shield_pu_163)
package vector_boom_fla {
import flash.display.*;
public dynamic class shield_pu_163 extends MovieClip {
public function shield_pu_163(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package vector_boom_fla
Section 27
//soundBuffer_172 (vector_boom_fla.soundBuffer_172)
package vector_boom_fla {
import flash.display.*;
public dynamic class soundBuffer_172 extends MovieClip {
public function soundBuffer_172(){
addFrameScript(0, frame1, 29, frame30);
}
function frame30(){
stop();
}
function frame1(){
gotoAndStop("buffed");
}
}
}//package vector_boom_fla
Section 28
//stage1_45 (vector_boom_fla.stage1_45)
package vector_boom_fla {
import flash.display.*;
public dynamic class stage1_45 extends MovieClip {
public function stage1_45(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 29
//stage2_65 (vector_boom_fla.stage2_65)
package vector_boom_fla {
import flash.display.*;
public dynamic class stage2_65 extends MovieClip {
public function stage2_65(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 30
//stage3_70 (vector_boom_fla.stage3_70)
package vector_boom_fla {
import flash.display.*;
public dynamic class stage3_70 extends MovieClip {
public function stage3_70(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 31
//survival_mode_btn_37 (vector_boom_fla.survival_mode_btn_37)
package vector_boom_fla {
import flash.display.*;
public dynamic class survival_mode_btn_37 extends MovieClip {
public function survival_mode_btn_37(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 32
//Teleport_Anim_Phase1_99 (vector_boom_fla.Teleport_Anim_Phase1_99)
package vector_boom_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Teleport_Anim_Phase1_99 extends MovieClip {
public function Teleport_Anim_Phase1_99(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
MovieClip(this.parent).Teleport();
}
}
}//package vector_boom_fla
Section 33
//tut_next_btn_19 (vector_boom_fla.tut_next_btn_19)
package vector_boom_fla {
import flash.display.*;
public dynamic class tut_next_btn_19 extends MovieClip {
public function tut_next_btn_19(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 34
//tut_play_btn_18 (vector_boom_fla.tut_play_btn_18)
package vector_boom_fla {
import flash.display.*;
public dynamic class tut_play_btn_18 extends MovieClip {
public function tut_play_btn_18(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 35
//upgrade_bar_115 (vector_boom_fla.upgrade_bar_115)
package vector_boom_fla {
import flash.display.*;
public dynamic class upgrade_bar_115 extends MovieClip {
public var max_stop_black:MovieClip;
public var max_stop:MovieClip;
public function upgrade_bar_115(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
}
}//package vector_boom_fla
Section 36
//upgrade_me_114 (vector_boom_fla.upgrade_me_114)
package vector_boom_fla {
import flash.display.*;
public dynamic class upgrade_me_114 extends MovieClip {
public function upgrade_me_114(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 37
//upgrade_pmg_119 (vector_boom_fla.upgrade_pmg_119)
package vector_boom_fla {
import flash.display.*;
public dynamic class upgrade_pmg_119 extends MovieClip {
public function upgrade_pmg_119(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package vector_boom_fla
Section 38
//ATBullet (ATBullet)
package {
public dynamic class ATBullet extends BulletA {
}
}//package
Section 39
//auto_turret_shoot (auto_turret_shoot)
package {
import flash.media.*;
public dynamic class auto_turret_shoot extends Sound {
}
}//package
Section 40
//AutoTurret (AutoTurret)
package {
import flash.display.*;
import flash.events.*;
public class AutoTurret extends MovieClip {
private var blnDead:Boolean;
private var myTarget:MovieClip;
public var emitter:MovieClip;
private var fireTimer:Number;
public function AutoTurret():void{
myTarget = null;
fireTimer = 50;
}
private function RotateMe():void{
var vecDir:LineVector;
var myRadians:*;
var myDegrees:*;
try {
myTarget = Main(root).FindTarget(this);
if (myTarget != null){
vecDir = new LineVector();
vecDir.x = (myTarget.x - (this.x + MovieClip(root).base.x));
vecDir.y = (myTarget.y - (this.y + MovieClip(root).base.y));
myRadians = Math.atan2(vecDir.y, vecDir.x);
myDegrees = ((360 * myRadians) / (2 * Math.PI));
this.rotation = myDegrees;
Fire();
};
} catch(e:Error) {
};
}
public function Dead():void{
blnDead = true;
}
public function Run():void{
if (blnDead == false){
RotateMe();
};
}
public function RemoveTurret():void{
MovieClip(root).removeChild(MovieClip(root).base[this]);
}
private function Fire():void{
if (fireTimer > 0){
fireTimer--;
} else {
if (fireTimer == 0){
Main(root).ShootAutoTurretBullet(this, myTarget);
fireTimer = 50;
};
};
}
public function Setup():void{
blnDead = false;
this.rotation = 90;
}
}
}//package
Section 41
//Base (Base)
package {
import flash.display.*;
import flash.events.*;
public class Base extends MovieClip {
public var ATActivate:Boolean;
public var yLoc:Number;
private var blnShown:Boolean;
private var numOfAutoTurrets:Number;
public var at1:MovieClip;
public var at2:MovieClip;
public var at3:MovieClip;
public var at4:MovieClip;
public var basebase:MovieClip;
private var baseStage:Number;
public var baseAutoTurret:MovieClip;
public var gun1:MovieClip;
private var slot1:Boolean;
private var slot2:Boolean;
private var slot3:Boolean;
private var slot4:Boolean;
private var arrAutoTurrets:Array;
public function Base(){
slot1 = false;
slot2 = false;
slot3 = false;
slot4 = false;
blnShown = false;
ATActivate = false;
yLoc = 55;
arrAutoTurrets = new Array();
}
public function BaseUpgrade(_arg1:Number):void{
this.gotoAndStop(_arg1);
Main(root).UpdateBStage(_arg1);
baseStage = _arg1;
ReAlign();
}
private function RemoveBase():void{
MovieClip(root).removeChild(this);
}
private function FadeMeIn():void{
if (blnShown == false){
this.alpha = (this.alpha + 0.1);
if (this.alpha >= 1){
this.alpha = 1;
blnShown = true;
};
};
}
public function Setup(_arg1:Number, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean):void{
baseStage = Main(root).ReturnCurrentBaseStage();
this.gotoAndStop(baseStage);
slot1 = _arg2;
slot2 = _arg3;
slot3 = _arg4;
slot4 = _arg5;
numOfAutoTurrets = _arg1;
if (_arg1 > 1){
if (slot1 == true){
CreateAutoTurret(this[("a" + "t1")].x, this[("a" + "t1")].y, 1);
};
if (slot2 == true){
CreateAutoTurret(this[("a" + "t2")].x, this[("a" + "t2")].y, 2);
};
if (slot3 == true){
CreateAutoTurret(this[("a" + "t3")].x, this[("a" + "t3")].y, 3);
};
if (slot4 == true){
CreateAutoTurret(this[("a" + "t4")].x, this[("a" + "t4")].y, 4);
};
ATActivate = true;
};
}
public function Run():void{
var _local1:Number;
FadeMeIn();
if (ATActivate == true){
_local1 = 0;
while (_local1 < arrAutoTurrets.length) {
arrAutoTurrets[_local1].Run();
_local1++;
};
};
}
public function RetrieveBaseStage():Number{
return (baseStage);
}
private function ReAlign():void{
this.x = int(((stage.stageWidth / 2) - (this.width / 2)));
this.y = yLoc;
}
private function CreateAutoTurret(_arg1:Number, _arg2:Number, _arg3:Number):void{
baseAutoTurret = new BAutoT();
baseAutoTurret.x = _arg1;
baseAutoTurret.y = _arg2;
baseAutoTurret.name = ("auto_turret_" + _arg3);
this.addChild(baseAutoTurret);
arrAutoTurrets.push(baseAutoTurret);
baseAutoTurret.Setup();
}
public function KillAutoTurrets():void{
var _local1:Number = 0;
while (_local1 < arrAutoTurrets.length) {
arrAutoTurrets[_local1].Dead();
this.removeChild(arrAutoTurrets[_local1]);
_local1++;
};
arrAutoTurrets.length = 0;
}
}
}//package
Section 42
//base_shoot (base_shoot)
package {
import flash.media.*;
public dynamic class base_shoot extends Sound {
}
}//package
Section 43
//BAutoT (BAutoT)
package {
public dynamic class BAutoT extends AutoTurret {
}
}//package
Section 44
//BGround1 (BGround1)
package {
import flash.display.*;
public dynamic class BGround1 extends MovieClip {
}
}//package
Section 45
//BGround10 (BGround10)
package {
import flash.display.*;
public dynamic class BGround10 extends MovieClip {
}
}//package
Section 46
//BGround11 (BGround11)
package {
import flash.display.*;
public dynamic class BGround11 extends MovieClip {
}
}//package
Section 47
//BGround2 (BGround2)
package {
import flash.display.*;
public dynamic class BGround2 extends MovieClip {
}
}//package
Section 48
//BGround3 (BGround3)
package {
import flash.display.*;
public dynamic class BGround3 extends MovieClip {
}
}//package
Section 49
//BGround4 (BGround4)
package {
import flash.display.*;
public dynamic class BGround4 extends MovieClip {
}
}//package
Section 50
//BGround5 (BGround5)
package {
import flash.display.*;
public dynamic class BGround5 extends MovieClip {
}
}//package
Section 51
//BGround6 (BGround6)
package {
import flash.display.*;
public dynamic class BGround6 extends MovieClip {
}
}//package
Section 52
//BGround7 (BGround7)
package {
import flash.display.*;
public dynamic class BGround7 extends MovieClip {
}
}//package
Section 53
//BGround8 (BGround8)
package {
import flash.display.*;
public dynamic class BGround8 extends MovieClip {
}
}//package
Section 54
//BGround9 (BGround9)
package {
import flash.display.*;
public dynamic class BGround9 extends MovieClip {
}
}//package
Section 55
//BigBoom (BigBoom)
package {
import flash.display.*;
public dynamic class BigBoom extends MovieClip {
public function BigBoom(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
Main(root).EffectKillSelf(MovieClip(this));
}
}
}//package
Section 56
//BShield (BShield)
package {
import flash.display.*;
public dynamic class BShield extends MovieClip {
public function BShield(){
addFrameScript(39, frame40);
}
function frame40(){
gotoAndPlay(1);
}
}
}//package
Section 57
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Bullet extends MovieClip {
public var type:Number;
public var speed:Number;
private var expArea:Number;
public var radius:Number;
private var blnMove:Boolean;
private var moveX:Number;
private var moveY:Number;
private var myTarget:Object;
public var damage:Number;
public var cReward:Number;
public var pReward:Number;
public function Bullet():void{
blnMove = false;
Setup();
}
public function Set(_arg1:Number):void{
type = Main.gData.arrBulletData[_arg1].type;
speed = Main.gData.arrBulletData[_arg1].speed;
if (type == 1){
damage = Main.gData.BASEBULLETDAMAGE;
} else {
damage = Main.gData.arrBulletData[_arg1].damage;
};
radius = Main.gData.arrBulletData[_arg1].radius;
cReward = Main.gData.arrBulletData[_arg1].cReward;
pReward = Main.gData.arrBulletData[_arg1].pReward;
}
public function Run():void{
if (type == 6){
MoveAutoMe();
} else {
MoveMe();
};
}
public function RemoveBullet():void{
MovieClip(root).removeChild(this);
}
public function Start():void{
blnMove = true;
}
public function GetDistance(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (this.x - _arg1);
var _local4:Number = (this.y - _arg2);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
private function SetMovement():void{
if (type != 6){
RotateBullet();
};
var _local1:LineVector = new LineVector();
_local1.x = (Math.cos(((Math.PI * this.rotation) / 180)) * speed);
_local1.y = (Math.sin(((Math.PI * this.rotation) / 180)) * speed);
this.moveX = _local1.x;
this.moveY = _local1.y;
}
public function Setup():void{
Set(0);
}
public function SetTarget(_arg1:Object):void{
myTarget = _arg1;
}
public function Stop():void{
blnMove = false;
}
private function MoveMe():void{
var _local1:Number;
if (blnMove == true){
_local1 = 18;
if (type != 1){
_local1 = Main(root).RetrieveBDis();
};
if (GetDistance(myTarget.x, myTarget.y) < _local1){
blnMove = false;
if (type == 1){
Main(root).CheckDestroyRadius(expArea, this.x, this.y, damage);
} else {
Main(root).BaseBulletHit(this, _local1);
};
if (this.name != "main_bullet_tanker"){
Main(root).DeleteBullet(this);
};
} else {
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
};
};
}
private function RotateBullet():void{
var _local1:LineVector;
var _local2:Number;
var _local3:Number;
var _local4:Point;
if (type != 6){
if (type == 1){
_local1 = new LineVector();
_local1.x = (myTarget.x - this.x);
_local1.y = (myTarget.y - this.y);
_local2 = Math.atan2(_local1.y, _local1.x);
_local3 = ((360 * _local2) / (2 * Math.PI));
this.rotation = _local3;
} else {
_local4 = new Point(MovieClip(root).base.gun1.x, MovieClip(root).base.gun1.y);
_local4 = MovieClip(root).base.localToGlobal(_local4);
_local1 = new LineVector();
_local1.x = (_local4.x - this.x);
_local1.y = (_local4.y - this.y);
_local2 = Math.atan2(_local1.y, _local1.x);
_local3 = ((360 * _local2) / (2 * Math.PI));
this.rotation = _local3;
};
};
}
private function MoveAutoMe():void{
if (blnMove == true){
if ((((((((this.x < -10)) || ((this.x > (MovieClip(root).stage.stageWidth + 10))))) || ((this.y < -10)))) || ((this.y > (MovieClip(root).stage.stageHeight + 10))))){
Main(root).DeleteABullet(this);
} else {
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
};
};
}
public function SetRadius(_arg1:Number):void{
radius = (expArea = _arg1);
}
}
}//package
Section 58
//Bullet1 (Bullet1)
package {
public class Bullet1 extends Bullet {
override public function Setup():void{
Set(1);
}
}
}//package
Section 59
//Bullet2 (Bullet2)
package {
public class Bullet2 extends Bullet {
override public function Setup():void{
Set(2);
}
}
}//package
Section 60
//Bullet3 (Bullet3)
package {
public class Bullet3 extends Bullet {
override public function Setup():void{
Set(3);
}
}
}//package
Section 61
//Bullet4 (Bullet4)
package {
public class Bullet4 extends Bullet {
override public function Setup():void{
Set(4);
}
}
}//package
Section 62
//Bullet5 (Bullet5)
package {
public class Bullet5 extends Bullet {
override public function Setup():void{
Set(5);
}
}
}//package
Section 63
//BulletA (BulletA)
package {
public class BulletA extends Bullet {
override public function Setup():void{
Set(6);
}
}
}//package
Section 64
//BulletB (BulletB)
package {
import flash.display.*;
public class BulletB extends Bullet {
public var cache:MovieClip;
override public function Setup():void{
Set(7);
}
}
}//package
Section 65
//button_over (button_over)
package {
import flash.media.*;
public dynamic class button_over extends Sound {
}
}//package
Section 66
//button_up (button_up)
package {
import flash.media.*;
public dynamic class button_up extends Sound {
}
}//package
Section 67
//ContBTN (ContBTN)
package {
import flash.display.*;
public dynamic class ContBTN extends MovieClip {
public function ContBTN(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 68
//CreditsBTN (CreditsBTN)
package {
import flash.display.*;
public dynamic class CreditsBTN extends MovieClip {
public function CreditsBTN(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 69
//E1 (E1)
package {
public dynamic class E1 extends Enemy1 {
}
}//package
Section 70
//E10 (E10)
package {
public dynamic class E10 extends Enemy1 {
}
}//package
Section 71
//E11 (E11)
package {
public dynamic class E11 extends EnemyB {
public function E11(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 72
//E2 (E2)
package {
public dynamic class E2 extends Enemy2 {
}
}//package
Section 73
//E2Bullet (E2Bullet)
package {
public dynamic class E2Bullet extends Bullet2 {
}
}//package
Section 74
//E3 (E3)
package {
public dynamic class E3 extends Enemy3 {
public function E3(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 75
//E3Bullet (E3Bullet)
package {
public dynamic class E3Bullet extends Bullet3 {
}
}//package
Section 76
//E4 (E4)
package {
public dynamic class E4 extends Enemy4 {
}
}//package
Section 77
//E4Bullet (E4Bullet)
package {
public dynamic class E4Bullet extends Bullet4 {
}
}//package
Section 78
//E5 (E5)
package {
public dynamic class E5 extends Enemy5 {
}
}//package
Section 79
//E5Bullet (E5Bullet)
package {
public dynamic class E5Bullet extends Bullet5 {
}
}//package
Section 80
//E6 (E6)
package {
public dynamic class E6 extends Enemy6 {
}
}//package
Section 81
//E7 (E7)
package {
public dynamic class E7 extends Enemy7 {
}
}//package
Section 82
//E8 (E8)
package {
public dynamic class E8 extends Enemy8 {
}
}//package
Section 83
//E9 (E9)
package {
public dynamic class E9 extends Enemy9 {
}
}//package
Section 84
//EBBullet (EBBullet)
package {
public dynamic class EBBullet extends BulletB {
}
}//package
Section 85
//EffectsEngine (EffectsEngine)
package {
import flash.display.*;
import flash.events.*;
class EffectsEngine {
private var arrEffects:Array;
private var effectIndex:Number;
private var mainRef:Main;
private var arrEffectLayers:Array;
function EffectsEngine(_arg1):void{
mainRef = _arg1;
effectIndex = 0;
arrEffects = new Array();
arrEffectLayers = new Array();
mainRef.addEventListener(Event.ENTER_FRAME, Run);
}
public function DeleteEffect(_arg1:MovieClip):void{
var _local2:Number = 0;
while (_local2 < arrEffects.length) {
if (arrEffects[_local2].mc == _arg1){
RetrieveLayer(arrEffects[_local2].layer).removeChild(arrEffects[_local2].mc);
arrEffects.splice(_local2, 1);
break;
};
_local2++;
};
}
public function DeleteLayer(_arg1:String):void{
var _local2:Number = 0;
while (_local2 < arrEffectLayers.length) {
if (arrEffectLayers[_local2].name == _arg1){
mainRef.removeChild(arrEffectLayers[_local2]);
arrEffectLayers.splice(_local2, 1);
break;
};
_local2++;
};
}
public function Run(_arg1:Event):void{
}
public function DeleteAllEffects():void{
var _local1:Number = 0;
while (_local1 < arrEffects.length) {
RetrieveLayer(arrEffects[_local1].layer).removeChild(arrEffects[_local1].mc);
_local1++;
};
arrEffects.length = 0;
}
public function CreateEffect(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:String=null):MovieClip{
_arg1.x = _arg2;
_arg1.y = _arg3;
_arg1.name = ("effect_" + effectIndex);
RetrieveLayer(_arg4).addChild(_arg1);
arrEffects.push({mc:_arg1, layer:_arg4});
effectIndex++;
return (_arg1);
}
public function PrintCurrentLayers():void{
var _local1:Number = 0;
while (_local1 < arrEffectLayers.length) {
_local1++;
};
}
public function Reset(_arg1:Boolean):void{
if (_arg1 == true){
DeleteAllLayers();
};
DeleteAllEffects();
effectIndex = 0;
}
private function RandNum(_arg1:Number, _arg2:Number):Number{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
private function RetrieveLayer(_arg1:String):MovieClip{
var _local2:Number = 0;
while (_local2 < arrEffectLayers.length) {
if (arrEffectLayers[_local2].name == _arg1){
return (arrEffectLayers[_local2]);
};
_local2++;
};
return (mainRef);
}
public function DeleteAllLayers():void{
var _local1:Number = 0;
while (_local1 < arrEffectLayers.length) {
mainRef.removeChild(arrEffectLayers[_local1]);
_local1++;
};
arrEffectLayers.length = 0;
}
public function CreateLayer(_arg1:String):void{
var _local2:MovieClip = new MovieClip();
_local2.x = 0;
_local2.y = 0;
_local2.name = _arg1;
mainRef.addChild(_local2);
arrEffectLayers.push(_local2);
}
public function DeleteMainRefEventListener():void{
mainRef.removeEventListener(Event.ENTER_FRAME, Run);
}
}
}//package
Section 86
//Enemy (Enemy)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Enemy extends MovieClip {
private var spawnIndex:Number;
private var mainRef:Main;
private var frameDuration:Number;
public var bossHitPoint1:Number;
public var bossHitPoint2:Number;
private var waitDuration:Number;
public var bossHitPoint3:Number;
public var bulletRadius:Number;
public var type:Number;
public var speed:Number;
private var blnMove:Boolean;
private var myTargetObj:Object;
private var myTarget:MovieClip;
public var shield:MovieClip;
private var shieldRef:MovieClip;
public var whichSpawn:Number;
public var damage:Number;
public var cReward:Number;
private var teleCount:Number;
public var myMode:Number;
private var shieldDelay:Number;
private var moveX:Number;
private var moveY:Number;
public var probeDirection:Number;
private var blnTeleport:Boolean;
private var teleTimer:Number;
public var pReward:Number;
public var curEnDis:Number;
private var PowerUpSpeed:Number;
private var spawnDelay:Number;
private var previousState:Number;
private var blnDead:Boolean;
public var blnShield:Boolean;
public var fireDelay:Number;
public var life:Number;
private var blnBossFlag:Boolean;
public function Enemy():void{
blnMove = false;
blnTeleport = false;
blnDead = false;
blnShield = false;
shieldRef = null;
spawnIndex = 1;
whichSpawn = 1;
shieldDelay = 0;
moveX = 0;
moveY = 0;
curEnDis = 0;
frameDuration = 0;
PowerUpSpeed = 4;
spawnDelay = 100;
blnBossFlag = false;
bossHitPoint1 = Main.gData.bHp1;
bossHitPoint2 = Main.gData.bHp2;
bossHitPoint3 = Main.gData.bHp3;
teleTimer = 200;
teleCount = 0;
myTargetObj = {x:0, y:0};
}
private function RandNum(_arg1:Number, _arg2:Number):Number{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
private function SetMovement():void{
var _local1:LineVector;
var _local2:*;
var _local3:*;
var _local4:Number;
if (blnDead == false){
_local1 = new LineVector();
if (myMode == 7){
_local1.x = ((myTarget.x + (myTarget.width / 2)) - this.x);
_local1.y = ((myTarget.y + (myTarget.height / 2)) - this.y);
_local2 = Math.atan2(_local1.y, _local1.x);
_local3 = ((360 * _local2) / (2 * Math.PI));
_local4 = GetDistance((myTarget.x + (myTarget.width / 2)), (myTarget.y + (myTarget.height / 2)));
PowerUpSpeed = ((_local4 / 2) * 0.3);
_local1.x = (Math.cos(((Math.PI * _local3) / 180)) * PowerUpSpeed);
_local1.y = (Math.sin(((Math.PI * _local3) / 180)) * PowerUpSpeed);
this.moveX = _local1.x;
this.moveY = _local1.y;
} else {
_local1.x = (Math.cos(((Math.PI * this.rotation) / 180)) * speed);
_local1.y = (Math.sin(((Math.PI * this.rotation) / 180)) * speed);
this.moveX = _local1.x;
this.moveY = _local1.y;
};
};
}
public function Stop():void{
blnMove = false;
}
private function MoveProbe():void{
if (blnDead == false){
if (blnMove == true){
if (probeDirection == 1){
if (this.x > (mainRef.stage.stageWidth + 60)){
Dead();
mainRef.DeleteEnemy(this);
} else {
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
};
} else {
if (this.x < -60){
mainRef.DeleteEnemy(this);
} else {
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
};
};
};
};
}
public function RemoveEnemy():void{
if (type == 7){
this[("t" + "Animation")].stop();
};
if (type == 9){
removeChild(this[("hat" + "ch")]);
this[("hat" + "ch")].stop();
};
mainRef.removeChild(MovieClip(this));
}
public function Set(_arg1:Number):void{
type = Main.gData.arrEnemyData[_arg1].type;
life = Main.gData.arrEnemyData[_arg1].life;
speed = Main.gData.arrEnemyData[_arg1].speed;
damage = Main.gData.arrEnemyData[_arg1].damage;
cReward = Main.gData.arrEnemyData[_arg1].cReward;
pReward = Main.gData.arrEnemyData[_arg1].pReward;
myMode = (previousState = Main.gData.arrEnemyData[_arg1].startMode);
fireDelay = Main.gData.arrEnemyData[_arg1].fireDelay;
if ((((type == 3)) || ((type == 7)))){
fireDelay = 15;
};
if (type == 1){
waitDuration = 0;
} else {
if (type == 2){
waitDuration = RandNum(50, 80);
} else {
if (type == 3){
waitDuration = RandNum(20, 50);
} else {
if (type == 6){
waitDuration = RandNum(80, 100);
} else {
if (type == 7){
waitDuration = RandNum(50, 80);
} else {
if (type == 9){
waitDuration = RandNum(80, 100);
} else {
if (type == 11){
waitDuration = 155;
};
};
};
};
};
};
};
if (type == 11){
this.rotation = -90;
};
CacheMe();
}
public function GetDistance(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (this.x - _arg1);
var _local4:Number = (this.y - _arg2);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
public function AmIAlive():Boolean{
return (blnDead);
}
public function Start():void{
blnMove = true;
}
public function Teleport():void{
var _local1:Number;
var _local2:Number;
if (blnDead == false){
this.alpha = 0;
mainRef.sPlayer.PlaySound(new teleport_sound(), 0.5);
mainRef.effect.CreateEffect(new teleport(), this.x, this.y);
_local1 = RandNum(20, mainRef.stage.stageWidth);
_local2 = RandNum(60, mainRef.stage.stageHeight);
this.x = _local1;
this.y = _local2;
mainRef.effect.CreateEffect(new teleportAppear(), this.x, this.y);
this.alpha = 1;
RotateEnemy();
blnTeleport = false;
};
}
private function Fire():void{
if (blnDead == false){
if (fireDelay > 0){
fireDelay--;
} else {
if (blnTeleport == false){
if (type == 11){
if (blnBossFlag == false){
mainRef.ShootBossRockets(this);
blnBossFlag = true;
} else {
mainRef.ShootBossMissles(this);
blnBossFlag = false;
};
} else {
if (type == 3){
mainRef.ShootEnemyBullet(this, true);
} else {
mainRef.ShootEnemyBullet(this);
};
};
};
fireDelay = Main.gData.arrEnemyData[type].fireDelay;
};
if (this.type == 6){
BigShipShieldTest();
};
if (this.type == 9){
MotherSpawn();
};
};
}
private function MotherSpawn():void{
if (blnDead == false){
if (spawnDelay > 0){
spawnDelay--;
} else {
DestroyShield();
if (spawnIndex == 1){
whichSpawn = 1;
} else {
if (spawnIndex == 2){
whichSpawn = 1;
} else {
if (spawnIndex == 3){
whichSpawn = 7;
};
};
};
this[("hat" + "ch")].gotoAndPlay("open");
spawnDelay = 125;
spawnIndex++;
if (spawnIndex >= 4){
spawnIndex = 1;
};
};
};
}
public function Run():void{
switch (myMode){
case 1:
if (type == 11){
MoveBoss();
} else {
MoveMe();
};
break;
case 2:
Fire();
break;
case 3:
MoveMe();
break;
case 4:
MoveProbe();
break;
case 5:
MoveMe();
Fire();
break;
case 6:
Fire();
TeleportTest();
break;
case 7:
HeadTowardPU();
break;
case 8:
break;
default:
break;
};
}
public function Setup():void{
}
private function MoveMe():void{
var _local1:Point;
var _local2:Object;
var _local3:Number;
var _local4:MovieClip;
if (blnDead == false){
if (blnMove == true){
curEnDis = mainRef.RetrieveEDis();
_local1 = new Point(mainRef.base.gun1.x, mainRef.base.gun1.y);
_local1 = mainRef.base.localToGlobal(_local1);
_local2 = {x:_local1.x, y:_local1.y};
if (GetDistance(_local2.x, _local2.y) < curEnDis){
Dead();
blnMove = false;
mainRef.sPlayer.PlaySound(new base_shoot(), 0.1);
if (curEnDis < 30){
mainRef.bars.AddOrSubtract(damage, "health");
};
if (AmIAlive() == false){
if (type == 5){
mainRef.CheckDestroyRadius(80, this.x, this.y, damage, this);
};
};
_local3 = RandNum(1, 5);
if (_local3 == 1){
_local4 = mainRef.effect.CreateEffect(new Explode1(), this.x, this.y);
} else {
if (_local3 == 2){
_local4 = mainRef.effect.CreateEffect(new Explode2(), this.x, this.y);
} else {
if (_local3 == 3){
_local4 = mainRef.effect.CreateEffect(new Explode3(), this.x, this.y);
} else {
if (_local3 == 4){
_local4 = mainRef.effect.CreateEffect(new Explode4(), this.x, this.y);
} else {
if (_local3 == 5){
_local4 = mainRef.effect.CreateEffect(new Explode5(), this.x, this.y);
};
};
};
};
};
mainRef.DeleteEnemy(this);
} else {
RotateEnemy();
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
if ((((((((((type == 2)) || ((type == 3)))) && (!((myMode == 3))))) || ((((type == 7)) && (!((myMode == 6))))))) || ((((((type == 6)) || ((type == 9)))) && (!((myMode == 2))))))){
if ((((this.x > 0)) && ((this.x < mainRef.stage.stageWidth)))){
if ((((this.y > 0)) && ((this.y < mainRef.stage.stageHeight)))){
frameDuration++;
};
};
if (frameDuration >= waitDuration){
if (type == 7){
myMode = 6;
} else {
myMode = 2;
};
if (type == 9){
CreateShield();
};
};
};
};
};
};
}
public function ReturnPreviousState():Number{
return (previousState);
}
public function SetTarget(_arg1:MovieClip):void{
previousState = myMode;
myTarget = _arg1;
myTargetObj = {x:myTarget.x, y:myTarget.y};
}
private function TeleportTest():void{
if (blnDead == false){
if (teleCount < teleTimer){
teleCount++;
} else {
this[("t" + "Animation")].gotoAndPlay(2);
blnTeleport = true;
teleCount = 0;
};
};
}
public function Dead():void{
blnDead = true;
myMode = 8;
}
private function RotateBoss():void{
var _local1:LineVector;
var _local2:Point;
var _local3:Number;
var _local4:Number;
if (blnDead == false){
_local1 = new LineVector();
_local2 = new Point(mainRef.base.gun1.x, mainRef.base.gun1.y);
_local2 = mainRef.base.localToGlobal(_local2);
_local1.x = (_local2.x - this.x);
_local1.y = (_local2.y - this.y);
_local3 = Math.atan2(_local1.y, _local1.x);
_local4 = ((360 * _local3) / (2 * Math.PI));
this.rotation = _local4;
};
}
private function CacheMe():void{
if (blnDead == false){
if (((!((myMode == 7))) && (!((type == 11))))){
this[("ca" + "che")].cacheAsBitmap = true;
if (type == 9){
this[("ca" + "che2")].cacheAsBitmap = true;
};
};
};
}
public function SetRefs(_arg1:Main):void{
mainRef = _arg1;
}
public function CreateShield():void{
if (blnDead == false){
if (shieldRef == null){
shield = new Shield1();
shield.x = 0;
shield.y = 0;
shield.name = ("shield" + mainRef.Indexer);
mainRef.Indexer++;
if (mainRef.Indexer > 20000){
mainRef.Indexer = 0;
};
this.addChild(shield);
shieldRef = this.shield;
blnShield = true;
};
};
}
private function UnCacheMe():void{
if (blnDead == false){
if (((!((myMode == 7))) && (!((type == 11))))){
this[("ca" + "che")].cacheAsBitmap = false;
if (type == 9){
this[("ca" + "che2")].cacheAsBitmap = false;
};
};
};
}
private function RotateEnemy():void{
var _local1:LineVector;
var _local2:Point;
var _local3:Number;
var _local4:Number;
if (blnDead == false){
if ((((((((((((type == 1)) || ((type == 5)))) || ((type == 6)))) || ((type == 7)))) || ((type == 8)))) || ((type == 9)))){
UnCacheMe();
};
_local1 = new LineVector();
_local2 = new Point(mainRef.base.gun1.x, mainRef.base.gun1.y);
_local2 = mainRef.base.localToGlobal(_local2);
_local1.x = (_local2.x - this.x);
_local1.y = (_local2.y - this.y);
_local3 = Math.atan2(_local1.y, _local1.x);
_local4 = ((360 * _local3) / (2 * Math.PI));
this.rotation = _local4;
if ((((((((((((type == 1)) || ((type == 5)))) || ((type == 6)))) || ((type == 7)))) || ((type == 8)))) || ((type == 9)))){
CacheMe();
};
};
}
private function HeadTowardPU():void{
var _local1:MovieClip;
if (blnDead == false){
if (blnMove == true){
if (GetDistance((myTarget.x + (myTarget.width / 2)), (myTarget.y + (myTarget.height / 2))) < 10){
blnMove = false;
PowerUpSpeed = 4;
if (type == 5){
if (AmIAlive() == false){
mainRef.CheckDestroyRadius(80, this.x, this.y, damage, this);
};
Dead();
_local1 = mainRef.effect.CreateEffect(new Explode2(), this.x, this.y);
mainRef.DeleteEnemy(this);
};
} else {
RotateEnemy();
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
};
};
};
}
public function DestroyShield():void{
if (blnDead == false){
if (shieldRef != null){
removeChild(shieldRef);
};
blnShield = false;
shieldRef = null;
};
}
public function SetDir(_arg1:Number):void{
probeDirection = _arg1;
}
public function TakeDamage(_arg1:Number):Boolean{
if (blnDead == false){
life = (life - _arg1);
if (life <= 0){
return (true);
};
if (type == 3){
if (life <= 10){
this.gotoAndStop("after");
myMode = 3;
};
};
};
return (false);
}
private function BigShipShieldTest():void{
if (blnDead == false){
if (shieldDelay > 0){
shieldDelay--;
} else {
if (blnShield == false){
CreateShield();
} else {
DestroyShield();
};
shieldDelay = 150;
};
};
}
private function MoveBoss():void{
if (blnDead == false){
if (blnMove == true){
SetMovement();
this.x = (this.x + this.moveX);
this.y = (this.y + this.moveY);
if (this.y < mainRef.stage.stageHeight){
frameDuration++;
};
if (frameDuration >= waitDuration){
myMode = 2;
};
};
};
}
}
}//package
Section 87
//Enemy1 (Enemy1)
package {
import flash.display.*;
public class Enemy1 extends Enemy {
public var cache:MovieClip;
override public function Setup():void{
Set(1);
}
}
}//package
Section 88
//Enemy2 (Enemy2)
package {
import flash.display.*;
public class Enemy2 extends Enemy {
public var cache:MovieClip;
public var emitter:MovieClip;
override public function Setup():void{
Set(2);
}
}
}//package
Section 89
//Enemy3 (Enemy3)
package {
import flash.display.*;
public class Enemy3 extends Enemy {
public var cache:MovieClip;
public var emitter2:MovieClip;
public var emitter:MovieClip;
override public function Setup():void{
Set(3);
}
}
}//package
Section 90
//Enemy4 (Enemy4)
package {
import flash.display.*;
public class Enemy4 extends Enemy {
public var cache:MovieClip;
override public function Setup():void{
Set(4);
}
}
}//package
Section 91
//Enemy5 (Enemy5)
package {
import flash.display.*;
public class Enemy5 extends Enemy {
public var cache:MovieClip;
override public function Setup():void{
Set(5);
}
}
}//package
Section 92
//Enemy6 (Enemy6)
package {
import flash.display.*;
public class Enemy6 extends Enemy {
public var cache:MovieClip;
public var emitter:MovieClip;
override public function Setup():void{
Set(6);
}
}
}//package
Section 93
//Enemy7 (Enemy7)
package {
import flash.display.*;
public class Enemy7 extends Enemy {
public var tAnimation:MovieClip;
public var cache:MovieClip;
public var emitter:MovieClip;
override public function Setup():void{
Set(7);
}
}
}//package
Section 94
//Enemy8 (Enemy8)
package {
import flash.display.*;
public class Enemy8 extends Enemy {
public var cache:MovieClip;
override public function Setup():void{
Set(8);
}
}
}//package
Section 95
//Enemy9 (Enemy9)
package {
import flash.display.*;
public class Enemy9 extends Enemy {
public var hatch:MovieClip;
public var cache:MovieClip;
public var mSpawn1:MovieClip;
public var spawner:MovieClip;
public var mSpawn2:MovieClip;
public var emitter:MovieClip;
public var cache2:MovieClip;
override public function Setup():void{
Set(9);
}
}
}//package
Section 96
//EnemyB (EnemyB)
package {
import flash.display.*;
public class EnemyB extends Enemy {
public var weak1:MovieClip;
public var weak3:MovieClip;
public var e10:MovieClip;
public var e11:MovieClip;
public var e12:MovieClip;
public var e13:MovieClip;
public var e14:MovieClip;
public var e1:MovieClip;
public var e2:MovieClip;
public var e3:MovieClip;
public var e4:MovieClip;
public var e5:MovieClip;
public var e6:MovieClip;
public var e8:MovieClip;
public var e9:MovieClip;
public var e7:MovieClip;
public var weak2:MovieClip;
override public function Setup():void{
Set(11);
}
}
}//package
Section 97
//Explode1 (Explode1)
package {
import flash.display.*;
public dynamic class Explode1 extends MovieClip {
public var inside:MovieClip;
public function Explode1(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame32(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 98
//Explode2 (Explode2)
package {
import flash.display.*;
public dynamic class Explode2 extends MovieClip {
public var inside:MovieClip;
public function Explode2(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame22(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 99
//Explode3 (Explode3)
package {
import flash.display.*;
public dynamic class Explode3 extends MovieClip {
public var inside:MovieClip;
public function Explode3(){
addFrameScript(0, frame1, 57, frame58);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame58(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 100
//Explode4 (Explode4)
package {
import flash.display.*;
public dynamic class Explode4 extends MovieClip {
public var inside:MovieClip;
public function Explode4(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame32(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 101
//Explode5 (Explode5)
package {
import flash.display.*;
public dynamic class Explode5 extends MovieClip {
public var inside:MovieClip;
public function Explode5(){
addFrameScript(0, frame1, 31, frame32);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame32(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 102
//Explode6 (Explode6)
package {
import flash.display.*;
public dynamic class Explode6 extends MovieClip {
public var inside:MovieClip;
public function Explode6(){
addFrameScript(0, frame1, 68, frame69);
}
function frame1(){
this.inside.rotation = Math.round((Math.random() * 360));
}
function frame69(){
stop();
try {
Main(root).EffectKillSelf(MovieClip(this));
} catch(e:Error) {
};
}
}
}//package
Section 103
//FAIL (FAIL)
package {
import flash.display.*;
import flash.events.*;
public class FAIL extends MovieClip {
private var mRef:Main;
public function FAIL():void{
}
public function RemoveFAIL():void{
mRef.removeEventListener(Event.ENTER_FRAME, Run);
mRef.RemoveFail(this);
}
private function Run(_arg1:Event):void{
this.y = int((this.y + 1));
if (this.y > (mRef.stage.stageHeight + 10)){
RemoveFAIL();
};
}
public function Setup(_arg1:Main):void{
mRef = _arg1;
mRef.addEventListener(Event.ENTER_FRAME, Run);
}
}
}//package
Section 104
//FailScreen (FailScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class FailScreen extends MovieClip {
public var fail_main:SimpleButton;
public var score_txt:TextField;
public var scoreTitle:TextField;
public var fail_retry:SimpleButton;
public var fail_pmg:MovieClip;
public var wave_txt:TextField;
public var loser:MovieClip;
public var waveTitle:TextField;
public function FailScreen(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 105
//FrameCounter (FrameCounter)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class FrameCounter {
private var numFrameRate:Number;
private var showText:Boolean;
private var stgRef:Stage;
private var intStarted:Number;
private var corner:Number;
private var lastFrameCount:Number;
private var updateStart:Number;
private var fontColor:Number;
private var frameCount:Number;
private var txtFrameText:TextField;
private var timerStartValue:Number;
private var updateLeft:Number;
public function FrameCounter(_arg1:Stage):void{
stgRef = _arg1;
frameCount = 0;
lastFrameCount = 0;
timerStartValue = 0;
numFrameRate = 0;
showText = true;
fontColor = 0xFFFFFF;
intStarted = 0;
corner = 4;
updateStart = 30;
updateLeft = 30;
stgRef.addEventListener(Event.ENTER_FRAME, Run);
Start();
}
private function SetColor(_arg1:Number):void{
fontColor = _arg1;
}
public function Start():void{
Reset();
}
public function Hide():void{
showText = false;
}
private function Run(_arg1:Event):void{
if (intStarted == 0){
timerStartValue = getTimer();
intStarted = 1;
};
frameCount++;
updateLeft--;
if (updateLeft == 0){
updateLeft = updateStart;
numFrameRate = Math.round((frameCount / ((getTimer() - timerStartValue) / 1000)));
frameCount = 0;
timerStartValue = getTimer();
intStarted = 2;
} else {
if (intStarted == 1){
numFrameRate = Math.round((frameCount / ((getTimer() - timerStartValue) / 1000)));
};
};
if (showText == true){
txtFrameText.text = (numFrameRate + " fps");
};
}
public function Reset():void{
frameCount = 0;
timerStartValue = 0;
if (showText == true){
txtFrameText = new TextField();
txtFrameText.textColor = fontColor;
txtFrameText.selectable = false;
txtFrameText.text = (50 + "fps");
if (corner == 1){
txtFrameText.x = 10;
txtFrameText.y = 10;
} else {
if (corner == 2){
txtFrameText.x = (stgRef.stageWidth - (txtFrameText.width / 2));
txtFrameText.y = 10;
} else {
if (corner == 3){
txtFrameText.x = 10;
txtFrameText.y = (stgRef.stageHeight - (txtFrameText.height / 3));
} else {
if (corner == 4){
txtFrameText.x = (stgRef.stageWidth - (txtFrameText.width / 2));
txtFrameText.y = (stgRef.stageHeight - (txtFrameText.height / 3));
};
};
};
};
stgRef.addChild(txtFrameText);
};
}
private function GetnumFrameRate():Number{
return (numFrameRate);
}
private function OutputTimeFrame():void{
lastFrameCount = frameCount;
}
}
}//package
Section 106
//FreeGames (FreeGames)
package {
import flash.display.*;
public dynamic class FreeGames extends MovieClip {
public function FreeGames(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 107
//GameData (GameData)
package {
public class GameData {
public var strCash:String;
public var RECHARGERATE:Number;
public var arrBulletData:Array;
public var blnShowHeroIntro:Boolean;
public var survivalStartCash:Number;
public var HEALTHMULTIPLIER:Number;
public var strHeader:String;
public var prevSCORE:Number;
public var arrAllowableDom:Array;
public var blnGameLocked:Boolean;
public var curHA:Number;
public var arrUpgradePoints:Array;
public var BASEBULLETDAMAGE:Number;
public var armorMultDecrement:Number;
public var prevCASH:Number;
public var strStage:String;
public var BS:Number;
public var BASERULE:Number;
public var areaIncrement:Number;
public var strSpecs:String;
public var bHp2:Number;
public var bHp3:Number;
public var bHp1:Number;
private var additionCount:Number;
public var strPoints:String;
public var versionTXT:String;
public var curAT:Number;
public var curRR:Number;
public var rechargeIncrement:Number;
public var frameAddition:Number;
public var curBS:Number;
public var arrAddFreeDom:Array;
public var blnWINNER:Boolean;
public var blnShowFPS:Boolean;
public var arrTurretLocations:Array;
public var curDA:Number;
public var damageIncrement:Number;
public var arrUpgradeData:Array;
public var curDS:Number;
public var strLevel:String;
public var strH1:String;
public var strH2:String;
public var strH3:String;
public var strH4:String;
public var blnShowArmorIntro:Boolean;
public var arrEnemyData:Array;
public var slot1:Boolean;
public var slot2:Boolean;
public var slot3:Boolean;
public var slot4:Boolean;
public var mRef:Main;
public function GameData():void{
blnShowArmorIntro = true;
blnShowHeroIntro = true;
blnShowFPS = false;
versionTXT = "v 1.1.3";
blnWINNER = false;
blnGameLocked = false;
arrAllowableDom = new Array();
arrAllowableDom.push("herointeractive.com");
arrAllowableDom.push("armorgames.com");
arrAddFreeDom = new Array();
arrAddFreeDom.push("addictinggames.com");
arrAddFreeDom.push("agstage.shockwave.com");
arrAddFreeDom.push("freeonlinegames.com");
arrAddFreeDom.push("andkon.com");
arrAddFreeDom.push("kongregate.com");
arrAddFreeDom.push("kongregatetrunk.com");
arrAddFreeDom.push("gamezhero.com");
arrBulletData = new Array();
arrBulletData.push({type:null, speed:null, damage:null, radius:null, cReward:null, pReward:null});
arrBulletData.push({type:1, speed:10, damage:10, radius:0, cReward:5, pReward:10});
arrBulletData.push({type:2, speed:4, damage:1, radius:30, cReward:5, pReward:10});
arrBulletData.push({type:3, speed:4, damage:0.5, radius:40, cReward:5, pReward:10});
arrBulletData.push({type:4, speed:3, damage:3, radius:40, cReward:5, pReward:10});
arrBulletData.push({type:5, speed:10, damage:2, radius:40, cReward:5, pReward:10});
arrBulletData.push({type:6, speed:10, damage:5, radius:30, cReward:0, pReward:0});
arrBulletData.push({type:7, speed:8, damage:8, radius:30, cReward:5, pReward:10});
arrEnemyData = new Array();
arrEnemyData.push({type:null, life:null, speed:null, damage:null, startMode:null, cReward:null, pReward:null, fireDelay:null});
arrEnemyData.push({type:1, life:10, speed:1, damage:2, startMode:1, cReward:10, pReward:50, fireDelay:0});
arrEnemyData.push({type:2, life:10, speed:1, damage:1, startMode:1, cReward:15, pReward:50, fireDelay:125});
arrEnemyData.push({type:3, life:20, speed:2, damage:1, startMode:1, cReward:20, pReward:100, fireDelay:75});
arrEnemyData.push({type:4, life:1, speed:1, damage:0, startMode:4, cReward:0, pReward:60, fireDelay:0});
arrEnemyData.push({type:5, life:30, speed:0.4, damage:15, startMode:1, cReward:30, pReward:100, fireDelay:0});
arrEnemyData.push({type:6, life:30, speed:0.6, damage:1, startMode:5, cReward:30, pReward:250, fireDelay:50});
arrEnemyData.push({type:7, life:15, speed:2, damage:1, startMode:1, cReward:15, pReward:80, fireDelay:50});
arrEnemyData.push({type:8, life:10, speed:3, damage:1, startMode:1, cReward:15, pReward:30, fireDelay:0});
arrEnemyData.push({type:9, life:40, speed:0.6, damage:1, startMode:5, cReward:100, pReward:300, fireDelay:50});
arrEnemyData.push({type:null, life:null, speed:null, damage:null, startMode:null, cReward:null, pReward:null, fireDelay:null});
arrEnemyData.push({type:11, life:1500, speed:0.6, damage:10, startMode:1, cReward:1000, pReward:2000, fireDelay:40});
strHeader = "Base Upgrade Menu";
strSpecs = "GAME SPECS";
strH1 = "UPGRADES";
strH2 = "COST";
strH3 = "CURRENT";
strH4 = "+";
strCash = "Cash";
strPoints = "Points";
strLevel = "Level";
strStage = "B-Stage";
arrUpgradeData = new Array();
arrUpgradeData.push({text:null, description:null, fullAmount:null, sAmount:null});
arrUpgradeData.push({text:"Base Stage", description:"Shows your current base stage", fullAmount:3, sAmount:1});
arrUpgradeData.push({text:"Health / Armor", description:"Upgrade your armor so that incoming attacks do less damage", fullAmount:5, sAmount:1});
arrUpgradeData.push({text:"Damage Area", description:"Upgrade how large of a radius your weapon can destroy", fullAmount:4, sAmount:1});
arrUpgradeData.push({text:"Damage Strength", description:"Upgrade how much damage your main weapon does", fullAmount:5, sAmount:1});
arrUpgradeData.push({text:"Recharge Rate", description:"Upgrade how long it takes to recharge your fire power", fullAmount:4, sAmount:1});
arrUpgradeData.push({text:"Turrets", description:"Add auto turrets to your base", fullAmount:"taken care of in Main.as", sAmount:1});
arrUpgradePoints = new Array();
arrUpgradePoints.push({upgrades:null, s1:null, s2:null, s3:null, s4:null, s5:null});
arrUpgradePoints.push({upgrades:(arrUpgradeData[1].fullAmount - 1), s1:"-------", s2:"-------", s3:"-------"});
arrUpgradePoints.push({upgrades:(arrUpgradeData[2].fullAmount - 1), s1:1000, s2:2000, s3:3000, s4:3500, s5:4000});
arrUpgradePoints.push({upgrades:(arrUpgradeData[3].fullAmount - 1), s1:1000, s2:2000, s3:3000});
arrUpgradePoints.push({upgrades:(arrUpgradeData[4].fullAmount - 1), s1:2000, s2:4000, s3:5000, s4:5000});
arrUpgradePoints.push({upgrades:(arrUpgradeData[5].fullAmount - 1), s1:1500, s2:3500, s3:4500});
arrUpgradePoints.push({upgrades:(arrUpgradeData[6].fullAmount - 1), s1:2500, s2:2500, s3:2500, s4:2500});
frameAddition = 0;
additionCount = 0;
Reset();
}
public function DeathAdjust():void{
additionCount++;
if (additionCount < 6){
frameAddition = (frameAddition + 15);
};
}
public function DeathAdjustReset():void{
frameAddition = 0;
additionCount = 0;
}
public function ReturnFrameAddition():Number{
return (frameAddition);
}
public function RefPass(_arg1:Main):void{
mRef = _arg1;
}
public function Reset():void{
bHp1 = 50;
bHp2 = 50;
bHp3 = 50;
curBS = 1;
curHA = 1;
curDA = 1;
curDS = 1;
curRR = 1;
curAT = 1;
slot1 = false;
slot2 = false;
slot3 = false;
slot4 = false;
BS = 1;
BASERULE = 90;
RECHARGERATE = 0.3;
BASEBULLETDAMAGE = arrBulletData[1].damage;
HEALTHMULTIPLIER = 1;
survivalStartCash = 20000;
damageIncrement = 5;
areaIncrement = 15;
rechargeIncrement = 0.2;
armorMultDecrement = 0.1;
}
public function ChangeBaseRule(_arg1:Number):void{
BASERULE = _arg1;
}
public function ReturnCurrentBaseRule():Number{
return (BASERULE);
}
public function CheckForStageUpgrade():Number{
var _local1:Number = ((((curHA + curDA) + curDS) + curRR) - 4);
if (curBS == 1){
if (_local1 > 3){
return (2);
};
} else {
if (curBS == 2){
if (_local1 > 7){
return (3);
};
};
};
return (0);
}
}
}//package
Section 108
//GameMusic (GameMusic)
package {
import flash.media.*;
public dynamic class GameMusic extends Sound {
}
}//package
Section 109
//Intro (Intro)
package {
import flash.display.*;
import flash.events.*;
public class Intro extends MovieClip {
public var url_mode:Number;
public function Intro():void{
url_mode = 1;
}
private function IntroOver(_arg1:Event):void{
this.buttonMode = (this.useHandCursor = true);
}
private function IntroOut(_arg1:Event):void{
this.buttonMode = (this.useHandCursor = false);
}
public function IntroComplete():void{
Main(root).CreateMainMenu();
MovieClip(root).removeChild(this);
}
private function IntroClicked(_arg1:Event):void{
Main(root).URL_OPEN(url_mode);
}
public function Setup():void{
this.addEventListener(MouseEvent.MOUSE_UP, IntroClicked);
this.addEventListener(MouseEvent.MOUSE_OVER, IntroOver);
this.addEventListener(MouseEvent.MOUSE_OUT, IntroOut);
}
}
}//package
Section 110
//LineVector (LineVector)
package {
public class LineVector {
public var x:Number;
public var y:Number;
public function LineVector():void{
x = 0;
y = 0;
}
function Add(_arg1:LineVector):void{
this.x = (this.x + _arg1.x);
this.y = (this.y + _arg1.y);
}
function VecToAngle(_arg1:Number, _arg2:Number):void{
CreateVectorTowardsAngle(_arg1);
Scale(_arg2);
}
function Scale(_arg1:Number):void{
this.x = (this.x * _arg1);
this.y = (this.y * _arg1);
}
function Print():void{
}
function ConvertToUnitVector():void{
var _local1:Number = GetLength();
if (_local1 != 0){
this.x = (this.x / _local1);
this.y = (this.y / _local1);
};
}
function CreateVectorTowardsAngle(_arg1:Number):void{
_arg1 = ((_arg1 * Math.PI) / 180);
this.x = (Math.cos(_arg1) * 1);
this.y = (Math.sin(_arg1) * 1);
}
function AngleToAlign(_arg1:Number, _arg2:Number, _arg3:Number):Number{
var _local4:Number = 0;
var _local5:Number = GetAngle();
var _local6:Number = 0;
var _local7 = "";
if (_arg1 >= 0){
_local4 = (_arg1 - 180);
if ((((_local5 < _arg1)) && ((_local5 > _local4)))){
_local6 = (-(_arg3) * _arg2);
_local7 = (_local7 + (((((" AAA " + _arg1) + " ") + _local5) + " ") + _local6));
if ((_local5 - _arg1) > _local6){
_local6 = (_local5 - _arg1);
};
} else {
_local6 = (_arg3 * _arg2);
_local7 = (_local7 + (((((" BBB " + _arg1) + " ") + _local5) + " ") + _local6));
if (_local5 >= 0){
if (_local5 != _local4){
if ((_local5 - _arg1) < _local6){
_local6 = (_local5 - _arg1);
};
};
};
};
} else {
_local4 = (_arg1 + 180);
if ((((_local5 < _local4)) && ((_local5 > _arg1)))){
_local6 = (_arg3 * _arg2);
_local7 = (_local7 + (((((" CCC " + _arg1) + " ") + _local5) + " ") + _local6));
if ((_local5 - _arg1) < _local6){
_local6 = (_local5 - _arg1);
};
} else {
_local6 = (-(_arg3) * _arg2);
_local7 = (_local7 + (((((" DDD " + _arg1) + " ") + _local5) + " ") + _local6));
if (_local5 < 0){
if ((_local5 - _arg1) > _local6){
_local6 = (_local5 - _arg1);
};
};
};
};
if (Math.abs(_local6) > 30){
} else {
if (_local5 == 0){
};
};
return (_local6);
}
function GetLength():Number{
var _local1:Number = ((this.x * this.x) + (this.y * this.y));
return (Math.sqrt(_local1));
}
function GetAngle():Number{
var _local1:Number = Math.atan2(this.y, this.x);
var _local2:Number = ((360 * _local1) / (2 * Math.PI));
return (_local2);
}
}
}//package
Section 111
//LockedScreen (LockedScreen)
package {
import flash.display.*;
public dynamic class LockedScreen extends MovieClip {
}
}//package
Section 112
//M_Menu (M_Menu)
package {
public dynamic class M_Menu extends MainMenu {
public function M_Menu(){
addFrameScript(0, frame1, 74, frame75, 119, frame120, 140, frame141, 154, frame155, 189, frame190, 204, frame205, 205, frame206, 239, frame240, 252, frame253, 266, frame267, 267, frame268, 281, frame282);
}
function frame141(){
this.play_btn.gotoAndStop("off");
this.settings_btn.gotoAndStop("off");
this.credits_btn.gotoAndStop("off");
this.pmg_btn.gotoAndStop("off");
}
function frame120(){
stop();
}
function frame253(){
stop();
}
function frame155(){
gotoAndStop("main");
}
function frame267(){
description_txt.text = "";
this.PlayFinish();
stop();
}
function frame268(){
description_txt.text = "";
this.normal_mode.gotoAndStop("off");
this.survival_mode.gotoAndStop("off");
}
function frame240(){
this.survival_mode.gotoAndStop("off");
this.normal_mode.gotoAndStop("off");
}
function frame205(){
gotoAndPlay("menuIn");
}
function frame1(){
this.play_btn.gotoAndStop("off");
this.settings_btn.gotoAndStop("off");
this.credits_btn.gotoAndStop("off");
this.pmg_btn.gotoAndStop("off");
this.SetSelectors();
}
function frame75(){
stop();
}
function frame206(){
this.play_btn.gotoAndStop("off");
this.settings_btn.gotoAndStop("off");
this.credits_btn.gotoAndStop("off");
this.pmg_btn.gotoAndStop("off");
}
function frame190(){
stop();
}
function frame282(){
description_txt.text = "";
gotoAndPlay("menuIn");
}
}
}//package
Section 113
//Main (Main)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import CPMStar.*;
import flash.filters.*;
import flash.geom.*;
public class Main extends MovieClip {
private var blnScreenShown:Boolean;
private var blnFirstOut:Boolean;
public var MUSIC:Boolean;
public var pauseMC:MovieClip;
private var blnUShow:Boolean;
private var arrBullets:Array;
public var upgrade:MovieClip;
private var blnTutorialTested:Boolean;
private var blnWavesDone:Boolean;
private var clickUp:Object;
public var bg:MovieClip;
private var pBarRefX:Number;
private var pBarRefY:Number;
private var clickDown:Object;
public var blnReset:Boolean;
public var puRef:MovieClip;
private var blnPower1:Boolean;
private var blnPower2:Boolean;
private var blnPower3:Boolean;
private var failIndex:Number;
public var FAIL_MC:MovieClip;
private var HEALTH:Number;
private var originalBaseRule:Number;
public var score_mc:MovieClip;
public var objFrameCounter:FrameCounter;
private var blnStartShakeStop:Boolean;
public var intro:MovieClip;
private var blnFAIL_time:Boolean;
public var winMC:MovieClip;
public var SHOWADS:Boolean;
private var p2Count:Number;
private var bDistance:Number;
private var gState:Number;
public var SCORE:Number;
private var arrEnemies:Array;
public var version_txt:TextField;
public var GAMEMODE:Number;
private var blnViewingUpgradesScreen:Boolean;
public var adBox:MovieClip;
public var pu_n:MovieClip;
private var blnLeaveRetry:Boolean;
public var PL_mc:MovieClip;
public var objUrlLocking:UrlLocking;
public var bars:MovieClip;
private var pTimer:Number;
public var sComplete:MovieClip;
public var shieldMC:MovieClip;
public var base:MovieClip;
public var Indexer:Number;
private var damageRadius:Number;
private var wCount:Number;
private var blnLeaveUpgrade:Boolean;
public var blnSurvive:Boolean;
public var SOUND:Boolean;
public var WAVE:Number;
public var bullet:MovieClip;
public var power:MovieClip;
public var wave:WaveEngine;
private var dCount:Number;
private var p3Count:Number;
public var sEffects:ScreenEffects;
public var locker:MovieClip;
public var fail:MovieClip;
private var arrFail:Array;
private var arrPower:Array;
public var bottomScore:MovieClip;
private var numUShow:Number;
public var CASH:Number;
public var sPlayer:SoundPlayer;
private var tankerRetest:Array;
public var web:Web;
public var tutorial:MovieClip;
public var menu:MovieClip;
public var shield:MovieClip;
public var LEVEL:Number;
private var eDistance:Number;
private var tutRef:MovieClip;
public var enemy:MovieClip;
public var effect:EffectsEngine;
private var arrABullets:Array;
public var waveNotify:MovieClip;
public var mPlayer:MusicPlayer;
private var blnPaused:Boolean;
private var bgShown:Boolean;
public var startCount:Number;
private var p1Count:Number;
private var shakeTimer:Number;
public var blnMouseDown:Boolean;
private var arrDrags:Array;
private var DISTANCE:Number;
static var gData:GameData = new GameData();
public function Main():void{
web = new Web();
super();
addFrameScript(0, frame1, 1, frame2);
gData.RefPass(this);
MUSIC = true;
SOUND = true;
blnSurvive = false;
blnMouseDown = false;
blnWavesDone = false;
blnReset = false;
blnPaused = false;
bgShown = false;
blnLeaveUpgrade = false;
blnViewingUpgradesScreen = false;
blnFirstOut = true;
blnPower1 = false;
blnPower2 = false;
blnPower3 = false;
blnTutorialTested = false;
blnStartShakeStop = true;
blnLeaveRetry = true;
blnScreenShown = true;
shakeTimer = -1;
p1Count = -1;
p2Count = -1;
p3Count = -1;
startCount = 0;
ChangeState(1);
clickDown = {x:0, y:0};
clickUp = {x:0, y:0};
CASH = 0;
SCORE = 0;
DISTANCE = 0;
LEVEL = 1;
WAVE = 0;
failIndex = 0;
GAMEMODE = 1;
dCount = -1;
wCount = -1;
pTimer = -1;
bDistance = 10;
eDistance = 25;
blnUShow = false;
numUShow = 0;
blnFAIL_time = false;
tutRef = null;
puRef = null;
Indexer = 0;
originalBaseRule = 0;
arrDrags = new Array();
arrBullets = new Array();
arrEnemies = new Array();
tankerRetest = new Array();
arrPower = new Array();
arrABullets = new Array();
arrFail = new Array();
stage.addEventListener(Event.ENTER_FRAME, Run);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyBoardPress);
sPlayer = new SoundPlayer();
mPlayer = new MusicPlayer(this.stage);
if (gData.blnShowFPS == true){
objFrameCounter = new FrameCounter(stage);
};
wave = new WaveEngine(this);
effect = new EffectsEngine(this);
sEffects = new ScreenEffects(this, stage);
objUrlLocking = new UrlLocking(stage, false, false);
var _local1:Number = 0;
while (_local1 < gData.arrAllowableDom.length) {
objUrlLocking.AddAllowableDomain(gData.arrAllowableDom[_local1]);
_local1++;
};
var _local2:Number = 0;
while (_local2 < gData.arrAddFreeDom.length) {
objUrlLocking.AddAdFreeDomain(gData.arrAddFreeDom[_local2]);
_local2++;
};
CreatePreloader();
}
private function MouseUp(_arg1:Event):void{
if (gState == 5){
if (startCount < 5){
startCount++;
};
};
var _local2:Number = 0;
while (_local2 < arrDrags.length) {
removeChild(arrDrags[_local2]);
_local2++;
};
arrDrags.length = 0;
if (gState == 5){
if (bars.GetPower() > 0){
if (DISTANCE > 10){
if (blnLeaveUpgrade == false){
sPlayer.PlaySound(new base_shoot(), 0.4);
ShootBaseBullet(damageRadius);
};
};
};
};
clickUp = {x:stage.mouseX, y:stage.mouseY};
blnMouseDown = false;
if (gState == 5){
if (blnLeaveUpgrade == false){
LosePower();
};
};
blnLeaveUpgrade = false;
}
private function ProbeTrigger(_arg1:MovieClip):void{
var _local2:Number = wave.ReturnCurrentWave();
PlaceEnemy(8, 1, 2, 10, 150);
}
private function CreateBase():void{
base = new UBase();
base.alpha = 0;
base.x = int(((stage.stageWidth / 2) - (base.width / 2)));
base.y = base.yLoc;
base.name = "base";
base.gotoAndStop(gData.curBS);
addChild(base);
base.Setup(gData.curAT, gData.slot1, gData.slot2, gData.slot3, gData.slot4);
}
private function UOverMe3(_arg1:Event):void{
upgrade[("up" + "_3")].gotoAndStop("on");
upgrade[("up" + "_3")].buttonMode = (this.useHandCursor = true);
}
private function n_up(_arg1:Event):void{
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, n_over);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, n_out);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, n_up);
tutorial.gotoAndStop("power");
}
private function n_over(_arg1:Event):void{
tutorial[("next_" + "btn")].buttonMode = (this.useHandCursor = true);
tutorial[("next_" + "btn")].gotoAndStop("on");
}
private function UOverMe6(_arg1:Event):void{
upgrade[("up" + "_6")].gotoAndStop("on");
upgrade[("up" + "_6")].buttonMode = (this.useHandCursor = true);
}
private function fail_pmg_over(_arg1:Event):void{
fail.fail_pmg.buttonMode = (this.useHandCursor = true);
fail.fail_pmg.gotoAndStop("on");
}
private function pmg_pause_up(_arg1:Event):void{
URL_OPEN(1);
}
private function UOverMe4(_arg1:Event):void{
upgrade[("up" + "_4")].gotoAndStop("on");
upgrade[("up" + "_4")].buttonMode = (this.useHandCursor = true);
}
private function q3Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_3")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
public function UpdateBStage(_arg1:Number):void{
gData.BS = _arg1;
gData.curBS = _arg1;
upgrade.class_cost.text = gData.arrUpgradePoints[1][("s" + gData.curBS)];
upgrade.bar_1.max_stop.gotoAndStop(gData.arrUpgradeData[1].fullAmount);
upgrade.bar_1.max_stop_black.gotoAndStop(gData.arrUpgradeData[1].fullAmount);
upgrade.bar_1.gotoAndStop(gData.curBS);
upgrade.turret_cost.text = gData.arrUpgradePoints[6][("s" + gData.curAT)];
upgrade.bar_6.max_stop.gotoAndStop((Main(root).ReturnAllowedAutoTurrets() + 1));
upgrade.bar_6.max_stop_black.gotoAndStop((Main(root).ReturnAllowedAutoTurrets() + 1));
upgrade.bar_6.gotoAndStop(gData.curAT);
upgrade.bstage_txt.text = ("Stage " + gData.curBS);
upgrade.menu_base.gotoAndStop(gData.BS);
}
private function UOutMe2(_arg1:Event):void{
upgrade[("up" + "_2")].gotoAndStop("off");
upgrade[("up" + "_2")].buttonMode = (this.useHandCursor = false);
}
private function UOutMe3(_arg1:Event):void{
upgrade[("up" + "_3")].gotoAndStop("off");
upgrade[("up" + "_3")].buttonMode = (this.useHandCursor = false);
}
private function UOutMe5(_arg1:Event):void{
upgrade[("up" + "_5")].gotoAndStop("off");
upgrade[("up" + "_5")].buttonMode = (this.useHandCursor = false);
}
private function UOutMe6(_arg1:Event):void{
upgrade[("up" + "_6")].gotoAndStop("off");
upgrade[("up" + "_6")].buttonMode = (this.useHandCursor = false);
}
private function UOverMe2(_arg1:Event):void{
upgrade[("up" + "_2")].gotoAndStop("on");
upgrade[("up" + "_2")].buttonMode = (this.useHandCursor = true);
}
private function AttachEnemy(_arg1:Number, _arg2:Number, _arg3:Number):MovieClip{
if (_arg1 == 1){
enemy = new E1();
};
if (_arg1 == 2){
enemy = new E2();
};
if (_arg1 == 3){
enemy = new E3();
};
if (_arg1 == 4){
enemy = new E4();
};
if (_arg1 == 5){
enemy = new E5();
};
if (_arg1 == 6){
enemy = new E6();
};
if (_arg1 == 7){
enemy = new E7();
};
if (_arg1 == 8){
enemy = new E8();
};
if (_arg1 == 9){
enemy = new E9();
};
if (_arg1 == 10){
enemy = new E10();
};
if (_arg1 == 11){
enemy = new E11();
};
enemy.x = _arg2;
enemy.y = _arg3;
return (enemy);
}
public function ShootBossMissles(_arg1:MovieClip):void{
var _local3:Point;
var _local4:Point;
var _local5:Object;
var _local2:Number = 0;
while (_local2 < 4) {
_local3 = new Point(_arg1[("e" + (_local2 + 11))].x, _arg1[("e" + (_local2 + 11))].y);
_local3 = _arg1.localToGlobal(_local3);
bullet = new EBBullet();
bullet.x = _local3.x;
bullet.y = _local3.y;
bullet.name = ("bullet_" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(bullet);
arrBullets.push(bullet);
_local4 = new Point(MovieClip(root).base.gun1.x, MovieClip(root).base.gun1.y);
_local4 = MovieClip(root).base.localToGlobal(_local4);
_local5 = {x:_local4.x, y:_local4.y};
bullet.SetTarget(_local5);
bullet.Setup();
bullet.Start();
_local2++;
};
}
private function UOverMe5(_arg1:Event):void{
upgrade[("up" + "_5")].gotoAndStop("on");
upgrade[("up" + "_5")].buttonMode = (this.useHandCursor = true);
}
public function RemoveBoss(_arg1:MovieClip):void{
removeChild(_arg1);
}
private function CreatePauseNotify():void{
pauseMC = new PauseN();
pauseMC.x = ((stage.stageWidth / 2) - (pauseMC.width / 2));
pauseMC.y = (((stage.stageHeight / 2) - (pauseMC.height / 2)) - 15);
pauseMC.name = "pauseMC";
addChild(pauseMC);
pauseMC.pmg_button.addEventListener(MouseEvent.MOUSE_OVER, pmg_pause_over);
pauseMC.pmg_button.addEventListener(MouseEvent.MOUSE_OUT, pmg_pause_out);
pauseMC.pmg_button.addEventListener(MouseEvent.MOUSE_UP, pmg_pause_up);
pauseMC.pmg_button.gotoAndStop("off");
}
public function ReturnFAddition():Number{
return (gData.ReturnFrameAddition());
}
private function DeletePowerUp(_arg1:MovieClip):void{
var _local3:Number;
var _local2:Number = 0;
while (_local2 < arrPower.length) {
if (_arg1 == arrPower[_local2].mc){
if (arrPower[_local2].type == 1){
_local3 = 0;
while (_local3 < arrEnemies.length) {
if (((((!((arrEnemies[_local3].type == 9))) && (!((arrEnemies[_local3].type == 6))))) && (!((arrEnemies[_local3].type == 11))))){
arrEnemies[_local3].SetTarget(_arg1);
arrEnemies[_local3].myMode = 7;
};
_local3++;
};
};
removeChild(arrPower[_local2].mc);
arrPower.splice(_local2, 1);
break;
};
_local2++;
};
}
private function UOutMe4(_arg1:Event):void{
upgrade[("up" + "_4")].gotoAndStop("off");
upgrade[("up" + "_4")].buttonMode = (this.useHandCursor = false);
}
private function ShowUpgradeDescription():void{
if (blnUShow == true){
upgrade.description_text.text = gData.arrUpgradeData[numUShow].description;
upgrade[("continue" + "_game")].alpha = 0;
upgrade.upgrade_pmg.alpha = 0;
};
}
private function DistanceBetween(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
public function StartTallyOver():void{
DISTANCE = 0;
LEVEL = 1;
SCORE = 0;
if ((((gData.blnWINNER == true)) && ((LEVEL == 1)))){
} else {
if (GAMEMODE == 1){
CASH = 0;
};
};
gData.Reset();
}
private function AutoTurretCollision():void{
var _local2:Number;
var _local1:Number = 0;
while (_local1 < arrABullets.length) {
_local2 = 0;
while (_local2 < arrEnemies.length) {
if (arrEnemies[_local2].hitTestPoint(arrABullets[_local1].x, arrABullets[_local1].y, true)){
effect.CreateEffect(new Explode2(), arrEnemies[_local2].x, arrEnemies[_local2].y);
if (arrEnemies[_local2].blnShield == false){
if (arrEnemies[_local2].TakeDamage(arrABullets[_local1].damage) == true){
arrEnemies[_local2].Dead();
if (arrEnemies[_local2].type == 9){
MotherShipChildren(arrEnemies[_local2]);
};
TallyUpdate(arrEnemies[_local2].cReward, "cash");
TallyUpdate(arrEnemies[_local2].pReward, "score");
DeleteEnemy(arrEnemies[_local2]);
};
};
DeleteABullet(arrABullets[_local1]);
break;
};
_local2++;
};
_local1++;
};
}
private function CreateLoseScreen():void{
try {
fail = new FailScreen();
fail.x = 0;
fail.y = 0;
fail.name = "fail";
addChild(fail);
fail.waveTitle.text = "";
fail.scoreTitle.text = "";
fail.score_txt.text = "";
fail.wave_txt.text = "";
fail[("fail" + "_main")].addEventListener(MouseEvent.MOUSE_UP, failMainUp);
fail[("fail" + "_retry")].addEventListener(MouseEvent.MOUSE_UP, failRetryUp);
fail.fail_pmg.addEventListener(MouseEvent.MOUSE_OVER, fail_pmg_over);
fail.fail_pmg.addEventListener(MouseEvent.MOUSE_OUT, fail_pmg_out);
fail.fail_pmg.addEventListener(MouseEvent.MOUSE_UP, fail_pmg_up);
if (GAMEMODE == 2){
fail[("fail" + "_main")].alpha = 1;
fail[("fail" + "_retry")].x = -2000;
fail.loser.end_txt.text = "";
fail.waveTitle.text = "Wave:";
fail.scoreTitle.text = "Score:";
fail.score_txt.text = SCORE;
fail.wave_txt.text = WAVE;
};
blnFAIL_time = true;
fail.fail_pmg.gotoAndStop("off");
} catch(e:Error) {
};
}
private function q6Over(_arg1:Event):void{
numUShow = 6;
blnUShow = true;
upgrade[("q" + "_6")].buttonMode = (this.useHandCursor = true);
}
public function DestroyAfterWin():void{
base.ATActivate = false;
wave.Stop();
effect.DeleteMainRefEventListener();
CreateStageComplete();
base.KillAutoTurrets();
wCount = 200;
}
public function Setup():void{
version_txt.text = gData.versionTXT;
ChangeState(2);
CreateIntro();
}
private function CreateBG():void{
if (GAMEMODE == 1){
if (LEVEL == 1){
bg = new BGround1();
} else {
if (LEVEL == 2){
bg = new BGround2();
} else {
if (LEVEL == 3){
bg = new BGround3();
} else {
if (LEVEL == 4){
bg = new BGround4();
} else {
if (LEVEL == 5){
bg = new BGround5();
} else {
if (LEVEL == 6){
bg = new BGround6();
} else {
if (LEVEL == 7){
bg = new BGround7();
} else {
if (LEVEL == 8){
bg = new BGround8();
} else {
if (LEVEL == 9){
bg = new BGround9();
} else {
if (LEVEL == 10){
bg = new BGround10();
};
};
};
};
};
};
};
};
};
};
} else {
if (GAMEMODE == 2){
bg = new BGround11();
};
};
bg.alpha = 0;
bg.x = -5;
bg.y = -5;
bg.name = "bg";
addChild(bg);
bgShown = false;
}
private function q2Over(_arg1:Event):void{
numUShow = 2;
blnUShow = true;
upgrade[("q" + "_2")].buttonMode = (this.useHandCursor = true);
}
public function RetrieveEDis():Number{
return (eDistance);
}
private function Run(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
switch (gState){
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
CreateTutorial();
break;
case 5:
RotateBaseGun();
ExternalRun();
ClickDrag();
BGAlphaUp();
WinTest();
AutoTurretCollision();
PauseDelay();
TimerShake();
break;
case 6:
bars.Run();
base.Run();
_local2 = 0;
while (_local2 < arrBullets.length) {
arrBullets[_local2].Run();
_local2++;
};
_local3 = 0;
while (_local3 < arrABullets.length) {
arrABullets[_local3].Run();
_local3++;
};
DestroyTimer();
CreateFailMCs();
break;
case 7:
bars.Run();
base.Run();
_local4 = 0;
while (_local4 < arrBullets.length) {
arrBullets[_local4].Run();
_local4++;
};
_local5 = 0;
while (_local5 < arrABullets.length) {
arrABullets[_local5].Run();
_local5++;
};
WinTimer();
break;
case 8:
PauseDelay();
break;
};
PowerUpsOn();
ShowUpgradeDescription();
}
public function WinTest():void{
if (blnWavesDone == true){
if (arrEnemies.length == 0){
if (arrBullets.length == 0){
gState = 7;
base.ATActivate = false;
DestroyAfterWin();
};
};
};
}
private function DestroyAfterLose():void{
gData.DeathAdjust();
wave.Stop();
effect.DeleteMainRefEventListener();
base.KillAutoTurrets();
dCount = 150;
}
private function upgrade_pmg_out(_arg1:Event):void{
upgrade.upgrade_pmg.buttonMode = (this.useHandCursor = false);
upgrade.upgrade_pmg.gotoAndStop("off");
}
public function ShootBossRockets(_arg1:MovieClip):void{
var _local3:Point;
var _local4:Point;
var _local5:Object;
var _local2:Number = 0;
while (_local2 < 9) {
_local3 = new Point(_arg1[("e" + (_local2 + 1))].x, _arg1[("e" + (_local2 + 1))].y);
_local3 = _arg1.localToGlobal(_local3);
bullet = new E2Bullet();
bullet.x = _local3.x;
bullet.y = _local3.y;
bullet.name = ("bullet_" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(bullet);
arrBullets.push(bullet);
_local4 = new Point(MovieClip(root).base.gun1.x, MovieClip(root).base.gun1.y);
_local4 = MovieClip(root).base.localToGlobal(_local4);
_local5 = {x:_local4.x, y:_local4.y};
bullet.SetTarget(_local5);
bullet.Setup();
bullet.Start();
_local2++;
};
}
function frame1(){
try {
MochiBot.track(this, "9baf0ab9");
} catch(e:Error) {
};
stop();
}
public function DeleteEnemy(_arg1:MovieClip):void{
var _local3:Object;
var _local2:Number = 0;
while (_local2 < arrEnemies.length) {
if (arrEnemies[_local2] == _arg1){
PowerUpCheck(_arg1);
_local3 = {x:_arg1.x, y:_arg1.y};
if (_arg1.AmIAlive() == true){
if (arrEnemies[_local2].type == 5){
if (gState == 5){
if (startCount > 2){
sEffects.SHAKE(20);
};
};
ShootInvisibleTankerFixBullet(_local3, 80);
sPlayer.PlaySound(new tanker_explosion(), 0.4);
};
};
_arg1.RemoveEnemy();
arrEnemies.splice(_local2, 1);
break;
};
_local2++;
};
}
private function ActivateShield():void{
if (shieldMC != null){
RemoveShield();
};
shield = new BShield();
var _local1:Point = new Point(MovieClip(root).base.gun1.x, MovieClip(root).base.gun1.y);
_local1 = MovieClip(root).base.localToGlobal(_local1);
shield.x = _local1.x;
shield.y = _local1.y;
shield.name = "shield";
addChild(shield);
shieldMC = shield;
}
public function DeleteABullet(_arg1:MovieClip):void{
var _local2:Number = 0;
while (_local2 < arrABullets.length) {
if (_arg1 == arrABullets[_local2]){
_arg1.RemoveBullet();
arrABullets.splice(_local2, 1);
break;
};
_local2++;
};
}
private function upgrade_pmg_up(_arg1:Event):void{
URL_OPEN(1);
}
private function q4Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_4")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
private function failRetryUp(_arg1:Event):void{
blnLeaveRetry = true;
CleanEverything();
CASH = gData.prevCASH;
SCORE = gData.prevSCORE;
ToGameAfterPreScreen();
wave = new WaveEngine(this);
}
private function PowerUpCheck(_arg1:MovieClip):void{
var _local2:Number = RandNum(1, 100);
if ((((((((_arg1.type == 5)) || ((_arg1.type == 6)))) || ((_arg1.type == 9)))) || ((_arg1.type == 11)))){
if (_local2 <= 8){
if ((((_arg1.x > 0)) && ((_arg1.x < stage.stageWidth)))){
if ((((_arg1.y > 0)) && ((_arg1.y < stage.stageHeight)))){
CreatePowerUp(_arg1.x, _arg1.y);
};
};
};
} else {
if (_local2 <= 3){
if ((((_arg1.x > 0)) && ((_arg1.x < stage.stageWidth)))){
if ((((_arg1.y > 0)) && ((_arg1.y < stage.stageHeight)))){
CreatePowerUp(_arg1.x, _arg1.y);
};
};
};
};
}
private function BackToMenu():void{
blnViewingUpgradesScreen = false;
blnSurvive = false;
blnMouseDown = false;
blnWavesDone = false;
blnReset = false;
blnPaused = false;
bgShown = false;
blnLeaveUpgrade = false;
blnFirstOut = true;
blnStartShakeStop = true;
blnTutorialTested = false;
blnFAIL_time = false;
KillAllFAILs();
blnPower1 = false;
blnPower2 = false;
blnPower3 = false;
p1Count = -1;
p2Count = -1;
p3Count = -1;
dCount = -1;
wCount = -1;
pTimer = -1;
startCount = 0;
ChangeState(3);
bDistance = 10;
eDistance = 25;
Indexer = 0;
originalBaseRule = 0;
clickDown = {x:0, y:0};
clickUp = {x:0, y:0};
DISTANCE = 0;
LEVEL = 1;
SCORE = 0;
CASH = 0;
WAVE = 0;
GAMEMODE = 1;
Indexer = 0;
arrDrags = new Array();
arrBullets = new Array();
arrEnemies = new Array();
tankerRetest = new Array();
arrPower = new Array();
arrABullets = new Array();
arrFail = new Array();
stage.removeEventListener(Event.ENTER_FRAME, Run);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.removeEventListener(KeyboardEvent.KEY_UP, KeyBoardPress);
stage.addEventListener(Event.ENTER_FRAME, Run);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyBoardPress);
wave = new WaveEngine(this);
effect = new EffectsEngine(this);
ChangeState(2);
CreateMainMenu();
gData.Reset();
}
public function GetMusic():Boolean{
return (MUSIC);
}
private function b_over(_arg1:Event):void{
tutorial[("back_" + "btn")].buttonMode = (this.useHandCursor = true);
tutorial[("back_" + "btn")].gotoAndStop("on");
}
private function TallyText():void{
bottomScore.score_txt.text = SCORE;
}
private function CreateTutorial():void{
if (blnTutorialTested == false){
blnTutorialTested = true;
tutorial = new TutVid();
tutorial.x = 0;
tutorial.y = 0;
tutorial.name = "tutorial";
addChild(tutorial);
tutRef = tutorial;
tutorial[("play_" + "btn")].addEventListener(MouseEvent.MOUSE_OVER, tp_over);
tutorial[("play_" + "btn")].addEventListener(MouseEvent.MOUSE_OUT, tp_out);
tutorial[("play_" + "btn")].addEventListener(MouseEvent.MOUSE_UP, tp_up);
tutorial[("next_" + "btn")].addEventListener(MouseEvent.MOUSE_OVER, n_over);
tutorial[("next_" + "btn")].addEventListener(MouseEvent.MOUSE_OUT, n_out);
tutorial[("next_" + "btn")].addEventListener(MouseEvent.MOUSE_UP, n_up);
tutorial[("back_" + "btn")].addEventListener(MouseEvent.MOUSE_OVER, b_over);
tutorial[("back_" + "btn")].addEventListener(MouseEvent.MOUSE_OUT, b_out);
tutorial[("back_" + "btn")].addEventListener(MouseEvent.MOUSE_UP, b_up);
};
}
public function CreateStageComplete():void{
sComplete = new StageComplete();
sComplete.x = 8;
sComplete.y = 201;
sComplete.name = "sComplete";
addChild(sComplete);
}
function frame2(){
PL_mc.SetFlag();
gotoAndStop("main");
}
private function ExternalRun():void{
base.Run();
bars.Run();
wave.Run();
var _local1:Number = 0;
while (_local1 < arrBullets.length) {
arrBullets[_local1].Run();
_local1++;
};
var _local2:Number = 0;
while (_local2 < arrEnemies.length) {
arrEnemies[_local2].Run();
_local2++;
};
var _local3:Number = 0;
while (_local3 < arrABullets.length) {
arrABullets[_local3].Run();
_local3++;
};
}
private function ShootBaseBullet(_arg1:Number):void{
var _local2:Point = new Point(base.gun1.emitter.x, base.gun1.emitter.y);
_local2 = base.gun1.localToGlobal(_local2);
bullet = new MBullet();
bullet.x = _local2.x;
bullet.y = _local2.y;
bullet.rotation = base.gun1.rotation;
bullet.name = "main_bullet";
addChild(bullet);
arrBullets.push(bullet);
bullet.SetTarget(clickDown);
bullet.SetRadius(_arg1);
bullet.Setup();
bullet.Start();
}
public function EffectKillSelf(_arg1:MovieClip):void{
effect.DeleteEffect(_arg1);
}
private function KeyBoardPress(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 80){
if (pTimer < 0){
pTimer = 15;
if (blnPaused == true){
blnPaused = false;
UnPause();
} else {
blnPaused = true;
Pause();
};
};
};
}
private function BGAlphaUp():void{
if (bgShown == false){
bg.alpha = (bg.alpha + 0.1);
if (bg.alpha >= 1){
bg.alpha = 1;
bgShown = true;
bg.cacheAsBitmap = true;
};
};
}
public function DeleteBullet(_arg1:MovieClip):void{
var _local2:Number = 0;
while (_local2 < arrBullets.length) {
if (_arg1 == arrBullets[_local2]){
_arg1.RemoveBullet();
arrBullets.splice(_local2, 1);
break;
};
_local2++;
};
}
public function ChangeState(_arg1:Number):void{
gState = _arg1;
}
public function ReturnCurrentBaseStage():Number{
return (gData.BS);
}
public function GrabRechargeRate():Number{
return (gData.RECHARGERATE);
}
private function upgrade_pmg_over(_arg1:Event):void{
upgrade.upgrade_pmg.buttonMode = (this.useHandCursor = true);
upgrade.upgrade_pmg.gotoAndStop("on");
}
private function UnPause():void{
gState = 5;
this.removeChild(pauseMC);
}
private function CreatePreloader():void{
var _local1:int;
var _local2:int;
var _local3:DisplayObject;
PL_mc = new PreloaderMC();
PL_mc.SetMainRef(this);
SHOWADS = objUrlLocking.GetShowAds();
if (SHOWADS == false){
this.adBox.alpha = 0;
this.adBox.x = -1000;
PL_mc.x = int(((stage.stageWidth / 2) - (PL_mc.width / 2)));
PL_mc.y = int(((stage.stageHeight / 2) - (PL_mc.height + 10)));
} else {
_local1 = 1052;
_local2 = 13;
_local3 = AdLoader.LoadAd(_local1, _local2);
adBox.addChild(_local3);
this.adBox.alpha = 1;
PL_mc.x = int(((stage.stageWidth / 2) - (PL_mc.width / 2)));
PL_mc.y = int((((stage.stageHeight / 2) - PL_mc.height) + 150));
};
PL_mc.name = "PL_mc";
addChild(PL_mc);
PL_mc.PL_Listeners();
}
private function tp_over(_arg1:Event):void{
tutorial[("play_" + "btn")].buttonMode = (this.useHandCursor = true);
tutorial[("play_" + "btn")].gotoAndStop("on");
}
private function UpdateUpgradeText():void{
upgrade.uHeader.text = gData.strHeader;
upgrade.specHead.text = gData.strSpecs;
upgrade.s1.text = gData.strCash;
upgrade.s2.text = gData.strPoints;
upgrade.s3.text = gData.strLevel;
upgrade.s4.text = gData.strStage;
upgrade.cash_txt.text = CASH;
upgrade.points_txt.text = SCORE;
upgrade.level_txt.text = LEVEL;
upgrade.stage_txt.text = gData.BS;
gData.prevCASH = CASH;
gData.prevSCORE = SCORE;
upgrade.bstage_txt.text = ("Stage " + gData.curBS);
upgrade.h1.text = gData.strH1;
upgrade.h2.text = gData.strH2;
upgrade.h3.text = gData.strH3;
upgrade.h4.text = gData.strH4;
upgrade.slot1.text = gData.arrUpgradeData[1].text;
upgrade.slot2.text = gData.arrUpgradeData[2].text;
upgrade.slot3.text = gData.arrUpgradeData[3].text;
upgrade.slot4.text = gData.arrUpgradeData[4].text;
upgrade.slot5.text = gData.arrUpgradeData[5].text;
upgrade.slot6.text = gData.arrUpgradeData[6].text;
if (gData.curBS < (gData.arrUpgradePoints[1].upgrades + 1)){
upgrade.class_cost.text = gData.arrUpgradePoints[1][("s" + gData.curBS)];
} else {
upgrade.class_cost.text = "-------";
};
if (gData.curHA < (gData.arrUpgradePoints[2].upgrades + 1)){
upgrade.armor_cost.text = gData.arrUpgradePoints[2][("s" + gData.curHA)];
} else {
upgrade.armor_cost.text = "FULL";
};
if (gData.curDA < (gData.arrUpgradePoints[3].upgrades + 1)){
upgrade.dArea_cost.text = gData.arrUpgradePoints[3][("s" + gData.curDA)];
} else {
upgrade.dArea_cost.text = "FULL";
};
if (gData.curDS < (gData.arrUpgradePoints[4].upgrades + 1)){
upgrade.dStrength_cost.text = gData.arrUpgradePoints[4][("s" + gData.curDS)];
} else {
upgrade.dStrength_cost.text = "FULL";
};
if (gData.curRR < (gData.arrUpgradePoints[5].upgrades + 1)){
upgrade.recharge_cost.text = gData.arrUpgradePoints[5][("s" + gData.curRR)];
} else {
upgrade.recharge_cost.text = "FULL";
};
if (ReturnCurrentAUAmount() < ReturnAllowedAutoTurrets()){
upgrade.turret_cost.text = gData.arrUpgradePoints[6][("s" + gData.curAT)];
} else {
upgrade.turret_cost.text = "FULL";
};
upgrade.bar_1.max_stop.gotoAndStop(gData.arrUpgradeData[1].fullAmount);
upgrade.bar_2.max_stop.gotoAndStop(gData.arrUpgradeData[2].fullAmount);
upgrade.bar_3.max_stop.gotoAndStop(gData.arrUpgradeData[3].fullAmount);
upgrade.bar_4.max_stop.gotoAndStop(gData.arrUpgradeData[4].fullAmount);
upgrade.bar_5.max_stop.gotoAndStop(gData.arrUpgradeData[5].fullAmount);
upgrade.bar_6.max_stop.gotoAndStop((Main(root).ReturnAllowedAutoTurrets() + 1));
upgrade.bar_1.max_stop_black.gotoAndStop(gData.arrUpgradeData[1].fullAmount);
upgrade.bar_2.max_stop_black.gotoAndStop(gData.arrUpgradeData[2].fullAmount);
upgrade.bar_3.max_stop_black.gotoAndStop(gData.arrUpgradeData[3].fullAmount);
upgrade.bar_4.max_stop_black.gotoAndStop(gData.arrUpgradeData[4].fullAmount);
upgrade.bar_5.max_stop_black.gotoAndStop(gData.arrUpgradeData[5].fullAmount);
upgrade.bar_6.max_stop_black.gotoAndStop((Main(root).ReturnAllowedAutoTurrets() + 1));
upgrade.bar_1.gotoAndStop(gData.curBS);
upgrade.bar_2.gotoAndStop(gData.curHA);
upgrade.bar_3.gotoAndStop(gData.curDA);
upgrade.bar_4.gotoAndStop(gData.curDS);
upgrade.bar_5.gotoAndStop(gData.curRR);
upgrade.bar_6.gotoAndStop(gData.curAT);
if (gData.CheckForStageUpgrade() == 2){
UpdateBStage(2);
} else {
if (gData.CheckForStageUpgrade() == 3){
UpdateBStage(3);
};
};
upgrade.menu_base.gotoAndStop(gData.BS);
}
private function CreatePUNotify(_arg1:Number):void{
if (puRef != null){
DestroyPUN();
};
pu_n = new PUNotice();
pu_n.x = 275;
pu_n.y = 250;
pu_n.name = "pu_n";
addChild(pu_n);
puRef = pu_n;
if (_arg1 == 1){
pu_n.gotoAndStop("shield");
} else {
if (_arg1 == 2){
pu_n.gotoAndStop("maxPower");
} else {
if (_arg1 == 3){
pu_n.gotoAndStop("magnet");
};
};
};
}
private function ClickDrag():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:MovieClip;
var _local6:Number;
var _local7:MovieClip;
var _local8:MovieClip;
var _local9:MovieClip;
if (blnMouseDown == true){
_local1 = (clickDown.x - stage.mouseX);
_local2 = (clickDown.y - stage.mouseY);
DISTANCE = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local3 = ((DISTANCE / 2) * bars.mult);
if (_local3 < 0){
(_local3 * -1);
};
if ((bars.GetHOrPMult(2) * bars.mult2) < _local3){
_local3 = (bars.GetHOrPMult(2) * bars.mult2);
};
_local4 = (pBarRefX + (bars.powerBar.width - _local3));
_local5 = new MovieClip();
_local5.graphics.beginFill(0, 0.3);
_local5.graphics.drawRect(_local4, pBarRefY, _local3, 5);
_local6 = 0;
while (_local6 < arrDrags.length) {
removeChild(arrDrags[_local6]);
_local6++;
};
arrDrags.length = 0;
_local7 = new MovieClip();
_local7.graphics.beginFill(0xFFFFFF, 0.05);
_local7.graphics.drawCircle(clickDown.x, clickDown.y, DISTANCE);
_local8 = new MovieClip();
_local8.graphics.beginFill(0xFFFFFF, 0.09);
_local8.graphics.drawCircle(clickDown.x, clickDown.y, ((_local3 * 2) / bars.mult));
damageRadius = (_local8.width / 2);
_local9 = new MovieClip();
_local9.graphics.lineStyle(1, 11272191, 0.4);
_local9.graphics.moveTo(clickDown.x, clickDown.y);
_local9.graphics.lineTo(stage.mouseX, stage.mouseY);
addChild(_local7);
addChild(_local8);
addChild(_local9);
addChild(_local5);
arrDrags.push(_local7);
arrDrags.push(_local8);
arrDrags.push(_local9);
arrDrags.push(_local5);
};
}
public function DestroyPUN():void{
try {
if (puRef != null){
MovieClip(root).removeChild(MovieClip(root).pu_n);
puRef = null;
};
} catch(e:Error) {
};
}
private function LosePower():void{
var _local1:Number = (clickDown.x - clickUp.x);
var _local2:Number = (clickDown.y - clickUp.y);
var _local3:Number = int(Math.sqrt(((_local1 * _local1) + (_local2 * _local2))));
_local3 = (_local3 * -1);
bars.AddOrSubtract((_local3 / 2), "power");
}
private function RotateBaseGun():void{
var _local1:Point;
var _local2:LineVector;
if (blnMouseDown == false){
_local1 = new Point(stage.mouseX, stage.mouseY);
_local1 = base.globalToLocal(_local1);
_local2 = new LineVector();
_local2.x = (_local1.x - base.gun1.x);
_local2.y = (_local1.y - base.gun1.y);
base.gun1.rotation = _local2.GetAngle();
};
}
public function ReturnCurrentAUAmount():Number{
var _local1:Number = 0;
if (gData.slot1 == true){
_local1++;
};
if (gData.slot2 == true){
_local1++;
};
if (gData.slot3 == true){
_local1++;
};
if (gData.slot4 == true){
_local1++;
};
return (_local1);
}
public function FillWinScore():String{
return (String(SCORE));
}
private function CreateIntro():void{
if (gData.blnGameLocked == true){
if (objUrlLocking.GetLocked() == false){
intro = new SplashIntro();
intro.x = 74;
intro.y = 80;
intro.name = "intro";
addChild(intro);
intro.Setup();
} else {
CreateLockedScreen();
};
} else {
intro = new SplashIntro();
intro.x = 74;
intro.y = 80;
intro.name = "intro";
addChild(intro);
intro.Setup();
};
}
private function MotherShipChildren(_arg1:MovieClip):void{
var _local2:Point = new Point(_arg1[("m" + "Spawn1")].x, _arg1[("m" + "Spawn1")].y);
_local2 = _arg1.localToGlobal(_local2);
var _local3:MovieClip = AttachEnemy(10, _local2.x, _local2.y);
var _local4:LineVector = new LineVector();
_local4.x = ((base.x + (base.width / 2)) - _local3.x);
_local4.y = ((base.y + (base.height / 2)) - _local3.y);
_local3.rotation = _local4.GetAngle();
_local3.name = ("spawn" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(_local3);
arrEnemies.push(_local3);
_local3.SetTarget(MovieClip(root).base);
_local3.SetRefs(this);
_local3.Setup();
_local3.Start();
_local2 = new Point(_arg1[("m" + "Spawn2")].x, _arg1[("m" + "Spawn2")].y);
_local2 = _arg1.localToGlobal(_local2);
var _local5:MovieClip = AttachEnemy(10, _local2.x, _local2.y);
_local4.x = ((base.x + (base.width / 2)) - _local5.x);
_local4.y = ((base.y + (base.height / 2)) - _local5.y);
_local5.rotation = _local4.GetAngle();
_local5.name = ("spawn" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(_local5);
arrEnemies.push(_local5);
_local5.SetTarget(MovieClip(root).base);
_local5.SetRefs(this);
_local5.Setup();
_local5.Start();
}
private function AddAutoTurret():void{
CASH = (CASH - gData.arrUpgradePoints[6][("s" + gData.curAT)]);
gData.curAT++;
if (gData.slot1 == false){
gData.slot1 = true;
} else {
if (gData.slot2 == false){
gData.slot2 = true;
} else {
if (gData.slot3 == false){
gData.slot3 = true;
} else {
if (gData.slot4 == false){
gData.slot4 = true;
};
};
};
};
}
public function FindTarget(_arg1:MovieClip):MovieClip{
var _local2:Point = new Point(_arg1.x, _arg1.y);
_local2 = localToGlobal(_local2);
var _local3:Number = 0;
while (_local3 < arrEnemies.length) {
if (arrEnemies[_local3].type != 4){
if (GetDistance(arrEnemies[_local3], _local2.x, _local2.y) < 400){
return (arrEnemies[_local3]);
};
};
_local3++;
};
return (null);
}
public function RetrieveGameState():Number{
return (gState);
}
public function PlaceEnemy(_arg1:Number=1, _arg2:Number=1, _arg3:Number=0, _arg4:Number=10, _arg5:Number=40):void{
var _local11:Number;
var _local6:Number = 0;
var _local7:Number = 0;
var _local8:Number = 0;
if (_arg1 == 4){
_local8 = RandNum(1, 2);
if (_local8 == 1){
_local6 = -40;
_local7 = RandNum(50, stage.stageHeight);
} else {
_local6 = (stage.stageWidth + 40);
_local7 = RandNum(50, stage.stageHeight);
};
} else {
if (_arg2 == 1){
_local11 = RandNum(1, 3);
if (_local11 == 1){
_local6 = -50;
_local7 = RandNum(50, stage.stageHeight);
} else {
if (_local11 == 2){
_local6 = (stage.stageWidth + 50);
_local7 = RandNum(50, stage.stageHeight);
} else {
if (_local11 == 3){
_local6 = RandNum(0, stage.stageWidth);
_local7 = (stage.stageHeight + 50);
};
};
};
} else {
if (_arg2 == 2){
_local6 = (stage.stageWidth / 2);
_local7 = (stage.stageHeight + 50);
} else {
if (_arg2 == 3){
_local6 = RandNum(0, stage.stageWidth);
_local7 = (stage.stageHeight + 50);
} else {
if (_arg2 == 4){
_local6 = -50;
_local7 = RandNum(50, stage.stageHeight);
} else {
if (_arg2 == 5){
_local6 = (stage.stageWidth + 50);
_local7 = RandNum(50, stage.stageHeight);
} else {
if (_arg2 == 6){
_local6 = (stage.stageWidth / 2);
_local7 = (stage.stageHeight + 200);
};
};
};
};
};
};
};
var _local9:MovieClip = AttachEnemy(_arg1, _local6, _local7);
var _local10:LineVector = new LineVector();
if (_local8 != 0){
_local9.SetDir(_local8);
if (_local9.probeDirection == 1){
_local10.x = ((stage.stageWidth + 50) - _local9.x);
_local10.y = (RandNum(50, stage.stageHeight) - _local9.y);
_local9.rotation = _local10.GetAngle();
} else {
_local10.x = (-50 - _local9.x);
_local10.y = (RandNum(50, stage.stageHeight) - _local9.y);
_local9.rotation = _local10.GetAngle();
};
} else {
_local10.x = ((base.x + (base.width / 2)) - _local9.x);
_local10.y = ((base.y + (base.height / 2)) - _local9.y);
_local9.rotation = _local10.GetAngle();
};
_local9.name = ("enemy" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(_local9);
arrEnemies.push(_local9);
if (_local9.type != 4){
_local9.SetTarget(MovieClip(root).base);
};
_local9.SetRefs(this);
_local9.Setup();
_local9.Start();
if (_arg3 != 0){
AttachCluster(_local9, _arg4, _arg5, _arg3);
};
}
private function pmg_pause_over(_arg1:Event):void{
pauseMC.pmg_button.buttonMode = (this.useHandCursor = true);
pauseMC.pmg_button.gotoAndStop("on");
}
public function PlaceSpawn(_arg1:MovieClip):void{
var _local2:MovieClip = AttachEnemy(_arg1.whichSpawn, _arg1.x, _arg1.y);
var _local3:LineVector = new LineVector();
_local3.x = ((base.x + (base.width / 2)) - _local2.x);
_local3.y = ((base.y + (base.height / 2)) - _local2.y);
_local2.rotation = _local3.GetAngle();
_local2.name = ("spawn" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(_local2);
arrEnemies.push(_local2);
_local2.SetTarget(MovieClip(root).base);
_local2.SetRefs(this);
_local2.Setup();
_local2.Start();
_arg1.hatch.gotoAndPlay("close");
}
public function ContinueToGame():void{
blnMouseDown = false;
blnWavesDone = false;
blnReset = false;
blnPaused = false;
bgShown = false;
blnPower1 = false;
blnPower2 = false;
blnPower3 = false;
p1Count = -1;
p2Count = -1;
p3Count = -1;
dCount = -1;
wCount = -1;
pTimer = -1;
bDistance = 10;
eDistance = 25;
startCount = 0;
WAVE = 0;
Indexer = 0;
originalBaseRule = 0;
clickDown = {x:0, y:0};
clickUp = {x:0, y:0};
Indexer = 0;
arrDrags = new Array();
arrBullets = new Array();
arrEnemies = new Array();
tankerRetest = new Array();
arrPower = new Array();
arrABullets = new Array();
arrFail = new Array();
stage.removeEventListener(Event.ENTER_FRAME, Run);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.removeEventListener(KeyboardEvent.KEY_UP, KeyBoardPress);
stage.addEventListener(Event.ENTER_FRAME, Run);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyBoardPress);
wave = new WaveEngine(this);
effect = new EffectsEngine(this);
ToGame();
}
public function WinTimer():void{
var _local1:Number;
if (wCount > 0){
wCount--;
} else {
if (wCount == 0){
_local1 = 0;
while (_local1 < arrABullets.length) {
arrABullets[_local1].RemoveBullet();
_local1++;
};
arrABullets.length = 0;
CleanEverything();
if (((((LEVEL + 1) >= 11)) || ((GAMEMODE == 2)))){
CreateWinScreen();
wCount = -1;
gData.blnWINNER = true;
} else {
CreateUpgradeMenu();
LEVEL++;
UpdateUpgradeText();
wCount = -1;
};
};
};
}
private function failMainUp(_arg1:Event):void{
fail[("fail" + "_main")].removeEventListener(MouseEvent.MOUSE_UP, failMainUp);
removeChild(fail);
BackToMenu();
blnFAIL_time = false;
KillAllFAILs();
}
private function CreateScoreMC():void{
score_mc = new ScoreMC();
score_mc.x = -18.1;
score_mc.y = 473;
score_mc.name = "score_mc";
addChild(score_mc);
bottomScore = score_mc;
}
public function GetObjDistance(_arg1:Object, _arg2:Number, _arg3:Number):Number{
var _local4:Number = (_arg1.x - _arg2);
var _local5:Number = (_arg1.y - _arg3);
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
private function CreateUpgradeMenu():void{
sEffects.Off();
blnStartShakeStop = true;
blnLeaveRetry = true;
upgrade = new UpgradeMenu();
upgrade.x = 69.5;
upgrade.y = 20;
upgrade.name = "upgrade";
addChild(upgrade);
upgrade[("up" + "_2")].gotoAndStop("off");
upgrade[("up" + "_3")].gotoAndStop("off");
upgrade[("up" + "_4")].gotoAndStop("off");
upgrade[("up" + "_5")].gotoAndStop("off");
upgrade[("up" + "_6")].gotoAndStop("off");
upgrade[("up" + "_2")].addEventListener(MouseEvent.MOUSE_OVER, UOverMe2);
upgrade[("up" + "_2")].addEventListener(MouseEvent.MOUSE_OUT, UOutMe2);
upgrade[("up" + "_2")].addEventListener(MouseEvent.MOUSE_UP, UUpMe2);
upgrade[("up" + "_3")].addEventListener(MouseEvent.MOUSE_OVER, UOverMe3);
upgrade[("up" + "_3")].addEventListener(MouseEvent.MOUSE_OUT, UOutMe3);
upgrade[("up" + "_3")].addEventListener(MouseEvent.MOUSE_UP, UUpMe3);
upgrade[("up" + "_4")].addEventListener(MouseEvent.MOUSE_OVER, UOverMe4);
upgrade[("up" + "_4")].addEventListener(MouseEvent.MOUSE_OUT, UOutMe4);
upgrade[("up" + "_4")].addEventListener(MouseEvent.MOUSE_UP, UUpMe4);
upgrade[("up" + "_5")].addEventListener(MouseEvent.MOUSE_OVER, UOverMe5);
upgrade[("up" + "_5")].addEventListener(MouseEvent.MOUSE_OUT, UOutMe5);
upgrade[("up" + "_5")].addEventListener(MouseEvent.MOUSE_UP, UUpMe5);
upgrade[("up" + "_6")].addEventListener(MouseEvent.MOUSE_OVER, UOverMe6);
upgrade[("up" + "_6")].addEventListener(MouseEvent.MOUSE_OUT, UOutMe6);
upgrade[("up" + "_6")].addEventListener(MouseEvent.MOUSE_UP, UUpMe6);
upgrade[("q" + "_1")].addEventListener(MouseEvent.MOUSE_OVER, q1Over);
upgrade[("q" + "_1")].addEventListener(MouseEvent.MOUSE_OUT, q1Out);
upgrade[("q" + "_2")].addEventListener(MouseEvent.MOUSE_OVER, q2Over);
upgrade[("q" + "_2")].addEventListener(MouseEvent.MOUSE_OUT, q2Out);
upgrade[("q" + "_3")].addEventListener(MouseEvent.MOUSE_OVER, q3Over);
upgrade[("q" + "_3")].addEventListener(MouseEvent.MOUSE_OUT, q3Out);
upgrade[("q" + "_4")].addEventListener(MouseEvent.MOUSE_OVER, q4Over);
upgrade[("q" + "_4")].addEventListener(MouseEvent.MOUSE_OUT, q4Out);
upgrade[("q" + "_5")].addEventListener(MouseEvent.MOUSE_OVER, q5Over);
upgrade[("q" + "_5")].addEventListener(MouseEvent.MOUSE_OUT, q5Out);
upgrade[("q" + "_6")].addEventListener(MouseEvent.MOUSE_OVER, q6Over);
upgrade[("q" + "_6")].addEventListener(MouseEvent.MOUSE_OUT, q6Out);
upgrade[("continue" + "_game")].addEventListener(MouseEvent.MOUSE_OVER, contOver);
upgrade[("continue" + "_game")].addEventListener(MouseEvent.MOUSE_OUT, contOut);
upgrade[("continue" + "_game")].addEventListener(MouseEvent.MOUSE_UP, contUp);
upgrade.upgrade_pmg.addEventListener(MouseEvent.MOUSE_OVER, upgrade_pmg_over);
upgrade.upgrade_pmg.addEventListener(MouseEvent.MOUSE_OUT, upgrade_pmg_out);
upgrade.upgrade_pmg.addEventListener(MouseEvent.MOUSE_UP, upgrade_pmg_up);
upgrade[("continue" + "_game")].gotoAndStop("off");
upgrade.upgrade_pmg.gotoAndStop("off");
}
private function q5Over(_arg1:Event):void{
numUShow = 5;
blnUShow = true;
upgrade[("q" + "_5")].buttonMode = (this.useHandCursor = true);
}
private function UpgradeClick(_arg1:Number):void{
if (_arg1 == 1){
} else {
if (_arg1 == 2){
if (gData.curHA < (gData.arrUpgradePoints[2].upgrades + 1)){
if (CASH >= gData.arrUpgradePoints[2][("s" + gData.curHA)]){
CASH = (CASH - gData.arrUpgradePoints[2][("s" + gData.curHA)]);
gData.curHA++;
gData.HEALTHMULTIPLIER = (gData.HEALTHMULTIPLIER - gData.armorMultDecrement);
};
};
} else {
if (_arg1 == 3){
if (gData.curDA < (gData.arrUpgradePoints[3].upgrades + 1)){
if (CASH >= gData.arrUpgradePoints[3][("s" + gData.curDA)]){
CASH = (CASH - gData.arrUpgradePoints[3][("s" + gData.curDA)]);
gData.curDA++;
gData.ChangeBaseRule((gData.ReturnCurrentBaseRule() + gData.areaIncrement));
};
};
} else {
if (_arg1 == 4){
if (gData.curDS < (gData.arrUpgradePoints[4].upgrades + 1)){
if (CASH >= gData.arrUpgradePoints[4][("s" + gData.curDS)]){
CASH = (CASH - gData.arrUpgradePoints[4][("s" + gData.curDS)]);
gData.curDS++;
gData.BASEBULLETDAMAGE = (gData.BASEBULLETDAMAGE + gData.damageIncrement);
};
};
} else {
if (_arg1 == 5){
if (gData.curRR < (gData.arrUpgradePoints[5].upgrades + 1)){
if (CASH >= gData.arrUpgradePoints[5][("s" + gData.curRR)]){
CASH = (CASH - gData.arrUpgradePoints[5][("s" + gData.curRR)]);
gData.curRR++;
if (GAMEMODE == 1){
bars.SwitchRechargeRate((gData.RECHARGERATE + gData.rechargeIncrement));
};
gData.RECHARGERATE = (gData.RECHARGERATE + gData.rechargeIncrement);
};
};
} else {
if (_arg1 == 6){
if (ReturnCurrentAUAmount() <= ReturnAllowedAutoTurrets()){
if (CASH >= gData.arrUpgradePoints[6][("s" + gData.curAT)]){
if (gData.BS == 1){
if ((((gData.slot1 == false)) || ((gData.slot2 == false)))){
AddAutoTurret();
};
} else {
if (gData.BS == 2){
if ((((((gData.slot1 == false)) || ((gData.slot2 == false)))) || ((gData.slot3 == false)))){
AddAutoTurret();
};
} else {
if (gData.BS == 3){
if ((((((((gData.slot1 == false)) || ((gData.slot2 == false)))) || ((gData.slot3 == false)))) || ((gData.slot4 == false)))){
AddAutoTurret();
};
};
};
};
};
};
};
};
};
};
};
};
UpdateUpgradeText();
}
private function q1Over(_arg1:Event):void{
numUShow = 1;
blnUShow = true;
upgrade[("q" + "_1")].buttonMode = (this.useHandCursor = true);
}
private function TimerShake():void{
if (shakeTimer > 0){
shakeTimer--;
} else {
if (shakeTimer == 0){
sEffects.ShakeSetup();
sEffects.On();
shakeTimer = -1;
};
};
}
private function ToGameAfterPreScreen():void{
if ((((blnFirstOut == false)) || ((GAMEMODE == 1)))){
ChangeState(3);
CreateBG();
ChangeState(5);
effect.CreateLayer("Below");
CreateBase();
CreateTopBars();
bars.SwitchRechargeRate((gData.RECHARGERATE + gData.rechargeIncrement));
CreateScoreMC();
TallyText();
if (GAMEMODE == 2){
CreateWaveNotice();
};
blnStartShakeStop = false;
eDistance = 25;
shakeTimer = 50;
};
}
private function MouseDown(_arg1:Event):void{
clickDown = {x:stage.mouseX, y:stage.mouseY};
blnMouseDown = true;
}
public function KillsComplete():void{
MovieClip(root).removeChild(MovieClip(root).sComplete);
}
private function CreateTopBars():void{
bars = new TBars();
bars.alpha = 0;
bars.x = 8;
bars.y = 8;
bars.name = "bars";
addChild(bars);
bars.Setup();
originalBaseRule = bars.RetrieveBR();
pBarRefX = (bars.x + bars.powerBar.x);
pBarRefY = (bars.y + bars.powerBar.y);
}
public function SetGameMode(_arg1:Number):void{
GAMEMODE = _arg1;
}
private function RandNum(_arg1:Number, _arg2:Number):Number{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
private function tp_out(_arg1:Event):void{
tutorial[("play_" + "btn")].buttonMode = (this.useHandCursor = false);
tutorial[("play_" + "btn")].gotoAndStop("off");
}
private function CreateFailMCs():void{
if ((((((blnFAIL_time == true)) && ((GAMEMODE == 1)))) && (!((gState == 5))))){
if (blnScreenShown == false){
if (failIndex > 0){
failIndex--;
} else {
FAIL_MC = new RainFail();
FAIL_MC.x = RandNum(15, (stage.stageWidth - 15));
FAIL_MC.y = -10;
FAIL_MC.alpha = (RandNum(3, 8) * 0.1);
FAIL_MC.name = ("FAIL_MC" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(FAIL_MC);
FAIL_MC.Setup(this);
arrFail.push(FAIL_MC);
failIndex = 10;
};
};
};
}
public function WavesDone():void{
blnWavesDone = true;
}
private function contOver(_arg1:Event):void{
upgrade[("continue" + "_game")].gotoAndStop("on");
upgrade[("continue" + "_game")].buttonMode = (this.useHandCursor = true);
}
public function CheckDestroyRadius(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:MovieClip=null):void{
var i:Number;
var e:Number;
var WPPoint:Point;
var j:Number;
var o:Number;
var randy:Number;
var boomRef:MovieClip;
var p:Number;
var randE:Number;
var k:Number;
var q:Number;
var randP:Number;
var radius = _arg1;
var xLoc = _arg2;
var yLoc = _arg3;
var bulletDamage = _arg4;
var mcTanker = _arg5;
var arrRemoveQueue:Array = new Array();
var arrRemoveQueue2:Array = new Array();
var arrRemoveQueue3:Array = new Array();
try {
i = 0;
while (i < arrEnemies.length) {
if (arrEnemies[i].type != 11){
if (arrEnemies[i].blnShield == false){
if (arrEnemies[i].GetDistance(xLoc, yLoc) < radius){
if (arrEnemies[i].type == 4){
ProbeTrigger(arrEnemies[i]);
};
if (arrEnemies[i].TakeDamage(bulletDamage) == true){
if (arrEnemies[i].type == 5){
sEffects.FLASH();
} else {
if (arrEnemies[i].type == 6){
sEffects.FLASH();
} else {
if (arrEnemies[i].type == 11){
sEffects.FLASH();
};
};
};
arrEnemies[i].Dead();
if (arrEnemies[i].type == 9){
sEffects.FLASH();
arrEnemies[i][("hat" + "ch")].gotoAndStop("off");
};
if (arrEnemies[i].type == 7){
arrEnemies[i][("t" + "Animation")].gotoAndStop(1);
};
arrRemoveQueue.push(arrEnemies[i]);
} else {
effect.CreateEffect(new Explode2(), arrEnemies[i].x, arrEnemies[i].y);
};
};
};
} else {
if (arrEnemies[i].AmIAlive() == false){
e = 0;
while (e < 3) {
WPPoint = new Point(arrEnemies[i][(("w" + "eak") + (e + 1))].x, arrEnemies[i][(("w" + "eak") + (e + 1))].y);
WPPoint = arrEnemies[i].localToGlobal(WPPoint);
if (GetObjDistance(WPPoint, xLoc, yLoc) < radius){
if (arrEnemies[i].TakeDamage(bulletDamage) == true){
arrEnemies[i].Dead();
arrEnemies[i].gotoAndStop("dead");
arrEnemies.splice(i, 1);
break;
} else {
effect.CreateEffect(new Explode2(), WPPoint.x, WPPoint.y);
};
};
e = (e + 1);
};
};
};
i = (i + 1);
};
} catch(e:Error) {
};
try {
j = 0;
while (j < arrBullets.length) {
if (arrBullets[j].GetDistance(xLoc, yLoc) < radius){
if (arrBullets[j].name != "main_bullet"){
arrRemoveQueue2.push(arrBullets[j]);
};
};
j = (j + 1);
};
o = 0;
while (o < arrPower.length) {
if (DistanceBetween(arrPower[o].mc.x, arrPower[o].mc.y, xLoc, yLoc) < radius){
arrRemoveQueue3.push(arrPower[o].mc);
ActivatePower(arrPower[o].type);
};
o = (o + 1);
};
randy = RandNum(1, 3);
if (randy == 1){
sPlayer.PlaySound(new radius_destroy(), 0.3);
} else {
if (randy == 2){
sPlayer.PlaySound(new radius_explode_2(), 0.6);
} else {
if (randy == 3){
sPlayer.PlaySound(new radius_explode_3(), 0.6);
};
};
};
if (startCount > 2){
if (blnStartShakeStop == false){
if (blnLeaveUpgrade == false){
if (blnLeaveRetry == false){
sEffects.SHAKE(10);
};
};
};
};
blnLeaveRetry = false;
boomRef = effect.CreateEffect(new BigBoom(), xLoc, yLoc);
boomRef.width = (boomRef.height = (radius + (radius / 2)));
} catch(e:Error) {
};
try {
p = 0;
while (p < arrRemoveQueue.length) {
randE = RandNum(1, 6);
if (randE == 1){
effect.CreateEffect(new Explode1(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 2){
effect.CreateEffect(new Explode2(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 3){
effect.CreateEffect(new Explode3(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 4){
effect.CreateEffect(new Explode4(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 5){
effect.CreateEffect(new Explode5(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 6){
randE = RandNum(1, 2);
if (randE == 1){
effect.CreateEffect(new Explode6(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
} else {
if (randE == 2){
effect.CreateEffect(new Explode2(), arrRemoveQueue[p].x, arrRemoveQueue[p].y);
};
};
};
};
};
};
};
};
if (arrRemoveQueue[p].type == 9){
MotherShipChildren(arrRemoveQueue[p]);
sPlayer.PlaySound(new tanker_explosion(), 0.4);
if (startCount > 2){
sEffects.SHAKE(20);
};
};
if (arrRemoveQueue[p].type == 11){
if (startCount > 2){
sEffects.SHAKE(20);
};
};
TallyUpdate(arrRemoveQueue[p].cReward, "cash");
TallyUpdate(arrRemoveQueue[p].pReward, "score");
if (mcTanker != arrRemoveQueue[p]){
DeleteEnemy(arrRemoveQueue[p]);
};
p = (p + 1);
};
} catch(e:Error) {
};
try {
k = 0;
while (k < arrRemoveQueue2.length) {
effect.CreateEffect(new Explode2(), arrRemoveQueue2[k].x, arrRemoveQueue2[k].y);
TallyUpdate(arrRemoveQueue2[k].cReward, "cash");
TallyUpdate(arrRemoveQueue2[k].pReward, "score");
DeleteBullet(arrRemoveQueue2[k]);
k = (k + 1);
};
q = 0;
while (q < arrRemoveQueue3.length) {
randP = RandNum(1, 5);
if (randP == 1){
effect.CreateEffect(new Explode1(), arrRemoveQueue3[q].x, arrRemoveQueue3[q].y);
} else {
if (randP == 2){
effect.CreateEffect(new Explode2(), arrRemoveQueue3[q].x, arrRemoveQueue3[q].y);
} else {
if (randP == 3){
effect.CreateEffect(new Explode3(), arrRemoveQueue3[q].x, arrRemoveQueue3[q].y);
} else {
if (randP == 4){
effect.CreateEffect(new Explode4(), arrRemoveQueue3[q].x, arrRemoveQueue3[q].y);
} else {
if (randP == 5){
effect.CreateEffect(new Explode5(), arrRemoveQueue3[q].x, arrRemoveQueue3[q].y);
};
};
};
};
};
DeletePowerUp(arrRemoveQueue3[q]);
q = (q + 1);
};
} catch(e:Error) {
};
}
private function RemoveShield():void{
if (shieldMC != null){
removeChild(shieldMC);
shieldMC = null;
};
}
private function contOut(_arg1:Event):void{
upgrade[("continue" + "_game")].gotoAndStop("off");
upgrade[("continue" + "_game")].buttonMode = (this.useHandCursor = false);
}
private function ResetEnemyTargets():void{
var _local1:Number = 0;
while (_local1 < arrEnemies.length) {
arrEnemies[_local1].myMode = arrEnemies[_local1].ReturnPreviousState();
arrEnemies[_local1].SetTarget(MovieClip(root).base);
_local1++;
};
}
private function fail_pmg_up(_arg1:Event):void{
URL_OPEN(1);
}
public function ShootEnemyBullet(_arg1:MovieClip, _arg2:Boolean=false):void{
var emitterRef:Point;
var gunRef:Point;
var targObj:Object;
var en = _arg1;
var blnTwo = _arg2;
try {
emitterRef = new Point(en.emitter.x, en.emitter.y);
emitterRef = en.localToGlobal(emitterRef);
if (en.type == 2){
bullet = new E2Bullet();
} else {
if (en.type == 3){
bullet = new E3Bullet();
} else {
if (en.type == 5){
bullet = new E4Bullet();
} else {
if (en.type == 6){
bullet = new E4Bullet();
} else {
if (en.type == 7){
bullet = new E5Bullet();
} else {
if (en.type == 9){
bullet = new E5Bullet();
} else {
if (en.type == 11){
bullet = new E5Bullet();
};
};
};
};
};
};
};
bullet.x = emitterRef.x;
bullet.y = emitterRef.y;
bullet.rotation = en.rotation;
bullet.name = ("bullet_" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(bullet);
arrBullets.push(bullet);
gunRef = new Point(MovieClip(root).base.gun1.x, MovieClip(root).base.gun1.y);
gunRef = MovieClip(root).base.localToGlobal(gunRef);
targObj = {x:gunRef.x, y:gunRef.y};
bullet.SetTarget(targObj);
bullet.Setup();
bullet.Start();
if (blnTwo == true){
emitterRef = new Point(en.emitter2.x, en.emitter2.y);
emitterRef = en.localToGlobal(emitterRef);
if (en.type == 2){
bullet = new E2Bullet();
} else {
if (en.type == 3){
bullet = new E3Bullet();
} else {
if (en.type == 5){
bullet = new E4Bullet();
} else {
if (en.type == 6){
bullet = new E4Bullet();
} else {
if (en.type == 7){
bullet = new E5Bullet();
} else {
if (en.type == 9){
bullet = new E5Bullet();
} else {
if (en.type == 11){
bullet = new E5Bullet();
};
};
};
};
};
};
};
bullet.x = emitterRef.x;
bullet.y = emitterRef.y;
bullet.rotation = en.rotation;
bullet.name = ("bullet_" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(bullet);
arrBullets.push(bullet);
targObj = {x:gunRef.x, y:gunRef.y};
bullet.SetTarget(targObj);
bullet.Setup();
bullet.Start();
};
} catch(e:Error) {
};
}
private function TallyUpdate(_arg1:Number, _arg2:String):void{
if (_arg2 == "cash"){
CASH = (CASH + _arg1);
} else {
if (_arg2 == "score"){
SCORE = (SCORE + _arg1);
};
};
TallyText();
}
public function SoundMode(_arg1:Boolean):void{
sPlayer.soundOn = (SOUND = _arg1);
}
public function URL_OPEN(_arg1:Number):void{
if (_arg1 == 1){
web.GetURL("http://www.armorgames.com/", "_blank");
} else {
if (_arg1 == 2){
web.GetURL("http://www.herointeractive.com/", "_blank");
} else {
if (_arg1 == 3){
web.GetURL("http://www.herointeractive.com/blog/", "_blank");
} else {
if (_arg1 == 4){
web.GetURL("http://www.herointeractive.com/rp/", "_blank");
};
};
};
};
}
private function q5Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_5")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
private function tp_up(_arg1:Event):void{
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, tp_over);
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, tp_out);
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, tp_up);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, b_over);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, b_out);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, b_up);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, n_over);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, n_out);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, n_up);
ToGame();
}
public function BaseBulletHit(_arg1:MovieClip, _arg2:Number):void{
effect.CreateEffect(new Explode2(), _arg1.x, _arg1.y);
if (_arg2 < 20){
bars.AddOrSubtract(_arg1.damage, "health");
};
}
private function q6Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_6")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
public function ToGame():void{
if (blnTutorialTested == false){
ChangeState(4);
} else {
mPlayer.PlayMusic(new GameMusic(), 0.8);
if (tutRef != null){
removeChild(tutRef);
};
tutRef = null;
if (gData.blnWINNER == true){
if (LEVEL == 1){
CASH = 100000;
blnViewingUpgradesScreen = true;
CreateUpgradeMenu();
UpdateUpgradeText();
} else {
ToGameAfterPreScreen();
};
} else {
if ((((((GAMEMODE == 2)) && ((blnFirstOut == true)))) || ((blnSurvive == true)))){
if (blnViewingUpgradesScreen == true){
ToGameAfterPreScreen();
} else {
blnViewingUpgradesScreen = true;
blnFirstOut = false;
CASH = gData.survivalStartCash;
CreateUpgradeMenu();
UpdateUpgradeText();
};
} else {
ToGameAfterPreScreen();
};
};
};
}
public function RetrieveBDis():Number{
return (bDistance);
}
public function GiveMeMultiplier():Number{
return (gData.HEALTHMULTIPLIER);
}
public function GetDistance(_arg1:MovieClip, _arg2:Number, _arg3:Number):Number{
var _local4:Number = (_arg1.x - (_arg2 + base.x));
var _local5:Number = (_arg1.y - (_arg3 + base.y));
return (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))));
}
private function PauseDelay():void{
if (pTimer >= 0){
pTimer--;
};
}
private function q1Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_1")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
public function MusicMode(_arg1:Boolean):void{
mPlayer.musicOn = (MUSIC = _arg1);
}
private function PowerUpsOn():void{
if (blnPower1 == true){
p1Count--;
if (p1Count < 0){
ResetEnemyTargets();
p1Count = -1;
blnPower1 = false;
DestroyPUN();
};
};
if (blnPower2 == true){
bars.PoweredUp();
p2Count--;
if (p2Count < 0){
bars.ChangeBaseRule(originalBaseRule);
p2Count = -1;
blnPower2 = false;
bars.powerBar.gotoAndStop("off");
DestroyPUN();
};
};
if (blnPower3 == true){
p3Count--;
if (p3Count < 0){
RemoveShield();
bDistance = 10;
eDistance = 25;
p3Count = -1;
blnPower3 = false;
DestroyPUN();
};
};
}
private function q4Over(_arg1:Event):void{
numUShow = 4;
blnUShow = true;
upgrade[("q" + "_4")].buttonMode = (this.useHandCursor = true);
}
private function CreateLockedScreen():void{
locker = new LockedScreen();
locker.x = 0;
locker.y = 0;
locker.name = "locker";
addChild(locker);
}
public function GetBaseRuleStart():Number{
return (gData.ReturnCurrentBaseRule());
}
private function contUp(_arg1:Event):void{
blnLeaveUpgrade = true;
CleanEverything();
if ((((gData.blnWINNER == true)) && ((LEVEL == 1)))){
ToGameAfterPreScreen();
} else {
ContinueToGame();
};
}
private function CreateWaveNotice():void{
waveNotify = new WaveText();
waveNotify.x = int(((stage.stageWidth - waveNotify.width) - 12));
waveNotify.y = int(((stage.stageHeight - waveNotify.height) - 12));
waveNotify.name = "waveNotify";
addChild(waveNotify);
}
private function fail_pmg_out(_arg1:Event):void{
fail.fail_pmg.buttonMode = (this.useHandCursor = false);
fail.fail_pmg.gotoAndStop("off");
}
public function GetSound():Boolean{
return (SOUND);
}
public function ReturnAllowedAutoTurrets():Number{
if (gData.BS == 1){
return (2);
};
if (gData.BS == 2){
return (3);
};
if (gData.BS == 3){
return (4);
};
return (0);
}
public function DestroyTimer():void{
if (dCount > 0){
dCount--;
} else {
if (dCount == 0){
CleanEverything();
blnScreenShown = false;
CreateLoseScreen();
dCount = -1;
};
};
}
public function ShootAutoTurretBullet(_arg1:MovieClip, _arg2:MovieClip):void{
sPlayer.PlaySound(new auto_turret_shoot(), 0.3);
var _local3:Point = new Point(_arg1.emitter.x, _arg1.emitter.y);
_local3 = _arg1.localToGlobal(_local3);
var _local4:MovieClip = new ATBullet();
_local4.x = _local3.x;
_local4.y = _local3.y;
_local4.rotation = _arg1.rotation;
_local4.name = ("autoBullet_" + _arg1.name);
addChild(_local4);
arrABullets.push(_local4);
var _local5:Object = {x:_arg2.x, y:_arg2.y};
_local4.SetTarget(_local5);
_local4.Start();
}
private function pmg_pause_out(_arg1:Event):void{
pauseMC.pmg_button.buttonMode = (this.useHandCursor = false);
pauseMC.pmg_button.gotoAndStop("off");
}
private function b_up(_arg1:Event):void{
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, tp_over);
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, tp_out);
tutorial[("play_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, tp_up);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, b_over);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, b_out);
tutorial[("back_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, b_up);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OVER, n_over);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_OUT, n_out);
tutorial[("next_" + "btn")].removeEventListener(MouseEvent.MOUSE_UP, n_up);
CleanEverything();
BackToMenu();
}
public function PreCreateShield(_arg1:MovieClip):void{
_arg1.CreateShield();
}
private function UUpMe2(_arg1:Event):void{
UpgradeClick(2);
}
private function UUpMe3(_arg1:Event):void{
UpgradeClick(3);
}
private function UUpMe4(_arg1:Event):void{
UpgradeClick(4);
}
private function q2Out(_arg1:Event):void{
blnUShow = false;
upgrade[("q" + "_2")].buttonMode = (this.useHandCursor = false);
upgrade.description_text.text = "";
upgrade[("continue" + "_game")].alpha = 1;
upgrade.upgrade_pmg.alpha = 1;
}
private function CreateWinScreen():void{
winMC = new WinScreen();
winMC.x = 0;
winMC.y = 0;
winMC.name = "winMC";
addChild(winMC);
}
private function UUpMe5(_arg1:Event):void{
UpgradeClick(5);
}
private function UUpMe6(_arg1:Event):void{
UpgradeClick(6);
}
private function ActivatePower(_arg1:Number):void{
if (_arg1 == 1){
p1Count = 100;
blnPower1 = true;
CreatePUNotify(3);
} else {
if (_arg1 == 2){
bars.ChangeBaseRule(400);
p2Count = 200;
blnPower2 = true;
bars.powerBar.gotoAndStop("on");
CreatePUNotify(2);
} else {
if (_arg1 == 3){
ActivateShield();
bDistance = (eDistance = 111);
p3Count = 200;
blnPower3 = true;
CreatePUNotify(1);
};
};
};
}
public function GreenMile():void{
base.basebase.gotoAndStop("dead");
gState = 6;
DestroyAfterLose();
}
private function KillAllFAILs():void{
var _local1:Number = 0;
while (_local1 < arrFail.length) {
removeChild(arrFail[_local1]);
arrFail.splice(_local1, 1);
_local1--;
_local1++;
};
}
private function CleanEverything():void{
startCount = 0;
blnFAIL_time = false;
RemoveShield();
KillAllFAILs();
arrDrags.length = 0;
arrBullets.length = 0;
arrEnemies.length = 0;
tankerRetest.length = 0;
arrPower.length = 0;
arrABullets.length = 0;
arrFail.length = 0;
arrDrags = new Array();
arrBullets = new Array();
arrEnemies = new Array();
tankerRetest = new Array();
arrPower = new Array();
arrABullets = new Array();
arrFail = new Array();
while (MovieClip(root).numChildren) {
MovieClip(root).removeChildAt(0);
};
}
private function CreatePowerUp(_arg1:Number, _arg2:Number):void{
var _local3:Number = RandNum(1, 3);
if (_local3 == 1){
power = new PowerUp1();
} else {
if (_local3 == 2){
power = new PowerUp2();
} else {
if (_local3 == 3){
power = new PowerUp3();
};
};
};
power.x = _arg1;
power.y = _arg2;
power.name = ("power" + Indexer);
addChild(power);
arrPower.push({mc:power, type:_local3});
}
public function UpdateWaveText(_arg1:Number):void{
WAVE = _arg1;
if (GAMEMODE == 2){
waveNotify.wTXT.text = _arg1;
};
}
private function AttachCluster(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number=1):void{
var _local8:LineVector;
var _local9:MovieClip;
var _local5:Number = 0;
var _local6:Number = 0;
var _local7:Number = 0;
while (_local7 < _arg2) {
_local8 = new LineVector();
if (_arg4 == 1){
_local8.VecToAngle(RandNum(0, 360), RandNum(10, _arg3));
_local5 = (_arg1.x + _local8.x);
_local6 = (_arg1.y + _local8.y);
} else {
if (_arg4 == 2){
if (_arg1.y < stage.stageHeight){
_local5 = _arg1.x;
_local6 = RandNum((_arg1.y - _arg3), (_arg1.y + _arg3));
} else {
_local5 = RandNum((_arg1.x - _arg3), (_arg1.x + _arg3));
_local6 = _arg1.y;
};
};
};
_local9 = AttachEnemy(_arg1.type, _local5, _local6);
if (_arg1.type == 4){
if (_arg1.probeDirection == 1){
_local8.x = ((stage.stageWidth + 50) - _local9.x);
_local8.y = (RandNum(50, stage.stageHeight) - _local9.y);
_local9.rotation = _local8.GetAngle();
} else {
_local8.x = (-50 - _local9.x);
_local8.y = (RandNum(50, stage.stageHeight) - _local9.y);
_local9.rotation = _local8.GetAngle();
};
} else {
_local8.x = ((base.x + (base.width / 2)) - _local9.x);
_local8.y = ((base.y + (base.height / 2)) - _local9.y);
_local9.rotation = _local8.GetAngle();
};
_local9.name = ("enemy" + Indexer);
Indexer++;
if (Indexer > 20000){
Indexer = 0;
};
addChild(_local9);
arrEnemies.push(_local9);
if (_local9.type != 4){
_local9.SetTarget(MovieClip(root).base);
};
_local9.SetRefs(this);
_local9.Setup();
_local9.Start();
_local7++;
};
}
private function Pause():void{
gState = 8;
CreatePauseNotify();
}
private function ShootInvisibleTankerFixBullet(_arg1:Object, _arg2:Number):void{
bullet = new MBullet();
bullet.x = _arg1.x;
bullet.y = _arg1.y;
bullet.alpha = 0;
bullet.name = "main_bullet_tanker";
addChild(bullet);
arrBullets.push(bullet);
bullet.SetTarget(_arg1);
bullet.SetRadius(_arg2);
bullet.Setup();
bullet.Start();
}
private function q3Over(_arg1:Event):void{
numUShow = 3;
blnUShow = true;
upgrade[("q" + "_3")].buttonMode = (this.useHandCursor = true);
}
public function RemoveFail(_arg1:MovieClip):void{
var _local2:Number = 0;
while (_local2 < arrFail.length) {
if (arrFail[_local2] == _arg1){
removeChild(_arg1);
arrFail.splice(_local2, 1);
break;
};
_local2++;
};
}
public function RemoveAd():void{
try {
removeChild(adBox);
} catch(e:Error) {
};
}
private function b_out(_arg1:Event):void{
tutorial[("back_" + "btn")].buttonMode = (this.useHandCursor = false);
tutorial[("back_" + "btn")].gotoAndStop("off");
}
public function CreateMainMenu():void{
blnFirstOut = false;
gData.DeathAdjustReset();
mPlayer.PlayMusic(new TitleMusic());
menu = new M_Menu();
menu.x = 49;
menu.y = 188;
menu.name = "menu";
addChild(menu);
menu.Setup(stage);
ChangeState(3);
}
public function FinishWinScreen():void{
removeChild(winMC);
BackToMenu();
}
private function n_out(_arg1:Event):void{
tutorial[("next_" + "btn")].buttonMode = (this.useHandCursor = false);
tutorial[("next_" + "btn")].gotoAndStop("off");
}
}
}//package
Section 114
//MainMenu (MainMenu)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class MainMenu extends MovieClip {
public var survival_mode:MovieClip;
public var main_menu_1:SimpleButton;
public var main_menu_2:SimpleButton;
public var main_menu_3:SimpleButton;
public var settings:MovieClip;
public var pmg_btn:PMGBTN;
public var description_txt:TextField;
public var settings_btn:SettingsBTN;
public var credits_btn:CreditsBTN;
public var play_btn:PlayBTN;
public var title:MovieClip;
public var free:MovieClip;
public var main_menu_M:SimpleButton;
public var normal_mode:MovieClip;
public function MainMenu():void{
}
public function PlayFinish():void{
Main(root).ContinueToGame();
Main(root).StartTallyOver();
DeleteMainMenu();
}
private function SettingsOut(_arg1:Event):void{
this.settings_btn.buttonMode = (this.useHandCursor = false);
this.settings_btn.gotoAndStop("off");
}
private function mOffUp(_arg1:Event):void{
Main(root).MusicMode(false);
SetSelectors();
}
private function Menu2Up(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("settingsOut");
}
private function nmOut(_arg1:Event):void{
this.description_txt.text = "";
this.normal_mode.buttonMode = (this.useHandCursor = false);
this.normal_mode.gotoAndStop("off");
}
private function MediumUp(_arg1:Event):void{
stage.quality = StageQuality.MEDIUM;
SetSelectors();
}
private function PMGOut(_arg1:Event):void{
this.pmg_btn.buttonMode = (this.useHandCursor = false);
this.pmg_btn.gotoAndStop("off");
}
private function smOut(_arg1:Event):void{
this.description_txt.text = "";
this.survival_mode.buttonMode = (this.useHandCursor = false);
this.survival_mode.gotoAndStop("off");
}
private function smUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
Main(root).SetGameMode(2);
Main(root).blnSurvive = true;
this.play();
}
private function PlayUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("playIt");
}
private function PMGUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
Main(root).URL_OPEN(1);
}
private function CreateFreeGamesBTN():void{
free = new FreeGames();
free.x = (this.x - 90);
free.y = (this.y + 99);
free.name = "free";
this.addChild(free);
free.addEventListener(MouseEvent.MOUSE_OVER, freeOver);
free.addEventListener(MouseEvent.MOUSE_OUT, freeOut);
free.addEventListener(MouseEvent.MOUSE_UP, freeUp);
}
private function CreditsUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("credits");
}
private function freeUp(_arg1:Event):void{
Main(root).web.GetURL("http://www.herointeractive.com/rp/", "_blank");
}
private function SettingsOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.settings_btn.buttonMode = (this.useHandCursor = true);
this.settings_btn.gotoAndStop("on");
}
private function nmUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
Main(root).SetGameMode(1);
this.play();
}
public function DeleteMainMenu():void{
free.removeEventListener(MouseEvent.MOUSE_OVER, freeOver);
free.removeEventListener(MouseEvent.MOUSE_OUT, freeOut);
free.removeEventListener(MouseEvent.MOUSE_UP, freeUp);
MovieClip(root).removeChild(this);
}
private function SettingsUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("settings");
}
private function freeOut(_arg1:Event):void{
this.free.buttonMode = (this.useHandCursor = false);
free.gotoAndStop("off");
}
private function PlayOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.play_btn.buttonMode = (this.useHandCursor = true);
this.play_btn.gotoAndStop("on");
}
private function nmOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.description_txt.text = "10 levels with upgrade options in between!";
this.normal_mode.buttonMode = (this.useHandCursor = true);
this.normal_mode.gotoAndStop("on");
}
private function Menu1Up(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("creditsOut");
}
public function SetSelectors():void{
if (stage.quality == "HIGH"){
this.settings.g1.x = 63.5;
} else {
if (stage.quality == "MEDIUM"){
this.settings.g1.x = 121;
} else {
if (stage.quality == "LOW"){
this.settings.g1.x = 177.9;
};
};
};
if (Main(root).GetSound() == true){
this.settings.s1.x = 63.5;
} else {
this.settings.s1.x = 121;
};
if (Main(root).GetMusic() == true){
this.settings.m1.x = 63.5;
} else {
this.settings.m1.x = 121;
};
}
private function smOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.description_txt.text = "Stay alive as long as you can!";
this.survival_mode.buttonMode = (this.useHandCursor = true);
this.survival_mode.gotoAndStop("on");
}
private function Menu3Up(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("playBACK");
}
private function sOffUp(_arg1:Event):void{
Main(root).SoundMode(false);
SetSelectors();
}
public function Setup(_arg1:Stage):void{
this.play_btn.addEventListener(MouseEvent.MOUSE_OVER, PlayOver);
this.play_btn.addEventListener(MouseEvent.MOUSE_OUT, PlayOut);
this.play_btn.addEventListener(MouseEvent.MOUSE_UP, PlayUp);
this.settings_btn.addEventListener(MouseEvent.MOUSE_OVER, SettingsOver);
this.settings_btn.addEventListener(MouseEvent.MOUSE_OUT, SettingsOut);
this.settings_btn.addEventListener(MouseEvent.MOUSE_UP, SettingsUp);
this.credits_btn.addEventListener(MouseEvent.MOUSE_OVER, CreditsOver);
this.credits_btn.addEventListener(MouseEvent.MOUSE_OUT, CreditsOut);
this.credits_btn.addEventListener(MouseEvent.MOUSE_UP, CreditsUp);
this.pmg_btn.addEventListener(MouseEvent.MOUSE_OVER, PMGOver);
this.pmg_btn.addEventListener(MouseEvent.MOUSE_OUT, PMGOut);
this.pmg_btn.addEventListener(MouseEvent.MOUSE_UP, PMGUp);
this.main_menu_1.addEventListener(MouseEvent.MOUSE_UP, Menu1Up);
this.main_menu_2.addEventListener(MouseEvent.MOUSE_UP, Menu2Up);
this.main_menu_3.addEventListener(MouseEvent.MOUSE_UP, Menu3Up);
this.main_menu_M.addEventListener(MouseEvent.MOUSE_UP, MenuMUp);
this.settings.high.addEventListener(MouseEvent.MOUSE_UP, HighUp);
this.settings.medium.addEventListener(MouseEvent.MOUSE_UP, MediumUp);
this.settings.low.addEventListener(MouseEvent.MOUSE_UP, LowUp);
this.settings.on_music.addEventListener(MouseEvent.MOUSE_UP, mOnUp);
this.settings.off_music.addEventListener(MouseEvent.MOUSE_UP, mOffUp);
this.settings.on_sounds.addEventListener(MouseEvent.MOUSE_UP, sOnUp);
this.settings.off_sounds.addEventListener(MouseEvent.MOUSE_UP, sOffUp);
this.normal_mode.addEventListener(MouseEvent.MOUSE_OVER, nmOver);
this.normal_mode.addEventListener(MouseEvent.MOUSE_OUT, nmOut);
this.normal_mode.addEventListener(MouseEvent.MOUSE_UP, nmUp);
this.survival_mode.addEventListener(MouseEvent.MOUSE_OVER, smOver);
this.survival_mode.addEventListener(MouseEvent.MOUSE_OUT, smOut);
this.survival_mode.addEventListener(MouseEvent.MOUSE_UP, smUp);
CreateFreeGamesBTN();
}
private function PMGOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.pmg_btn.buttonMode = (this.useHandCursor = true);
this.pmg_btn.gotoAndStop("on");
}
private function freeOver(_arg1:Event):void{
this.free.buttonMode = (this.useHandCursor = true);
free.gotoAndStop("on");
}
private function PlayOut(_arg1:Event):void{
this.play_btn.buttonMode = (this.useHandCursor = false);
this.play_btn.gotoAndStop("off");
}
private function mOnUp(_arg1:Event):void{
Main(root).MusicMode(true);
SetSelectors();
}
private function MenuMUp(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_up(), 0.6);
this.gotoAndPlay("modeBack");
}
private function sOnUp(_arg1:Event):void{
Main(root).SoundMode(true);
SetSelectors();
}
private function LowUp(_arg1:Event):void{
stage.quality = StageQuality.LOW;
SetSelectors();
}
private function CreditsOut(_arg1:Event):void{
this.credits_btn.buttonMode = (this.useHandCursor = false);
this.credits_btn.gotoAndStop("off");
}
private function CreditsOver(_arg1:Event):void{
Main(root).sPlayer.PlaySound(new button_over());
this.credits_btn.buttonMode = (this.useHandCursor = true);
this.credits_btn.gotoAndStop("on");
}
private function HighUp(_arg1:Event):void{
stage.quality = StageQuality.HIGH;
SetSelectors();
}
}
}//package
Section 115
//MBullet (MBullet)
package {
public dynamic class MBullet extends Bullet1 {
}
}//package
Section 116
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var self:MochiBot;
var server:String;
var lv:URLVariables;
var url:String;
var req:URLRequest;
var loader:Loader;
var parent = _arg1;
var tag = _arg2;
try {
if (Security.sandboxType == "localWithFile"){
return (null);
};
self = new (MochiBot);
parent.addChild(self);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
server = "http://core.mochibot.com/my/core.swf";
lv = new URLVariables();
lv["sb"] = Security.sandboxType;
lv["v"] = Capabilities.version;
lv["swfid"] = tag;
lv["mv"] = "8";
lv["fv"] = "9";
url = self.root.loaderInfo.loaderURL;
if (url.indexOf("http") == 0){
lv["url"] = url;
} else {
lv["url"] = "local";
};
req = new URLRequest(server);
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader = new Loader();
self.addChild(loader);
loader.load(req);
} catch(e:Error) {
};
return (self);
}
}
}//package
Section 117
//MusicPlayer (MusicPlayer)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class MusicPlayer {
private var numMasterVolume:Number;
private var strDefaultTransition:String;
private var blnMusicOn:Boolean;
private var intTransitionCounterCurrent:int;
var chnMusicChannel0:SoundChannel;
var chnMusicChannel1:SoundChannel;
var arrChannelData:Array;
private var intMode:int;
private var intTransitionCounterTotal:int;
private var intDefaultTransitionTime:int;
public function MusicPlayer(_arg1:Stage){
blnMusicOn = true;
numMasterVolume = 1;
strDefaultTransition = "FadeOutFadeIn";
intDefaultTransitionTime = 120;
_arg1.addEventListener(Event.ENTER_FRAME, Run);
arrChannelData = new Array();
arrChannelData.push({sndMusic:null, dblVolume:1, blnLoop:true, strTransitionEffect:"", intTransitionTime:2});
arrChannelData.push({sndMusic:null, dblVolume:1, blnLoop:true, strTransitionEffect:"", intTransitionTime:2});
}
public function Channel0Complete(_arg1:Event):void{
var _local2:SoundTransform;
if (arrChannelData[0].blnLoop == true){
_local2 = new SoundTransform();
chnMusicChannel0 = arrChannelData[0].sndMusic.play(0, 1);
_local2.volume = (numMasterVolume * arrChannelData[0].dblVolume);
chnMusicChannel0.soundTransform = _local2;
chnMusicChannel0.addEventListener(Event.SOUND_COMPLETE, Channel0Complete);
} else {
intMode = 0;
};
}
public function Channel1Complete(_arg1:Event):void{
var _local2:SoundTransform;
if (arrChannelData[1].blnLoop == true){
_local2 = new SoundTransform();
chnMusicChannel1 = arrChannelData[1].sndMusic.play(0, 1);
_local2.volume = (numMasterVolume * arrChannelData[1].dblVolume);
chnMusicChannel1.soundTransform = _local2;
chnMusicChannel1.addEventListener(Event.SOUND_COMPLETE, Channel1Complete);
} else {
intMode = 0;
};
}
public function set musicOn(_arg1:Boolean):void{
var _local2:* = blnMusicOn;
blnMusicOn = _arg1;
if (_local2 == _arg1){
return;
};
if (blnMusicOn == true){
RestartMusic();
} else {
HaltMusic();
};
}
private function HaltMusic():void{
switch (intMode){
case 0:
break;
case 1:
case 2:
chnMusicChannel0.stop();
break;
case 3:
chnMusicChannel0.stop();
arrChannelData[0].sndMusic = null;
break;
case 4:
try {
chnMusicChannel0.stop();
} catch(e:Error) {
};
try {
chnMusicChannel1.stop();
} catch(e:Error) {
};
arrChannelData[0].sndMusic = arrChannelData[1].sndMusic;
arrChannelData[0].dblVolume = arrChannelData[1].dblVolume;
arrChannelData[0].blnLoop = arrChannelData[1].blnLoop;
arrChannelData[0].strTransitionEffect = arrChannelData[1].strTransitionEffect;
arrChannelData[0].intTransitionTime = arrChannelData[1].intTransitionTime;
break;
case 5:
case 6:
chnMusicChannel1.stop();
arrChannelData[0].sndMusic = arrChannelData[1].sndMusic;
arrChannelData[0].dblVolume = arrChannelData[1].dblVolume;
arrChannelData[0].blnLoop = arrChannelData[1].blnLoop;
arrChannelData[0].strTransitionEffect = arrChannelData[1].strTransitionEffect;
arrChannelData[0].intTransitionTime = arrChannelData[1].intTransitionTime;
break;
case 7:
chnMusicChannel1.stop();
arrChannelData[0].sndMusic = null;
break;
case 8:
try {
chnMusicChannel0.stop();
} catch(e:Error) {
};
try {
chnMusicChannel1.stop();
} catch(e:Error) {
};
break;
};
}
private function FadeOut(_arg1:int, _arg2:Boolean=false):void{
var _local3:Number = (numMasterVolume * arrChannelData[_arg1].dblVolume);
if (intTransitionCounterTotal == 0){
if (_arg1 == 0){
chnMusicChannel0.stop();
} else {
chnMusicChannel1.stop();
};
intMode = 0;
return;
};
intTransitionCounterCurrent++;
var _local4:int = intTransitionCounterTotal;
if (_arg2 == true){
_local4 = Math.round((intTransitionCounterTotal / 2));
};
var _local5:Number = (intTransitionCounterCurrent / intTransitionCounterTotal);
if (_local5 > 1){
_local5 = 1;
};
var _local6:Number = (_local3 * (1 - _local5));
var _local7:SoundTransform = new SoundTransform();
_local7.volume = _local6;
if (_arg1 == 0){
chnMusicChannel0.soundTransform = _local7;
} else {
chnMusicChannel1.soundTransform = _local7;
};
_local7 = new SoundTransform();
if (_local5 == 1){
if (_arg1 == 0){
if (_arg2 == true){
intTransitionCounterTotal = Math.round((intTransitionCounterTotal / 2));
intTransitionCounterCurrent = 0;
intMode = 5;
chnMusicChannel0.stop();
chnMusicChannel1 = arrChannelData[1].sndMusic.play(0, 1);
_local7.volume = 0;
chnMusicChannel1.soundTransform = _local7;
chnMusicChannel1.addEventListener(Event.SOUND_COMPLETE, Channel1Complete);
} else {
chnMusicChannel0.stop();
intMode = 0;
};
} else {
if (_arg1 == 1){
if (_arg2 == true){
intTransitionCounterTotal = Math.round((intTransitionCounterTotal / 2));
intTransitionCounterCurrent = 0;
intMode = 1;
chnMusicChannel1.stop();
chnMusicChannel0 = arrChannelData[0].sndMusic.play(0, 1);
_local7.volume = 0;
chnMusicChannel0.soundTransform = _local7;
chnMusicChannel0.addEventListener(Event.SOUND_COMPLETE, Channel0Complete);
} else {
chnMusicChannel1.stop();
intMode = 0;
};
};
};
};
}
public function Run(_arg1:Event):void{
if (blnMusicOn == false){
return;
};
switch (intMode){
case 1:
if ((arrChannelData[0].strTransitionEffect == "FadeOutFadeIn")){
FadeIn(0);
};
break;
case 4:
if ((arrChannelData[1].strTransitionEffect == "FadeOutFadeIn")){
FadeOut(0, true);
};
break;
case 5:
if ((arrChannelData[1].strTransitionEffect == "FadeOutFadeIn")){
FadeIn(1);
};
break;
case 8:
if ((arrChannelData[0].strTransitionEffect == "FadeOutFadeIn")){
FadeOut(1, true);
};
break;
};
}
private function FadeIn(_arg1:int):void{
var _local2:Number = (numMasterVolume * arrChannelData[_arg1].dblVolume);
if (intTransitionCounterTotal == 0){
if (_arg1 == 0){
intMode = 2;
} else {
intMode = 6;
};
return;
};
intTransitionCounterCurrent++;
var _local3:Number = (intTransitionCounterCurrent / intTransitionCounterTotal);
if (_local3 > 1){
_local3 = 1;
};
var _local4:Number = (_local2 * _local3);
if (_local3 == 1){
if (_arg1 == 0){
intMode = 2;
} else {
intMode = 6;
};
};
var _local5:SoundTransform = new SoundTransform();
_local5.volume = _local4;
if (_arg1 == 0){
chnMusicChannel0.soundTransform = _local5;
} else {
chnMusicChannel1.soundTransform = _local5;
};
}
public function PlayMusic(_arg1:Sound, _arg2:Number=1, _arg3:Boolean=true, _arg4:String="%%%", _arg5:int=-1):void{
if (_arg2 < 0){
_arg2 = 0;
} else {
if (_arg2 > 1){
_arg2 = 1;
};
};
if (_arg4 == "%%%"){
_arg4 = strDefaultTransition;
};
if (_arg5 == -1){
_arg5 = intDefaultTransitionTime;
};
if (_arg5 < 0){
_arg5 = 0;
};
if (_arg5 == 0){
_arg4 = "None";
};
if (_arg4 != "FadeOutFadeIn"){
_arg4 = strDefaultTransition;
};
if (blnMusicOn == false){
arrChannelData[0].sndMusic = _arg1;
arrChannelData[0].dblVolume = _arg2;
arrChannelData[0].blnLoop = _arg3;
return;
};
var _local6:SoundTransform = new SoundTransform();
switch (intMode){
case 0:
chnMusicChannel0 = _arg1.play(0, 1);
_local6.volume = 0;
chnMusicChannel0.soundTransform = _local6;
chnMusicChannel0.addEventListener(Event.SOUND_COMPLETE, Channel0Complete);
intMode = 1;
arrChannelData[0].sndMusic = _arg1;
arrChannelData[0].dblVolume = _arg2;
arrChannelData[0].blnLoop = _arg3;
arrChannelData[0].strTransitionEffect = _arg4;
arrChannelData[0].intTransitionTime = _arg5;
intTransitionCounterTotal = _arg5;
intTransitionCounterCurrent = 0;
break;
case 2:
intMode = 4;
arrChannelData[1].sndMusic = _arg1;
arrChannelData[1].dblVolume = _arg2;
arrChannelData[1].blnLoop = _arg3;
arrChannelData[1].strTransitionEffect = _arg4;
arrChannelData[1].intTransitionTime = _arg5;
intTransitionCounterTotal = _arg5;
intTransitionCounterCurrent = 0;
break;
case 6:
intMode = 8;
arrChannelData[0].sndMusic = _arg1;
arrChannelData[0].dblVolume = _arg2;
arrChannelData[0].blnLoop = _arg3;
arrChannelData[0].strTransitionEffect = _arg4;
arrChannelData[0].intTransitionTime = _arg5;
intTransitionCounterTotal = _arg5;
intTransitionCounterCurrent = 0;
break;
};
}
private function RestartMusic():void{
if (arrChannelData[0].sndMusic == null){
return;
};
var _local1:SoundTransform = new SoundTransform();
chnMusicChannel0 = arrChannelData[0].sndMusic.play(0, 1);
_local1.volume = (numMasterVolume * arrChannelData[0].dblVolume);
chnMusicChannel0.soundTransform = _local1;
chnMusicChannel0.addEventListener(Event.SOUND_COMPLETE, Channel0Complete);
}
public function get musicOn():Boolean{
return (blnMusicOn);
}
}
}//package
Section 118
//PauseN (PauseN)
package {
import flash.display.*;
public dynamic class PauseN extends MovieClip {
public var pmg_button:MovieClip;
}
}//package
Section 119
//PlayBTN (PlayBTN)
package {
import flash.display.*;
public dynamic class PlayBTN extends MovieClip {
public function PlayBTN(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 120
//PMGBTN (PMGBTN)
package {
import flash.display.*;
public dynamic class PMGBTN extends MovieClip {
public function PMGBTN(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 121
//PowerUp1 (PowerUp1)
package {
import flash.display.*;
public dynamic class PowerUp1 extends MovieClip {
public function PowerUp1(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package
Section 122
//PowerUp2 (PowerUp2)
package {
import flash.display.*;
public dynamic class PowerUp2 extends MovieClip {
public function PowerUp2(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package
Section 123
//PowerUp3 (PowerUp3)
package {
import flash.display.*;
public dynamic class PowerUp3 extends MovieClip {
public function PowerUp3(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package
Section 124
//Preloader (Preloader)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Preloader extends MovieClip {
private var cTimer:Number;
public var preloader_txt:TextField;
private var refMain:Main;
private var cont_btn:MovieClip;
public var bar:MovieClip;
private var blnPreloaderFlag:Boolean;
public function Preloader():void{
cTimer = -1;
}
private function contUp(_arg1:Event):void{
if (refMain.SHOWADS == true){
refMain.RemoveAd();
};
refMain.removeChild(this.cont_btn);
refMain.Setup();
RemovePreloader();
}
public function PL_Listeners():void{
refMain.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PLProgress);
refMain.loaderInfo.addEventListener(Event.COMPLETE, PLComplete);
}
private function contOver(_arg1:Event):void{
this.cont_btn.buttonMode = (this.useHandCursor = true);
this.cont_btn.gotoAndStop("on");
}
public function PLProgress(_arg1:ProgressEvent):void{
if (blnPreloaderFlag == false){
refMain.gotoAndStop("load");
};
var _local2:Number = _arg1.target.bytesLoaded;
var _local3:Number = _arg1.target.bytesTotal;
var _local4:Number = Math.round(((_local2 / _local3) * 100));
this.preloader_txt.text = (_local4 + "%");
this.bar.gotoAndStop(_local4);
}
private function Run(_arg1:Event):void{
ContinueTimer();
}
private function ContinueTimer():void{
if (cTimer > 0){
cTimer--;
} else {
if (cTimer == 0){
CreateContinueButton();
cTimer = -1;
};
};
}
private function RemovePreloader():void{
refMain.removeEventListener(Event.ENTER_FRAME, Run);
refMain.removeChild(this);
}
private function contOut(_arg1:Event):void{
this.cont_btn.buttonMode = (this.useHandCursor = true);
this.cont_btn.gotoAndStop("off");
}
public function PLComplete(_arg1:Event):void{
this.preloader_txt.text = "100%";
this.bar.gotoAndStop(100);
cTimer = 55;
}
private function CreateContinueButton():void{
cont_btn = new ContBTN();
if (refMain.SHOWADS == false){
cont_btn.x = (((refMain.stage.stageWidth / 2) - cont_btn.width) + 58);
cont_btn.y = (((refMain.stage.stageHeight / 2) - cont_btn.height) + 50);
} else {
cont_btn.x = (((refMain.stage.stageWidth / 2) - cont_btn.width) + 60);
cont_btn.y = (((refMain.stage.stageHeight / 2) - cont_btn.height) + 100);
};
cont_btn.name = "cont_btn";
refMain.addChild(cont_btn);
cont_btn.addEventListener(MouseEvent.MOUSE_OVER, contOver);
cont_btn.addEventListener(MouseEvent.MOUSE_OUT, contOut);
cont_btn.addEventListener(MouseEvent.MOUSE_UP, contUp);
}
public function SetFlag():void{
blnPreloaderFlag = true;
}
public function SetMainRef(_arg1:Main):void{
refMain = _arg1;
refMain.addEventListener(Event.ENTER_FRAME, Run);
}
}
}//package
Section 125
//PreloaderMC (PreloaderMC)
package {
public dynamic class PreloaderMC extends Preloader {
}
}//package
Section 126
//PUNotice (PUNotice)
package {
import flash.display.*;
public dynamic class PUNotice extends MovieClip {
public function PUNotice(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 127
//radius_destroy (radius_destroy)
package {
import flash.media.*;
public dynamic class radius_destroy extends Sound {
}
}//package
Section 128
//radius_explode_2 (radius_explode_2)
package {
import flash.media.*;
public dynamic class radius_explode_2 extends Sound {
}
}//package
Section 129
//radius_explode_3 (radius_explode_3)
package {
import flash.media.*;
public dynamic class radius_explode_3 extends Sound {
}
}//package
Section 130
//RainFail (RainFail)
package {
public dynamic class RainFail extends FAIL {
}
}//package
Section 131
//ScoreMC (ScoreMC)
package {
import flash.display.*;
import flash.text.*;
public dynamic class ScoreMC extends MovieClip {
public var score_txt:TextField;
}
}//package
Section 132
//ScreenEffects (ScreenEffects)
package {
import flash.display.*;
import flash.events.*;
class ScreenEffects {
private var blnShakeMode:Boolean;
private var intShakeDuration:Number;
private var intShakeStart:Number;
private var arrScreenEffects:Array;
private var mainRef:Main;
private var vecScreenCoords:LineVector;
private var intShakeCounter:Number;
private var stageRef:Stage;
private var vecPreScreenCoords:LineVector;
public var sFlash:MovieClip;
function ScreenEffects(_arg1:Main, _arg2:Stage):void{
intShakeDuration = 0;
blnShakeMode = true;
mainRef = _arg1;
stageRef = _arg2;
mainRef.addEventListener(Event.ENTER_FRAME, Run);
arrScreenEffects = new Array();
intShakeDuration = 0;
intShakeCounter = 0;
intShakeStart = 0;
ShakeSetup();
}
private function RandNum(_arg1:Number, _arg2:Number):Number{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
public function Off():void{
blnShakeMode = false;
HaltShaking();
}
public function FLASH():void{
try {
sFlash = new ScreenFlash();
sFlash.x = ((mainRef.stage.stageWidth / 2) - (sFlash.width / 2));
sFlash.y = ((mainRef.stage.stageHeight / 2) - (sFlash.height / 2));
sFlash.name = "sFlash";
mainRef.addChild(sFlash);
arrScreenEffects.push(sFlash);
} catch(e:Error) {
};
}
public function DeleteMainRefEventListener():void{
mainRef.removeEventListener(Event.ENTER_FRAME, Run);
}
private function MoveWorld(_arg1:LineVector):void{
_arg1.x = Math.round(_arg1.x);
_arg1.y = Math.round(_arg1.y);
mainRef.x = (mainRef.x + _arg1.x);
mainRef.y = (mainRef.y + _arg1.y);
}
public function HaltShaking():void{
var _local1:Number;
var _local2:Number;
var _local3:LineVector;
if (((!((mainRef.x == vecPreScreenCoords.x))) || (!((mainRef.y == vecPreScreenCoords.y))))){
intShakeDuration = 0;
_local1 = (vecPreScreenCoords.x - mainRef.x);
_local2 = (vecPreScreenCoords.y - mainRef.y);
mainRef.x = vecPreScreenCoords.x;
mainRef.y = vecPreScreenCoords.y;
_local3 = new LineVector();
_local3.x = _local1;
_local3.y = _local2;
MoveWorld(vecPreScreenCoords);
};
}
public function SHAKE(_arg1:Number):void{
if (mainRef.startCount > 2){
if (mainRef.RetrieveGameState() == 5){
if (intShakeDuration == 0){
intShakeDuration = _arg1;
intShakeStart = _arg1;
intShakeCounter = 3;
vecPreScreenCoords.x = mainRef.x;
vecPreScreenCoords.y = mainRef.y;
};
};
};
}
private function Run(_arg1:Event):void{
if (blnShakeMode == true){
ManageShaking();
};
}
public function KillMe(_arg1:MovieClip):void{
var flashSucks:MovieClip;
var i:Number;
var effectName = _arg1;
try {
flashSucks = effectName;
i = 0;
while (i < arrScreenEffects.length) {
if (arrScreenEffects[i] == flashSucks){
mainRef.removeChild(flashSucks);
};
arrScreenEffects.splice(i, 1);
break;
i = (i + 1);
};
} catch(e:Error) {
};
}
public function ShakeSetup():void{
intShakeDuration = 0;
blnShakeMode = true;
arrScreenEffects = new Array();
vecScreenCoords = (vecPreScreenCoords = new LineVector());
vecScreenCoords.x = (vecPreScreenCoords.x = mainRef.x);
vecScreenCoords.y = (vecPreScreenCoords.y = mainRef.y);
HaltShaking();
}
private function ManageShaking():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:LineVector;
if (mainRef.RetrieveGameState() == 5){
if (intShakeDuration > 0){
intShakeDuration--;
if (intShakeDuration == 0){
HaltShaking();
} else {
intShakeCounter--;
if (intShakeCounter == 0){
intShakeCounter = 3;
_local1 = (intShakeDuration / intShakeStart);
_local2 = 2;
if (intShakeStart > 45){
_local2 = 4;
};
_local3 = (vecPreScreenCoords.x + (RandNum((-1 * _local2), _local2) * _local1));
_local4 = (vecPreScreenCoords.y + (RandNum((-1 * _local2), _local2) * _local1));
_local5 = (_local3 - mainRef.x);
_local6 = (_local4 - mainRef.y);
mainRef.x = _local3;
mainRef.y = _local4;
_local7 = new LineVector();
_local7.x = _local5;
_local7.y = _local6;
MoveWorld(_local7);
};
};
};
};
}
public function On():void{
blnShakeMode = true;
}
}
}//package
Section 133
//ScreenFlash (ScreenFlash)
package {
import flash.display.*;
public dynamic class ScreenFlash extends MovieClip {
public function ScreenFlash(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
Main(root).sEffects.KillMe(MovieClip(this));
}
}
}//package
Section 134
//SettingsBTN (SettingsBTN)
package {
import flash.display.*;
public dynamic class SettingsBTN extends MovieClip {
public function SettingsBTN(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 135
//Shield1 (Shield1)
package {
import flash.display.*;
public dynamic class Shield1 extends MovieClip {
}
}//package
Section 136
//SoundPlayer (SoundPlayer)
package {
import flash.events.*;
import flash.media.*;
public class SoundPlayer {
private var numMasterVolume:Number;
private var blnSoundOn:Boolean;
var arrChannelOriginalVolume:Array;
var chnSoundChannel1:SoundChannel;
var chnSoundChannel2:SoundChannel;
var chnSoundChannel3:SoundChannel;
var chnSoundChannel4:SoundChannel;
var chnSoundChannel5:SoundChannel;
var chnSoundChannel6:SoundChannel;
var chnSoundChannel7:SoundChannel;
var arrChannelInUse:Array;
public function SoundPlayer(){
blnSoundOn = true;
numMasterVolume = 1;
arrChannelInUse = new Array(false, false, false, false, false, false, false, false);
arrChannelOriginalVolume = new Array(1, 1, 1, 1, 1, 1, 1, 1);
}
public function StopAllSounds():void{
if (arrChannelInUse[1]){
chnSoundChannel1.stop();
};
if (arrChannelInUse[2]){
chnSoundChannel2.stop();
};
if (arrChannelInUse[3]){
chnSoundChannel3.stop();
};
if (arrChannelInUse[4]){
chnSoundChannel4.stop();
};
if (arrChannelInUse[5]){
chnSoundChannel5.stop();
};
if (arrChannelInUse[6]){
chnSoundChannel6.stop();
};
if (arrChannelInUse[7]){
chnSoundChannel7.stop();
};
var _local1:int;
while (_local1 < arrChannelInUse.length) {
arrChannelInUse[_local1] = false;
_local1++;
};
}
public function Channel1Complete(_arg1:Event):void{
arrChannelInUse[1] = false;
}
public function Channel2Complete(_arg1:Event):void{
arrChannelInUse[2] = false;
}
public function Channel3Complete(_arg1:Event):void{
arrChannelInUse[3] = false;
}
public function Channel5Complete(_arg1:Event):void{
arrChannelInUse[5] = false;
}
public function Channel6Complete(_arg1:Event):void{
arrChannelInUse[6] = false;
}
public function get soundOn():Boolean{
return (blnSoundOn);
}
public function StopSoundLoop():void{
arrChannelInUse[7] = false;
chnSoundChannel7.stop();
}
public function set soundOn(_arg1:Boolean):void{
blnSoundOn = _arg1;
if (_arg1 == false){
StopAllSounds();
};
}
public function PlaySoundLoop(_arg1:Sound, _arg2:Number=1, _arg3:Number=0):void{
if (arrChannelInUse[7] == true){
return;
};
if (_arg2 > 1){
_arg2 = 1;
} else {
if (_arg2 < 0){
_arg2 = 0;
};
};
if (_arg3 > 1){
_arg3 = 1;
} else {
if (_arg3 < -1){
_arg3 = 1;
};
};
arrChannelInUse[7] = true;
var _local4:SoundTransform = new SoundTransform();
chnSoundChannel7 = _arg1.play(0, 99999);
_local4.volume = (_arg2 * numMasterVolume);
_local4.pan = _arg3;
chnSoundChannel7.soundTransform = _local4;
}
public function PlaySound(_arg1:Sound, _arg2:Number=1, _arg3:Number=0):void{
if (blnSoundOn == false){
return;
};
var _local4 = -1;
var _local5:Number = 1;
while (_local5 < 7) {
if (arrChannelInUse[_local5] == false){
_local4 = _local5;
break;
};
_local5++;
};
if (_local4 == -1){
return;
};
if (_arg2 > 1){
_arg2 = 1;
} else {
if (_arg2 < 0){
_arg2 = 0;
};
};
if (_arg3 > 1){
_arg3 = 1;
} else {
if (_arg3 < -1){
_arg3 = 1;
};
};
arrChannelInUse[_local4] = true;
arrChannelOriginalVolume[_local4] = _arg2;
var _local6:SoundTransform = new SoundTransform();
switch (_local4){
case 1:
chnSoundChannel1 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel1.soundTransform = _local6;
chnSoundChannel1.addEventListener(Event.SOUND_COMPLETE, Channel1Complete);
break;
case 2:
chnSoundChannel2 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel2.soundTransform = _local6;
chnSoundChannel2.addEventListener(Event.SOUND_COMPLETE, Channel2Complete);
break;
case 3:
chnSoundChannel3 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel3.soundTransform = _local6;
chnSoundChannel3.addEventListener(Event.SOUND_COMPLETE, Channel3Complete);
break;
case 4:
chnSoundChannel4 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel4.soundTransform = _local6;
chnSoundChannel4.addEventListener(Event.SOUND_COMPLETE, Channel4Complete);
break;
case 5:
chnSoundChannel5 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel5.soundTransform = _local6;
chnSoundChannel5.addEventListener(Event.SOUND_COMPLETE, Channel5Complete);
break;
case 6:
chnSoundChannel6 = _arg1.play(0, 1);
_local6.volume = (_arg2 * numMasterVolume);
_local6.pan = _arg3;
chnSoundChannel6.soundTransform = _local6;
chnSoundChannel6.addEventListener(Event.SOUND_COMPLETE, Channel6Complete);
break;
};
}
public function get masterVolume():Number{
return (numMasterVolume);
}
public function Channel4Complete(_arg1:Event):void{
arrChannelInUse[4] = false;
}
public function set masterVolume(_arg1:Number):void{
var _local2:SoundTransform;
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < 0){
_arg1 = 0;
};
};
numMasterVolume = _arg1;
if (arrChannelInUse[1]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[1] * numMasterVolume);
chnSoundChannel1.soundTransform = _local2;
};
if (arrChannelInUse[2]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[2] * numMasterVolume);
chnSoundChannel2.soundTransform = _local2;
};
if (arrChannelInUse[3]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[3] * numMasterVolume);
chnSoundChannel3.soundTransform = _local2;
};
if (arrChannelInUse[4]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[4] * numMasterVolume);
chnSoundChannel4.soundTransform = _local2;
};
if (arrChannelInUse[5]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[5] * numMasterVolume);
chnSoundChannel5.soundTransform = _local2;
};
if (arrChannelInUse[6]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[6] * numMasterVolume);
chnSoundChannel6.soundTransform = _local2;
};
if (arrChannelInUse[7]){
_local2 = new SoundTransform();
_local2.volume = (arrChannelOriginalVolume[7] * numMasterVolume);
chnSoundChannel7.soundTransform = _local2;
};
}
}
}//package
Section 137
//SplashIntro (SplashIntro)
package {
public dynamic class SplashIntro extends Intro {
public function SplashIntro(){
addFrameScript(0, frame1, 222, frame223, 365, frame366);
}
function frame1(){
if (Main.gData.blnShowArmorIntro == false){
gotoAndPlay("armorSkip");
};
}
function frame366(){
stop();
IntroComplete();
}
function frame223(){
url_mode = 2;
if (Main.gData.blnShowHeroIntro == false){
gotoAndPlay("heroSkip");
};
}
}
}//package
Section 138
//StageComplete (StageComplete)
package {
import flash.display.*;
public dynamic class StageComplete extends MovieClip {
public function StageComplete(){
addFrameScript(164, frame165);
}
function frame165(){
stop();
Main(root).KillsComplete();
}
}
}//package
Section 139
//tanker_explosion (tanker_explosion)
package {
import flash.media.*;
public dynamic class tanker_explosion extends Sound {
}
}//package
Section 140
//TBars (TBars)
package {
public dynamic class TBars extends TopBars {
}
}//package
Section 141
//teleport (teleport)
package {
import flash.display.*;
public dynamic class teleport extends MovieClip {
public function teleport(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
Main(root).EffectKillSelf(MovieClip(this));
}
}
}//package
Section 142
//teleport_sound (teleport_sound)
package {
import flash.media.*;
public dynamic class teleport_sound extends Sound {
}
}//package
Section 143
//teleportAppear (teleportAppear)
package {
import flash.display.*;
public dynamic class teleportAppear extends MovieClip {
public function teleportAppear(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
Main(root).EffectKillSelf(MovieClip(this));
}
}
}//package
Section 144
//TitleMusic (TitleMusic)
package {
import flash.media.*;
public dynamic class TitleMusic extends Sound {
}
}//package
Section 145
//TopBars (TopBars)
package {
import flash.display.*;
public class TopBars extends MovieClip {
public var mult2:Number;
private var power:Number;
public var currentBaseRule:Number;
private var blnShown:Boolean;
public var powerBar:MovieClip;
public var healthLose:MovieClip;
public var healthBar:MovieClip;
private var health:Number;
public var rechargeRate:Number;
private var blnDead:Boolean;
private var fullBarWidth:Number;
public var mult:Number;
public var powerLose:MovieClip;
public function TopBars():void{
blnShown = false;
blnDead = false;
health = 100;
power = 100;
}
private function LoseBarFaders():void{
if (this.powerLose.alpha > 0){
this.powerLose.alpha = (this.powerLose.alpha - 0.05);
if (this.powerLose.alpha < 0){
this.powerLose.alpha = 0;
};
};
if (this.healthLose.alpha > 0){
this.healthLose.alpha = (this.healthLose.alpha - 0.02);
if (this.healthLose.alpha < 0){
this.healthLose.alpha = 0;
};
};
}
private function FadeMeIn():void{
if (blnShown == false){
this.alpha = (this.alpha + 0.1);
if (this.alpha >= 1){
this.alpha = 1;
blnShown = true;
};
};
}
public function SwitchRechargeRate(_arg1:Number):void{
rechargeRate = _arg1;
}
public function Setup():void{
rechargeRate = Main(root).GrabRechargeRate();
fullBarWidth = this.powerBar.width;
currentBaseRule = Main(root).GetBaseRuleStart();
mult = (fullBarWidth / currentBaseRule);
mult2 = (currentBaseRule / 100);
this.powerLose.alpha = 0;
CalculateAndAdjust();
}
public function PoweredUp():void{
power = 100;
CalculateAndAdjust();
}
public function ChangeBaseRule(_arg1:Number):void{
currentBaseRule = _arg1;
mult = (fullBarWidth / currentBaseRule);
mult2 = (currentBaseRule / 100);
}
private function RemoveBars():void{
MovieClip(root).removeChild(this);
}
public function Run():void{
FadeMeIn();
PowerRecharge();
LoseBarFaders();
}
public function RetrieveBR():Number{
return (currentBaseRule);
}
private function CalculateAndAdjust():void{
this.healthBar.width = ((health * mult) * mult2);
this.powerBar.width = ((power * mult) * mult2);
}
public function GetHOrPMult(_arg1:Number):Number{
if (_arg1 == 1){
return ((health * mult));
};
if (_arg1 == 2){
return ((power * mult));
};
return (0);
}
public function GetPower():Number{
return (power);
}
private function PowerRecharge():void{
if (power < 100){
power = (power + rechargeRate);
CalculateAndAdjust();
};
}
public function AddOrSubtract(_arg1:Number, _arg2:String):void{
if (blnDead == false){
_arg1 = (_arg1 / mult2);
mult = (fullBarWidth / currentBaseRule);
mult2 = (currentBaseRule / 100);
this.powerLose.width = ((power * mult) * mult2);
this.healthLose.width = ((health * mult) * mult2);
if (_arg2 == "power"){
power = (power + _arg1);
if (power < 0){
power = 0;
};
if (power > 100){
power = 100;
};
this.powerLose.alpha = 1;
} else {
if (_arg2 == "health"){
health = (health - ((_arg1 * Main(root).GiveMeMultiplier()) / 3));
if (health <= 0){
blnDead = true;
health = 0;
Main(root).GreenMile();
};
if (health > 100){
health = 100;
};
this.healthLose.alpha = 1;
};
};
CalculateAndAdjust();
};
}
}
}//package
Section 146
//TutVid (TutVid)
package {
import flash.display.*;
public dynamic class TutVid extends MovieClip {
public var play_btn:MovieClip;
public var back_btn:MovieClip;
public var next_btn:MovieClip;
public function TutVid(){
addFrameScript(0, frame1, 1, frame2);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 147
//UBase (UBase)
package {
public dynamic class UBase extends Base {
public function UBase(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 148
//UpgradeMenu (UpgradeMenu)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeMenu extends MovieClip {
public var bar_1:MovieClip;
public var bar_2:MovieClip;
public var bar_3:MovieClip;
public var bar_4:MovieClip;
public var bar_5:MovieClip;
public var bstage_txt:TextField;
public var up_2:MovieClip;
public var up_3:MovieClip;
public var up_4:MovieClip;
public var up_5:MovieClip;
public var up_6:MovieClip;
public var dStrength_cost:TextField;
public var description_text:TextField;
public var s1:TextField;
public var s2:TextField;
public var s4:TextField;
public var bar_6:MovieClip;
public var stage_txt:TextField;
public var menu_base:UBase;
public var class_cost:TextField;
public var level_txt:TextField;
public var points_txt:TextField;
public var continue_game:MovieClip;
public var s3:TextField;
public var specHead:TextField;
public var dArea_cost:TextField;
public var turret_cost:TextField;
public var h3:TextField;
public var armor_cost:TextField;
public var h4:TextField;
public var h1:TextField;
public var h2:TextField;
public var q_1:MovieClip;
public var q_2:MovieClip;
public var recharge_cost:TextField;
public var q_4:MovieClip;
public var upgrade_pmg:MovieClip;
public var q_6:MovieClip;
public var uHeader:TextField;
public var cash_txt:TextField;
public var q_3:MovieClip;
public var q_5:MovieClip;
public var slot1:TextField;
public var slot2:TextField;
public var slot3:TextField;
public var slot4:TextField;
public var slot5:TextField;
public var slot6:TextField;
public function UpgradeMenu(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 149
//UrlLocking (UrlLocking)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class UrlLocking {
private var stgRef:Stage;
private var arrDomains:Array;
private var blnAllowAllSites:Boolean;
private var blnLoadedXML:Boolean;
private var arrAdFreeDomains:Array;
private var lodUrlLoader:URLLoader;
private var blnShowNoAdsEver:Boolean;
private var blnExceptionFound:Boolean;
private var blnXMLException:Boolean;
public function UrlLocking(_arg1:Stage, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean=true):void{
stgRef = _arg1;
blnXMLException = _arg4;
blnAllowAllSites = _arg2;
blnShowNoAdsEver = _arg3;
arrDomains = new Array();
arrAdFreeDomains = new Array();
blnLoadedXML = false;
blnExceptionFound = false;
if (blnXMLException == true){
if (Capabilities.playerType == "External"){
SearchForXMLException();
} else {
blnLoadedXML = true;
};
};
}
public function AddAllowableDomain(_arg1:String):void{
arrDomains.push(_arg1);
}
private function XmlListener(_arg1:Event):void{
var _local2:XML = new XML(lodUrlLoader.data);
if (_local2.name() == "GAMEEXCEPTIONS"){
if (_local2.children()[0].name() == "GAMEALLOWURLACCESS"){
if (_local2.children()[0].attribute("ALLOWACCESS").toString() == "True"){
blnLoadedXML = true;
blnExceptionFound = true;
} else {
blnLoadedXML = true;
blnExceptionFound = false;
};
} else {
blnLoadedXML = true;
blnExceptionFound = false;
};
} else {
blnLoadedXML = true;
blnExceptionFound = false;
};
}
public function GetShowAds():Boolean{
if (blnShowNoAdsEver == true){
return (false);
};
var _local1:String = stgRef.loaderInfo.url;
var _local2:Number = 0;
while (_local2 < arrAdFreeDomains.length) {
if (_local1.indexOf(arrAdFreeDomains[_local2]) != -1){
return (false);
};
_local2++;
};
return (true);
}
public function GetLocked():Boolean{
var _local1:String;
var _local2:Number;
if (blnAllowAllSites == true){
return (false);
};
if ((((blnXMLException == true)) && ((blnLoadedXML == false)))){
};
if (blnExceptionFound == true){
return (false);
};
_local1 = stgRef.loaderInfo.url;
_local2 = 0;
while (_local2 < arrDomains.length) {
if (_local1.indexOf(arrDomains[_local2]) != -1){
return (false);
};
_local2++;
};
return (true);
}
public function AddAdFreeDomain(_arg1:String):void{
arrAdFreeDomains.push(_arg1);
}
private function XmlFail(_arg1:Event):void{
blnLoadedXML = true;
blnExceptionFound = false;
}
private function SearchForXMLException():void{
var _local1:URLRequest = new URLRequest("AllowGameURLAccess.xml");
lodUrlLoader = new URLLoader();
lodUrlLoader.addEventListener(Event.COMPLETE, XmlListener);
lodUrlLoader.addEventListener(IOErrorEvent.IO_ERROR, XmlFail);
lodUrlLoader.load(_local1);
}
}
}//package
Section 150
//WaveEngine (WaveEngine)
package {
public class WaveEngine {
private var arrSurvive1:Array;
private var arrSurvive2:Array;
private var arrSurvive4:Array;
private var arrSurvive6:Array;
private var arrPosTypes:Array;
private var arrSurvive3:Array;
private var arrSurvive5:Array;
private var arrSurvive8:Array;
private var arrSurvive9:Array;
private var OAFrameCount:Number;
private var arrSurvive7:Array;
private var mainRef:Main;
private var gMode:Number;
private var mult:Number;
private var arrSurvive11:Array;
private var arrSurvive13:Array;
private var arrSurvive15:Array;
private var arrSurvive16:Array;
private var arrSurvive10:Array;
private var arrSurvive18:Array;
private var arrSurvive12:Array;
private var arrSurvive14:Array;
private var arrSurvive17:Array;
private var arrWaves:Array;
private var IFrameCount:Number;
private var arrSurvive20:Array;
private var arrSurvive19:Array;
private var frameInterval:Number;
private var waveIndex:Number;
private var blnSurvivalDone:Boolean;
private var i:Number;
private var blnGo:Boolean;
public function WaveEngine(_arg1:Main):void{
mainRef = _arg1;
OAFrameCount = 0;
IFrameCount = 0;
waveIndex = 0;
mult = 1;
blnSurvivalDone = false;
frameInterval = 10;
i = 1;
blnGo = true;
arrWaves = new Array();
arrPosTypes = new Array();
SetWaves();
}
private function ClusterList(_arg1:Number=-1, _arg2:Number=-1, _arg3:Number=-1):Array{
var _local4:Array = new Array();
if (_arg1 != -1){
_local4.push(_arg1);
};
if (_arg2 != -1){
_local4.push(_arg2);
};
if (_arg3 != -1){
_local4.push(_arg3);
};
return (_local4);
}
private function RandNum(_arg1:Number, _arg2:Number):Number{
return ((Math.round((Math.random() * (_arg2 - _arg1))) + _arg1));
}
private function WavesFinished():void{
blnGo = false;
mainRef.WavesDone();
}
private function PositionList(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0):Array{
var _local7:Array = new Array();
if (_arg1 != 0){
_local7.push(_arg1);
};
if (_arg2 != 0){
_local7.push(_arg2);
};
if (_arg3 != 0){
_local7.push(_arg3);
};
if (_arg4 != 0){
_local7.push(_arg4);
};
if (_arg5 != 0){
_local7.push(_arg5);
};
if (_arg6 != 0){
_local7.push(_arg6);
};
return (_local7);
}
private function CRadiusList(_arg1:Boolean, _arg2:Number=-1, _arg3:Number=-1, _arg4:Number=-1, _arg5:Number=-1, _arg6:Number=-1, _arg7:Number=-1, _arg8:Number=-1, _arg9:Number=-1, _arg10:Number=-1, _arg11:Number=-1):Array{
var _local13:Number;
var _local12:Array = new Array();
if (_arg1 == false){
if (_arg2 != -1){
_local12.push(_arg2);
};
if (_arg3 != -1){
_local12.push(_arg3);
};
if (_arg4 != -1){
_local12.push(_arg4);
};
if (_arg5 != -1){
_local12.push(_arg5);
};
if (_arg6 != -1){
_local12.push(_arg6);
};
if (_arg7 != -1){
_local12.push(_arg7);
};
if (_arg8 != -1){
_local12.push(_arg8);
};
if (_arg9 != -1){
_local12.push(_arg9);
};
if (_arg10 != -1){
_local12.push(_arg10);
};
if (_arg11 != -1){
_local12.push(_arg11);
};
} else {
_local13 = _arg2;
while (_local13 <= _arg3) {
_local12.push(_local13);
_local13++;
};
};
return (_local12);
}
public function Stop():void{
blnGo = false;
}
private function BetweenList(_arg1:Boolean, _arg2:Number=-1, _arg3:Number=-1, _arg4:Number=-1, _arg5:Number=-1, _arg6:Number=-1, _arg7:Number=-1, _arg8:Number=-1, _arg9:Number=-1, _arg10:Number=-1, _arg11:Number=-1):Array{
var _local13:Number;
var _local12:Array = new Array();
if (_arg1 == false){
if (_arg2 != -1){
_local12.push(_arg2);
};
if (_arg3 != -1){
_local12.push(_arg3);
};
if (_arg4 != -1){
_local12.push(_arg4);
};
if (_arg5 != -1){
_local12.push(_arg5);
};
if (_arg6 != -1){
_local12.push(_arg6);
};
if (_arg7 != -1){
_local12.push(_arg7);
};
if (_arg8 != -1){
_local12.push(_arg8);
};
if (_arg9 != -1){
_local12.push(_arg9);
};
if (_arg10 != -1){
_local12.push(_arg10);
};
if (_arg11 != -1){
_local12.push(_arg11);
};
} else {
_local13 = _arg2;
while (_local13 <= _arg3) {
_local12.push(_local13);
_local13++;
};
};
return (_local12);
}
public function ReturnCurrentWave():Number{
return (waveIndex);
}
private function NextWave():void{
var _local1:Number;
if (gMode == 1){
if (waveIndex < arrWaves.length){
mainRef.PlaceEnemy(arrWaves[waveIndex].enemyType, arrWaves[waveIndex].positioningType[(RandNum(1, arrWaves[waveIndex].positioningType.length) - 1)], arrWaves[waveIndex].clusterType, arrWaves[waveIndex].clusterAmount, arrWaves[waveIndex].clusterRadius);
frameInterval = (arrWaves[waveIndex].inBetween + mainRef.ReturnFAddition());
waveIndex++;
} else {
WavesFinished();
};
} else {
_local1 = 0;
if ((((((((this[("arrSurvive" + i)].length > 0)) && (!((this[("arrSurvive" + i)] == null))))) && (!((this[("arrSurvive" + (i + 1))] == null))))) && ((blnSurvivalDone == false)))){
i = (int((waveIndex / 10)) + 1);
_local1 = RandNum(0, (this[("arrSurvive" + i)].length - 1));
if ((((((this[("arrSurvive" + i)].length > 0)) && (!((this[("arrSurvive" + i)] == null))))) && (!((this[("arrSurvive" + (i + 1))] == null))))){
mainRef.PlaceEnemy(this[("arrSurvive" + i)][_local1].enemyType, this[("arrSurvive" + i)][_local1].positioningType[RandNum(0, (this[("arrSurvive" + i)][_local1].positioningType.length - 1))], this[("arrSurvive" + i)][_local1].clusterType[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterType.length - 1))], this[("arrSurvive" + i)][_local1].clusterAmount[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterAmount.length - 1))], this[("arrSurvive" + i)][_local1].clusterRadius[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterRadius.length - 1))]);
frameInterval = (int(this[("arrSurvive" + i)][_local1].inBetween[RandNum(0, (this[("arrSurvive" + i)][_local1].inBetween.length - 1))]) + mainRef.ReturnFAddition());
};
waveIndex++;
} else {
if (blnSurvivalDone == false){
i--;
blnSurvivalDone = true;
};
_local1 = RandNum(0, (this[("arrSurvive" + i)].length - 1));
mainRef.PlaceEnemy(this[("arrSurvive" + i)][_local1].enemyType, this[("arrSurvive" + i)][_local1].positioningType[RandNum(0, (this[("arrSurvive" + i)][_local1].positioningType.length - 1))], this[("arrSurvive" + i)][_local1].clusterType[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterType.length - 1))], this[("arrSurvive" + i)][_local1].clusterAmount[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterAmount.length - 1))], this[("arrSurvive" + i)][_local1].clusterRadius[RandNum(0, (this[("arrSurvive" + i)][_local1].clusterRadius.length - 1))]);
if ((mult - 0.01) >= 0.3){
mult = (mult - 0.01);
};
frameInterval = (int(this[("arrSurvive" + i)][_local1].inBetween[RandNum(0, (this[("arrSurvive" + i)][_local1].inBetween.length - 1))]) + mainRef.ReturnFAddition());
waveIndex++;
};
};
mainRef.UpdateWaveText(waveIndex);
}
public function Reset():void{
OAFrameCount = 0;
frameInterval = 0;
}
public function Start():void{
gMode = mainRef.GAMEMODE;
blnGo = true;
}
private function CAmountList(_arg1:Boolean, _arg2:Number=-1, _arg3:Number=-1, _arg4:Number=-1, _arg5:Number=-1, _arg6:Number=-1, _arg7:Number=-1, _arg8:Number=-1, _arg9:Number=-1, _arg10:Number=-1, _arg11:Number=-1):Array{
var _local13:Number;
var _local12:Array = new Array();
if (_arg1 == false){
if (_arg2 != -1){
_local12.push(_arg2);
};
if (_arg3 != -1){
_local12.push(_arg3);
};
if (_arg4 != -1){
_local12.push(_arg4);
};
if (_arg5 != -1){
_local12.push(_arg5);
};
if (_arg6 != -1){
_local12.push(_arg6);
};
if (_arg7 != -1){
_local12.push(_arg7);
};
if (_arg8 != -1){
_local12.push(_arg8);
};
if (_arg9 != -1){
_local12.push(_arg9);
};
if (_arg10 != -1){
_local12.push(_arg10);
};
if (_arg11 != -1){
_local12.push(_arg11);
};
} else {
_local13 = _arg2;
while (_local13 <= _arg3) {
_local12.push(_local13);
_local13++;
};
};
return (_local12);
}
private function SetWaves():void{
gMode = mainRef.GAMEMODE;
var _local1:Number = 0;
var _local2:Number = 0;
if (gMode == 1){
if (mainRef.LEVEL == 1){
arrWaves.push({enemyType:1, positioningType:PositionList(4), clusterType:2, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:2, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:2, clusterAmount:8, clusterRadius:RandNum(75, 150), inBetween:150});
arrWaves.push({enemyType:1, positioningType:PositionList(4), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:1, clusterAmount:5, clusterRadius:RandNum(50, 100), inBetween:125});
arrWaves.push({enemyType:1, positioningType:PositionList(2), clusterType:2, clusterAmount:15, clusterRadius:125, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:2, clusterAmount:6, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:2, clusterAmount:2, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:2, clusterAmount:8, clusterRadius:75, inBetween:80});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:2, clusterAmount:5, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:12, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(4), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:2, clusterAmount:25, clusterRadius:200, inBetween:100});
} else {
if (mainRef.LEVEL == 2){
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:12, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(4), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:5, positioningType:PositionList(2), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:250});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(4), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(4), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:150});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(4), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(5), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(4), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:350});
arrWaves.push({enemyType:4, positioningType:PositionList(4), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:250});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:150});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:75, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:75, inBetween:50});
} else {
if (mainRef.LEVEL == 3){
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(4), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:250});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:30});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:100, inBetween:200});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:200});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:8, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:150});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:14, clusterRadius:200, inBetween:60});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:75, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
} else {
if (mainRef.LEVEL == 4){
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:250});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:8, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:150});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:300});
arrWaves.push({enemyType:6, positioningType:PositionList(2), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:250});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(2), clusterType:2, clusterAmount:10, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:1, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(2), clusterType:2, clusterAmount:10, clusterRadius:100, inBetween:250});
} else {
if (mainRef.LEVEL == 5){
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:250});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:300});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:9, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(2), clusterType:2, clusterAmount:10, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:20, clusterRadius:125, inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:250});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:9, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(2), clusterType:2, clusterAmount:10, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:20});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:350});
arrWaves.push({enemyType:5, positioningType:PositionList(2), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(3), clusterType:1, clusterAmount:0, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(4), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:200});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:350});
} else {
if (mainRef.LEVEL == 6){
arrWaves.push({enemyType:6, positioningType:PositionList(2), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:250});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:9, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:1, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(2), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(2), clusterType:2, clusterAmount:10, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(3), clusterType:1, clusterAmount:0, clusterRadius:75, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:75, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:25});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(5), clusterType:1, clusterAmount:1, clusterRadius:75, inBetween:125});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:6, clusterRadius:75, inBetween:300});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:2, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:2, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:9, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:250});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:25, clusterRadius:250, inBetween:40});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:125});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
} else {
if (mainRef.LEVEL == 7){
arrWaves.push({enemyType:7, positioningType:PositionList(3), clusterType:1, clusterAmount:8, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:200});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:150});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:7, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:7, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:75, inBetween:150});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:8, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:200});
arrWaves.push({enemyType:7, positioningType:PositionList(3), clusterType:1, clusterAmount:8, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:200});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:9, positioningType:PositionList(2), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
} else {
if (mainRef.LEVEL == 8){
arrWaves.push({enemyType:9, positioningType:PositionList(2), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:7, positioningType:PositionList(1), clusterType:1, clusterAmount:7, clusterRadius:75, inBetween:60});
arrWaves.push({enemyType:7, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:75, inBetween:150});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(3), clusterType:1, clusterAmount:8, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:200});
arrWaves.push({enemyType:6, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:7, positioningType:PositionList(5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:40});
arrWaves.push({enemyType:7, positioningType:PositionList(4), clusterType:2, clusterAmount:4, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1), clusterType:1, clusterAmount:4, clusterRadius:100, inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:150});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(4), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:9, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:9, positioningType:PositionList(5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:100});
} else {
if (mainRef.LEVEL == 9){
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:70});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:8, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:14, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:70});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:1, clusterAmount:50, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:0});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:1, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:125});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:1, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:60});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:200, inBetween:350});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:5, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:5, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:2, positioningType:PositionList(3), clusterType:2, clusterAmount:17, clusterRadius:150, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:5, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:5, clusterRadius:100, inBetween:300});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:100});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:70});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:20});
arrWaves.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:75, inBetween:300});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:60});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:60});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:100});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:250});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:250});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:70});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:24, clusterRadius:RandNum(50, 125), inBetween:350});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:0, clusterRadius:200, inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:200, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:3, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:2, clusterRadius:100, inBetween:60});
arrWaves.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:2, clusterAmount:5, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:50});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:3, clusterRadius:RandNum(50, 100), inBetween:75});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:3, clusterAmount:4, clusterRadius:RandNum(50, 100), inBetween:30});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:1, clusterAmount:2, clusterRadius:RandNum(50, 100), inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:15});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:10});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:75});
} else {
if (mainRef.LEVEL == 10){
arrWaves.push({enemyType:11, positioningType:PositionList(6), clusterType:0, clusterAmount:0, clusterRadius:0, inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:0, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:6, clusterRadius:RandNum(50, 125), inBetween:50});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:75});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:0});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:4, clusterRadius:RandNum(50, 125), inBetween:100});
arrWaves.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:150});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:0});
arrWaves.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:0, clusterAmount:0, clusterRadius:100, inBetween:350});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:1, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:2, clusterRadius:RandNum(50, 125), inBetween:25});
arrWaves.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:RandNum(1, 2), clusterAmount:3, clusterRadius:RandNum(50, 125), inBetween:100});
};
};
};
};
};
};
};
};
};
};
} else {
if (gMode == 2){
arrSurvive1 = new Array();
arrSurvive1.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 4), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 40, 100)});
arrSurvive2 = new Array();
arrSurvive2.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 40, 100)});
arrSurvive2.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 4), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 20, 70)});
arrSurvive2.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 4), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 40)});
arrSurvive2.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive3 = new Array();
arrSurvive3.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 60, 125)});
arrSurvive3.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 4), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 60)});
arrSurvive3.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive3.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 2, 7), clusterRadius:CRadiusList(true, 50, 160), inBetween:BetweenList(true, 25, 75)});
arrSurvive4 = new Array();
arrSurvive4.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 60, 125)});
arrSurvive4.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 4), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 60)});
arrSurvive4.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive4.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 160), inBetween:BetweenList(true, 25, 75)});
arrSurvive4.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 2, 6), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 125)});
arrSurvive4.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive5 = new Array();
arrSurvive5.push({enemyType:1, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(true, 60, 125)});
arrSurvive5.push({enemyType:1, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(true, 30, 60)});
arrSurvive5.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive5.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 160), inBetween:BetweenList(true, 25, 75)});
arrSurvive5.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 2, 6), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 125)});
arrSurvive5.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive5.push({enemyType:6, positioningType:PositionList(2), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 150)});
arrSurvive6 = new Array();
arrSurvive6.push({enemyType:1, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 11, 19), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(true, 60, 125)});
arrSurvive6.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive6.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 160), inBetween:BetweenList(true, 25, 75)});
arrSurvive6.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 2, 6), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 125)});
arrSurvive6.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive6.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive7 = new Array();
arrSurvive7.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive7.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 25, 75)});
arrSurvive7.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive7.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive7.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive7.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 2, 5), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive8 = new Array();
arrSurvive8.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive8.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 25, 75)});
arrSurvive8.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive8.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive8.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive8.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive9 = new Array();
arrSurvive9.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive9.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive9.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive9.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive9.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive9.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 100, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive10 = new Array();
arrSurvive10.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive10.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive10.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive10.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive10.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive10.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive11 = new Array();
arrSurvive11.push({enemyType:5, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive11.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive11.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive11.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive11.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive11.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive11.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 2, 5), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive12 = new Array();
arrSurvive12.push({enemyType:5, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 0, 2), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 0, 60)});
arrSurvive12.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 400), inBetween:BetweenList(true, 30, 125)});
arrSurvive12.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive12.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive12.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive12.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive12.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive13 = new Array();
arrSurvive13.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive13.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive13.push({enemyType:3, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 30, 90), inBetween:BetweenList(true, 25, 75)});
arrSurvive13.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive13.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive13.push({enemyType:9, positioningType:PositionList(2), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 150)});
arrSurvive14 = new Array();
arrSurvive14.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive14.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive14.push({enemyType:3, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive14.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive14.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive14.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive15 = new Array();
arrSurvive15.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive15.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive15.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive15.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive15.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive16 = new Array();
arrSurvive16.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive16.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive16.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 100)});
arrSurvive16.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive16.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive16.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive17 = new Array();
arrSurvive17.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive17.push({enemyType:6, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 150, 250), inBetween:BetweenList(false, 150)});
arrSurvive17.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive17.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive17.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 150)});
arrSurvive17.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive18 = new Array();
arrSurvive18.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive18.push({enemyType:7, positioningType:PositionList(1, 3, 4, 5), clusterType:ClusterList(1, 2), clusterAmount:CAmountList(true, 5, 9), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 25, 75)});
arrSurvive18.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 125)});
arrSurvive18.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 150)});
arrSurvive18.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(false, 100)});
arrSurvive19 = new Array();
arrSurvive19.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 125)});
arrSurvive19.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive19.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 9, 17), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 25, 125)});
arrSurvive19.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 11), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 30, 50)});
arrSurvive19.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 75, 200), inBetween:BetweenList(false, 150)});
arrSurvive19.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 75, 200), inBetween:BetweenList(false, 100)});
arrSurvive20 = new Array();
arrSurvive19.push({enemyType:5, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 1, 2), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 0, 60)});
arrSurvive19.push({enemyType:2, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 5, 14), clusterRadius:CRadiusList(true, 50, 100), inBetween:BetweenList(true, 30, 125)});
arrSurvive19.push({enemyType:4, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(0), clusterAmount:CAmountList(false, 0), clusterRadius:CRadiusList(false, 75), inBetween:BetweenList(true, 30, 60)});
arrSurvive19.push({enemyType:7, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 9, 17), clusterRadius:CRadiusList(true, 200, 300), inBetween:BetweenList(true, 25, 125)});
arrSurvive19.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 75, 200), inBetween:BetweenList(false, 100)});
arrSurvive19.push({enemyType:9, positioningType:PositionList(3, 4, 5), clusterType:ClusterList(2), clusterAmount:CAmountList(true, 0, 1), clusterRadius:CRadiusList(true, 75, 200), inBetween:BetweenList(false, 50)});
};
};
}
public function Run():void{
if (blnGo == true){
OAFrameCount++;
IFrameCount++;
if (IFrameCount >= frameInterval){
NextWave();
IFrameCount = 0;
};
};
}
}
}//package
Section 151
//WaveText (WaveText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class WaveText extends MovieClip {
public var wTXT:TextField;
}
}//package
Section 152
//Web (Web)
package {
import flash.display.*;
import flash.net.*;
import flash.external.*;
public dynamic class Web extends MovieClip {
protected static const WINDOW_OPEN_FUNCTION:String = "window.open";
public function Web():void{
}
public function GetURL(_arg1:String, _arg2:String=null):void{
var url = _arg1;
var window = _arg2;
var req:URLRequest = new URLRequest(url);
try {
navigateToURL(req, window);
} catch(e:Error) {
};
}
public function OpenWindow(_arg1:String, _arg2:String="_blank", _arg3:String=""):void{
ExternalInterface.call(WINDOW_OPEN_FUNCTION, _arg1, _arg2, _arg3);
}
}
}//package
Section 153
//WinScreen (WinScreen)
package {
import flash.display.*;
import flash.text.*;
public dynamic class WinScreen extends MovieClip {
public var score_txt:TextField;
public function WinScreen(){
addFrameScript(382, frame383, 546, frame547);
}
function frame383(){
this.score_txt.text = Main(root).FillWinScore();
}
function frame547(){
stop();
Main(root).FinishWinScreen();
}
}
}//package