home *** CD-ROM | disk | FTP | other *** search
Text File | 2008-09-02 | 61.7 KB | 1,876 lines |
- class BubbleTanksWorld
- {
- var startX;
- var startY;
- var bossX;
- var bossY;
- var arrBubblefields;
- var current;
- var x;
- var y;
- var enemyDepth;
- var previous;
- function BubbleTanksWorld()
- {
- this.startX = 10000;
- this.startY = 10000;
- this.bossX = 0;
- this.bossY = 0;
- this.arrBubblefields = new Array();
- var _loc3_ = new Bubblefield();
- if(_global.gameMode == 2)
- {
- false;
- _loc3_ = _global.arena;
- }
- _loc3_.x = this.startX;
- _loc3_.y = this.startY;
- this.arrBubblefields.push(_loc3_);
- this.current = _loc3_;
- this.x = this.startX;
- this.y = this.startY;
- this.enemyDepth = 5000;
- }
- function RequestEnemyDepth()
- {
- var _loc2_ = this.enemyDepth;
- this.enemyDepth = this.enemyDepth + 1;
- if(this.enemyDepth >= 20000)
- {
- this.enemyDepth = 5000;
- }
- return _loc2_;
- }
- function CreateBubblefield(xloc, yloc, blnForceEasy)
- {
- var _loc3_ = new Bubblefield();
- this.arrBubblefields.push(_loc3_);
- _loc3_.x = xloc;
- _loc3_.y = yloc;
- if(_global.gameMode == 2)
- {
- if(xloc == this.startX && yloc == this.startY)
- {
- this.CreateEnemies(_loc3_,xloc,yloc);
- }
- }
- else
- {
- this.CreateEnemies(_loc3_,xloc,yloc,blnForceEasy);
- }
- this.Sort();
- return _loc3_;
- }
- function MoveUp()
- {
- this.previous = this.current;
- var _loc2_ = this.Find(this.x,this.y + 1);
- if(_loc2_ == undefined)
- {
- _loc2_ = this.CreateBubblefield(this.x,this.y + 1,false);
- }
- this.current = _loc2_;
- this.y += 1;
- }
- function MoveDown()
- {
- this.previous = this.current;
- var _loc2_ = this.Find(this.x,this.y - 1);
- if(_loc2_ == undefined)
- {
- _loc2_ = this.CreateBubblefield(this.x,this.y - 1,false);
- }
- this.current = _loc2_;
- this.y += -1;
- }
- function MoveLeft()
- {
- this.previous = this.current;
- var _loc2_ = this.Find(this.x - 1,this.y);
- if(_loc2_ == undefined)
- {
- _loc2_ = this.CreateBubblefield(this.x - 1,this.y,false);
- }
- this.current = _loc2_;
- this.x += -1;
- }
- function MoveRight()
- {
- this.previous = this.current;
- var _loc2_ = this.Find(this.x + 1,this.y);
- if(_loc2_ == undefined)
- {
- _loc2_ = this.CreateBubblefield(this.x + 1,this.y,false);
- }
- this.current = _loc2_;
- this.x += 1;
- }
- function MoveTo(xLoc, yLoc)
- {
- this.previous = this.current;
- var _loc2_ = this.Find(xLoc,yLoc);
- if(_loc2_ == undefined)
- {
- _loc2_ = this.CreateBubblefield(xLoc,yLoc,false);
- }
- this.current = _loc2_;
- this.x = xLoc;
- this.y = yLoc;
- }
- function GetRight(blnCreateIfDNE)
- {
- var _loc2_ = this.Find(this.x + 1,this.y);
- if(_loc2_ == undefined)
- {
- if(blnCreateIfDNE == true)
- {
- _loc2_ = this.CreateBubblefield(this.x + 1,this.y,blnCreateIfDNE);
- }
- }
- return _loc2_;
- }
- function GetLeft(blnCreateIfDNE)
- {
- var _loc2_ = this.Find(this.x - 1,this.y);
- if(_loc2_ == undefined)
- {
- if(blnCreateIfDNE == true)
- {
- _loc2_ = this.CreateBubblefield(this.x - 1,this.y,blnCreateIfDNE);
- }
- }
- return _loc2_;
- }
- function GetDown(blnCreateIfDNE)
- {
- var _loc2_ = this.Find(this.x,this.y - 1);
- if(_loc2_ == undefined)
- {
- if(blnCreateIfDNE == true)
- {
- _loc2_ = this.CreateBubblefield(this.x,this.y - 1,blnCreateIfDNE);
- }
- }
- return _loc2_;
- }
- function GetUp(blnCreateIfDNE)
- {
- var _loc2_ = this.Find(this.x,this.y + 1);
- if(_loc2_ == undefined)
- {
- if(blnCreateIfDNE == true)
- {
- _loc2_ = this.CreateBubblefield(this.x,this.y + 1,blnCreateIfDNE);
- }
- }
- return _loc2_;
- }
- function Sort()
- {
- this.arrBubblefields.sortOn(["x","y"],Array.NUMERIC);
- }
- function Find(xLoc, yLoc)
- {
- var _loc3_ = undefined;
- var _loc2_ = this.arrBubblefields.bSearch({x:xLoc,y:yLoc},Array.NUMERIC);
- if(_loc2_ != -1)
- {
- _loc3_ = this.arrBubblefields[_loc2_];
- }
- return _loc3_;
- }
- function PrintBubblefieldCoordsList()
- {
- var _loc3_ = "";
- var _loc2_ = 0;
- while(_loc2_ < this.arrBubblefields.length)
- {
- _loc3_ += "(" + this.arrBubblefields[_loc2_].x + ", " + this.arrBubblefields[_loc2_].y + ") ";
- _loc2_ = _loc2_ + 1;
- }
- }
- function CreateEnemies(tempBubblefield, xloc, yloc, blnEasyMode)
- {
- var _loc21_ = false;
- var _loc3_ = undefined;
- var _loc19_ = xloc - this.startX;
- var _loc18_ = yloc - this.startY;
- var _loc14_ = Math.round(Math.sqrt(_loc19_ * _loc19_ + _loc18_ * _loc18_));
- if(blnEasyMode == true)
- {
- _loc3_ = this.GetEnemyOptionsEasy(_root.game.GetMaxLife());
- }
- else if(_root.game.IsBossNeeded(xloc,yloc) == true)
- {
- this.bossX = xloc;
- this.bossY = yloc;
- _loc21_ = true;
- tempBubblefield.blnBoss = true;
- }
- else
- {
- var _loc20_ = 0;
- if(_root.game.IsHelpNeeded() == true)
- {
- _loc20_ = this.RandNum(0,100);
- }
- if(_loc20_ > 50)
- {
- _loc3_ = this.GetEnemyOptionsHelp(_loc14_);
- }
- else if(_loc14_ < 10)
- {
- _loc3_ = this.GetEnemyOptionsClose(_loc14_);
- }
- else if(_loc14_ >= 10 && _loc14_ < 20)
- {
- _loc3_ = this.GetEnemyOptionsMiddle(_loc14_);
- }
- else if(_loc14_ >= 20 && _loc14_ < 30)
- {
- _loc3_ = this.GetEnemyOptionsFar(_loc14_);
- }
- else if(_loc14_ >= 30)
- {
- _loc3_ = this.GetEnemyOptionsVeryFar(_loc14_);
- }
- }
- if(_loc21_ == false)
- {
- var _loc9_ = 0;
- var _loc11_ = 0;
- var _loc16_ = 0;
- var _loc13_ = 0;
- var _loc6_ = 0;
- while(_loc6_ < _loc3_.length)
- {
- _loc16_ += _loc3_[_loc6_].chance;
- _loc6_ = _loc6_ + 1;
- }
- _loc13_ = Math.round(Math.random() * _loc16_);
- _loc6_ = 0;
- while(_loc6_ < _loc3_.length)
- {
- _loc11_ = _loc9_ + _loc3_[_loc6_].chance;
- _loc3_[_loc6_].minChance = _loc9_;
- _loc3_[_loc6_].maxChance = _loc11_;
- _loc9_ = _loc11_;
- _loc6_ = _loc6_ + 1;
- }
- var _loc7_ = -1;
- _loc6_ = 0;
- while(_loc6_ < _loc3_.length)
- {
- if(_loc13_ >= _loc3_[_loc6_].minChance && _loc13_ < _loc3_[_loc6_].maxChance)
- {
- _loc7_ = _loc6_;
- break;
- }
- _loc6_ = _loc6_ + 1;
- }
- if(_loc7_ == -1)
- {
- _loc7_ = _loc3_.length - 1;
- }
- _loc3_[_loc7_].Begin();
- var _loc10_ = 0;
- var _loc12_ = "";
- var _loc17_ = _loc3_[_loc7_].GetNumInstructions();
- var _loc8_ = 0;
- while(_loc8_ < _loc17_)
- {
- _loc10_ = _loc3_[_loc7_].enemyNum;
- _loc12_ = _loc3_[_loc7_].enemyType;
- var _loc5_ = 0;
- while(_loc5_ < _loc10_)
- {
- var _loc4_ = new Vector();
- _loc4_._x = Math.round(Math.random() * 500) - 250;
- _loc4_._y = Math.round(Math.random() * 400) - 200;
- tempBubblefield.AddUnit("enemy_" + this.enemyDepth,_loc12_,_loc4_,this.enemyDepth);
- this.enemyDepth = this.enemyDepth + 1;
- if(this.enemyDepth >= 20000)
- {
- this.enemyDepth = 5000;
- }
- _loc5_ = _loc5_ + 1;
- }
- _loc3_[_loc7_].Next();
- _loc8_ = _loc8_ + 1;
- }
- }
- false;
- }
- function GetEnemyOptionsHelp(worldDistance)
- {
- var _loc3_ = new Array();
- if(worldDistance < 7)
- {
- var _loc2_ = undefined;
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc2_.AddInstruction("Enemy_1",2,3);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 7 && worldDistance < 20)
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc2_.AddInstruction("Enemy_1",3,5);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 20)
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_92",1,2);
- _loc2_.AddInstruction("Enemy_1",2,4);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(50);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc2_.AddInstruction("Enemy_10",1,1);
- _loc3_.push(_loc2_);
- }
- return _loc3_;
- }
- function GetEnemyOptionsEasy(maxLife)
- {
- var _loc3_ = new Array();
- if(maxLife < 75)
- {
- var _loc2_ = undefined;
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",2,3);
- _loc2_.AddInstruction("Enemy_1",3,4);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- }
- else if(maxLife >= 75 && maxLife < 200)
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",2,3);
- _loc2_.AddInstruction("Enemy_1",5,6);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- }
- else if(maxLife >= 200 && maxLife < 400)
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",2,3);
- _loc2_.AddInstruction("Enemy_92",2,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- }
- else if(maxLife >= 400 && maxLife < 800)
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",2,3);
- _loc2_.AddInstruction("Enemy_92",4,5);
- _loc2_.AddInstruction("Enemy_1",2,3);
- _loc3_.push(_loc2_);
- }
- else
- {
- _loc2_ = new WorldInstruction(50);
- _loc2_.AddInstruction("Enemy_17",2,3);
- _loc2_.AddInstruction("Enemy_92",6,8);
- _loc2_.AddInstruction("Enemy_1",2,3);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(50);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc2_.AddInstruction("Enemy_92",5,7);
- _loc2_.AddInstruction("Enemy_10",1,1);
- _loc3_.push(_loc2_);
- }
- return _loc3_;
- }
- function GetEnemyOptionsClose(worldDistance)
- {
- var _loc3_ = new Array();
- if(worldDistance < 2)
- {
- var _loc2_ = undefined;
- _loc2_ = new WorldInstruction(100);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc2_.AddInstruction("Enemy_1",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 2 && worldDistance < 4)
- {
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(60);
- _loc2_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_1",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc2_.AddInstruction("Enemy_76",1,3);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 4 && worldDistance < 6)
- {
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,4);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,4);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,4);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_3",1,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",2,3);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_3",1,2);
- _loc2_.AddInstruction("Enemy_41",1,1);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_1",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_86",1,1);
- _loc2_.AddInstruction("Enemy_1",0,3);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 6 && worldDistance < 8)
- {
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",2,3);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",2,3);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",3,4);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(30);
- _loc2_.AddInstruction("Enemy_3",1,1);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",2,3);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",2,3);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",2,3);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_3",2,2);
- _loc2_.AddInstruction("Enemy_9",1,1);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_1",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc2_.AddInstruction("Enemy_76",1,3);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_R1",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_86",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 8)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_17",1,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",3,4);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",3,4);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",3,4);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(40);
- _loc2_.AddInstruction("Enemy_76",0,2);
- _loc2_.AddInstruction("Enemy_3",0,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",2,3);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",2,3);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",2,3);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_95",12,16);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_80",1,3);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,2);
- }
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_1",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc2_.AddInstruction("Enemy_76",1,3);
- _loc3_.push(_loc2_);
- }
- return _loc3_;
- }
- function GetEnemyOptionsMiddle(worldDistance)
- {
- var _loc3_ = new Array();
- if(worldDistance < 12)
- {
- var _loc2_ = undefined;
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",2,3);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(25);
- _loc2_.AddInstruction("Enemy_5",2,3);
- _loc2_.AddInstruction("Enemy_3",1,1);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",0,1);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",0,1);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",0,1);
- }
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_95",9,12);
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_76",2,2);
- _loc2_.AddInstruction("Enemy_80",3,4);
- _loc2_.AddInstruction("Enemy_1",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_12",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(15);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_42",1,1);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_43",1,1);
- }
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",2,4);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",2,4);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",3,4);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_90",1,1);
- _loc2_.AddInstruction("Enemy_76",0,2);
- _loc2_.AddInstruction("Enemy_1",1,5);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(3);
- _loc2_.AddInstruction("Enemy_97",1,1);
- _loc2_.AddInstruction("Enemy_1",1,5);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 12 && worldDistance < 14)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",3,4);
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",2,3);
- _loc2_.AddInstruction("Enemy_6",2,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",1,3);
- _loc2_.AddInstruction("Enemy_6",1,2);
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_5",2,3);
- _loc2_.AddInstruction("Enemy_6",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_5",2,3);
- _loc2_.AddInstruction("Enemy_48",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_12",1,1);
- _loc2_.AddInstruction("Enemy_6",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(15);
- _loc2_.AddInstruction("Enemy_13",2,4);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_42",0,1);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_43",0,1);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_90",1,1);
- _loc2_.AddInstruction("Enemy_76",0,1);
- _loc2_.AddInstruction("Enemy_1",1,5);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_97",1,1);
- _loc2_.AddInstruction("Enemy_1",1,5);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 14 && worldDistance < 16)
- {
- _loc2_ = new WorldInstruction(30);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",2,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",2,2);
- }
- _loc2_.AddInstruction("Enemy_6",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_6",1,2);
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_11",1,2);
- _loc2_.AddInstruction("Enemy_48",1,1);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,1);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,1);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,1);
- }
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",3,4);
- _loc2_.AddInstruction("Enemy_48",2,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",2,4);
- _loc2_.AddInstruction("Enemy_9",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_9",2,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_12",1,1);
- _loc2_.AddInstruction("Enemy_6",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(5);
- _loc2_.AddInstruction("Enemy_13",3,4);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_42",0,1);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_43",0,1);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 16 && worldDistance < 18)
- {
- _loc2_ = new WorldInstruction(20);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",2,4);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",2,4);
- }
- _loc2_.AddInstruction("Enemy_6",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(30);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,3);
- }
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_88",1,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_89",1,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_65",1,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_11",2,3);
- _loc2_.AddInstruction("Enemy_48",1,1);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,1);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,1);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,1);
- }
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_11",1,1);
- _loc2_.AddInstruction("Enemy_48",2,3);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",1,1);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",1,1);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",1,1);
- }
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_5",3,4);
- _loc2_.AddInstruction("Enemy_48",2,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_6",2,3);
- _loc2_.AddInstruction("Enemy_9",1,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_9",2,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_87",12,16);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_90",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_86",1,1);
- _loc2_.AddInstruction("Enemy_76",1,3);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc2_.AddInstruction("Enemy_17",0,1);
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 18)
- {
- _loc2_ = new WorldInstruction(30);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_63",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_83",1,2);
- }
- _loc2_.AddInstruction("Enemy_11",1,1);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- if(_root.game._enemySet2 == 2)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_82",1,2);
- _loc2_.AddInstruction("Enemy_93",3,4);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc2_.AddInstruction("Enemy_17",0,1);
- _loc3_.push(_loc2_);
- }
- if(_root.game._enemySet2 == 3)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_85",1,2);
- _loc2_.AddInstruction("Enemy_94",3,4);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc2_.AddInstruction("Enemy_17",0,1);
- _loc3_.push(_loc2_);
- }
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_9",0,2);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_88",2,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_89",2,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_65",2,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_12",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",2,3);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_87",12,16);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_90",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_86",1,1);
- _loc2_.AddInstruction("Enemy_76",1,3);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc2_.AddInstruction("Enemy_17",0,1);
- _loc3_.push(_loc2_);
- }
- return _loc3_;
- }
- function GetEnemyOptionsFar(worldDistance)
- {
- var _loc3_ = new Array();
- if(worldDistance < 25)
- {
- var _loc2_ = undefined;
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_96",2,4);
- _loc2_.AddInstruction("Enemy_76",1,2);
- _loc2_.AddInstruction("Enemy_1",1,2);
- _loc2_.AddInstruction("Enemy_17",0,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_96",1,3);
- _loc2_.AddInstruction("Enemy_44",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_79",1,2);
- _loc2_.AddInstruction("Enemy_96",2,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",2,3);
- }
- _loc2_.AddInstruction("Enemy_74",1,1);
- _loc2_.AddInstruction("Enemy_11",0,1);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_91",1,2);
- }
- _loc2_.AddInstruction("Enemy_74",1,1);
- _loc2_.AddInstruction("Enemy_11",1,1);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_46",2,2);
- _loc2_.AddInstruction("Enemy_79",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- if(_root.game._enemySet2 == 3)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_85",2,3);
- _loc2_.AddInstruction("Enemy_80",1,2);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- }
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_10",1,1);
- _loc2_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_90",1,1);
- _loc2_.AddInstruction("Enemy_96",2,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_14",1,1);
- _loc2_.AddInstruction("Enemy_96",0,1);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,3);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",5,6);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",5,6);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",5,6);
- }
- _loc2_.AddInstruction("Enemy_12",1,1);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_88",2,3);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_89",2,3);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_65",2,3);
- }
- _loc2_.AddInstruction("Enemy_9",0,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- }
- else if(worldDistance >= 25)
- {
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_96",2,3);
- _loc2_.AddInstruction("Enemy_11",2,2);
- _loc2_.AddInstruction("Enemy_9",0,2);
- _loc2_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_96",2,3);
- _loc2_.AddInstruction("Enemy_45",1,1);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_79",2,3);
- _loc2_.AddInstruction("Enemy_6",1,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_47",1,1);
- if(_root.game._enemySet == 1)
- {
- _loc2_.AddInstruction("Enemy_2",2,4);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc2_.AddInstruction("Enemy_93",2,4);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc2_.AddInstruction("Enemy_94",2,4);
- }
- _loc2_.AddInstruction("Enemy_11",0,1);
- _loc2_.AddInstruction("Enemy_17",0,2);
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(20);
- _loc2_.AddInstruction("Enemy_47",1,1);
- _loc2_.AddInstruction("Enemy_79",2,2);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_10",1,1);
- _loc2_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_90",1,1);
- _loc2_.AddInstruction("Enemy_96",3,4);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",1,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_14",1,1);
- _loc2_.AddInstruction("Enemy_96",2,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc2_.AddInstruction("Enemy_4",2,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc2_.AddInstruction("Enemy_18",2,2);
- }
- _loc3_.push(_loc2_);
- _loc2_ = new WorldInstruction(10);
- _loc2_.AddInstruction("Enemy_86",1,1);
- _loc2_.AddInstruction("Enemy_76",2,3);
- _loc2_.AddInstruction("Enemy_1",0,2);
- _loc3_.push(_loc2_);
- }
- return _loc3_;
- }
- function GetEnemyOptionsVeryFar(worldDistance)
- {
- var _loc5_ = new Array();
- if(worldDistance < 35)
- {
- var _loc3_ = undefined;
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_75",1,2);
- _loc3_.AddInstruction("Enemy_95",2,3);
- _loc3_.AddInstruction("Enemy_9",0,1);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_75",1,2);
- _loc3_.AddInstruction("Enemy_45",1,1);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_98",2,3);
- _loc3_.AddInstruction("Enemy_96",1,2);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_98",1,3);
- if(_root.game._enemySet == 1)
- {
- _loc3_.AddInstruction("Enemy_2",3,5);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc3_.AddInstruction("Enemy_93",3,5);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc3_.AddInstruction("Enemy_94",3,5);
- }
- _loc3_.AddInstruction("Enemy_11",0,1);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_47",0,1);
- _loc3_.AddInstruction("Enemy_99",1,1);
- _loc3_.AddInstruction("Enemy_96",1,3);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",0,2);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_92",1,1);
- _loc3_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",2,3);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_97",1,1);
- _loc3_.AddInstruction("Enemy_96",1,2);
- _loc3_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",2,3);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_90",1,1);
- _loc3_.AddInstruction("Enemy_75",2,2);
- _loc3_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",0,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",0,3);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_86",1,1);
- _loc3_.AddInstruction("Enemy_99",1,1);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc5_.push(_loc3_);
- }
- else if(worldDistance >= 35)
- {
- _loc3_ = new WorldInstruction(15);
- var _loc4_ = 0;
- while(_loc4_ < 3)
- {
- var _loc6_ = this.RandNum(1,15);
- switch(_loc6_)
- {
- case 1:
- _loc3_.AddInstruction("Enemy_99",1,1);
- break;
- case 2:
- _loc3_.AddInstruction("Enemy_75",1,2);
- break;
- case 3:
- _loc3_.AddInstruction("Enemy_98",1,2);
- break;
- case 4:
- _loc3_.AddInstruction("Enemy_97",1,1);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",1,4);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",1,4);
- }
- _loc4_ = _loc4_ + 1;
- break;
- case 5:
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",1,4);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",1,4);
- }
- break;
- case 6:
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_7",1,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_91",1,2);
- }
- break;
- case 7:
- _loc3_.AddInstruction("Enemy_9",1,2);
- break;
- case 8:
- _loc3_.AddInstruction("Enemy_1",1,2);
- break;
- case 9:
- _loc3_.AddInstruction("Enemy_99",1,1);
- break;
- case 10:
- _loc3_.AddInstruction("Enemy_96",1,2);
- break;
- case 11:
- _loc3_.AddInstruction("Enemy_76",1,2);
- break;
- case 12:
- if(_root.game._enemySet == 1)
- {
- _loc3_.AddInstruction("Enemy_88",1,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc3_.AddInstruction("Enemy_89",1,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc3_.AddInstruction("Enemy_65",1,2);
- }
- break;
- case 13:
- _loc3_.AddInstruction("Enemy_80",1,2);
- break;
- case 14:
- _loc3_.AddInstruction("Enemy_95",2,4);
- break;
- case 15:
- _loc4_ = _loc4_ + 1;
- }
- _loc4_ = _loc4_ + 1;
- }
- _loc3_.AddInstruction("Enemy_1",0,3);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_75",2,2);
- _loc3_.AddInstruction("Enemy_95",3,6);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_75",1,2);
- _loc3_.AddInstruction("Enemy_98",2,2);
- _loc3_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",0,2);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_98",1,3);
- _loc3_.AddInstruction("Enemy_76",1,3);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_99",1,2);
- _loc3_.AddInstruction("Enemy_96",2,3);
- _loc3_.AddInstruction("Enemy_1",1,3);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_99",2,2);
- _loc3_.AddInstruction("Enemy_5",1,2);
- _loc3_.AddInstruction("Enemy_76",0,1);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_79",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_7",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_91",2,3);
- }
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",0,2);
- }
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_12",1,2);
- _loc3_.AddInstruction("Enemy_96",2,4);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(3);
- _loc3_.AddInstruction("Enemy_45",1,2);
- _loc3_.AddInstruction("Enemy_96",1,3);
- _loc3_.AddInstruction("Enemy_17",1,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(3);
- _loc3_.AddInstruction("Enemy_45",1,2);
- _loc3_.AddInstruction("Enemy_75",1,1);
- _loc3_.AddInstruction("Enemy_17",1,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_44",1,2);
- _loc3_.AddInstruction("Enemy_98",1,2);
- _loc3_.AddInstruction("Enemy_96",0,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(5);
- _loc3_.AddInstruction("Enemy_92",1,2);
- _loc3_.AddInstruction("Enemy_3",1,2);
- _loc3_.AddInstruction("Enemy_96",0,2);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(3);
- _loc3_.AddInstruction("Enemy_97",1,1);
- _loc3_.AddInstruction("Enemy_3",0,2);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(3);
- _loc3_.AddInstruction("Enemy_97",1,1);
- _loc3_.AddInstruction("Enemy_76",0,2);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc5_.push(_loc3_);
- if(_root.game._enemySet2 == 2)
- {
- _loc3_ = new WorldInstruction(15);
- _loc3_.AddInstruction("Enemy_82",1,2);
- _loc3_.AddInstruction("Enemy_93",3,4);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc3_.AddInstruction("Enemy_17",0,1);
- _loc5_.push(_loc3_);
- }
- if(_root.game._enemySet2 == 3)
- {
- _loc3_ = new WorldInstruction(15);
- _loc3_.AddInstruction("Enemy_85",1,2);
- _loc3_.AddInstruction("Enemy_94",3,4);
- _loc3_.AddInstruction("Enemy_1",1,2);
- _loc3_.AddInstruction("Enemy_17",0,1);
- _loc5_.push(_loc3_);
- }
- _loc3_ = new WorldInstruction(20);
- _loc3_.AddInstruction("Enemy_9",0,2);
- if(_root.game._enemySet == 1)
- {
- _loc3_.AddInstruction("Enemy_88",2,2);
- }
- else if(_root.game._enemySet == 2)
- {
- _loc3_.AddInstruction("Enemy_89",2,2);
- }
- else if(_root.game._enemySet == 3)
- {
- _loc3_.AddInstruction("Enemy_65",2,2);
- }
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc3_.AddInstruction("Enemy_17",1,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_14",1,1);
- _loc3_.AddInstruction("Enemy_96",0,1);
- _loc3_.AddInstruction("Enemy_1",0,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",2,3);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",2,3);
- }
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_90",1,1);
- _loc3_.AddInstruction("Enemy_76",0,2);
- _loc3_.AddInstruction("Enemy_1",1,5);
- _loc3_.AddInstruction("Enemy_17",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(10);
- _loc3_.AddInstruction("Enemy_86",1,1);
- _loc3_.AddInstruction("Enemy_99",1,1);
- _loc3_.AddInstruction("Enemy_1",0,2);
- _loc5_.push(_loc3_);
- _loc3_ = new WorldInstruction(2);
- _loc3_.AddInstruction("Enemy_R1",1,1);
- _loc3_.AddInstruction("Enemy_1",1,2);
- if(_root.game._enemySet2 == 1)
- {
- _loc3_.AddInstruction("Enemy_4",0,2);
- }
- else if(_root.game._enemySet2 == 2)
- {
- _loc3_.AddInstruction("Enemy_18",0,2);
- }
- _loc5_.push(_loc3_);
- }
- return _loc5_;
- }
- function RandNum(minVal, maxVal)
- {
- return Math.round(Math.random() * (maxVal - minVal)) + minVal;
- }
- }
-